git clone https://github.com/ethereum/go-ethereum
cd go-ethereum
go build cmd/geth
go build cmd/ethkey
Example genesis
{
"config": {
"chainId": 4224,
"homesteadBlock": 0,
"eip150Block": 0,
"eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"eip155Block": 0,
"eip158Block": 0,
"byzantiumBlock": 0,
"constantinopleBlock": 0,
"petersburgBlock": 0,
"istanbulBlock": 0,
"muirGlacierBlock": 0,
"grayGlacierBlock": 0,
"berlinBlock": 0,
"londonBlock": 0,
"ethash": {}
},
"nonce": "0x0",
"timestamp": "0x615d5464",
"extraData": "0x0000000000000000000000000000000000000000000000000000000000000000",
"gasLimit": "0xffffffffffff",
"difficulty": "0x40000",
"mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x0000000000000000000000000000000000000000",
"alloc": {
"90F8bf6A479f320ead074411a4B0e7944Ea8c9C1": {
"balance": "0x10000000000000000000000"
}
},
"number": "0x0",
"gasUsed": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"baseFeePerGas": null
}
Specify your accounts in alloc
field
Save genesis to soranet.json
Init chain
./geth --datadir data init soranet.json
Create account
./geth --datadir data account new
Run node
./geth --networkid 4224 \
--mine --miner.threads 1 \
--datadir "./data" \
--nodiscover --http --http.port "8545" \
--ws --ws.port "8546" --ws.api "eth,web3,personal,net,debug" \
--port "30303" --http.corsdomain "*" \
--nat "any" --http.api eth,web3,personal,net,debug \
--unlock 0 --password ~/work/soramitsu/ethereum/password.sec \
--allow-insecure-unlock \
--verbosity 5 \
--ipcpath "~/Library/Ethereum/geth.ipc"
You should run Ethereum and Sora network
Install node modules
cd ethereum-bridge-contracts
yarn
Prepare dotenv
cp env.template .env
Get private key via ethkey
./ethkey inspect --private <ethereum node folder>/data/keystore/<your key data>
And set to GETH_PRIVATE_KEY
var in .env
Deploy contracts
./deploy.sh
./bridge-scripts/register-bridge.sh
By default it will register local geth ethereum network. If you want to choose different, run the script with relayer bridge register-bridge
's parameters (see --help
for details). For example,
./bridge-scripts/register-bridge.sh --ropsten
If you want to use ERC20 tokens in bridge you should register that tokens.
Example script placed in bridge-scripts/register-assets.sh
./bridge-scripts/run-ethereum-relay.sh
./bridge-scripts/run-substrate-relay.sh <private-key>
Now you can transfer tokens through bridge.
Easiest way is to use ethApp.burn
and erc20App.burn
via polkadot.js/apps
Example placed in bridge-scripts/transfer-eth.sh