@@ -97,7 +97,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
97
97
98
98
public func getBalance( account: EthereumAddress ) async throws -> BigUInt {
99
99
let contract = self . contract
100
- var transactionOptions = TransactionOptions ( )
100
+ var transactionOptions = TransactionOptions . emptyTransaction
101
101
transactionOptions. callOnBlock = . latest
102
102
let result = try await contract. read ( " balanceOf " , parameters: [ account] as [ AnyObject ] , extraData: Data ( ) , transactionOptions: self . transactionOptions) !. decodedData ( with: transactionOptions)
103
103
guard let res = result [ " 0 " ] as? BigUInt else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
@@ -106,7 +106,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
106
106
107
107
public func getAllowance( originalOwner: EthereumAddress , delegate: EthereumAddress ) async throws -> BigUInt {
108
108
let contract = self . contract
109
- var transactionOptions = TransactionOptions ( )
109
+ var transactionOptions = TransactionOptions . emptyTransaction
110
110
transactionOptions. callOnBlock = . latest
111
111
let result = try await contract. read ( " allowance " , parameters: [ originalOwner, delegate] as [ AnyObject ] , extraData: Data ( ) , transactionOptions: self . transactionOptions) !. decodedData ( with: transactionOptions)
112
112
guard let res = result [ " 0 " ] as? BigUInt else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
@@ -115,7 +115,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
115
115
116
116
public func transfer( from: EthereumAddress , to: EthereumAddress , amount: String ) async throws -> WriteTransaction {
117
117
let contract = self . contract
118
- var basicOptions = TransactionOptions ( )
118
+ var basicOptions = TransactionOptions . emptyTransaction
119
119
basicOptions. from = from
120
120
basicOptions. to = self . address
121
121
basicOptions. callOnBlock = . latest
@@ -137,7 +137,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
137
137
138
138
public func transferFrom( from: EthereumAddress , to: EthereumAddress , originalOwner: EthereumAddress , amount: String ) async throws -> WriteTransaction {
139
139
let contract = self . contract
140
- var basicOptions = TransactionOptions ( )
140
+ var basicOptions = TransactionOptions . emptyTransaction
141
141
basicOptions. from = from
142
142
basicOptions. to = self . address
143
143
basicOptions. callOnBlock = . latest
@@ -160,7 +160,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
160
160
161
161
public func setAllowance( from: EthereumAddress , to: EthereumAddress , newAmount: String ) async throws -> WriteTransaction {
162
162
let contract = self . contract
163
- var basicOptions = TransactionOptions ( )
163
+ var basicOptions = TransactionOptions . emptyTransaction
164
164
basicOptions. from = from
165
165
basicOptions. to = self . address
166
166
basicOptions. callOnBlock = . latest
@@ -183,7 +183,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
183
183
184
184
public func approve( from: EthereumAddress , spender: EthereumAddress , amount: String ) async throws -> WriteTransaction {
185
185
let contract = self . contract
186
- var basicOptions = TransactionOptions ( )
186
+ var basicOptions = TransactionOptions . emptyTransaction
187
187
basicOptions. from = from
188
188
basicOptions. to = self . address
189
189
basicOptions. callOnBlock = . latest
@@ -206,7 +206,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
206
206
207
207
public func totalSupply( ) async throws -> BigUInt {
208
208
let contract = self . contract
209
- var transactionOptions = TransactionOptions ( )
209
+ var transactionOptions = TransactionOptions . emptyTransaction
210
210
transactionOptions. callOnBlock = . latest
211
211
let result = try await contract. read ( " totalSupply " , parameters: [ AnyObject] ( ) , extraData: Data ( ) , transactionOptions: self . transactionOptions) !. decodedData ( with: transactionOptions)
212
212
guard let res = result [ " 0 " ] as? BigUInt else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
@@ -215,7 +215,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
215
215
216
216
func approve( from: EthereumAddress , spender: EthereumAddress , expectedValue: String , newValue: String ) async throws -> WriteTransaction {
217
217
let contract = self . contract
218
- var basicOptions = TransactionOptions ( )
218
+ var basicOptions = TransactionOptions . emptyTransaction
219
219
basicOptions. from = from
220
220
basicOptions. to = self . address
221
221
basicOptions. callOnBlock = . latest
@@ -241,7 +241,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
241
241
242
242
func increaseAllowance( from: EthereumAddress , spender: EthereumAddress , value: String ) async throws -> WriteTransaction {
243
243
let contract = self . contract
244
- var basicOptions = TransactionOptions ( )
244
+ var basicOptions = TransactionOptions . emptyTransaction
245
245
basicOptions. from = from
246
246
basicOptions. to = self . address
247
247
basicOptions. callOnBlock = . latest
@@ -264,7 +264,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
264
264
265
265
func decreaseAllowance( from: EthereumAddress , spender: EthereumAddress , value: String , strict: Bool ) async throws -> WriteTransaction {
266
266
let contract = self . contract
267
- var basicOptions = TransactionOptions ( )
267
+ var basicOptions = TransactionOptions . emptyTransaction
268
268
basicOptions. from = from
269
269
basicOptions. to = self . address
270
270
basicOptions. callOnBlock = . latest
@@ -287,7 +287,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
287
287
288
288
func setERC20ApproveChecking( from: EthereumAddress , approveChecking: Bool ) throws -> WriteTransaction {
289
289
let contract = self . contract
290
- var basicOptions = TransactionOptions ( )
290
+ var basicOptions = TransactionOptions . emptyTransaction
291
291
basicOptions. from = from
292
292
basicOptions. to = self . address
293
293
@@ -297,7 +297,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
297
297
298
298
func spendableAllowance( owner: EthereumAddress , spender: EthereumAddress ) async throws -> BigUInt {
299
299
let contract = self . contract
300
- var transactionOptions = TransactionOptions ( )
300
+ var transactionOptions = TransactionOptions . emptyTransaction
301
301
transactionOptions. callOnBlock = . latest
302
302
let result = try await contract. read ( " spendableAllowance " , parameters: [ owner, spender] as [ AnyObject ] , extraData: Data ( ) , transactionOptions: self . transactionOptions) !. decodedData ( with: transactionOptions)
303
303
guard let res = result [ " 0 " ] as? BigUInt else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
@@ -306,7 +306,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
306
306
307
307
func transfer( from: EthereumAddress , data: String ) async throws -> WriteTransaction {
308
308
let contract = self . contract
309
- var basicOptions = TransactionOptions ( )
309
+ var basicOptions = TransactionOptions . emptyTransaction
310
310
basicOptions. from = from
311
311
basicOptions. to = self . address
312
312
basicOptions. callOnBlock = . latest
@@ -328,7 +328,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
328
328
329
329
func transferAndCall( from: EthereumAddress , to: EthereumAddress , value: String , data: [ UInt8 ] ) async throws -> WriteTransaction {
330
330
let contract = self . contract
331
- var basicOptions = TransactionOptions ( )
331
+ var basicOptions = TransactionOptions . emptyTransaction
332
332
basicOptions. from = from
333
333
basicOptions. to = self . address
334
334
basicOptions. callOnBlock = . latest
@@ -350,7 +350,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
350
350
351
351
func nonceOf( owner: EthereumAddress ) async throws -> BigUInt {
352
352
let contract = self . contract
353
- var transactionOptions = TransactionOptions ( )
353
+ var transactionOptions = TransactionOptions . emptyTransaction
354
354
transactionOptions. callOnBlock = . latest
355
355
let result = try await contract. read ( " nonceOf " , parameters: [ owner] as [ AnyObject ] , extraData: Data ( ) , transactionOptions: self . transactionOptions) !. decodedData ( with: transactionOptions)
356
356
guard let res = result [ " 0 " ] as? BigUInt else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
@@ -359,7 +359,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
359
359
360
360
func increaseNonce( from: EthereumAddress ) throws -> WriteTransaction {
361
361
let contract = self . contract
362
- var basicOptions = TransactionOptions ( )
362
+ var basicOptions = TransactionOptions . emptyTransaction
363
363
basicOptions. from = from
364
364
basicOptions. to = self . address
365
365
basicOptions. callOnBlock = . latest
@@ -370,7 +370,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
370
370
371
371
func delegateTransferAndCall( from: EthereumAddress , nonce: BigUInt , fee: BigUInt , gasAmount: BigUInt , to: EthereumAddress , value: String , data: [ UInt8 ] , mode: IERC1376DelegateMode , v: UInt8 , r: Data , s: Data ) async throws -> WriteTransaction {
372
372
let contract = self . contract
373
- var basicOptions = TransactionOptions ( )
373
+ var basicOptions = TransactionOptions . emptyTransaction
374
374
basicOptions. from = from
375
375
basicOptions. to = self . address
376
376
basicOptions. callOnBlock = . latest
@@ -395,7 +395,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
395
395
396
396
func directDebit( debtor: EthereumAddress , receiver: EthereumAddress ) async throws -> DirectDebit {
397
397
let contract = self . contract
398
- var transactionOptions = TransactionOptions ( )
398
+ var transactionOptions = TransactionOptions . emptyTransaction
399
399
transactionOptions. callOnBlock = . latest
400
400
let result = try await contract. read ( " directDebit " , parameters: [ debtor, receiver] as [ AnyObject ] , extraData: Data ( ) , transactionOptions: self . transactionOptions) !. decodedData ( with: transactionOptions)
401
401
guard let res = result [ " 0 " ] as? DirectDebit else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
@@ -404,7 +404,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
404
404
405
405
func setupDirectDebit( from: EthereumAddress , receiver: EthereumAddress , info: DirectDebitInfo ) throws -> WriteTransaction {
406
406
let contract = self . contract
407
- var basicOptions = TransactionOptions ( )
407
+ var basicOptions = TransactionOptions . emptyTransaction
408
408
basicOptions. from = from
409
409
basicOptions. to = self . address
410
410
@@ -414,7 +414,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
414
414
415
415
func terminateDirectDebit( from: EthereumAddress , receiver: EthereumAddress ) throws -> WriteTransaction {
416
416
let contract = self . contract
417
- var basicOptions = TransactionOptions ( )
417
+ var basicOptions = TransactionOptions . emptyTransaction
418
418
basicOptions. from = from
419
419
basicOptions. to = self . address
420
420
@@ -424,7 +424,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
424
424
425
425
func withdrawDirectDebit( from: EthereumAddress , debtor: EthereumAddress ) throws -> WriteTransaction {
426
426
let contract = self . contract
427
- var basicOptions = TransactionOptions ( )
427
+ var basicOptions = TransactionOptions . emptyTransaction
428
428
basicOptions. from = from
429
429
basicOptions. to = self . address
430
430
@@ -434,7 +434,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
434
434
435
435
func withdrawDirectDebit( from: EthereumAddress , debtors: [ EthereumAddress ] , strict: Bool ) throws -> WriteTransaction {
436
436
let contract = self . contract
437
- var basicOptions = TransactionOptions ( )
437
+ var basicOptions = TransactionOptions . emptyTransaction
438
438
basicOptions. from = from
439
439
basicOptions. to = self . address
440
440
0 commit comments