Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
wcgcyx committed Nov 5, 2023
1 parent cb511af commit 962581b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion bootstrap/3_child_deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
8 changes: 4 additions & 4 deletions bootstrap/7_imx_rebalancing.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,17 +48,17 @@ 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();

// Rebalancing
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();
Expand Down
4 changes: 2 additions & 2 deletions bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions src/child/ChildERC20Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 962581b

Please sign in to comment.