@@ -55,34 +55,35 @@ abstract contract AxelarGatewayDestination is IERC7786GatewayDestinationPassive,
55
55
*
56
56
* In this function:
57
57
*
58
- * - `remoteChain ` is in the Axelar format. It should not be expected to be a proper CAIP-2 format
59
- * - `remoteAccount ` is the sender of the crosschain message. That should be the remote gateway on the chain which
60
- * the message originates from. It is NOT the sender of the crosschain message
58
+ * - `axelarSourceChain ` is in the Axelar format. It should not be expected to be a proper CAIP-2 format
59
+ * - `axelarSourceAddress ` is the sender of the Axelar message. That should be the remote gateway on the chain
60
+ * which the message originates from. It is NOT the sender of the ERC-7786 crosschain message.
61
61
*
62
62
* Proper CAIP-10 encoding of the message sender (including the CAIP-2 name of the origin chain can be found in
63
63
* the message)
64
64
*/
65
65
function _execute (
66
- string calldata remoteChain , // chain of the remote gateway - axelar format
67
- string calldata remoteAccount , // address of the remote gateway
66
+ string calldata axelarSourceChain , // chain of the remote gateway - axelar format
67
+ string calldata axelarSourceAddress , // address of the remote gateway
68
68
bytes calldata adapterPayload
69
69
) internal override {
70
70
// Parse the package
71
71
(string memory sender , string memory receiver , bytes memory payload , bytes [] memory attributes ) = abi.decode (
72
72
adapterPayload,
73
73
(string , string , bytes , bytes [])
74
74
);
75
- string memory source = getEquivalentChain (remoteChain);
75
+ // Axelar to CAIP-2 translation
76
+ string memory sourceChain = getEquivalentChain (axelarSourceChain);
76
77
77
78
// check message validity
78
- // - `remoteAccount ` is the remote gateway on the origin chain.
79
- require (getRemoteGateway (source ).equal (remoteAccount ), "Invalid origin gateway " );
79
+ // - `axelarSourceAddress ` is the remote gateway on the origin chain.
80
+ require (getRemoteGateway (sourceChain ).equal (axelarSourceAddress ), "Invalid origin gateway " );
80
81
81
82
// Active mode
82
83
bytes4 result = IERC7786Receiver (receiver.parseAddress ()).executeMessage (
83
84
address (0 ), // not needed in active mode
84
85
new bytes (0 ), // not needed in active mode
85
- source ,
86
+ sourceChain ,
86
87
sender,
87
88
payload,
88
89
attributes
0 commit comments