Skip to content
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

set innertx.To when op is create2 #45

Merged
merged 2 commits into from
Jul 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 1 addition & 24 deletions core/vm/evm_xlayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,6 @@ const (
SUICIDE_TYP = "suicide"
)

//// InnerTx stores the basic field of an inner tx.
//// NOTE: DON'T change this struct for:
//// 1. It will be written to database, and must be keep the same type When reading history data from db
//// 2. It will be returned by rpc method
//type InnerTx struct {
// Dept big.Int `json:"dept"`
// InternalIndex big.Int `json:"internal_index"`
// CallType string `json:"call_type"`
// Name string `json:"name"`
// TraceAddress string `json:"trace_address"`
// CodeAddress string `json:"code_address"`
// From string `json:"from"`
// To string `json:"to"`
// Input string `json:"input"`
// Output string `json:"output"`
// IsError bool `json:"is_error"`
// Gas uint64 `json:"gas"`
// GasUsed uint64 `json:"gas_used"`
// Value string `json:"value"`
// ValueWei string `json:"value_wei"`
// Error string `json:"error"`
//}

type InnerTxMeta struct {
index int
lastDepth int
Expand Down Expand Up @@ -129,7 +106,7 @@ func afterOp(interpreter *EVMInterpreter, opType string, gas_used uint64, newInd
}

switch opType {
case "create":
case CREATE_TYP, CREATE2_TYP:
innerTx.To = addr.String()
}
}
Loading