-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
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.
| 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.
Sorry, this is the same issue as before.
EIP-7702 batch transactions can still be signed locally by the EOA itself and more typically are.
The only exceptions to that are when the gas station EIP-7702 flow is used as it's signed by our relay.
If we're missing a scenario when a transaction is signed externally, then we need to update isExternalSign externally (as we do for gas station EIP-7702 currently) or trigger it more specifically internally, assuming we have that context internally without unnecessary coupling.
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
Addresses incorrect nonce handling for EIP-7702 delegated/batch transactions.
isExternalSign = truewhennestedTransactionsare present to bypass EOA nonce assignment for EIP-7702 batchesdelegationAddressfor metrics without using it to inferisExternalSignCHANGELOG.mdunder Fixed to reflect the behavior changeWritten by Cursor Bugbot for commit 99b756f. This will update automatically on new commits. Configure here.