Skip to content

Commit

Permalink
Added effectiveGasPrice to TxReceipt.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frozen committed Oct 14, 2024
1 parent 0f41c5d commit 150f2f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rpc/harmony/v1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ type TxReceipt struct {
To string `json:"to"`
Root hexutil.Bytes `json:"root"`
Status hexutil.Uint `json:"status"`
EffectiveGasPrice *big.Int `json:"effectiveGasPrice"`
}

// StakingTxReceipt represents a staking transaction receipt that will serialize to the RPC representation.
Expand Down Expand Up @@ -359,6 +360,7 @@ func NewTxReceipt(
To: receiver,
Root: receipt.PostState,
Status: hexutil.Uint(receipt.Status),
EffectiveGasPrice: new(big.Int).Set(receipt.EffectiveGasPrice),
}

// Set empty array for empty logs
Expand Down
2 changes: 2 additions & 0 deletions rpc/harmony/v2/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ type TxReceipt struct {
To string `json:"to"`
Root hexutil.Bytes `json:"root"`
Status uint `json:"status"`
EffectiveGasPrice *big.Int `json:"effectiveGasPrice"`
}

// StakingTxReceipt represents a staking transaction receipt that will serialize to the RPC representation.
Expand Down Expand Up @@ -389,6 +390,7 @@ func NewTxReceipt(
To: receiver,
Root: receipt.PostState,
Status: uint(receipt.Status),
EffectiveGasPrice: new(big.Int).Set(receipt.EffectiveGasPrice),
}

// Set optionals
Expand Down

0 comments on commit 150f2f5

Please sign in to comment.