Skip to content

Commit

Permalink
Fix eip1559 contract transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
rasom committed Aug 19, 2021
1 parent b22a261 commit d1a581b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.83.12
0.83.13
17 changes: 16 additions & 1 deletion transactions/transactor.go
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,22 @@ func (t *Transactor) buildTransactionWithOverrides(nonce uint64, value *big.Int,
tx = gethtypes.NewTx(txData)
t.logNewTx(args, gas, gasPrice, value)
} 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)
}

Expand Down

0 comments on commit d1a581b

Please sign in to comment.