eth/tracers: fix

This commit is contained in:
Sina Mahmoodi 2021-10-12 12:52:11 +02:00
parent bf165bba68
commit 4ea0d15966
1 changed files with 4 additions and 1 deletions

View File

@ -24,7 +24,7 @@ type CallFrame struct {
Gas string `json:"gas"` Gas string `json:"gas"`
GasUsed string `json:"gasUsed"` GasUsed string `json:"gasUsed"`
Input string `json:"input"` Input string `json:"input"`
Output string `json:"output"` Output string `json:"output,omitempty"`
Error string `json:"error,omitempty"` Error string `json:"error,omitempty"`
Calls []CallFrame `json:"calls,omitempty"` Calls []CallFrame `json:"calls,omitempty"`
} }
@ -117,6 +117,9 @@ func bytesToHex(s []byte) string {
} }
func bigToHex(n *big.Int) string { func bigToHex(n *big.Int) string {
if n == nil {
return ""
}
return "0x" + n.Text(16) return "0x" + n.Text(16)
} }