Skip to content

Commit

Permalink
PR comment
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Oct 17, 2024
1 parent 4c3be31 commit d163373
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 10 deletions.
7 changes: 6 additions & 1 deletion v2/contracts/evm/GatewayEVM.sol
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ contract GatewayEVM is
emit Reverted(destination, address(0), msg.value, data, revertContext);
}

/// @notice Executes an authenticated call to a destination address without ERC20 tokens.
/// @notice Executes a call to a destination address without ERC20 tokens.
/// @dev This function can only be called by the TSS address and it is payable.
/// @param messageContext Message context containing sender.
/// @param destination Address to call.
Expand All @@ -142,6 +142,9 @@ contract GatewayEVM is
{
if (destination == address(0)) revert ZeroAddress();
bytes memory result;
// Execute the call on the target contract
// if sender is provided in messageContext call is authenticated and target is Callable.onCall
// otherwise, call is arbitrary
if (messageContext.sender == address(0)) {
result = _executeArbitraryCall(destination, data);
} else {
Expand Down Expand Up @@ -179,6 +182,8 @@ contract GatewayEVM is
if (!_resetApproval(token, to)) revert ApprovalFailed();
if (!IERC20(token).approve(to, amount)) revert ApprovalFailed();
// Execute the call on the target contract
// if sender is provided in messageContext call is authenticated and target is Callable.onCall
// otherwise, call is arbitrary
if (messageContext.sender == address(0)) {
_executeArbitraryCall(to, data);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function executeRevert(

### execute

Executes an authenticated call to a destination address without ERC20 tokens.
Executes a call to a destination address without ERC20 tokens.

*This function can only be called by the TSS address and it is payable.*

Expand Down
2 changes: 1 addition & 1 deletion v2/pkg/erc20custody.t.sol/erc20custodytest.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayevm.sol/gatewayevm.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayevm.t.sol/gatewayevminboundtest.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayevm.t.sol/gatewayevmtest.go

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/pkg/gatewayevmzevm.t.sol/gatewayevmzevmtest.go

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion v2/types/factories/GatewayEVM__factory.ts

Large diffs are not rendered by default.

0 comments on commit d163373

Please sign in to comment.