-
Notifications
You must be signed in to change notification settings - Fork 429
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fixes GasRouter expectRevert message - added TestMerkleRootHook for proof() and fixes MerkleRootMultisig test - fixes ERC5164 tests post v3 changes - added contract name to mailbox and abstractHook error messages - removed unnecessary tests for "message too large" - downgrade slither in actions to 0.3.0 because of their recent "missing inheritance" bug on main - V3 Yes Unit tests
- Loading branch information
1 parent
760dce6
commit 6a32287
Showing
19 changed files
with
144 additions
and
401 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
pragma solidity >=0.8.0; | ||
|
||
import {MerkleLib} from "../libs/Merkle.sol"; | ||
import {MerkleTreeHook} from "../hooks/MerkleTreeHook.sol"; | ||
|
||
contract TestMerkleTreeHook is MerkleTreeHook { | ||
constructor(address _mailbox) MerkleTreeHook(_mailbox) {} | ||
|
||
function proof() external view returns (bytes32[32] memory) { | ||
bytes32[32] memory _zeroes = MerkleLib.zeroHashes(); | ||
uint256 _index = _tree.count - 1; | ||
bytes32[32] memory _proof; | ||
|
||
for (uint256 i = 0; i < 32; i++) { | ||
uint256 _ithBit = (_index >> i) & 0x01; | ||
if (_ithBit == 1) { | ||
_proof[i] = _tree.branch[i]; | ||
} else { | ||
_proof[i] = _zeroes[i]; | ||
} | ||
} | ||
return _proof; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
{ | ||
"filter_paths": "lib|node_modules|test|Mock*|Test*", | ||
"compile_force_framework": "foundry", | ||
"exclude_informational": true | ||
"exclude_informational": true, | ||
"no_fail": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.