Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

fix: set correct nonce in EthCall/EstimateGas #871

Merged
merged 3 commits into from
Jan 4, 2022

Conversation

yihuang
Copy link
Contributor

@yihuang yihuang commented Jan 4, 2022

Closes: #870

Description

for contract creation tx, the executing msg must contain the correct nonce value, because ApplyMessage will reset sender's nonce to that first.


For contributor use:

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

For admin use:

  • Added appropriate labels to PR (ex. WIP, R4R, docs, etc)
  • Reviewers assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

Copy link
Contributor

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK, can you add a test to ensure this doesn't break again? 🙏

CHANGELOG.md Outdated
@@ -66,6 +66,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* (evm) [tharsis#838](https://github.com/tharsis/ethermint/pull/838) Fix splitting of trace.Memory into 32 chunks.
* (rpc) [tharsis#860](https://github.com/tharsis/ethermint/pull/860) Fix `eth_getLogs` when specify blockHash without address/topics, and limit the response size.
* (rpc) [tharsis#865](https://github.com/tharsis/ethermint/pull/865) Fix RPC Filter parameters being ignored
* (evm) [tharsis#]() Set correct nonce in `EthCall` and `EstimateGas` grpc query.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing link 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@codecov
Copy link

codecov bot commented Jan 4, 2022

Codecov Report

Merging #871 (abcfbff) into main (d34aa09) will increase coverage by 0.21%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #871      +/-   ##
==========================================
+ Coverage   57.18%   57.40%   +0.21%     
==========================================
  Files          74       74              
  Lines        6141     6148       +7     
==========================================
+ Hits         3512     3529      +17     
+ Misses       2423     2408      -15     
- Partials      206      211       +5     
Impacted Files Coverage Δ
x/evm/keeper/grpc_query.go 67.88% <100.00%> (+3.03%) ⬆️

CHANGELOG.md Outdated Show resolved Hide resolved
@yihuang
Copy link
Contributor Author

yihuang commented Jan 4, 2022

utACK, can you add a test to ensure this doesn't break again? 🙏

unit test added, I checked that the test fail on main branch.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

estimateGas returns "contract address collision" error
2 participants