Fix eip1559 contract transactions
This commit is contained in:
parent
b22a261bc2
commit
d1a581b18c
|
@ -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)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue