Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Resolve fuzzing test failures for AddressSortedLinkedListWithMedian #277

Open
wants to merge 2 commits into
base: celo10
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion packages/contracts-bedrock/test/libraries/SafeCall.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ pragma solidity 0.8.15;
// Testing utilities
import { Test } from "forge-std/Test.sol";
import { StdCheatsSafe } from "forge-std/StdCheats.sol";
import { AddressSortedLinkedList } from "src/celo/common/linkedlists/AddressSortedLinkedList.sol";
import { AddressSortedLinkedListWithMedian } from "src/celo/common/linkedlists/AddressSortedLinkedListWithMedian.sol";

// Target contract
import { SafeCall } from "src/libraries/SafeCall.sol";
Expand All @@ -14,7 +16,10 @@ contract SafeCall_Test is Test {
vm.assume(_addr.balance == 0);
vm.assume(_addr != address(this));
vm.assume(uint256(uint160(_addr)) > uint256(256)); // TODO temp fix until new forge-std release with modern
// precompiles: https://github.com/foundry-rs/forge-std/pull/594
// ignore address of library contract whose functions have 'public' or 'external' visibilities
vm.assume(_addr != address(AddressSortedLinkedList));
vm.assume(_addr != address(AddressSortedLinkedListWithMedian));
// precompiles: https://github.com/foundry-rs/forge-std/pull/594
assumeAddressIsNot(_addr, StdCheatsSafe.AddressType.ForgeAddress, StdCheatsSafe.AddressType.Precompile);
}

Expand Down
Loading