Skip to content

Commit

Permalink
problem: missing fields for root and blobGasPrice
Browse files Browse the repository at this point in the history
  • Loading branch information
splix committed Oct 9, 2024
1 parent 17686b7 commit 451781f
Showing 1 changed file with 32 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,17 @@

package io.emeraldpay.etherjar.rpc.json;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import io.emeraldpay.etherjar.domain.*;
import io.emeraldpay.etherjar.hex.Hex32;

import java.io.Serializable;
import java.util.List;
import java.util.Objects;

@JsonIgnoreProperties(ignoreUnknown = true)
public class TransactionReceiptJson implements TransactionRef, Serializable {

/**
Expand Down Expand Up @@ -94,8 +97,16 @@ public class TransactionReceiptJson implements TransactionRef, Serializable {
@JsonSerialize(using = HexIntSerializer.class)
private Integer status;

/**
* The actual value per gas deducted from the sender's account. Before EIP-1559, this is equal to the transaction's gas price. After, it is equal to baseFeePerGas + min(maxFeePerGas - baseFeePerGas, maxPriorityFeePerGas).
*/
private Wei effectiveGasPrice;

/**
* The actual value per gas deducted from the sender's account for blob gas. Only specified for blob transactions as defined by EIP-4844.
*/
private Wei blobGasPrice;

/**
* Transaction type
*
Expand All @@ -105,6 +116,11 @@ public class TransactionReceiptJson implements TransactionRef, Serializable {
@JsonSerialize(using = HexIntSerializer.class)
private Integer type = 0;

/**
* The post-transaction state root. Only specified for transactions included before the Byzantium upgrade.
*/
private Hex32 root;

public TransactionId getTransactionHash() {
return transactionHash;
}
Expand Down Expand Up @@ -209,6 +225,14 @@ public void setEffectiveGasPrice(Wei effectiveGasPrice) {
this.effectiveGasPrice = effectiveGasPrice;
}

public Wei getBlobGasPrice() {
return blobGasPrice;
}

public void setBlobGasPrice(Wei blobGasPrice) {
this.blobGasPrice = blobGasPrice;
}

public int getType() {
if (type == null) {
return 0;
Expand All @@ -220,6 +244,14 @@ public void setType(int type) {
this.type = type;
}

public Hex32 getRoot() {
return root;
}

public void setRoot(Hex32 root) {
this.root = root;
}

@Override
public TransactionId getHash() {
return transactionHash;
Expand Down

0 comments on commit 451781f

Please sign in to comment.