@@ -96,7 +96,7 @@ public class ENS {
9696 }
9797
9898 // FIXME: Rewrite this to CodableTransaction
99- public func setAddress( forNode node: String , address: EthereumAddress , options : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
99+ public func setAddress( forNode node: String , address: EthereumAddress , transaction : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
100100 guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
101101 throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
102102 }
@@ -106,9 +106,9 @@ public class ENS {
106106 guard isAddrSupports else {
107107 throw Web3Error . processingError ( desc: " Address isn't supported " )
108108 }
109- var options = options ?? defaultTransaction
109+ var options = transaction ?? defaultTransaction
110110 options. to = resolver. resolverContractAddress
111- guard let result = try ? await resolver. setAddress ( forNode: node, address: address, options : options, password: password) else {
111+ guard let result = try ? await resolver. setAddress ( forNode: node, address: address, transaction : options, password: password) else {
112112 throw Web3Error . processingError ( desc: " Can't get result " )
113113 }
114114 return result
@@ -131,7 +131,7 @@ public class ENS {
131131 }
132132
133133 // FIXME: Rewrite this to CodableTransaction
134- public func setName( forNode node: String , name: String , options : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
134+ public func setName( forNode node: String , name: String , transaction : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
135135 guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
136136 throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
137137 }
@@ -141,9 +141,9 @@ public class ENS {
141141 guard isNameSupports else {
142142 throw Web3Error . processingError ( desc: " Name isn't supported " )
143143 }
144- var options = options ?? defaultTransaction
144+ var options = transaction ?? defaultTransaction
145145 options. to = resolver. resolverContractAddress
146- guard let result = try ? await resolver. setCanonicalName ( forNode: node, name: name, options : options, password: password) else {
146+ guard let result = try ? await resolver. setCanonicalName ( forNode: node, name: name, transaction : options, password: password) else {
147147 throw Web3Error . processingError ( desc: " Can't get result " )
148148 }
149149 return result
@@ -167,7 +167,7 @@ public class ENS {
167167 }
168168
169169 // FIXME: Rewrite this to CodableTransaction
170- public func setContent( forNode node: String , hash: String , options : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
170+ public func setContent( forNode node: String , hash: String , transaction : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
171171 guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
172172 throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
173173 }
@@ -177,9 +177,9 @@ public class ENS {
177177 guard isContentSupports else {
178178 throw Web3Error . processingError ( desc: " Content isn't supported " )
179179 }
180- var options = options ?? defaultTransaction
180+ var options = transaction ?? defaultTransaction
181181 options. to = resolver. resolverContractAddress
182- guard let result = try ? await resolver. setContentHash ( forNode: node, hash: hash, options : options, password: password) else {
182+ guard let result = try ? await resolver. setContentHash ( forNode: node, hash: hash, transaction : options, password: password) else {
183183 throw Web3Error . processingError ( desc: " Can't get result " )
184184 }
185185 return result
@@ -202,7 +202,7 @@ public class ENS {
202202 }
203203
204204 // FIXME: Rewrite this to CodableTransaction
205- public func setABI( forNode node: String , contentType: ENS . Resolver . ContentType , data: Data , options : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
205+ public func setABI( forNode node: String , contentType: ENS . Resolver . ContentType , data: Data , transaction : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
206206 guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
207207 throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
208208 }
@@ -212,9 +212,9 @@ public class ENS {
212212 guard isABISupports else {
213213 throw Web3Error . processingError ( desc: " ABI isn't supported " )
214214 }
215- var options = options ?? defaultTransaction
215+ var options = transaction ?? defaultTransaction
216216 options. to = resolver. resolverContractAddress
217- guard let result = try ? await resolver. setContractABI ( forNode: node, contentType: contentType, data: data, options : options, password: password) else {
217+ guard let result = try ? await resolver. setContractABI ( forNode: node, contentType: contentType, data: data, transaction : options, password: password) else {
218218 throw Web3Error . processingError ( desc: " Can't get result " )
219219 }
220220 return result
@@ -237,7 +237,7 @@ public class ENS {
237237 }
238238
239239 // FIXME: Rewrite this to CodableTransaction
240- public func setPublicKey( forNode node: String , publicKey: PublicKey , options : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
240+ public func setPublicKey( forNode node: String , publicKey: PublicKey , transaction : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
241241 guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
242242 throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
243243 }
@@ -247,9 +247,9 @@ public class ENS {
247247 guard isPKSupports else {
248248 throw Web3Error . processingError ( desc: " Public Key isn't supported " )
249249 }
250- var options = options ?? defaultTransaction
250+ var options = transaction ?? defaultTransaction
251251 options. to = resolver. resolverContractAddress
252- guard let result = try ? await resolver. setPublicKey ( forNode: node, publicKey: publicKey, options : options, password: password) else {
252+ guard let result = try ? await resolver. setPublicKey ( forNode: node, publicKey: publicKey, transaction : options, password: password) else {
253253 throw Web3Error . processingError ( desc: " Can't get result " )
254254 }
255255 return result
@@ -272,7 +272,7 @@ public class ENS {
272272 }
273273
274274 // FIXME: Rewrite this to CodableTransaction
275- public func setText( forNode node: String , key: String , value: String , options : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
275+ public func setText( forNode node: String , key: String , value: String , transaction : CodableTransaction ? = nil , password: String ) async throws -> TransactionSendingResult {
276276 guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
277277 throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
278278 }
@@ -282,9 +282,9 @@ public class ENS {
282282 guard isTextSupports else {
283283 throw Web3Error . processingError ( desc: " Text isn't supported " )
284284 }
285- var options = options ?? defaultTransaction
285+ var options = transaction ?? defaultTransaction
286286 options. to = resolver. resolverContractAddress
287- guard let result = try ? await resolver. setTextData ( forNode: node, key: key, value: value, options : options, password: password) else {
287+ guard let result = try ? await resolver. setTextData ( forNode: node, key: key, value: value, transaction : options, password: password) else {
288288 throw Web3Error . processingError ( desc: " Can't get result " )
289289 }
290290 return result
0 commit comments