diff --git a/bootstrap/3_child_deployment.js b/bootstrap/3_child_deployment.js index 7dc247dd..3887b562 100755 --- a/bootstrap/3_child_deployment.js +++ b/bootstrap/3_child_deployment.js @@ -96,7 +96,7 @@ async function run() { let childAdaptorProxy = await deployChildContract(childAdaptorProxyObj, adminWallet, childAdaptorImpl.address, proxyAdmin.address, []); await waitForReceipt(childAdaptorProxy.deployTransaction.hash, childProvider); console.log("Deployed to CHILD_ADAPTOR_PROXY_ADDRESS: ", childAdaptorProxy.address); - output += "CHILD_ADAPTOR_PROXY_ADDRESS" + childAdaptorProxy.address + "\n"; + output += "CHILD_ADAPTOR_PROXY_ADDRESS=" + childAdaptorProxy.address + "\n"; fs.writeFileSync("./3.out.tmp", output); } diff --git a/bootstrap/7_imx_rebalancing.js b/bootstrap/7_imx_rebalancing.js index dcefa4a0..fe6f39ab 100644 --- a/bootstrap/7_imx_rebalancing.js +++ b/bootstrap/7_imx_rebalancing.js @@ -48,8 +48,8 @@ async function run() { let balanceAmt = ethers.utils.parseEther(TOTAL_SUPPLY).sub(bridgeBal).sub(multisigBal); console.log("The amount to balance on L1 is: ", ethers.utils.formatEther(balanceAmt)); let IMX = new ethers.Contract(imxRootAddr, IMX_ABI, rootProvider); - console.log("Admin L1 IMX balance: ", await IMX.balanceOf(adminAddr)); - console.log("Root bridge L1 IMX balance: ", await IMX.balanceOf(rootBridgeAddr)); + console.log("Admin L1 IMX balance: ", (await IMX.balanceOf(adminAddr)).toString()); + console.log("Root bridge L1 IMX balance: ", (await IMX.balanceOf(rootBridgeAddr)).toString()); console.log("Rebalance in..."); await wait(); @@ -57,8 +57,8 @@ async function run() { console.log("Transfer...") let resp = await IMX.connect(adminWallet).transfer(rootBridgeAddr, balanceAmt); await waitForReceipt(resp.hash, rootProvider); - console.log("Admin L1 IMX balance: ", await IMX.balanceOf(adminAddr)); - console.log("Root bridge L1 IMX balance: ", await IMX.balanceOf(rootBridgeAddr)); + console.log("Admin L1 IMX balance: ", (await IMX.balanceOf(adminAddr)).toString()); + console.log("Root bridge L1 IMX balance: ", (await IMX.balanceOf(rootBridgeAddr)).toString()); } run(); diff --git a/bootstrap/README.md b/bootstrap/README.md index 0b452418..3a4e2dbb 100644 --- a/bootstrap/README.md +++ b/bootstrap/README.md @@ -70,11 +70,11 @@ node 4_root_deployment.js 8. Set the following environment variables using the output `3.out.tmp` & `4.out.tmp` from the previous step. ``` CHILD_BRIDGE_ADDRESS= -CHILD_ADAPTER_ADDRESS= +CHILD_ADAPTOR_ADDRESS= WRAPPED_IMX_ADDRESS= CHILD_TOKEN_TEMPLATE= ROOT_BRIDGE_ADDRESS= -ROOT_ADAPTER_ADDRESS= +ROOT_ADAPTOR_ADDRESS= ROOT_TOKEN_TEMPLATE= ``` 9. Initialise bridge contracts on child chain. (see [here](../README.md#remote-deployment) for more details) diff --git a/src/child/ChildERC20Bridge.sol b/src/child/ChildERC20Bridge.sol index dc40ed38..efbe75af 100644 --- a/src/child/ChildERC20Bridge.sol +++ b/src/child/ChildERC20Bridge.sol @@ -53,6 +53,12 @@ contract ChildERC20Bridge is /// @dev The address of the ETH ERC20 token on L2. address public childETHToken; + /** + * @notice Fallback function on recieving native IMX. + */ + receive() external payable { + } + /** * @notice Initilization function for RootERC20Bridge. * @param newBridgeAdaptor Address of StateSender to send deposit information to.