Skip to content

Getters are reverting in Fuzz testing #2073

Answered by EngrPips
tamermint asked this question in Q&A
Discussion options

You must be logged in to vote

From the output you shared, this invariant_protocolMustHaveMoreValueThanTotalSupply() was not been tested. The call to redeemCollateral is pretty normal and understandable, as the fuzzer can call any function on the handler contract. You can maybe use the selector options to limit the function you want it to call if you don't want it calling some functions when you are doing getters test.

        bytes4[] memory selectors = new bytes4[](2);
        selectors[0] = TSwapPoolTestHandler.deposit.selector;
        selectors[1] = TSwapPoolTestHandler.swap_pool_token_for_weth.selector;

        targetSelector(FuzzSelector({addr: address(tswap_pool_test_handler_contract), selectors: selectors}));

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@EngrPips
Comment options

@tamermint
Comment options

@EngrPips
Comment options

Answer selected by tamermint
@tamermint
Comment options

@EngrPips
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants