-
-
Notifications
You must be signed in to change notification settings - Fork 268
fix: set isExternalSign to true for delegated transactions #7659
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
base: main
Are you sure you want to change the base?
Conversation
| } | ||
|
|
||
| // Skip nonce assignment for delegated transactions (EIP-7702) | ||
| // The delegation address manages its own nonce sequence externally |
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.
Even if the account is upgraded, it can still sign and submit transactions normally meaning the nonces are valid.
This just records the current delegated address for any transaction, for metrics.
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.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
| deviceConfirmedOn, | ||
| disableGasBuffer, | ||
| id: random(), | ||
| isExternalSign: isEIP7702Batch, |
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.
EIP-7702 batch isExternalSign override by gas fee token check
Medium Severity
The new isExternalSign = isEIP7702Batch can be overridden by checkGasFeeTokenBeforePublish when a transaction has both nestedTransactions and a gasFeeToken, and the user has sufficient native balance. The checkGasFeeTokenBeforePublish function unconditionally sets isExternalSign = false in this case, which would cause the original nonce conflicts for EIP-7702 batch transactions that the PR aims to fix.
Explanation
EIP-7702 delegated transactions were incorrectly using the user's EOA nonce, causing nonce conflicts and preventing transactions from appearing in the activity tab. In EIP-7702, the delegation address manages its own nonce sequence, not the user's EOA.
This PR sets
isExternalSignfor EIP-7702 txs.References
Checklist
Note
Fixes nonce/signing flow for EIP-7702 batches.
isExternalSign = truewhen adding EIP-7702 batch transactions (presence ofnestedTransactions) to bypass internal nonce assignmentdelegationAddressfor metrics only; do not deriveisExternalSignfrom itCHANGELOG.mdto note the fixWritten by Cursor Bugbot for commit 1d3d23a. This will update automatically on new commits. Configure here.