@@ -21,11 +21,11 @@ protocol IERC721 {
21
21
22
22
func approve( from: EthereumAddress , approved: EthereumAddress , tokenId: BigUInt ) throws -> WriteTransaction
23
23
24
- func setApprovalForAll( operator address : EthereumAddress , from : EthereumAddress , approved: Bool ) throws -> WriteTransaction
24
+ func setApprovalForAll( from : EthereumAddress , operator user : EthereumAddress , approved: Bool ) throws -> WriteTransaction
25
25
26
26
func getApproved( tokenId: BigUInt ) throws -> EthereumAddress
27
27
28
- func isApprovedForAll( operator address : EthereumAddress , approved : Bool ) throws -> Bool
28
+ func isApprovedForAll( owner : EthereumAddress , operator user : EthereumAddress ) throws -> Bool
29
29
}
30
30
31
31
protocol IERC721Metadata {
@@ -181,20 +181,20 @@ public class ERC721: IERC721, IERC721Enumerable, IERC721Metadata {
181
181
return tx
182
182
}
183
183
184
- public func setApprovalForAll( operator address : EthereumAddress , from : EthereumAddress , approved: Bool ) throws -> WriteTransaction {
184
+ public func setApprovalForAll( from : EthereumAddress , operator user : EthereumAddress , approved: Bool ) throws -> WriteTransaction {
185
185
let contract = self . contract
186
186
var basicOptions = TransactionOptions ( )
187
187
basicOptions. from = from
188
188
189
- let tx = contract. write ( " setApprovalForAll " , parameters: [ address , approved] as [ AnyObject ] , transactionOptions: basicOptions) !
189
+ let tx = contract. write ( " setApprovalForAll " , parameters: [ user , approved] as [ AnyObject ] , transactionOptions: basicOptions) !
190
190
return tx
191
191
}
192
192
193
- public func isApprovedForAll( operator address : EthereumAddress , approved : Bool ) throws -> Bool {
193
+ public func isApprovedForAll( owner : EthereumAddress , operator user : EthereumAddress ) throws -> Bool {
194
194
let contract = self . contract
195
195
var basicOptions = TransactionOptions ( )
196
196
basicOptions. callOnBlock = . latest
197
- let result = try contract. read ( " isApprovedForAll " , parameters: [ address , approved ] as [ AnyObject ] , extraData: Data ( ) , transactionOptions: self . transactionOptions) !. call ( transactionOptions: transactionOptions)
197
+ let result = try contract. read ( " isApprovedForAll " , parameters: [ owner , user ] as [ AnyObject ] , extraData: Data ( ) , transactionOptions: self . transactionOptions) !. call ( transactionOptions: transactionOptions)
198
198
guard let res = result [ " 0 " ] as? Bool else { throw Web3Error . processingError ( desc: " Failed to get result of expected type from the Ethereum node " ) }
199
199
return res
200
200
}
0 commit comments