Skip to content

Commit

Permalink
Rename and remove parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
alistair-singh committed Jan 16, 2025
1 parent b5a553f commit aca3846
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions contracts/src/AgentExecutor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ contract AgentExecutor {
}

/// @dev Transfer ether to Gateway. Used once off for migration purposes. Can be removed after version 1.
function transferNativeToGateway(address payable gateway, uint256 amount) external {
IGateway(gateway).depositEther{value: amount}();
function transferEtherToGateway(uint256 amount) external {
IGateway(msg.sender).depositEther{value: amount}();
}

/// @dev Transfer ERC20 to `recipient`. Only callable via `execute`.
Expand Down
3 changes: 1 addition & 2 deletions contracts/src/upgrades/Gateway202410.sol
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ contract Gateway202410 is Gateway {

// migrate asset hub agent
address agent = _ensureAgent(hex"81c5ab2571199e3188135178f3c2c8e2d268be1313d029b30f534fa579b69b79");
bytes memory call =
abi.encodeCall(AgentExecutor.transferNativeToGateway, (payable(address(this)), agent.balance));
bytes memory call = abi.encodeCall(AgentExecutor.transferEtherToGateway, (agent.balance));
_invokeOnAgent(agent, call);
}
}

0 comments on commit aca3846

Please sign in to comment.