fix(contracts): add check for valid mailbox and relayer in `TrustedRelayerIsm`
Description
- minor fix: add an isContract check for mailbox and non-zero check for relayer when instantiating TrustedRelayerIsm
Drive-by changes
None
Related issues
- partly fixes https://github.com/chainlight-io/2024-08-hyperlane/issues/14
Backward compatibility
Yes
Testing
Unit
⚠️ No Changeset found
Latest commit: d495858d1d711317e58fcc49612945a4f58f5be6
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
Click here to learn what changesets are, and how to add one.
Click here if you're a maintainer who wants to add a changeset to this PR
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 82.36%. Comparing base (
25e5d1a) to head (d495858). Report is 102 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #4553 +/- ##
==========================================
+ Coverage 82.33% 82.36% +0.02%
==========================================
Files 100 100
Lines 1421 1423 +2
Branches 180 182 +2
==========================================
+ Hits 1170 1172 +2
Misses 251 251
| Components | Coverage Δ | |
|---|---|---|
| core | 96.92% <ø> (ø) |
|
| hooks | 86.66% <ø> (ø) |
|
| isms | 93.85% <100.00%> (+0.05%) |
:arrow_up: |
| token | 93.46% <ø> (ø) |
|
| middlewares | 86.52% <ø> (ø) |
always feel like address(0) checks are not needed any more: forum.openzeppelin.com/t/removing-address-0x0-checks-from-openzeppelin-contracts/2222
you can technically set this as any address that you don't own and its considered "misconfigured"
it is quite useful to catch these configuration issues at deploy time even if solidity will include the 0x0.call check at "runtime"