From c5e23487ba5ba1c4ca6f51bbc44501ca24e9f2b3 Mon Sep 17 00:00:00 2001 From: Denis Fadeev Date: Tue, 12 Nov 2024 15:10:07 +0300 Subject: [PATCH] onCall: remove return --- examples/call/contracts/Connected.sol | 4 +--- examples/nft/contracts/Connected.sol | 3 +-- examples/token/contracts/Connected.sol | 3 +-- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/examples/call/contracts/Connected.sol b/examples/call/contracts/Connected.sol index 69183499..b156f6fd 100644 --- a/examples/call/contracts/Connected.sol +++ b/examples/call/contracts/Connected.sol @@ -53,10 +53,8 @@ contract Connected { function onCall( MessageContext calldata context, bytes calldata message - ) external payable onlyGateway returns (bytes4) { + ) external payable onlyGateway { emit HelloEvent("Hello on EVM from onCall()", "hey"); - - return ""; } function onRevert( diff --git a/examples/nft/contracts/Connected.sol b/examples/nft/contracts/Connected.sol index b756a745..9cee3f5a 100644 --- a/examples/nft/contracts/Connected.sol +++ b/examples/nft/contracts/Connected.sol @@ -91,7 +91,7 @@ contract Connected is function onCall( MessageContext calldata context, bytes calldata message - ) external payable onlyGateway returns (bytes4) { + ) external payable onlyGateway { if (context.sender != counterparty) revert Unauthorized(); (address receiver, uint256 tokenId, string memory uri) = abi.decode( @@ -102,7 +102,6 @@ contract Connected is _safeMint(receiver, tokenId); _setTokenURI(tokenId, uri); emit TokenTransferReceived(receiver, tokenId, uri); - return ""; } function onRevert(RevertContext calldata context) external onlyGateway { diff --git a/examples/token/contracts/Connected.sol b/examples/token/contracts/Connected.sol index 9f066163..12095acf 100644 --- a/examples/token/contracts/Connected.sol +++ b/examples/token/contracts/Connected.sol @@ -70,7 +70,7 @@ contract Connected is ERC20, Ownable2Step, Events { function onCall( MessageContext calldata context, bytes calldata message - ) external payable onlyGateway returns (bytes4) { + ) external payable onlyGateway { if (context.sender != counterparty) revert Unauthorized(); (address receiver, uint256 amount) = abi.decode( message, @@ -78,7 +78,6 @@ contract Connected is ERC20, Ownable2Step, Events { ); _mint(receiver, amount); emit TokenTransferReceived(receiver, amount); - return ""; } function onRevert(RevertContext calldata context) external onlyGateway {}