dj
is the CLI tool for Darwinia Bridge, which is a cross-chain bridge currently supports bidirectional cross chain relay between Ethereum and Darwinia.
Darwinia supports the cross-chain bridge of Ethereum by implementing an Ethereum light client(Darwinia ChainRelay) on its chain. Therefore, someone needs to submit the Ethereum block headers to this light client. dj
is such a tool, anyone can use it to submit block headers to the Ethereum light client on Darwinia and get rewards.
It is recommended to use nvm for installing nodejs. version 8.x and above will be better.
yarn
A seed
used to sign and send extrinsics. The easiest way is to generate an account in the web wallet and write down the mnemonic seed
during the generation process. For more information, please refer to this tutorial.
(Optional) docker
(Optional) A local darwinia crab network node if you want to test with a local node.
yarn global add @darwinia/dj
Now you can type dj
in your command-line:
> dj
dj <[email protected]>
Commands:
dj balance [address] Get balance of account address
dj config [edit] Show config
dj proposal <block> Submit a relay proposal to darwinia
dj transfer <address> <amount> Transfer RING to darwinia account
Options:
--help, -h Show help [boolean]
--version, -V Show version number
By default, dj
is configured to point to the Infura Ethereum node and the official Darwinia crab network node. So you can immediately start using dj
to submit Ethereum block headers to the Darwinia crab network and get rewards.
dj
When the dj
command is executed for the first time, you will be asked to input a seed. At this time, you need to enter the seed you have prepared and press Enter to continue.
You can see the submission result in a few minutes. If ok
appears, it means the submission is successful. If reject
appears, xxx.
dj proposal <block>
Submit a proposal to darwinia network. The proposal includes the target block header with its proof.