This is an example application for an atomic swap through Cross-chain transaction using Cross Framework between Hyperledger Fabric and Tendermint.
As Atomic commit protocol, Simple commit protocol is used.
The below command installs Relayer, Fabric tools, Fabric CLI, Tendermint CLI
# install fabric tools and build Fabric/Tendermint CLI, Relayer
make -C demo build -j5| Chain | Node | Role | Application |
|---|---|---|---|
| Tendermint | 1 Node | Coordinator/Participant | ERC-20 based on CDT Module |
| Fabric | 1 Orderer, 3 Peers | Participant | ERC-20 based on CDT Module |
- Refer to CDT
- cmds
- alpha ... Tendermint CLI
- beta ... Fabric CLI
- contracts
- erc20 ... contract modules for Tendermint/Fabric
- demo ... demo environment including
- chains
- fabric ... fabric-related files including docker-compose.yaml for network
- chaincode
- fabibc ... fabric chaincode application
- chaincode
- tendermint ... tendermint simapp working as CLI and tendermint application including docker-compose.yaml for network
- fabric ... fabric-related files including docker-compose.yaml for network
- configs ... config files for alpha cli, beta cli, fabric app, relayer
- scripts ... shell scripts for alpha cli, beta cli, relayer, scenario
- chains
- relayer ... Relayer CLI
- Relayer
- relaying packets between different chains
- Fabric tools
- genesis block generation
- configuration of a channel
- cryptographic generation
- deployment of chaincode
- Fabric CLI
- creating tx, submitting tx, querying tx on Fabric node
- Tendermint CLI
- creating tx, submitting tx, querying tx on Tendermint node
# prepare fabric network and tendermint network using docker containers
make -C demo networkThis demo is primarily developed and validated on Go 1.18, and is supported on Go 1.16–1.18.
Go 1.19 and later may exhibit unstable behavior due to dependency and runtime differences.
To ensure a reproducible setup, we strongly recommend Go 1.18.
# initialize relayer, fabric CLI, tendermint CLI, and run handshake for IBC between fabric and tendermint by creating transactions.
make -C demo run-init
# run ./scripts/scenario/sample-scenario. See the `About sample-scenario` section for more detail.
make -C demo run# down related containers, remove volumes
make -C demo network-down
# remove any generated data
make -C demo cleanmake -C demo network-down
make -C demo clean
make -C demo networkAdditional information can be found below.