$ nvm use 18
$ npm installYou 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.jsfile
# deploy token
$ npm run deployOnce 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 Proxyand connect account with the aboveEOAaddress - Go to
mapTokenfunction 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
mapTokenand 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.