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

Reduce removal of nonbuildable statements #661

Open
0xPhaze opened this issue Aug 10, 2023 · 2 comments
Open

Reduce removal of nonbuildable statements #661

0xPhaze opened this issue Aug 10, 2023 · 2 comments

Comments

@0xPhaze
Copy link
Contributor

0xPhaze commented Aug 10, 2023

I see a few examples of where the exception list could be refined, however some might require some static analysis.
We could include exceptions for .function in vm.function and abi.function. With further analysis .Struct for Interface.Struct shouldn't be removed as well as .function in contract.function.

test/Test.t.sol:4457:11-4457:45: `.assume(_relayer > address(0x09));` nonbuildable
test/Test.t.sol:4458:9-4458:40: `vm.assume(_oracle != _relayer);` passed
test/Test.t.sol:4458:11-4458:40: `.assume(_oracle != _relayer);` nonbuildable
test/Test.t.sol:4461:9-4461:32: `vm.roll(startingBlock);` failed
test/Test.t.sol:4461:11-4461:32: `.roll(startingBlock);` nonbuildable
test/Test.t.sol:4466:35-4466:105: `.ProtocolFeeSettings(false, payable(address(0)), true, address(0), 0);` nonbuildable
test/Test.t.sol:4467:13-4467:91: `endpoint.updateProtocolFeeSettings("TestLibrary", 1, abi.encode(feeSettings));` passed
test/Test.t.sol:4467:21-4467:91: `.updateProtocolFeeSettings("TestLibrary", 1, abi.encode(feeSettings));` nonbuildable
test/Test.t.sol:4467:69-4467:89: `.encode(feeSettings)` nonbuildable
test/Test.t.sol:4470:46-4470:98: `.encode(false, address(_oracle), address(_relayer));` nonbuildable
test/Test.t.sol:4472:20-4472:121: `.encode(10, 10, 10, 10, _oracle, _relayer, address(this), address(0), address(0), true, true, false);` nonbuildable
test/Test.t.sol:4482:38-4482:49: `.encode(i);` nonbuildable
test/Test.t.sol:4483:45-4483:56: `.encode(i);` nonbuildable
test/Test.t.sol:4484:54-4484:71: `.encode(_relayer)` nonbuildable
@smoelius
Copy link
Collaborator

Looking at your output, I think I see a bug:

test/Test.t.sol:4457:11-4457:45: `.assume(_relayer > address(0x09));` nonbuildable

Removing a method call is not supposed to remove a trailing semicolon.

Fixing that bug should eliminate at least some nonbuildable outcomes. 😬

@smoelius smoelius added the bug Something isn't working label Aug 10, 2023
@smoelius
Copy link
Collaborator

Version 0.2.1 should address some of these problems.

@smoelius smoelius removed the bug Something isn't working label Aug 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants