File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 94
94
95
95
let chain = utils:: get_chain ( config. chain , & provider) . await ?;
96
96
let etherscan_api_key = config. get_etherscan_api_key ( Some ( chain) ) ;
97
+ let legacy = tx_opts. legacy || chain. is_legacy ( ) ;
97
98
98
99
if let Some ( gas_limit) = tx_opts. gas_limit {
99
100
tx. set_gas_limit ( gas_limit. to ( ) ) ;
@@ -104,14 +105,14 @@ where
104
105
}
105
106
106
107
if let Some ( gas_price) = tx_opts. gas_price {
107
- if tx_opts . legacy {
108
+ if legacy {
108
109
tx. set_gas_price ( gas_price. to ( ) ) ;
109
110
} else {
110
111
tx. set_max_fee_per_gas ( gas_price. to ( ) ) ;
111
112
}
112
113
}
113
114
114
- if !tx_opts . legacy {
115
+ if !legacy {
115
116
if let Some ( priority_fee) = tx_opts. priority_gas_price {
116
117
tx. set_max_priority_fee_per_gas ( priority_fee. to ( ) ) ;
117
118
}
@@ -128,7 +129,7 @@ where
128
129
Ok ( Self {
129
130
provider,
130
131
tx,
131
- legacy : tx_opts . legacy || chain . is_legacy ( ) ,
132
+ legacy,
132
133
blob : tx_opts. blob ,
133
134
chain,
134
135
etherscan_api_key,
You can’t perform that action at this time.
0 commit comments