-
Notifications
You must be signed in to change notification settings - Fork 7
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
get innternal transactions by tracer #201
base: dev
Are you sure you want to change the base?
Conversation
func init() { | ||
register("okTracer", NewOKTracer) | ||
} |
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.
Is this function called anywhere? How does the tracing for EVM actually begins?
From: currentTx.From.String(), | ||
To: toAddress, | ||
ValueWei: value.String(), | ||
CallValueWei: hexutil.EncodeBig(value), |
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.
This follows core VM conversion and will display hex string.
if index-2 >= 0 { | ||
callTx.InternalIndex = *big.NewInt(int64(index - 2)) | ||
} else { | ||
callTx.InternalIndex = *big.NewInt(0) | ||
log.Error("internalTxTraceToInnerTx got -ve internal index.", "index", index, "calc idx", index-2) | ||
} |
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.
-2
to match previous inner tx response. And log error if somehow trace idx becomes -ve.
Some things to note, not all fields can be replicated due to slight differences in implementation. I will list those fields here:
|
Get internal transaction by tracer