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

Fix nonce starting at 0 #61

Conversation

gianbelinche
Copy link
Contributor

@gianbelinche gianbelinche commented Jul 4, 2024

What ❔

This PR fixes some tests that expected the nonce on EVM to start at 1, while we start it at 0.

This PR depends on lambdaclass/era-contracts#24

Why ❔

Checklist

  • PR title corresponds to the body of PR.
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via cargo fmt and checked with cargo clippy.

@hedgar2017
Copy link
Collaborator

Hm, this is weird. A lot of tests used to fail for me when I was doing this.

@gianbelinche
Copy link
Contributor Author

Hm, this is weird. A lot of tests used to fail for me when I was doing this.

With the new change I just pushed this are the differences on the tests results:

Test solidity/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol[#balance_check:3] was failing and is now passing ✅
Test solidity/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol[getAddress:2] was failing and is now passing ✅
Test solidity/test/libsolidity/semanticTests/builtinFunctions/keccak256_packed_complex_types.sol[f:1] was failing and is now passing ✅
Test solidity/test/libsolidity/semanticTests/functionCall/failed_create.sol[f:1] was failing and is now passing ✅
Test solidity/test/libsolidity/semanticTests/libraries/library_references_preserve.sol[#deployer:solidity/test/libsolidity/semanticTests/libraries/library_references_preserve.sol:L2] was failing and is now passing ✅
Test solidity/test/libsolidity/semanticTests/functionCall/failed_create.sol[stack:7] was failing and is now passing ✅
Test solidity/test/libsolidity/semanticTests/errors/errors_by_parameter_type.sol[e:5] was failing and is now passing ✅
Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:31] was passing and is now failing ❌
Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[removeLiquidity:41] was passing and is now failing ❌
Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:35] was passing and is now failing ❌
Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[swapExactTokensForTokens:36] was passing and is now failing ❌
Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[addLiquidity:30] was passing and is now failing ❌
Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:34] was passing and is now failing ❌
Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:39] was passing and is now failing ❌
Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:38] was passing and is now failing ❌
Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:37] was passing and is now failing ❌

Have in mind this PR depends on lambdaclass/era-contracts#24, I forgot to mention it

@hedgar2017
Copy link
Collaborator

hedgar2017 commented Jul 4, 2024

Hm, this is weird. A lot of tests used to fail for me when I was doing this.

With the new change I just pushed this are the differences on the tests results:


Test solidity/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol[#balance_check:3] was failing and is now passing ✅

Test solidity/test/libsolidity/semanticTests/isoltestTesting/balance_other_contract.sol[getAddress:2] was failing and is now passing ✅

Test solidity/test/libsolidity/semanticTests/builtinFunctions/keccak256_packed_complex_types.sol[f:1] was failing and is now passing ✅

Test solidity/test/libsolidity/semanticTests/functionCall/failed_create.sol[f:1] was failing and is now passing ✅

Test solidity/test/libsolidity/semanticTests/libraries/library_references_preserve.sol[#deployer:solidity/test/libsolidity/semanticTests/libraries/library_references_preserve.sol:L2] was failing and is now passing ✅

Test solidity/test/libsolidity/semanticTests/functionCall/failed_create.sol[stack:7] was failing and is now passing ✅

Test solidity/test/libsolidity/semanticTests/errors/errors_by_parameter_type.sol[e:5] was failing and is now passing ✅

Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:31] was passing and is now failing ❌

Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[removeLiquidity:41] was passing and is now failing ❌

Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:35] was passing and is now failing ❌

Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[swapExactTokensForTokens:36] was passing and is now failing ❌

Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[addLiquidity:30] was passing and is now failing ❌

Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:34] was passing and is now failing ❌

Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:39] was passing and is now failing ❌

Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:38] was passing and is now failing ❌

Test tests/solidity/complex/defi/UniswapV2Router01/test.json::complex[balanceOf:37] was passing and is now failing ❌

Have in mind this PR depends on lambdaclass/era-contracts#24, I forgot to mention it

Thank you sir 🫡
Will check out shortly.

@hedgar2017
Copy link
Collaborator

@gianbelinche shall we merge this PR into #60 ?

@gianbelinche
Copy link
Contributor Author

@gianbelinche shall we merge this PR into #60 ?

You are right, I created a PR on the lambdaclass fork, lambdaclass#1, we are not going to merge it yet, since it needs more reviews, have in mind this PR still depends on it lambdaclass/era-contracts#24

I'll close this one

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

Successfully merging this pull request may close these issues.

2 participants