mirror of
https://github.com/vacp2p/rln-contract.git
synced 2025-01-23 04:49:23 +00:00
fix: make tests compile with forge-std@1.6.0
There was a breaking change introduced in `forge-std` at https://github.com/foundry-rs/forge-std/pull/407 which breaks compilation of `Rln.t.sol` with `forge-std@v1.6.0`. This commit updates the dependency to v1.6.0 and adjusts the test source such that it successfully compiles. Another way to go about this would've been to just stick with `v1.5.6.` and ensuring installation of that version. However, I've decided to update the dependency to the latest stable version instead.
This commit is contained in:
parent
a092b934a6
commit
e13af692f7
2
.gitmodules
vendored
2
.gitmodules
vendored
@ -1,4 +1,4 @@
|
|||||||
[submodule "lib/forge-std"]
|
[submodule "lib/forge-std"]
|
||||||
path = lib/forge-std
|
path = lib/forge-std
|
||||||
url = https://github.com/foundry-rs/forge-std
|
url = https://github.com/foundry-rs/forge-std
|
||||||
branch = v1.5.2
|
branch = v1.6.0
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 2b58ecbcf3dfde7a75959dc7b4eb3d0670278de6
|
Subproject commit 74cfb77e308dd188d2f58864aaf44963ae6b88b1
|
@ -77,7 +77,7 @@ contract RlnTest is Test {
|
|||||||
// avoid precompiles, etc
|
// avoid precompiles, etc
|
||||||
// TODO: wrap both of these in a single function
|
// TODO: wrap both of these in a single function
|
||||||
assumePayable(to);
|
assumePayable(to);
|
||||||
assumeNoPrecompiles(to);
|
assumeNotPrecompile(to);
|
||||||
vm.assume(to != address(0));
|
vm.assume(to != address(0));
|
||||||
|
|
||||||
rln.register{value: MEMBERSHIP_DEPOSIT}(idCommitment);
|
rln.register{value: MEMBERSHIP_DEPOSIT}(idCommitment);
|
||||||
@ -118,7 +118,7 @@ contract RlnTest is Test {
|
|||||||
function test__InvalidSlash__NoStake(uint256 idCommitment, address payable to) public {
|
function test__InvalidSlash__NoStake(uint256 idCommitment, address payable to) public {
|
||||||
// avoid precompiles, etc
|
// avoid precompiles, etc
|
||||||
assumePayable(to);
|
assumePayable(to);
|
||||||
assumeNoPrecompiles(to);
|
assumeNotPrecompile(to);
|
||||||
vm.assume(to != address(0));
|
vm.assume(to != address(0));
|
||||||
|
|
||||||
rln.register{value: MEMBERSHIP_DEPOSIT}(idCommitment);
|
rln.register{value: MEMBERSHIP_DEPOSIT}(idCommitment);
|
||||||
@ -171,7 +171,7 @@ contract RlnTest is Test {
|
|||||||
|
|
||||||
function test__ValidWithdraw(address payable to) public {
|
function test__ValidWithdraw(address payable to) public {
|
||||||
assumePayable(to);
|
assumePayable(to);
|
||||||
assumeNoPrecompiles(to);
|
assumeNotPrecompile(to);
|
||||||
|
|
||||||
uint256 idCommitment = 19014214495641488759237505126948346942972912379615652741039992445865937985820;
|
uint256 idCommitment = 19014214495641488759237505126948346942972912379615652741039992445865937985820;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user