Skip to content

Commit

Permalink
bugfix: Fixed the rpc tx and receipt marshal of type and to address
Browse files Browse the repository at this point in the history
  • Loading branch information
gameofpointers committed Oct 2, 2024
1 parent 5a938b7 commit 3624f0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/quaiapi/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ type RPCTransaction struct {
To *common.MixedcaseAddress `json:"to,omitempty"`
TransactionIndex *hexutil.Uint64 `json:"transactionIndex"`
Value *hexutil.Big `json:"value,omitempty"`
Type hexutil.Uint64 `json:"type,omitempty"`
Type hexutil.Uint64 `json:"type"`
Accesses *types.AccessList `json:"accessList,omitempty"`
ChainID *hexutil.Big `json:"chainId,omitempty"`
V *hexutil.Big `json:"v,omitempty"`
Expand Down Expand Up @@ -1438,7 +1438,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha
"transactionHash": hash,
"transactionIndex": hexutil.Uint64(index),
"from": from.Hex(),
"to": tx.To().MixedcaseAddress(),
"to": tx.To().Hex(),
"gasUsed": hexutil.Uint64(receipt.GasUsed),
"cumulativeGasUsed": hexutil.Uint64(receipt.CumulativeGasUsed),
"contractAddress": nil,
Expand All @@ -1449,7 +1449,7 @@ func (s *PublicTransactionPoolAPI) GetTransactionReceipt(ctx context.Context, ha

if tx.Type() == types.ExternalTxType {
fields["originatingTxHash"] = tx.OriginatingTxHash()
fields["etxType"] = tx.EtxType()
fields["etxType"] = hexutil.Uint(tx.EtxType())
}

var outBoundEtxs []*RPCTransaction
Expand Down

0 comments on commit 3624f0f

Please sign in to comment.