rpc: geth v1.10.9 changes (#624)

* rpc: geth v1.10.9 changes

* updates

* suggestGasTipCap

* update gRPC

* resend

* fixes

* rm unused func

* address TODO
This commit is contained in:
Federico Kunze Küllmer
2021-10-06 11:22:32 +00:00
committed by GitHub
parent 202bc5f1cd
commit bcdb982886
17 changed files with 427 additions and 221 deletions
+9 -9
View File
@@ -113,7 +113,7 @@ func (args *TransactionArgs) ToTransaction() *MsgEthereumTx {
GasFeeCap: &maxFeePerGas,
GasTipCap: &maxPriorityFeePerGas,
Amount: &value,
Data: args.data(),
Data: args.GetData(),
Accesses: al,
}
case args.AccessList != nil:
@@ -124,7 +124,7 @@ func (args *TransactionArgs) ToTransaction() *MsgEthereumTx {
GasLimit: gas,
GasPrice: &gasPrice,
Amount: &value,
Data: args.data(),
Data: args.GetData(),
Accesses: NewAccessList(args.AccessList),
}
default:
@@ -134,7 +134,7 @@ func (args *TransactionArgs) ToTransaction() *MsgEthereumTx {
GasLimit: gas,
GasPrice: &gasPrice,
Amount: &value,
Data: args.data(),
Data: args.GetData(),
}
}
@@ -162,7 +162,7 @@ func (args *TransactionArgs) ToMessage(globalGasCap uint64, baseFee *big.Int) (e
}
// Set sender address or use zero address if none specified.
addr := args.from()
addr := args.GetFrom()
// Set default gas & gas price if none were set
gas := globalGasCap
@@ -214,7 +214,7 @@ func (args *TransactionArgs) ToMessage(globalGasCap uint64, baseFee *big.Int) (e
if args.Value != nil {
value = args.Value.ToInt()
}
data := args.data()
data := args.GetData()
var accessList ethtypes.AccessList
if args.AccessList != nil {
accessList = *args.AccessList
@@ -223,16 +223,16 @@ func (args *TransactionArgs) ToMessage(globalGasCap uint64, baseFee *big.Int) (e
return msg, nil
}
// from retrieves the transaction sender address.
func (args *TransactionArgs) from() common.Address {
// GetFrom retrieves the transaction sender address.
func (args *TransactionArgs) GetFrom() common.Address {
if args.From == nil {
return common.Address{}
}
return *args.From
}
// data retrieves the transaction calldata. Input field is preferred.
func (args *TransactionArgs) data() []byte {
// GetData retrieves the transaction calldata. Input field is preferred.
func (args *TransactionArgs) GetData() []byte {
if args.Input != nil {
return *args.Input
}