Skip to content

Commit

Permalink
fix(evm): L02 _destinationSettler Can Return Zero Address (#834)
Browse files Browse the repository at this point in the history
* fix: L02 _destinationSettler Can Return Zero Address

* updated implementation to be in internal function

Signed-off-by: Chris Maree <[email protected]>

---------

Signed-off-by: Chris Maree <[email protected]>
Co-authored-by: Chris Maree <[email protected]>
Co-authored-by: nicholaspai <[email protected]>
  • Loading branch information
3 people authored Feb 5, 2025
1 parent cf0b6b8 commit 39dc879
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions contracts/erc7683/ERC7683OrderDepositor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ abstract contract ERC7683OrderDepositor is IOriginSettler {
error WrongChainId();
error WrongOrderDataType();
error WrongExclusiveRelayer();
error NoDestinationSettlerForChain(uint256 chainId);

// Permit2 contract for this network.
IPermit2 public immutable PERMIT2;
Expand Down
1 change: 1 addition & 0 deletions contracts/erc7683/ERC7683OrderDepositorExternal.sol
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ contract ERC7683OrderDepositorExternal is ERC7683OrderDepositor, Ownable, MultiC
}

function _destinationSettler(uint256 chainId) internal view override returns (address) {
if (destinationSettlers[chainId] == address(0)) revert NoDestinationSettlerForChain(chainId);
return destinationSettlers[chainId];
}
}

0 comments on commit 39dc879

Please sign in to comment.