7.1 Interchain Services based on Poly Enterprise

7.1.1 Overview

A complete cross-chain transaction requires application contracts for multiple chains. For example, there is an application contract on the Ethereum Ropsten and a FISCO application contract on the BSN. These two contracts can interact across chains through the cross-chain protocol to ensure the correctness of the information. The cross-chain contract includes a management contract and an application contract. The management contract implements the core logic of the cross-chain protocol, developed by the BSN development team and is deployed in each chain; the application contract needs to be implemented by blockchain application publishers according to the cross-chain protocol and deployed in the blockchain network.

Management contracts include the following implementations.

1. ETH and FISCO

  • EthCrossChainManager: contains logic of management.
  • EthCrossChainData: used to save and manipulate data.
  • EthCrossChainManagerProxy: used to implement logical contract upgrades.

2. Neo

  • CCMC: contains the logic of management.

3. Fabric

  • CCMC: contains the logic of management.

4. Cross-chain management contract address

  • The following table shows the framework names, chain IDs, and cross-chain contract names or addresses for Poly Enterprise-based cross-chain services.
Testnet Framework Chain ID Cross-chain contract names/addresses Application Example Contract
China Fabric 8 ccm myhellopoly
China FISCO 6 0x315bF6da1f040355d283 CCc41f04e8933Ff98f01 0x69d0ba0866ee3d9abd19b 06ad8ac6f49023e19b8
International Fabric 9 ccm myhellopoly
International FISCO 7 0x327A05F0f7F575206BE1 0AcB80D98845C1c0033e 0xbc393345ab22eea8f16ac 98dd430657903e19e73
Ropsten Ethereum 2 0xF6993b7d73B282742068 9Dbc0b3068D24E6e467F 0x0b89e4f2103c4700de5ae 96f370f3708c5572211
Testnet Neo 4 0x10b6edbb6e44188d0ff3 9065442081b13bbd109b 0x0ea9e760ca350d950d01b 32c35127b3f7c0c18b5

The application cross-chain contains the following functions:

1. Outbound: The source chain's application contract initiates a cross-chain transaction request and transfers this request from the source chain to the target chain. The user can call a self-defined method in the source chain's application contract which calls the ‘crossChain’ method of the management contract. This will send the cross-chain data through events.

2. Inbound: The target chain application contract receives the cross-chain transaction request. This request information sent from the source chain is passed to the target chain application contract. The cross-chain management contract receives and verifies the cross-chain information. The cross-chain protocol requires the target chain application contract and function name to be included in the cross-chain information. Then the management contract invokes the specified method for the specified contract address and passes the information to the target chain application contract.

© 2019-2020 Red Date (Hong Kong) Technology Limited. all right reserved,powered by GitbookFile Modify: 2020-11-24 16:39:23

results matching ""

    No results matching ""

    results matching ""

      No results matching ""