Skip to content

Commit

Permalink
add missing fields to "toCallArg" (#1197)
Browse files Browse the repository at this point in the history
  • Loading branch information
darioush authored May 30, 2024
1 parent 1dc1924 commit caa42de
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions ethclient/ethclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -763,5 +763,14 @@ func toCallArg(msg interfaces.CallMsg) interface{} {
if msg.GasTipCap != nil {
arg["maxPriorityFeePerGas"] = (*hexutil.Big)(msg.GasTipCap)
}
if msg.AccessList != nil {
arg["accessList"] = msg.AccessList
}
if msg.BlobGasFeeCap != nil {
arg["maxFeePerBlobGas"] = (*hexutil.Big)(msg.BlobGasFeeCap)
}
if msg.BlobHashes != nil {
arg["blobVersionedHashes"] = msg.BlobHashes
}
return arg
}
9 changes: 9 additions & 0 deletions ethclient/subnetevmclient/subnet_evm_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,15 @@ func toCallArg(msg interfaces.CallMsg) interface{} {
if msg.GasPrice != nil {
arg["gasPrice"] = (*hexutil.Big)(msg.GasPrice)
}
if msg.AccessList != nil {
arg["accessList"] = msg.AccessList
}
if msg.BlobGasFeeCap != nil {
arg["maxFeePerBlobGas"] = (*hexutil.Big)(msg.BlobGasFeeCap)
}
if msg.BlobHashes != nil {
arg["blobVersionedHashes"] = msg.BlobHashes
}
return arg
}

Expand Down
4 changes: 4 additions & 0 deletions interfaces/interfaces.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,10 @@ type CallMsg struct {
Data []byte // input data, usually an ABI-encoded contract method invocation

AccessList types.AccessList // EIP-2930 access list.

// For BlobTxType
BlobGasFeeCap *big.Int
BlobHashes []common.Hash
}

// A ContractCaller provides contract calls, essentially transactions that are executed by
Expand Down

0 comments on commit caa42de

Please sign in to comment.