forked from cerc-io/laconicd-deprecated
@@ -677,6 +677,11 @@ func (api *PublicEthereumAPI) GetTransactionReceipt(hash common.Hash) (map[strin
|
||||
return nil, err
|
||||
}
|
||||
|
||||
cumulativeGasUsed := uint64(tx.TxResult.GasUsed)
|
||||
if tx.Index != 0 {
|
||||
cumulativeGasUsed += rpctypes.GetBlockCumulativeGas(api.clientCtx.Codec, block.Block, int(tx.Index))
|
||||
}
|
||||
|
||||
// Set status codes based on tx result
|
||||
var status hexutil.Uint
|
||||
if tx.TxResult.IsOK() {
|
||||
@@ -699,7 +704,7 @@ func (api *PublicEthereumAPI) GetTransactionReceipt(hash common.Hash) (map[strin
|
||||
receipt := map[string]interface{}{
|
||||
// Consensus fields: These fields are defined by the Yellow Paper
|
||||
"status": status,
|
||||
"cumulativeGasUsed": nil, // ignore until needed
|
||||
"cumulativeGasUsed": hexutil.Uint64(cumulativeGasUsed),
|
||||
"logsBloom": data.Bloom,
|
||||
"logs": data.Logs,
|
||||
|
||||
@@ -715,7 +720,7 @@ func (api *PublicEthereumAPI) GetTransactionReceipt(hash common.Hash) (map[strin
|
||||
"blockNumber": hexutil.Uint64(tx.Height),
|
||||
"transactionIndex": hexutil.Uint64(tx.Index),
|
||||
|
||||
// sender and receiver (contract or EOA) addreses
|
||||
// sender and receiver (contract or EOA) addresses
|
||||
"from": from,
|
||||
"to": ethTx.To(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user