-
Notifications
You must be signed in to change notification settings - Fork 324
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
[api] implement web3 API debug_traceTransaction #3779
Changes from 5 commits
d32fde5
b932455
8b121dd
ada78ff
4c23599
ea83bdf
df09bab
9f793ee
b4233b9
2ac00bd
a41cedb
7c764e4
d893f73
e4a1454
d133278
44918bb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,12 @@ import ( | |
"encoding/hex" | ||
"encoding/json" | ||
|
||
"github.com/ethereum/go-ethereum/common" | ||
"github.com/ethereum/go-ethereum/common/hexutil" | ||
"github.com/ethereum/go-ethereum/common/math" | ||
"github.com/ethereum/go-ethereum/core/types" | ||
"github.com/ethereum/go-ethereum/core/vm" | ||
"github.com/holiman/uint256" | ||
"github.com/iotexproject/go-pkgs/crypto" | ||
"github.com/iotexproject/go-pkgs/hash" | ||
"github.com/iotexproject/iotex-address/address" | ||
|
@@ -75,6 +80,28 @@ type ( | |
CurrentBlock string `json:"currentBlock"` | ||
HighestBlock string `json:"highestBlock"` | ||
} | ||
structLog struct { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if custom marshalling is used? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it could be done in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there is no need to implement |
||
Pc uint64 `json:"pc"` | ||
Op vm.OpCode `json:"op"` | ||
Gas math.HexOrDecimal64 `json:"gas"` | ||
GasCost math.HexOrDecimal64 `json:"gasCost"` | ||
Memory hexutil.Bytes `json:"memory"` | ||
MemorySize int `json:"memSize"` | ||
Stack []uint256.Int `json:"stack"` | ||
ReturnData hexutil.Bytes `json:"returnData"` | ||
Storage map[common.Hash]common.Hash `json:"storage"` | ||
Depth int `json:"depth"` | ||
RefundCounter uint64 `json:"refund"` | ||
OpName string `json:"opName"` | ||
ErrorString string `json:"error"` | ||
} | ||
debugTraceTransactionResult struct { | ||
Failed bool `json:"failed"` | ||
Revert string `json:"revert"` | ||
ReturnValue string `json:"returnValue"` | ||
Gas uint64 `json:"gas"` | ||
StructLogs []structLog `json:"structLogs"` | ||
} | ||
) | ||
|
||
var ( | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
grpcserver.TraceTransactionStructLogs
should be integrated with this func