Fix eip1559 contract transactions

This commit is contained in:
Roman Volosovskyi 2021-08-19 13:28:58 +03:00
parent b22a261bc2
commit d1a581b18c
No known key found for this signature in database
GPG Key ID: 0238A4B5ECEE70DE
2 changed files with 17 additions and 2 deletions

View File

@ -1 +1 @@
0.83.12 0.83.13

View File

@ -382,7 +382,22 @@ func (t *Transactor) buildTransactionWithOverrides(nonce uint64, value *big.Int,
tx = gethtypes.NewTx(txData) tx = gethtypes.NewTx(txData)
t.logNewTx(args, gas, gasPrice, value) t.logNewTx(args, gas, gasPrice, value)
} else { } else {
tx = gethtypes.NewContractCreation(nonce, value, gas, gasPrice, args.GetInput()) if args.IsDynamicFeeTx() {
gasTipCap := (*big.Int)(args.MaxPriorityFeePerGas)
gasFeeCap := (*big.Int)(args.MaxFeePerGas)
txData := &gethtypes.DynamicFeeTx{
Nonce: nonce,
Value: value,
Gas: gas,
GasTipCap: gasTipCap,
GasFeeCap: gasFeeCap,
Data: args.GetInput(),
}
tx = gethtypes.NewTx(txData)
} else {
tx = gethtypes.NewContractCreation(nonce, value, gas, gasPrice, args.GetInput())
}
t.logNewContract(args, gas, gasPrice, value, nonce) t.logNewContract(args, gas, gasPrice, value, nonce)
} }