@@ -56,15 +56,15 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
5656 public func getBalance( account: EthereumAddress ) async throws -> BigUInt {
5757 let contract = self . contract
5858 self . transaction. callOnBlock = . latest
59- let result = try await contract. createReadOperation ( " balanceOf " , parameters: [ account] as [ AnyObject ] , extraData: Data ( ) ) !. callContractMethod ( )
59+ let result = try await contract. createReadOperation ( " balanceOf " , parameters: [ account] as [ AnyObject ] , extraData: Data ( ) ) !. callContractMethod ( )
6060 guard let res = result [ " 0 " ] as? BigUInt else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
6161 return res
6262 }
6363
6464 public func getAllowance( originalOwner: EthereumAddress , delegate: EthereumAddress ) async throws -> BigUInt {
6565 let contract = self . contract
6666 self . transaction. callOnBlock = . latest
67- let result = try await contract. createReadOperation ( " allowance " , parameters: [ originalOwner, delegate] as [ AnyObject ] , extraData: Data ( ) ) !. callContractMethod ( )
67+ let result = try await contract. createReadOperation ( " allowance " , parameters: [ originalOwner, delegate] as [ AnyObject ] , extraData: Data ( ) ) !. callContractMethod ( )
6868 guard let res = result [ " 0 " ] as? BigUInt else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
6969 return res
7070 }
@@ -87,7 +87,7 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
8787 guard let value = Utilities . parseToBigUInt ( amount, decimals: intDecimals) else {
8888 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
8989 }
90- let tx = contract. createWriteOperation ( " transfer " , parameters: [ to, value] as [ AnyObject ] ) !
90+ let tx = contract. createWriteOperation ( " transfer " , parameters: [ to, value] as [ AnyObject ] ) !
9191 return tx
9292 }
9393
@@ -110,7 +110,7 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
110110 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
111111 }
112112
113- let tx = contract. createWriteOperation ( " transferFrom " , parameters: [ originalOwner, to, value] as [ AnyObject ] ) !
113+ let tx = contract. createWriteOperation ( " transferFrom " , parameters: [ originalOwner, to, value] as [ AnyObject ] ) !
114114 return tx
115115 }
116116
@@ -133,15 +133,15 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
133133 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
134134 }
135135
136- let tx = contract. createWriteOperation ( " setAllowance " , parameters: [ to, value] as [ AnyObject ] ) !
136+ let tx = contract. createWriteOperation ( " setAllowance " , parameters: [ to, value] as [ AnyObject ] ) !
137137 return tx
138138 }
139139
140140 public func totalSupply( ) async throws -> BigUInt {
141141 let contract = self . contract
142142
143143 self . transaction. callOnBlock = . latest
144- let result = try await contract. createReadOperation ( " totalSupply " , parameters: [ AnyObject] ( ) , extraData: Data ( ) ) !. callContractMethod ( )
144+ let result = try await contract. createReadOperation ( " totalSupply " , parameters: [ AnyObject] ( ) , extraData: Data ( ) ) !. callContractMethod ( )
145145 guard let res = result [ " 0 " ] as? BigUInt else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
146146 return res
147147 }
@@ -165,7 +165,7 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
165165 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
166166 }
167167
168- let tx = contract. createWriteOperation ( " approve " , parameters: [ spender, value] as [ AnyObject ] ) !
168+ let tx = contract. createWriteOperation ( " approve " , parameters: [ spender, value] as [ AnyObject ] ) !
169169 return tx
170170 }
171171
@@ -189,7 +189,7 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
189189 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
190190 }
191191
192- let tx = contract. createWriteOperation ( " transferWithData " , parameters: [ to, value, data] as [ AnyObject ] ) !
192+ let tx = contract. createWriteOperation ( " transferWithData " , parameters: [ to, value, data] as [ AnyObject ] ) !
193193 return tx
194194 }
195195
@@ -212,14 +212,14 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
212212 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
213213 }
214214
215- let tx = contract. createWriteOperation ( " transferFromWithData " , parameters: [ originalOwner, to, value, data] as [ AnyObject ] ) !
215+ let tx = contract. createWriteOperation ( " transferFromWithData " , parameters: [ originalOwner, to, value, data] as [ AnyObject ] ) !
216216 return tx
217217 }
218218
219219 public func isIssuable( ) async throws -> Bool {
220220 let contract = self . contract
221221 self . transaction. callOnBlock = . latest
222- let result = try await contract. createReadOperation ( " isIssuable " , parameters: [ AnyObject] ( ) , extraData: Data ( ) ) !. callContractMethod ( )
222+ let result = try await contract. createReadOperation ( " isIssuable " , parameters: [ AnyObject] ( ) , extraData: Data ( ) ) !. callContractMethod ( )
223223 guard let res = result [ " 0 " ] as? Bool else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
224224 return res
225225 }
@@ -243,7 +243,7 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
243243 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
244244 }
245245
246- let tx = contract. createWriteOperation ( " issue " , parameters: [ tokenHolder, value, data] as [ AnyObject ] ) !
246+ let tx = contract. createWriteOperation ( " issue " , parameters: [ tokenHolder, value, data] as [ AnyObject ] ) !
247247 return tx
248248 }
249249
@@ -266,7 +266,7 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
266266 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
267267 }
268268
269- let tx = contract. createWriteOperation ( " redeem " , parameters: [ value, data] as [ AnyObject ] ) !
269+ let tx = contract. createWriteOperation ( " redeem " , parameters: [ value, data] as [ AnyObject ] ) !
270270 return tx
271271 }
272272
@@ -289,7 +289,7 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
289289 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
290290 }
291291
292- let tx = contract. createWriteOperation ( " redeemFrom " , parameters: [ tokenHolder, value, data] as [ AnyObject ] ) !
292+ let tx = contract. createWriteOperation ( " redeemFrom " , parameters: [ tokenHolder, value, data] as [ AnyObject ] ) !
293293 return tx
294294 }
295295
@@ -309,7 +309,7 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
309309 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
310310 }
311311
312- let result = try await contract. createReadOperation ( " canTransfer " , parameters: [ to, value, data] as [ AnyObject ] , extraData: Data ( ) ) !. callContractMethod ( )
312+ let result = try await contract. createReadOperation ( " canTransfer " , parameters: [ to, value, data] as [ AnyObject ] , extraData: Data ( ) ) !. callContractMethod ( )
313313 guard let res = result [ " 0 " ] as? ( [ UInt8 ] , Data ) else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
314314 return res
315315 }
@@ -330,7 +330,7 @@ public class ERC1594: IERC1594, ERC20BaseProperties {
330330 throw Web3Error . inputError ( desc: " Can not parse inputted amount " )
331331 }
332332
333- let result = try await contract. createReadOperation ( " canTransfer " , parameters: [ originalOwner, to, value, data] as [ AnyObject ] , extraData: Data ( ) ) !. callContractMethod ( )
333+ let result = try await contract. createReadOperation ( " canTransfer " , parameters: [ originalOwner, to, value, data] as [ AnyObject ] , extraData: Data ( ) ) !. callContractMethod ( )
334334 guard let res = result [ " 0 " ] as? ( [ UInt8 ] , Data ) else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
335335 return res
336336 }
0 commit comments