@@ -35,17 +35,17 @@ extension DirectDebitInfo: Hashable {
35
35
36
36
// Service-Friendly Token Standard
37
37
protocol IERC1376 : IERC20 {
38
- func approve( from: EthereumAddress , spender: EthereumAddress , expectedValue: String , newValue: String ) async throws -> WriteTransaction
39
- func increaseAllowance( from: EthereumAddress , spender: EthereumAddress , value: String ) async throws -> WriteTransaction
40
- func decreaseAllowance( from: EthereumAddress , spender: EthereumAddress , value: String , strict: Bool ) async throws -> WriteTransaction
41
- func setERC20ApproveChecking( from: EthereumAddress , approveChecking: Bool ) async throws -> WriteTransaction
38
+ func approve( from: EthereumAddress , spender: EthereumAddress , expectedValue: String , newValue: String ) async throws -> WriteOperation
39
+ func increaseAllowance( from: EthereumAddress , spender: EthereumAddress , value: String ) async throws -> WriteOperation
40
+ func decreaseAllowance( from: EthereumAddress , spender: EthereumAddress , value: String , strict: Bool ) async throws -> WriteOperation
41
+ func setERC20ApproveChecking( from: EthereumAddress , approveChecking: Bool ) async throws -> WriteOperation
42
42
43
43
func spendableAllowance( owner: EthereumAddress , spender: EthereumAddress ) async throws -> BigUInt
44
- func transfer( from: EthereumAddress , data: String ) async throws -> WriteTransaction
45
- func transferAndCall( from: EthereumAddress , to: EthereumAddress , value: String , data: [ UInt8 ] ) async throws -> WriteTransaction
44
+ func transfer( from: EthereumAddress , data: String ) async throws -> WriteOperation
45
+ func transferAndCall( from: EthereumAddress , to: EthereumAddress , value: String , data: [ UInt8 ] ) async throws -> WriteOperation
46
46
47
47
func nonceOf( owner: EthereumAddress ) async throws -> BigUInt
48
- func increaseNonce( from: EthereumAddress ) async throws -> WriteTransaction
48
+ func increaseNonce( from: EthereumAddress ) async throws -> WriteOperation
49
49
func delegateTransferAndCall( from: EthereumAddress ,
50
50
nonce: BigUInt ,
51
51
fee: BigUInt ,
@@ -56,13 +56,13 @@ protocol IERC1376: IERC20 {
56
56
mode: IERC1376DelegateMode ,
57
57
v: UInt8 ,
58
58
r: Data ,
59
- s: Data ) async throws -> WriteTransaction
59
+ s: Data ) async throws -> WriteOperation
60
60
61
61
func directDebit( debtor: EthereumAddress , receiver: EthereumAddress ) async throws -> DirectDebit
62
- func setupDirectDebit( from: EthereumAddress , receiver: EthereumAddress , info: DirectDebitInfo ) async throws -> WriteTransaction
63
- func terminateDirectDebit( from: EthereumAddress , receiver: EthereumAddress ) async throws -> WriteTransaction
64
- func withdrawDirectDebit( from: EthereumAddress , debtor: EthereumAddress ) async throws -> WriteTransaction
65
- func withdrawDirectDebit( from: EthereumAddress , debtors: [ EthereumAddress ] , strict: Bool ) async throws -> WriteTransaction
62
+ func setupDirectDebit( from: EthereumAddress , receiver: EthereumAddress , info: DirectDebitInfo ) async throws -> WriteOperation
63
+ func terminateDirectDebit( from: EthereumAddress , receiver: EthereumAddress ) async throws -> WriteOperation
64
+ func withdrawDirectDebit( from: EthereumAddress , debtor: EthereumAddress ) async throws -> WriteOperation
65
+ func withdrawDirectDebit( from: EthereumAddress , debtors: [ EthereumAddress ] , strict: Bool ) async throws -> WriteOperation
66
66
}
67
67
68
68
// FIXME: Rewrite this to CodableTransaction
@@ -113,7 +113,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
113
113
return res
114
114
}
115
115
116
- public func transfer( from: EthereumAddress , to: EthereumAddress , amount: String ) async throws -> WriteTransaction {
116
+ public func transfer( from: EthereumAddress , to: EthereumAddress , amount: String ) async throws -> WriteOperation {
117
117
let contract = self . contract
118
118
var basicOptions = CodableTransaction . emptyTransaction
119
119
basicOptions. from = from
@@ -135,7 +135,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
135
135
return tx
136
136
}
137
137
138
- public func transferFrom( from: EthereumAddress , to: EthereumAddress , originalOwner: EthereumAddress , amount: String ) async throws -> WriteTransaction {
138
+ public func transferFrom( from: EthereumAddress , to: EthereumAddress , originalOwner: EthereumAddress , amount: String ) async throws -> WriteOperation {
139
139
let contract = self . contract
140
140
var basicOptions = CodableTransaction . emptyTransaction
141
141
basicOptions. from = from
@@ -158,7 +158,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
158
158
return tx
159
159
}
160
160
161
- public func setAllowance( from: EthereumAddress , to: EthereumAddress , newAmount: String ) async throws -> WriteTransaction {
161
+ public func setAllowance( from: EthereumAddress , to: EthereumAddress , newAmount: String ) async throws -> WriteOperation {
162
162
let contract = self . contract
163
163
var basicOptions = CodableTransaction . emptyTransaction
164
164
basicOptions. from = from
@@ -181,7 +181,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
181
181
return tx
182
182
}
183
183
184
- public func approve( from: EthereumAddress , spender: EthereumAddress , amount: String ) async throws -> WriteTransaction {
184
+ public func approve( from: EthereumAddress , spender: EthereumAddress , amount: String ) async throws -> WriteOperation {
185
185
let contract = self . contract
186
186
var basicOptions = CodableTransaction . emptyTransaction
187
187
basicOptions. from = from
@@ -213,7 +213,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
213
213
return res
214
214
}
215
215
216
- func approve( from: EthereumAddress , spender: EthereumAddress , expectedValue: String , newValue: String ) async throws -> WriteTransaction {
216
+ func approve( from: EthereumAddress , spender: EthereumAddress , expectedValue: String , newValue: String ) async throws -> WriteOperation {
217
217
let contract = self . contract
218
218
var basicOptions = CodableTransaction . emptyTransaction
219
219
basicOptions. from = from
@@ -239,7 +239,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
239
239
return tx
240
240
}
241
241
242
- func increaseAllowance( from: EthereumAddress , spender: EthereumAddress , value: String ) async throws -> WriteTransaction {
242
+ func increaseAllowance( from: EthereumAddress , spender: EthereumAddress , value: String ) async throws -> WriteOperation {
243
243
let contract = self . contract
244
244
var basicOptions = CodableTransaction . emptyTransaction
245
245
basicOptions. from = from
@@ -262,7 +262,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
262
262
return tx
263
263
}
264
264
265
- func decreaseAllowance( from: EthereumAddress , spender: EthereumAddress , value: String , strict: Bool ) async throws -> WriteTransaction {
265
+ func decreaseAllowance( from: EthereumAddress , spender: EthereumAddress , value: String , strict: Bool ) async throws -> WriteOperation {
266
266
let contract = self . contract
267
267
var basicOptions = CodableTransaction . emptyTransaction
268
268
basicOptions. from = from
@@ -285,7 +285,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
285
285
return tx
286
286
}
287
287
288
- func setERC20ApproveChecking( from: EthereumAddress , approveChecking: Bool ) throws -> WriteTransaction {
288
+ func setERC20ApproveChecking( from: EthereumAddress , approveChecking: Bool ) throws -> WriteOperation {
289
289
let contract = self . contract
290
290
var basicOptions = CodableTransaction . emptyTransaction
291
291
basicOptions. from = from
@@ -304,7 +304,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
304
304
return res
305
305
}
306
306
307
- func transfer( from: EthereumAddress , data: String ) async throws -> WriteTransaction {
307
+ func transfer( from: EthereumAddress , data: String ) async throws -> WriteOperation {
308
308
let contract = self . contract
309
309
var basicOptions = CodableTransaction . emptyTransaction
310
310
basicOptions. from = from
@@ -326,7 +326,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
326
326
return tx
327
327
}
328
328
329
- func transferAndCall( from: EthereumAddress , to: EthereumAddress , value: String , data: [ UInt8 ] ) async throws -> WriteTransaction {
329
+ func transferAndCall( from: EthereumAddress , to: EthereumAddress , value: String , data: [ UInt8 ] ) async throws -> WriteOperation {
330
330
let contract = self . contract
331
331
var basicOptions = CodableTransaction . emptyTransaction
332
332
basicOptions. from = from
@@ -357,7 +357,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
357
357
return res
358
358
}
359
359
360
- func increaseNonce( from: EthereumAddress ) throws -> WriteTransaction {
360
+ func increaseNonce( from: EthereumAddress ) throws -> WriteOperation {
361
361
let contract = self . contract
362
362
var basicOptions = CodableTransaction . emptyTransaction
363
363
basicOptions. from = from
@@ -368,7 +368,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
368
368
return tx
369
369
}
370
370
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 {
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 -> WriteOperation {
372
372
let contract = self . contract
373
373
var basicOptions = CodableTransaction . emptyTransaction
374
374
basicOptions. from = from
@@ -402,7 +402,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
402
402
return res
403
403
}
404
404
405
- func setupDirectDebit( from: EthereumAddress , receiver: EthereumAddress , info: DirectDebitInfo ) throws -> WriteTransaction {
405
+ func setupDirectDebit( from: EthereumAddress , receiver: EthereumAddress , info: DirectDebitInfo ) throws -> WriteOperation {
406
406
let contract = self . contract
407
407
var basicOptions = CodableTransaction . emptyTransaction
408
408
basicOptions. from = from
@@ -412,7 +412,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
412
412
return tx
413
413
}
414
414
415
- func terminateDirectDebit( from: EthereumAddress , receiver: EthereumAddress ) throws -> WriteTransaction {
415
+ func terminateDirectDebit( from: EthereumAddress , receiver: EthereumAddress ) throws -> WriteOperation {
416
416
let contract = self . contract
417
417
var basicOptions = CodableTransaction . emptyTransaction
418
418
basicOptions. from = from
@@ -422,7 +422,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
422
422
return tx
423
423
}
424
424
425
- func withdrawDirectDebit( from: EthereumAddress , debtor: EthereumAddress ) throws -> WriteTransaction {
425
+ func withdrawDirectDebit( from: EthereumAddress , debtor: EthereumAddress ) throws -> WriteOperation {
426
426
let contract = self . contract
427
427
var basicOptions = CodableTransaction . emptyTransaction
428
428
basicOptions. from = from
@@ -432,7 +432,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
432
432
return tx
433
433
}
434
434
435
- func withdrawDirectDebit( from: EthereumAddress , debtors: [ EthereumAddress ] , strict: Bool ) throws -> WriteTransaction {
435
+ func withdrawDirectDebit( from: EthereumAddress , debtors: [ EthereumAddress ] , strict: Bool ) throws -> WriteOperation {
436
436
let contract = self . contract
437
437
var basicOptions = CodableTransaction . emptyTransaction
438
438
basicOptions. from = from
0 commit comments