Skip to content

Commit 3a93aa4

Browse files
committed
Remove obsolete gas limit for read operations
1 parent 7f8df70 commit 3a93aa4

File tree

7 files changed

+0
-21
lines changed

7 files changed

+0
-21
lines changed

Sources/web3swift/Tokens/ERC1155/Web3+ERC1155.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,6 @@ public class ERC1155: IERC1155 {
136136
public func supportsInterface(interfaceID: String) async throws -> Bool {
137137
let contract = self.contract
138138
self.transaction.callOnBlock = .latest
139-
// FIXME: check if this still works
140-
self.transaction.gasLimit = 300000
141-
// self.transaction.gasLimitPolicy = .manual(30000)
142139
let result = try await contract.createReadOperation("supportsInterface", parameters: [interfaceID] as [AnyObject], extraData: Data() )!.callContractMethod()
143140
guard let res = result["0"] as? Bool else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")}
144141
return res

Sources/web3swift/Tokens/ERC1400/Web3+ERC1400.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -686,9 +686,6 @@ extension ERC1400: IERC777 {
686686
public func supportsInterface(interfaceID: String) async throws -> Bool {
687687
let contract = self.contract
688688
self.transaction.callOnBlock = .latest
689-
// FIXME: test if this still works
690-
self.transaction.gasLimit = 30000
691-
// self.transaction.gasLimitPolicy = .manual(30000)
692689
let result = try await contract.createReadOperation("supportsInterface", parameters: [interfaceID] as [AnyObject], extraData: Data() )!.callContractMethod()
693690
guard let res = result["0"] as? Bool else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")}
694691
return res

Sources/web3swift/Tokens/ERC1410/Web3+ERC1410.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -452,9 +452,6 @@ extension ERC1410: IERC777 {
452452
public func supportsInterface(interfaceID: String) async throws -> Bool {
453453
let contract = self.contract
454454
self.transaction.callOnBlock = .latest
455-
// FIXME:
456-
self.transaction.gasLimit = 30000
457-
// self.transaction.gasLimitPolicy = .manual(30000)
458455
let result = try await contract.createReadOperation("supportsInterface", parameters: [interfaceID] as [AnyObject], extraData: Data() )!.callContractMethod()
459456
guard let res = result["0"] as? Bool else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")}
460457
return res

Sources/web3swift/Tokens/ERC1633/Web3+ERC1633.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,6 @@ public class ERC1633: IERC1633, ERC20BaseProperties {
180180
public func supportsInterface(interfaceID: String) async throws -> Bool {
181181
let contract = self.contract
182182
self.transaction.callOnBlock = .latest
183-
// FIXME:
184-
self.transaction.gasLimit = 30000
185-
// self.transaction.gasLimitPolicy = .manual(30000)
186183
let result = try await contract.createReadOperation("supportsInterface", parameters: [interfaceID] as [AnyObject], extraData: Data() )!.callContractMethod()
187184
guard let res = result["0"] as? Bool else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")}
188185
return res

Sources/web3swift/Tokens/ERC721/Web3+ERC721.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,6 @@ public class ERC721: IERC721 {
192192
public func supportsInterface(interfaceID: String) async throws -> Bool {
193193
let contract = self.contract
194194
transaction.callOnBlock = .latest
195-
// FIXME:
196-
self.transaction.gasLimit = 30000
197-
// transaction.gasLimitPolicy = .manual(30000)
198195
let result = try await contract.createReadOperation("supportsInterface", parameters: [interfaceID] as [AnyObject], extraData: Data() )!.callContractMethod()
199196
guard let res = result["0"] as? Bool else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")}
200197
return res

Sources/web3swift/Tokens/ERC721x/Web3+ERC721x.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,6 @@ public class ERC721x: IERC721x {
174174
public func supportsInterface(interfaceID: String) async throws -> Bool {
175175
let contract = self.contract
176176
self.transaction.callOnBlock = .latest
177-
// FIXME:
178-
self.transaction.gasLimit = 30000
179-
// self.transaction.gasLimitPolicy = .manual(30000)
180177
let result = try await contract.createReadOperation("supportsInterface", parameters: [interfaceID] as [AnyObject], extraData: Data() )!.callContractMethod()
181178
guard let res = result["0"] as? Bool else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")}
182179
return res

Sources/web3swift/Tokens/ERC777/Web3+ERC777.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,6 @@ public class ERC777: IERC777, ERC20BaseProperties {
361361
public func supportsInterface(interfaceID: String) async throws -> Bool {
362362
let contract = self.contract
363363
self.transaction.callOnBlock = .latest
364-
// FIXME:
365-
self.transaction.gasLimit = 30000
366-
// self.transaction.gasLimitPolicy = .manual(30000)
367364
let result = try await contract.createReadOperation("supportsInterface", parameters: [interfaceID] as [AnyObject], extraData: Data() )!.callContractMethod()
368365
guard let res = result["0"] as? Bool else {throw Web3Error.processingError(desc: "Failed to get result of expected type from the Ethereum node")}
369366
return res

0 commit comments

Comments
 (0)