Ethereum contracts for the Syscoin <=> Ethereum bridge.
If you are new to the Syscoin <=> Ethereum bridge, please check the docs repository first.
- SyscoinSuperblocks contract
- Keeps a copy of the Syscoin Superblockchain
- Informs SyscoinToken contract when a Syscoin transaction locked or unlocked funds.
- It's kind of a Syscoin version of BtcRelay but using Superblocks instead of blocks.
- SyscoinToken contract
- An ERC20 contract where 1 token is worth 1 Syscoin.
- Tokens are minted when coins are locked on the Syscoin blockchain.
- Tokens are destroyed when coins should go back to the Syscoin blockchain.
- SyscoinClaimManager contract
- Manages the interactive (challenge/response) validation of Superblocks.
- SyscoinMessageLibrary
- Library for parsing/working with Syscoin blocks, txs and merkle trees
-
Install prerequisites
npm install -g truffle@5.0.24
- ganache-cli v6.4.2 or above.
npm install -g ganache-cli
-
Clone this repo.
-
Install npm dependencies.
- cd to the directory where the repo is cloned.
npm install
-
Compile contracts
# compile contracts truffle compile --all
-
Run tests:
# first start ganache-cli - and do this again once your gas ran out ganache-cli --gasLimit 4000000000000 # run tests truffle test
To deploy the contracts
- A Rinkeby/Mainnet client running with rpc enabled
- Run
./scripts/exportAndInit.sh
MIT License
Copyright (c) 2019 Blockchain Foundry Inc
License