fix RPC for blob tx receipt

This commit is contained in:
Roy Crihfield 2024-07-26 18:38:44 +08:00
parent 190b36bcd1
commit 95beee2714
2 changed files with 8 additions and 0 deletions

View File

@ -660,6 +660,12 @@ func (pea *PublicEthAPI) localGetTransactionReceipt(ctx context.Context, hash co
if receipt.Logs == nil { if receipt.Logs == nil {
fields["logs"] = []*types.Log{} fields["logs"] = []*types.Log{}
} }
if tx.Type() == types.BlobTxType {
fields["blobGasUsed"] = hexutil.Uint64(receipt.BlobGasUsed)
fields["blobGasPrice"] = (*hexutil.Big)(receipt.BlobGasPrice)
}
// If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation // If the ContractAddress is 20 0x0 bytes, assume it is not a contract creation
if receipt.ContractAddress != (common.Address{}) { if receipt.ContractAddress != (common.Address{}) {
fields["contractAddress"] = receipt.ContractAddress fields["contractAddress"] = receipt.ContractAddress

View File

@ -4,6 +4,8 @@ services:
ipld-eth-server: ipld-eth-server:
restart: unless-stopped restart: unless-stopped
image: cerc/ipld-eth-server:local image: cerc/ipld-eth-server:local
build:
context: ..
networks: networks:
- test_default - test_default
environment: environment: