ethereum, ethclient: add blob transaction fields in CallMsg (#28989)

Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
maskpp 2024-02-15 17:08:46 +08:00 committed by GitHub
parent 8321fe2fda
commit 9d537f5439
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -665,6 +665,12 @@ func toCallArg(msg ethereum.CallMsg) interface{} {
if msg.AccessList != nil { if msg.AccessList != nil {
arg["accessList"] = msg.AccessList arg["accessList"] = msg.AccessList
} }
if msg.BlobGasFeeCap != nil {
arg["maxFeePerBlobGas"] = (*hexutil.Big)(msg.BlobGasFeeCap)
}
if msg.BlobHashes != nil {
arg["blobVersionedHashes"] = msg.BlobHashes
}
return arg return arg
} }

View File

@ -152,6 +152,10 @@ type CallMsg struct {
Data []byte // input data, usually an ABI-encoded contract method invocation Data []byte // input data, usually an ABI-encoded contract method invocation
AccessList types.AccessList // EIP-2930 access list. 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 // A ContractCaller provides contract calls, essentially transactions that are executed by