mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
feat: add accessList field in toCallArg
This commit is contained in:
parent
e5d5e09faa
commit
fc5084814c
2 changed files with 26 additions and 0 deletions
|
|
@ -662,6 +662,16 @@ func toCallArg(msg ethereum.CallMsg) interface{} {
|
||||||
if msg.GasTipCap != nil {
|
if msg.GasTipCap != nil {
|
||||||
arg["maxPriorityFeePerGas"] = (*hexutil.Big)(msg.GasTipCap)
|
arg["maxPriorityFeePerGas"] = (*hexutil.Big)(msg.GasTipCap)
|
||||||
}
|
}
|
||||||
|
if msg.AccessList != nil {
|
||||||
|
accessListArg := make([]map[string]interface{}, len(msg.AccessList))
|
||||||
|
for i, access := range msg.AccessList {
|
||||||
|
accessListArg[i] = map[string]interface{}{
|
||||||
|
"address": access.Address,
|
||||||
|
"storageKeys": access.StorageKeys,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arg["accessList"] = accessListArg
|
||||||
|
}
|
||||||
return arg
|
return arg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -236,6 +236,22 @@ func toCallArg(msg ethereum.CallMsg) interface{} {
|
||||||
if msg.GasPrice != nil {
|
if msg.GasPrice != nil {
|
||||||
arg["gasPrice"] = (*hexutil.Big)(msg.GasPrice)
|
arg["gasPrice"] = (*hexutil.Big)(msg.GasPrice)
|
||||||
}
|
}
|
||||||
|
if msg.GasFeeCap != nil {
|
||||||
|
arg["maxFeePerGas"] = (*hexutil.Big)(msg.GasFeeCap)
|
||||||
|
}
|
||||||
|
if msg.GasTipCap != nil {
|
||||||
|
arg["maxPriorityFeePerGas"] = (*hexutil.Big)(msg.GasTipCap)
|
||||||
|
}
|
||||||
|
if msg.AccessList != nil {
|
||||||
|
accessListArg := make([]map[string]interface{}, len(msg.AccessList))
|
||||||
|
for i, access := range msg.AccessList {
|
||||||
|
accessListArg[i] = map[string]interface{}{
|
||||||
|
"address": access.Address,
|
||||||
|
"storageKeys": access.StorageKeys,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
arg["accessList"] = accessListArg
|
||||||
|
}
|
||||||
return arg
|
return arg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue