This project contains a prototypical implementation of our framework to enable smart contract interoperability across different blockchains. The framework allows smart contracts residing on two different EVM-based blockchains to call each other. The framework provides the opportunity to create stub contracts which serve as an abstraction layer to hide the background details of cross-blockchain communication. For that, the stub contracts use blockchain relays to transfer the information to another blockchain. A client contract can conveniently call a stub contract to call a smart contract on another blockchain, as the transaction sender facilitates the communication between the stubs by forwarding the necessary information with the respective proof data.
In ./ccsc_contracts/contracts/ccsc
, you can find the general client and server stub, which can be used to create the stubs for specific smart contracts. We used it for a simple storage contract, which can be found in ./ccsc_contracts/contracts/examples/
. Further, we added a simple cross-blockchain caller in ccsc_go
which executes some cross-blockchain calls with the example contracts and captures different metrics. To install the example, follow these steps:
- Deploy ETH-Relay and BSC-Relay.
- Change into the contract directory:
cd ccsc_contracts/
- Install all dependencies:
npm install
- Change the network configuration in
hardhat.config.js
- Update the addresses for ETH-Relay and BSC-Relay in
./scripts/deploy.js
- Run
hardhat run ./scripts/deploy.js
to deploy the example on the configured networks
- Change into the contract directory:
cd ccsc_go/
- Build the example caller with
go build -o example_caller ./cmd/main.go
- Adapt the configuration in
./configs/config.json
- Run the example caller with
./example_caller
This is a research prototype. We welcome anyone to contribute. File a bug report or submit feature requests through the issue tracker. If you want to contribute feel free to submit a pull request.
The financial support by the Austrian Federal Ministry for Digital and Economic Affairs, the National Foundation for Research, Technology and Development as well as the Christian Doppler Research Association is gratefully acknowledged.
This project is licensed under the MIT License.