@@ -59,11 +59,12 @@ type TransactOpts struct {
59
59
Nonce * big.Int // Nonce to use for the transaction execution (nil = use pending state)
60
60
Signer SignerFn // Method to use for signing the transaction (mandatory)
61
61
62
- Value * big.Int // Funds to transfer along the transaction (nil = 0 = no funds)
63
- GasPrice * big.Int // Gas price to use for the transaction execution (nil = gas price oracle)
64
- GasFeeCap * big.Int // Gas fee cap to use for the 1559 transaction execution (nil = gas price oracle)
65
- GasTipCap * big.Int // Gas priority fee cap to use for the 1559 transaction execution (nil = gas price oracle)
66
- GasLimit uint64 // Gas limit to set for the transaction execution (0 = estimate)
62
+ Value * big.Int // Funds to transfer along the transaction (nil = 0 = no funds)
63
+ GasPrice * big.Int // Gas price to use for the transaction execution (nil = gas price oracle)
64
+ GasFeeCap * big.Int // Gas fee cap to use for the 1559 transaction execution (nil = gas price oracle)
65
+ GasTipCap * big.Int // Gas priority fee cap to use for the 1559 transaction execution (nil = gas price oracle)
66
+ GasLimit uint64 // Gas limit to set for the transaction execution (0 = estimate)
67
+ AccessList types.AccessList // Access list to set for the transaction execution (nil = no access list)
67
68
68
69
Context context.Context // Network context to support cancellation and timeouts (nil = no timeout)
69
70
@@ -300,20 +301,21 @@ func (c *BoundContract) createDynamicTx(opts *TransactOpts, contract *common.Add
300
301
return nil , err
301
302
}
302
303
baseTx := & types.DynamicFeeTx {
303
- To : contract ,
304
- Nonce : nonce ,
305
- GasFeeCap : gasFeeCap ,
306
- GasTipCap : gasTipCap ,
307
- Gas : gasLimit ,
308
- Value : value ,
309
- Data : input ,
304
+ To : contract ,
305
+ Nonce : nonce ,
306
+ GasFeeCap : gasFeeCap ,
307
+ GasTipCap : gasTipCap ,
308
+ Gas : gasLimit ,
309
+ Value : value ,
310
+ Data : input ,
311
+ AccessList : opts .AccessList ,
310
312
}
311
313
return types .NewTx (baseTx ), nil
312
314
}
313
315
314
316
func (c * BoundContract ) createLegacyTx (opts * TransactOpts , contract * common.Address , input []byte ) (* types.Transaction , error ) {
315
- if opts .GasFeeCap != nil || opts .GasTipCap != nil {
316
- return nil , errors .New ("maxFeePerGas or maxPriorityFeePerGas specified but london is not active yet" )
317
+ if opts .GasFeeCap != nil || opts .GasTipCap != nil || opts . AccessList != nil {
318
+ return nil , errors .New ("maxFeePerGas or maxPriorityFeePerGas or accessList specified but london is not active yet" )
317
319
}
318
320
// Normalize value
319
321
value := opts .Value
0 commit comments