TVM-aware test helpers#69
Open
km631 wants to merge 2 commits into
Open
Conversation
luiz-lvj
requested changes
May 29, 2026
Collaborator
luiz-lvj
left a comment
There was a problem hiding this comment.
Imo we should remove erc4337 additions for now, we might add them back later when/if we have an strategy for Account Abstraction on Tron.
Comment on lines
+35
to
+57
| PackedUserOperation: { | ||
| sender: 'address', | ||
| nonce: 'uint256', | ||
| initCode: 'bytes', | ||
| callData: 'bytes', | ||
| accountGasLimits: 'bytes32', | ||
| preVerificationGas: 'uint256', | ||
| gasFees: 'bytes32', | ||
| paymasterAndData: 'bytes', | ||
| }, | ||
| UserOperationRequest: { | ||
| sender: 'address', | ||
| nonce: 'uint256', | ||
| initCode: 'bytes', | ||
| callData: 'bytes', | ||
| accountGasLimits: 'bytes32', | ||
| preVerificationGas: 'uint256', | ||
| gasFees: 'bytes32', | ||
| paymasterVerificationGasLimit: 'uint256', | ||
| paymasterPostOpGasLimit: 'uint256', | ||
| validAfter: 'uint48', | ||
| validUntil: 'uint48', | ||
| }, |
Collaborator
There was a problem hiding this comment.
I think we should drop this for now as we removed ERC4337 from the repo. They might be reintroduced when Tron implements ERC7702 and as well.
Suggested change
| PackedUserOperation: { | |
| sender: 'address', | |
| nonce: 'uint256', | |
| initCode: 'bytes', | |
| callData: 'bytes', | |
| accountGasLimits: 'bytes32', | |
| preVerificationGas: 'uint256', | |
| gasFees: 'bytes32', | |
| paymasterAndData: 'bytes', | |
| }, | |
| UserOperationRequest: { | |
| sender: 'address', | |
| nonce: 'uint256', | |
| initCode: 'bytes', | |
| callData: 'bytes', | |
| accountGasLimits: 'bytes32', | |
| preVerificationGas: 'uint256', | |
| gasFees: 'bytes32', | |
| paymasterVerificationGasLimit: 'uint256', | |
| paymasterPostOpGasLimit: 'uint256', | |
| validAfter: 'uint48', | |
| validUntil: 'uint48', | |
| }, | |
| const delegate = await accountFactory.deploy(...extraArgs); | ||
| const instance = await params.eip7702signer.getAddress().then(address => accountFactory.attach(address)); | ||
| const authorization = await params.eip7702signer.authorize({ address: delegate.target }); | ||
| return new EIP7702SmartAccount(instance, authorization, env); |
Collaborator
There was a problem hiding this comment.
EIP 7702 is not live on Tron, so we dropped the contracts. Imo we should remove this file erc4337.js for now.
Comment on lines
+131
to
+132
| entrypoint: params.entrypoint ?? predeploy.entrypoint.v09, | ||
| senderCreator: params.senderCreator ?? predeploy.senderCreator.v09, |
Collaborator
There was a problem hiding this comment.
The entrypoint is not deployed on Tron, so let's skip this for now.
Collaborator
Author
Bound the account default balance to TVM's Long.MAX_VALUE sun range, make txpool batchInBlock dual-mode (EVM evm_setAutomine path when a provider is passed, TVM tre_blockTime/tre_mine path otherwise), and add the PackedUserOperation/UserOperationRequest EIP-712 types plus an erc4337 helper as groundwork for account-abstraction tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Remove the speculative erc4337.js helper and the PackedUserOperation/ UserOperationRequest EIP-712 types. Account abstraction (ERC-4337/7702) is not live on Tron and the contracts were removed from the repo; this can be reintroduced alongside an AA strategy. Leaves the account balance bound and the dual-mode txpool helper. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
af46156 to
adfb2fc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part 2 of 3 splitting #64. Stacked on #68 (
feat/tvm-compile-pipeline) — review/merge after #68.What
TVM-aware test helpers.
accountdefault balance bounded to TVM'sLong.MAX_VALUEsun range (5 * WeiPerEther; the upstream10000 ETHequivalent overflows TVM's 1-wei-==-1-sun account balance).txpoolbatchInBlockmade dual-mode — EVM path (evm_setAutomine) when an explicit provider is passed (anvil-backed tests), TVM path (tre_blockTime/tre_mine) otherwise. (The EVM path is currently exercised only by theTrieProoftest, which is skipped in part 3; kept as forward-looking groundwork.)PackedUserOperation/UserOperationRequestEIP-712 types and anerc4337helper (UserOperation builder,ERC4337Helper, smart-account wrappers) as groundwork for account-abstraction tests (no in-tree test consumes them yet).Excluded vs the original branch
governance.js— the functional sequential-delegate()change is already on master; the only net difference was comment wording, so it is dropped to avoid churn.🤖 Generated with Claude Code