-
-
Notifications
You must be signed in to change notification settings - Fork 26
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: add support for incrementing nonces #1074
🐛 Fix: add support for incrementing nonces #1074
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 220efe9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 11 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
WalkthroughThe updates introduce significant enhancements to the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @roninjin10 and the rest of your teammates on Graphite |
61a38f7
to
732b4ae
Compare
8a5427c
to
ac9a0e0
Compare
732b4ae
to
0e739c0
Compare
ac9a0e0
to
7ffcbf0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Out of diff range and nitpick comments (1)
.changeset/young-actors-battle.md (1)
6-6
: Clarify the description of thebySenderAddress
method.Consider providing a more detailed description of the
bySenderAddress
method, including its purpose and usage.
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!pnpm-lock.yaml
Files selected for processing (23)
- .changeset/young-actors-battle.md (1 hunks)
- packages/actions/src/tevm/callHandler.js (3 hunks)
- packages/actions/src/tevm/callHandler.spec.ts (2 hunks)
- packages/actions/src/tevm/contractHandler.js (1 hunks)
- packages/actions/src/tevm/createTransaction.js (4 hunks)
- packages/memory-client/src/test/viemPublicActions.spec.ts (1 hunks)
- packages/txpool/docs/classes/TxPool.md (5 hunks)
- packages/txpool/src/TxPool.ts (2 hunks)
- tevm/actions-types/index.d.cts (1 hunks)
- tevm/actions-types/index.d.ts (1 hunks)
- tevm/base-client/index.d.cts (1 hunks)
- tevm/base-client/index.d.ts (1 hunks)
- tevm/errors/index.d.cts (1 hunks)
- tevm/errors/index.d.ts (1 hunks)
- tevm/memory-client/index.d.cts (1 hunks)
- tevm/memory-client/index.d.ts (1 hunks)
- tevm/package.json (1 hunks)
- tevm/procedures-types/index.d.cts (1 hunks)
- tevm/procedures-types/index.d.ts (1 hunks)
- tevm/server/index.d.cts (1 hunks)
- tevm/server/index.d.ts (1 hunks)
- tevm/utils/index.d.cts (1 hunks)
- tevm/utils/index.d.ts (1 hunks)
Files skipped from review due to trivial changes (6)
- packages/actions/src/tevm/callHandler.spec.ts
- tevm/base-client/index.d.cts
- tevm/base-client/index.d.ts
- tevm/package.json
- tevm/server/index.d.cts
- tevm/server/index.d.ts
Additional comments not posted (19)
tevm/memory-client/index.d.cts (1)
1-1
: Ensure thatTevmActions
is correctly defined and exported in@tevm/memory-client
.Please verify that
TevmActions
is correctly defined and exported in the@tevm/memory-client
module.tevm/memory-client/index.d.ts (1)
1-1
: Ensure thatTevmActions
is correctly defined and exported in@tevm/memory-client
.Please verify that
TevmActions
is correctly defined and exported in the@tevm/memory-client
module..changeset/young-actors-battle.md (1)
2-4
: Ensure that the version updates are correctly reflected in the package files.Please verify that the minor version updates for
@tevm/txpool
andtevm
are correctly reflected in the respective package files.tevm/errors/index.d.cts (1)
1-1
: Ensure thatInvalidCreateParams
is correctly defined and exported in@tevm/errors
.Please verify that
InvalidCreateParams
is correctly defined and exported in the@tevm/errors
module.tevm/errors/index.d.ts (1)
1-1
: Ensure thatInvalidCreateParams
is correctly defined and exported in@tevm/errors
.Please verify that
InvalidCreateParams
is correctly defined and exported in the@tevm/errors
module.tevm/utils/index.d.cts (1)
1-1
: The added entities in the export statement are correctly named and relevant to the module. The changes look good.tevm/utils/index.d.ts (1)
1-1
: The added entities in the export statement are correctly named and relevant to the module. The changes look good.packages/memory-client/src/test/viemPublicActions.spec.ts (1)
1-105
: The added and updated test cases for public actions in theviem
module are correctly implemented and cover the intended functionality. The changes look good.tevm/actions-types/index.d.cts (1)
1-1
: The added entities in the export statement are correctly named and relevant to the module. The changes look good.tevm/actions-types/index.d.ts (1)
1-1
: The added entities in the export statement are correctly named and relevant to the module. The changes look good.packages/actions/src/tevm/contractHandler.js (1)
119-133
: Good use of a try-catch block to handle potential errors during the decoding process. This ensures that thecontractHandler
function can handle unexpected issues gracefully.tevm/procedures-types/index.d.cts (1)
1-1
: The addition ofMineJsonRpcProcedure
,MineJsonRpcRequest
, andMineJsonRpcResponse
to the export list is appropriate. Ensure these entities are correctly defined and used in the codebase.tevm/procedures-types/index.d.ts (1)
1-1
: The addition ofMineJsonRpcProcedure
,MineJsonRpcRequest
, andMineJsonRpcResponse
to the export list is appropriate. Ensure these entities are correctly defined and used in the codebase.packages/actions/src/tevm/createTransaction.js (2)
61-63
: Fetching transactions by sender address is a necessary step for correctly calculating the nonce. Ensure that thegetBySenderAddress
method is correctly implemented and used.
74-75
: The nonce calculation logic ensures that the nonce is correctly incremented when there are multiple transactions from the same address. This is a necessary fix for the bug mentioned in the PR summary.packages/txpool/docs/classes/TxPool.md (1)
268-279
: The documentation for thegetBySenderAddress
method is clear and provides necessary information about its parameters and source location. Ensure that the method is correctly documented and the source location is accurate.packages/actions/src/tevm/callHandler.js (2)
152-154
: Improve error handling by checking for the presence of a message in the error object.
220-222
: Improve error handling by checking for the presence of a message in the error object.packages/txpool/src/TxPool.ts (1)
435-437
: Add method to retrieve transactions by sender address.
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`.⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ # Releases ## @tevm/[email protected] ### Minor Changes - [#1069](#1069) [`a6655fc`](a6655fc) Thanks [@roninjin10](https://github.com/roninjin10)! - Exported `prefundedAccount` as an array of contract addresses that are prefunded. These map to the the same accounts prefunded by anvil and hardhat. ### Patch Changes - Updated dependencies \[[`40547fe`](40547fe), [`40547fe`](40547fe), [`2ba2c27`](2ba2c27)]: - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] ## @tevm/[email protected] ### Minor Changes - [#1074](#1074) [`2ba2c27`](2ba2c27) Thanks [@roninjin10](https://github.com/roninjin10)! - Added bySenderAddress method to return all mempool tx from a single sender address ### Patch Changes - [#1076](#1076) [`40547fe`](40547fe) Thanks [@roninjin10](https://github.com/roninjin10)! - Fixed bug with txPool not removing processed tx after block is mined ## @tevm/[email protected] ### Minor Changes - [#1071](#1071) [`3546dc4`](3546dc4) Thanks [@roninjin10](https://github.com/roninjin10)! - Added simpleContract to testutils ## [email protected] ### Minor Changes - [#1074](#1074) [`2ba2c27`](2ba2c27) Thanks [@roninjin10](https://github.com/roninjin10)! - Added bySenderAddress method to return all mempool tx from a single sender address ### Patch Changes - [#1076](#1076) [`40547fe`](40547fe) Thanks [@roninjin10](https://github.com/roninjin10)! - Fixed bug with not updating nonce when more than one tx is in the tx pool - Updated dependencies \[[`a6655fc`](a6655fc), [`40547fe`](40547fe)]: - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] ## @tevm/[email protected] ### Patch Changes - Updated dependencies \[]: - @tevm/[email protected] - @tevm/[email protected] ## @tevm/[email protected] ### Patch Changes - Updated dependencies \[]: - @tevm/[email protected] ## @tevm/[email protected] ### Patch Changes - [#1076](#1076) [`40547fe`](40547fe) Thanks [@roninjin10](https://github.com/roninjin10)! - Fixed bug with not updating nonce when more than one tx is in the tx pool - Updated dependencies \[]: - @tevm/[email protected] ## @tevm/[email protected] ### Patch Changes - Updated dependencies \[[`40547fe`](40547fe)]: - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] ## @tevm/[email protected] ### Patch Changes - Updated dependencies \[[`a6655fc`](a6655fc)]: - @tevm/[email protected] - @tevm/[email protected] - @tevm/[email protected] ## @tevm/[email protected] ### Patch Changes - Updated dependencies \[[`40547fe`](40547fe)]: - @tevm/[email protected] ## @tevm/[email protected] ### Patch Changes - [#1076](#1076) [`40547fe`](40547fe) Thanks [@roninjin10](https://github.com/roninjin10)! - Cleaned up how deep copying works. Change should help with performance a bit. - Updated dependencies \[[`3546dc4`](3546dc4)]: - @tevm/[email protected] ## @tevm/[email protected] ### Patch Changes - Updated dependencies \[[`40547fe`](40547fe)]: - @tevm/[email protected] Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Description
Fixes a bug where nonces would not increment if more than 0 tx from the same address are in the tx pool
Testing
Explain the quality checks that have been done on the code changes
Additional Information
Your ENS/address:
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Documentation
TxPool
documentation.Refactor
Chores