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

contracts module unit test failed #15

Open
barry963 opened this issue May 6, 2023 · 0 comments
Open

contracts module unit test failed #15

barry963 opened this issue May 6, 2023 · 0 comments

Comments

@barry963
Copy link

barry963 commented May 6, 2023

Two test failed in contract testing, it seems address(ALICE) doesn't give correct address. But if I hardcoded it to exact address, tokenBalance always returned 0.

> contracts % forge test --root .      
[⠢] Compiling...
[⠑] Compiling 4 files with 0.8.19
[⠘] Solc 0.8.19 finished in 433.60ms
Compiler run successful!

Running 6 tests for src/test/MerkleClaimERC20.t.sol:Tests
[FAIL. Reason: NotInMerkle()] testAliceClaim() (gas: 16464)
[FAIL. Reason: NotInMerkle()] testBobClaimForAlice() (gas: 21072)
[PASS] testFailAliceClaimInvalidAmount() (gas: 12869)
[PASS] testFailAliceClaimInvalidProof() (gas: 12827)
[PASS] testFailAliceClaimTwice() (gas: 12816)
[PASS] testFailBobClaim() (gas: 12815)
Test result: FAILED. 4 passed; 2 failed; finished in 611.83µs

Failing tests:
Encountered 2 failing tests in src/test/MerkleClaimERC20.t.sol:Tests
[FAIL. Reason: NotInMerkle()] testAliceClaim() (gas: 16464)
[FAIL. Reason: NotInMerkle()] testBobClaimForAlice() (gas: 21072)

Encountered a total of 2 failing tests, 4 tests succeeded
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

1 participant