$ nvm use 18
$ npm install
You need to configure your environment variables now. Copy .env.example
and rename as .env
. Now provide values for the keys mentioned there.
- update the mapping details in
main.js
file
# deploy token
$ npm run deploy
Once child token is deployed, the script will return the complete mapping details
{
root_token: "0xabc",
child_token: "0xpqr"
token_type: "0xabcdef"
// other non important related details
}
Mappings on testnet does not require multisig. mapping can be done by EOA 0xf89154D7A42c5E9f77884511586A9db4618683C5
Steps:
- Go to rootChainManagerProxy Contract on goerli.
- click on
Write as Proxy
and connect account with the aboveEOA
address - Go to
mapToken
function and enter the details returned by the script and execute transaction - Mapping done
Mappings on mainnet is done via multisig on Ethereum chain.
Steps:
- Add above multisig added in gnosis
- Open transaction Builder
- Add the rootChainManager contract (Make sure that the ABI used is from implementation contract but the address used is Proxy contract).
- Select
mapToken
and enter the details returned by the script and initiate transaction - Mapping will be done when all the multisig owners sign the transaction and execute it.