fix: workaround assumePayable
This commit is contained in:
parent
7c081c1ad8
commit
cae34e64d8
|
@ -45,7 +45,7 @@ jobs:
|
|||
run: yarn lint
|
||||
|
||||
- id: test
|
||||
run: yarn test
|
||||
run: yarn test:verbose
|
||||
|
||||
- id: coverage
|
||||
run: yarn coverage
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
"start": "hardhat node --export-all deployments/allDeployments.json",
|
||||
"compile": "hardhat compile",
|
||||
"test": "yarn test:foundry && yarn test:hardhat",
|
||||
"test:verbose": "yarn test:foundry -vvv && yarn test:hardhat --verbose",
|
||||
"test:hardhat": "hardhat test",
|
||||
"test:hardhat:localhost": "yarn test:hardhat --network localhost",
|
||||
"test:hardhat:sepolia": "yarn test:hardhat --network sepolia",
|
||||
|
|
|
@ -16,6 +16,9 @@ contract ArrayUnique {
|
|||
seen[arr[i]] = true;
|
||||
}
|
||||
}
|
||||
|
||||
// contract in construction goes around the assumePayable() check
|
||||
receive() external payable {}
|
||||
}
|
||||
|
||||
function repeatElementIntoArray(
|
||||
|
@ -160,7 +163,9 @@ contract RLNTest is Test {
|
|||
address payable to
|
||||
) public {
|
||||
// avoid precompiles, etc
|
||||
// TODO: wrap both of these in a single function
|
||||
assumePayable(to);
|
||||
assumeNoPrecompiles(to);
|
||||
vm.assume(to != address(0));
|
||||
uint256 idCommitment = poseidon.hash(idSecretHash);
|
||||
|
||||
|
@ -206,6 +211,7 @@ contract RLNTest is Test {
|
|||
) public {
|
||||
// avoid precompiles, etc
|
||||
assumePayable(to);
|
||||
assumeNoPrecompiles(to);
|
||||
vm.assume(to != address(0));
|
||||
uint256 idCommitment = poseidon.hash(idSecretHash);
|
||||
|
||||
|
@ -234,6 +240,7 @@ contract RLNTest is Test {
|
|||
) public {
|
||||
// avoid precompiles, etc
|
||||
assumePayable(to);
|
||||
assumeNoPrecompiles(to);
|
||||
vm.assume(isUniqueArray(idSecretHashes) && idSecretHashes.length > 0);
|
||||
vm.assume(to != address(0));
|
||||
uint256 idCommitmentlen = idSecretHashes.length;
|
||||
|
@ -276,6 +283,7 @@ contract RLNTest is Test {
|
|||
address payable to
|
||||
) public {
|
||||
assumePayable(to);
|
||||
assumeNoPrecompiles(to);
|
||||
vm.assume(isUniqueArray(idSecretHashes) && idSecretHashes.length > 0);
|
||||
vm.assume(to != address(0));
|
||||
|
||||
|
|
Loading…
Reference in New Issue