Commit f6e6c55
authored
Estimate gas for no-op self-transfer transaction (#103)
Replace the hardcoded 21k gas limit for the noop self-send with a runtime estimate from the provider. Make the request mutable, call chain.provider().estimate_gas(tx_request.clone()) and fall back to 21000 if estimation fails. This handles chains that charge more than the standard 21k and preserves the subsequent fee estimation and tx building logic.1 parent 7762469 commit f6e6c55
1 file changed
+12
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | 135 | | |
136 | | - | |
137 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
138 | 147 | | |
139 | 148 | | |
140 | 149 | | |
| |||
0 commit comments