@@ -37,7 +37,7 @@ public extension ENS {
37
37
defaultOptions. from = from
38
38
defaultOptions. to = self . address
39
39
40
- guard let transaction = self . contract. createWriteOperation ( " addController " , parameters: [ controllerAddress as AnyObject ] ) else { throw Web3Error . transactionSerializationError}
40
+ guard let transaction = self . contract. createWriteOperation ( " addController " , parameters: [ controllerAddress] ) else { throw Web3Error . transactionSerializationError}
41
41
42
42
return transaction
43
43
}
@@ -47,7 +47,7 @@ public extension ENS {
47
47
defaultOptions. from = from
48
48
defaultOptions. to = self . address
49
49
50
- guard let transaction = self . contract. createWriteOperation ( " removeController " , parameters: [ controllerAddress as AnyObject ] ) else { throw Web3Error . transactionSerializationError}
50
+ guard let transaction = self . contract. createWriteOperation ( " removeController " , parameters: [ controllerAddress] ) else { throw Web3Error . transactionSerializationError}
51
51
52
52
return transaction
53
53
}
@@ -57,13 +57,13 @@ public extension ENS {
57
57
defaultOptions. from = from
58
58
defaultOptions. to = self . address
59
59
60
- guard let transaction = self . contract. createWriteOperation ( " setResolver " , parameters: [ resolverAddress as AnyObject ] ) else { throw Web3Error . transactionSerializationError}
60
+ guard let transaction = self . contract. createWriteOperation ( " setResolver " , parameters: [ resolverAddress] ) else { throw Web3Error . transactionSerializationError}
61
61
62
62
return transaction
63
63
}
64
64
65
65
public func getNameExpirity( name: BigUInt ) async throws -> BigUInt {
66
- guard let transaction = self . contract. createReadOperation ( " nameExpires " , parameters: [ name as AnyObject ] ) else { throw Web3Error . transactionSerializationError}
66
+ guard let transaction = self . contract. createReadOperation ( " nameExpires " , parameters: [ name] ) else { throw Web3Error . transactionSerializationError}
67
67
68
68
guard let result = try ? await transaction. callContractMethod ( ) else { throw Web3Error . processingError ( desc: " Can't call transaction " ) }
69
69
guard let expirity = result [ " 0 " ] as? BigUInt else { throw Web3Error . processingError ( desc: " Can't get answer " ) }
@@ -72,7 +72,7 @@ public extension ENS {
72
72
73
73
@available ( * , message: " This function should not be used to check if a name can be registered by a user. To check if a name can be registered by a user, check name availablility via the controller " )
74
74
public func isNameAvailable( name: BigUInt ) async throws -> Bool {
75
- guard let transaction = self . contract. createReadOperation ( " available " , parameters: [ name as AnyObject ] ) else { throw Web3Error . transactionSerializationError}
75
+ guard let transaction = self . contract. createReadOperation ( " available " , parameters: [ name] ) else { throw Web3Error . transactionSerializationError}
76
76
77
77
guard let result = try ? await transaction. callContractMethod ( ) else { throw Web3Error . processingError ( desc: " Can't call transaction " ) }
78
78
guard let available = result [ " 0 " ] as? Bool else { throw Web3Error . processingError ( desc: " Can't get answer " ) }
@@ -83,7 +83,7 @@ public extension ENS {
83
83
defaultOptions. from = from
84
84
defaultOptions. to = self . address
85
85
86
- guard let transaction = self . contract. createWriteOperation ( " reclaim " , parameters: [ record as AnyObject ] ) else { throw Web3Error . transactionSerializationError}
86
+ guard let transaction = self . contract. createWriteOperation ( " reclaim " , parameters: [ record] ) else { throw Web3Error . transactionSerializationError}
87
87
88
88
return transaction
89
89
}
0 commit comments