-
-
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
✨ Feat: Add official tevm trace methods #824
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Current dependencies on/for this PR: This stack of pull requests is managed by Graphite. |
Warning Rate Limit Exceeded@roninjin10 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 21 minutes and 22 seconds before requesting another review. How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. WalkthroughThe update to the Changes
Poem
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 (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (32)
- vm/api/src/Tevm.ts (2 hunks)
- vm/api/src/TevmJsonRpcRequestHandler.ts (3 hunks)
- vm/api/src/handlers/TraceCallHandler.ts (1 hunks)
- vm/api/src/handlers/TraceContractHandler.ts (1 hunks)
- vm/api/src/handlers/TraceScriptHandler.ts (1 hunks)
- vm/api/src/handlers/index.ts (1 hunks)
- vm/api/src/index.ts (6 hunks)
- vm/api/src/params/DebugParams.ts (3 hunks)
- vm/api/src/params/TraceCallParams.ts (1 hunks)
- vm/api/src/params/TraceContractParams.ts (1 hunks)
- vm/api/src/params/TraceScriptParams.ts (1 hunks)
- vm/api/src/params/index.ts (1 hunks)
- vm/api/src/procedure/TraceCallProcedure.ts (1 hunks)
- vm/api/src/procedure/TraceContractProcedure.ts (1 hunks)
- vm/api/src/procedure/TraceScriptProcedure.ts (1 hunks)
- vm/api/src/procedure/index.ts (1 hunks)
- vm/api/src/requests/TraceCallJsonRpcRequest.ts (1 hunks)
- vm/api/src/requests/TraceContractJsonRpcRequest.ts (1 hunks)
- vm/api/src/requests/TraceScriptJsonRpcRequest.ts (1 hunks)
- vm/api/src/requests/index.ts (1 hunks)
- vm/api/src/responses/TraceCallJsonRpcResponse.ts (1 hunks)
- vm/api/src/responses/TraceContractJsonRpcResponse.ts (1 hunks)
- vm/api/src/responses/TraceScriptJsonRpcResponse.ts (1 hunks)
- vm/api/src/responses/index.ts (1 hunks)
- vm/api/src/result/DebugResult.ts (1 hunks)
- vm/api/src/result/TraceCallResult.ts (1 hunks)
- vm/api/src/result/TraceContractResult.ts (1 hunks)
- vm/api/src/result/TraceScriptResult.ts (1 hunks)
- vm/api/src/result/index.ts (1 hunks)
- vm/api/src/utils/SerializeToJson.ts (1 hunks)
- vm/procedures/src/handlers/debug/traceCallHandler.js (1 hunks)
- vm/procedures/src/jsonrpc/debug/traceCallProcedure.js (1 hunks)
Files skipped from review due to trivial changes (1)
- vm/api/src/handlers/TraceContractHandler.ts
Additional comments: 36
vm/api/src/handlers/TraceCallHandler.ts (1)
- 4-7: The
TraceCallHandler
type definition is correct and aligns with the expected functionality of a handler that takesTraceCallParams
and returns aPromise
ofTraceCallResult
.vm/api/src/handlers/TraceScriptHandler.ts (1)
- 4-7: The
TraceScriptHandler
type definition is correct and aligns with the expected functionality of a handler that takesTraceScriptParams
and returns aPromise
ofTraceScriptResult
.vm/api/src/result/TraceCallResult.ts (1)
- 4-11: The
TraceCallResult
type is correctly defined withcallResult
,failed
, andstructLogs
properties, which are appropriate for a trace call result.vm/api/src/result/TraceScriptResult.ts (1)
- 4-11: The
TraceScriptResult
type is correctly defined withcallResult
,failed
, andstructLogs
properties, which are appropriate for a trace script result.vm/api/src/result/TraceContractResult.ts (1)
- 4-11: The
TraceContractResult
type is correctly defined withcallResult
,failed
, andstructLogs
properties, which are appropriate for a trace contract result.vm/api/src/procedure/TraceCallProcedure.ts (1)
- 4-12: The
TraceCallProcedure
type definition is correct and aligns with the expected functionality of a JSON-RPC procedure that takesTraceCallJsonRpcRequest
and returns aPromise
ofTraceCallJsonRpcResponse
.vm/api/src/procedure/TraceScriptProcedure.ts (1)
- 4-11: The
TraceScriptProcedure
type definition is correct and aligns with the expected functionality of a JSON-RPC procedure that takesTraceScriptJsonRpcRequest
and returns aPromise
ofTraceScriptJsonRpcResponse
.vm/api/src/result/index.ts (1)
- 8-10: The new exports for
TraceCallResult
,TraceScriptResult
, andTraceContractResult
are correctly added to theindex.ts
file, expanding the public API to include these new result types.vm/api/src/handlers/index.ts (1)
- 8-10: The addition of the exports for
TraceCallHandler
,TraceScriptHandler
, andTraceContractHandler
in theindex.ts
file is correct, making these handlers available for import.vm/api/src/requests/TraceCallJsonRpcRequest.ts (1)
- 4-12: The
TraceCallJsonRpcRequest
type is correctly defined, specifying the method as'debug_traceCall'
and the parameters asSerializeToJson<TraceCallParams>
.vm/api/src/procedure/TraceContractProcedure.ts (1)
- 4-10: The
TraceContractProcedure
type definition is correct and aligns with the expected functionality of a JSON-RPC procedure that takesTraceContractJsonRpcRequest
and returns aPromise
ofTraceContractJsonRpcResponse
.vm/api/src/requests/TraceScriptJsonRpcRequest.ts (1)
- 4-12: The
TraceScriptJsonRpcRequest
type is correctly defined, specifying the method as'debug_traceScript'
and the parameters asSerializeToJson<TraceScriptParams>
.vm/api/src/requests/TraceContractJsonRpcRequest.ts (1)
- 4-12: The
TraceContractJsonRpcRequest
type is correctly defined, specifying the method as'debug_traceContract'
and the parameters asSerializeToJson<TraceContractParams>
.vm/api/src/params/index.ts (1)
- 9-11: The addition of the exports for
TraceCallParams
,TraceScriptParams
, andTraceContractParams
in theindex.ts
file is correct, indicating an expansion of functionality related to tracing within the API.vm/api/src/responses/index.ts (1)
- 9-11: The new exports for trace-related JSON-RPC responses (
TraceCallJsonRpcResponse
,TraceContractJsonRpcResponse
, andTraceScriptJsonRpcResponse
) are correctly added to theindex.ts
file.vm/api/src/procedure/index.ts (1)
- 9-11: The addition of the exports for
TraceCallProcedure
,TraceScriptProcedure
, andTraceContractProcedure
in theindex.ts
file is correct, making these procedures available for import.vm/api/src/requests/index.ts (1)
- 10-12: The new exports for trace-related JSON-RPC requests (
TraceCallJsonRpcRequest
,TraceContractJsonRpcRequest
, andTraceScriptJsonRpcRequest
) are correctly added to theindex.ts
file.vm/api/src/result/DebugResult.ts (1)
- 4-4: The modification to export the
StructLog
type is correct, allowing it to be accessible outside of its module, which is necessary for the new tracing functionality.vm/api/src/responses/TraceCallJsonRpcResponse.ts (1)
- 14-17: The
TraceCallJsonRpcResponse
type is correctly defined, specifying the method as'tevm_traceCall'
and the result asSerializeToJson<TraceCallResult>
, with a placeholder for strongly typed errors.vm/api/src/responses/TraceScriptJsonRpcResponse.ts (1)
- 14-17: The
TraceScriptJsonRpcResponse
type is correctly defined, specifying the method as'tevm_traceScript'
and the result asSerializeToJson<TraceScriptResult>
, with a placeholder for strongly typed errors.vm/api/src/responses/TraceContractJsonRpcResponse.ts (1)
- 14-17: The
TraceContractJsonRpcResponse
type is correctly defined, specifying the method as'tevm_traceContract'
and the result asSerializeToJson<TraceContractResult>
, with a placeholder for strongly typed errors.vm/api/src/params/TraceCallParams.ts (1)
- 14-22: The
TraceCallParams
type is correctly defined, extendingTraceParams
and including the necessary properties for a trace call, such ascall
and optionalblock
.vm/api/src/params/TraceScriptParams.ts (1)
- 14-22: The
TraceScriptParams
type is correctly defined, extendingTraceParams
and including the necessary properties for a trace script, such ascall
and optionalblock
.vm/api/src/params/TraceContractParams.ts (1)
- 14-22: The
TraceContractParams
type is correctly defined, extendingTraceParams
and including the necessary properties for a trace contract, such ascall
and optionalblock
.vm/api/src/utils/SerializeToJson.ts (1)
- 26-33: The
SerializeToJson
utility type has been updated correctly to handle serialization of new types more accurately and efficiently, includingJsonSerializableSet
andJsonSerializableArray
.vm/api/src/Tevm.ts (1)
- 32-34: The
Tevm
type has been updated to include new trace handlers (traceCall
,traceContract
, andtraceScript
) correctly, and the restructuring of theeth
anddebug
handlers is appropriate.vm/procedures/src/jsonrpc/debug/traceCallProcedure.js (1)
- 9-35: The
traceCallProcedure
function is correctly refactored to use async/await syntax and structured to handle events and trace data efficiently.vm/api/src/params/DebugParams.ts (1)
- 37-37: The changes in
DebugParams.ts
are correct, including the removal ofCallParameters
and its replacement withCallParams
, and the addition ofreadonly
todisableStack
andtransactionHash
.vm/procedures/src/handlers/debug/traceCallHandler.js (1)
- 13-90: The
traceCallHandler
function is refactored correctly to use async/await syntax and restructured to handle events and trace data more efficiently.vm/api/src/TevmJsonRpcRequestHandler.ts (1)
- 63-65: The addition of
TraceCallJsonRpcResponse
,TraceContractJsonRpcResponse
, andTraceScriptJsonRpcResponse
types toTevmJsonRpcRequestHandler.ts
is correct, extending theTevmReturnType
type with corresponding properties.vm/api/src/index.ts (6)
- 2-3: The changes to the exported types in
vm/api/src/index.ts
are correct, adding new parameters and handlers for tracing scripts, contracts, and calls, as well as additional JSON-RPC requests and responses related to tracing.- 111-113: The addition of handler types for tracing (
TraceScriptHandler
,TraceContractHandler
,TraceCallHandler
) is correct.- 173-174: The addition of result types for tracing (
TraceCallResult
,TraceScriptResult
,TraceContractResult
) is correct.- 236-240: The addition of JSON-RPC request types for tracing (
TraceCallJsonRpcRequest
,TraceScriptJsonRpcRequest
,TraceContractJsonRpcRequest
) is correct.- 303-305: The addition of JSON-RPC response types for tracing (
TraceScriptJsonRpcResponse
,TraceContractJsonRpcResponse
,TraceCallJsonRpcResponse
) is correct.- 366-368: The addition of procedure types for tracing (
TraceCallProcedure
,TraceScriptProcedure
,TraceContractProcedure
) is correct.
b1a509e
to
8649fe2
Compare
Gonna add trace as a param on regular call contract and script instead |
Description
Add the official tevm trace methods. They work the same as call, contract, and script but take extra trace params
Testing
Explain the quality checks that have been done on the code changes
Additional Information
Your ENS/address:
Summary by CodeRabbit
New Features
traceCall
,traceContract
, andtraceScript
.Improvements
eth
anddebug
handler sections for better usability.bigint
.Bug Fixes
StructLog
type declaration to ensure correct export format.Documentation