Skip to content

Commit 39dc879

Browse files
mrice32chrismareenicholaspai
authored
fix(evm): L02 _destinationSettler Can Return Zero Address (#834)
* fix: L02 _destinationSettler Can Return Zero Address * updated implementation to be in internal function Signed-off-by: Chris Maree <christopher.maree@gmail.com> --------- Signed-off-by: Chris Maree <christopher.maree@gmail.com> Co-authored-by: Chris Maree <christopher.maree@gmail.com> Co-authored-by: nicholaspai <npai.nyc@gmail.com>
1 parent cf0b6b8 commit 39dc879

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

contracts/erc7683/ERC7683OrderDepositor.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ abstract contract ERC7683OrderDepositor is IOriginSettler {
2626
error WrongChainId();
2727
error WrongOrderDataType();
2828
error WrongExclusiveRelayer();
29+
error NoDestinationSettlerForChain(uint256 chainId);
2930

3031
// Permit2 contract for this network.
3132
IPermit2 public immutable PERMIT2;

contracts/erc7683/ERC7683OrderDepositorExternal.sol

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ contract ERC7683OrderDepositorExternal is ERC7683OrderDepositor, Ownable, MultiC
101101
}
102102

103103
function _destinationSettler(uint256 chainId) internal view override returns (address) {
104+
if (destinationSettlers[chainId] == address(0)) revert NoDestinationSettlerForChain(chainId);
104105
return destinationSettlers[chainId];
105106
}
106107
}

0 commit comments

Comments
 (0)