Skip to content

Commit 76d0057

Browse files
authored
perf(crosschain): use parseV1Calldata in _isAuthorizedGateway
1 parent 3c063fc commit 76d0057

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

contracts/crosschain/CrosschainLinked.sol

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ abstract contract CrosschainLinked is ERC7786Recipient {
9797
address instance,
9898
bytes calldata sender
9999
) internal view virtual override returns (bool) {
100-
(address gateway, bytes memory router) = getLink(_extractChain(sender));
100+
(bytes2 chainType, bytes calldata chainReference, ) = sender.parseV1Calldata();
101+
bytes memory chain = InteroperableAddress.formatV1(chainType, chainReference, hex"");
102+
(address gateway, bytes memory router) = getLink(chain);
101103
return instance == gateway && sender.equal(router);
102104
}
103105

0 commit comments

Comments
 (0)