We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5484e81 commit 4e4ae26Copy full SHA for 4e4ae26
Sources/web3swift/Promises/Promise+Web3+Eth+EstimateGas.swift
@@ -24,7 +24,22 @@ extension web3.Eth {
24
}
25
throw Web3Error.nodeError(desc: "Invalid value from Ethereum node")
26
27
- return value
+
28
+ if let policy = transactionOptions?.gasLimit {
29
+ switch policy {
30
+ case .automatic:
31
+ return value
32
+ case .limited(let limitValue):
33
+ return limitValue < value ? limitValue: value
34
+ case .manual(let exactValue):
35
+ return exactValue
36
+ case .withMargin:
37
+ // MARK: - update value according margin
38
39
+ }
40
+ } else {
41
42
43
44
} catch {
45
let returnPromise = Promise<BigUInt>.pending()
0 commit comments