@@ -96,7 +96,7 @@ public class ENS {
96
96
}
97
97
98
98
// 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 {
100
100
guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
101
101
throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
102
102
}
@@ -106,9 +106,9 @@ public class ENS {
106
106
guard isAddrSupports else {
107
107
throw Web3Error . processingError ( desc: " Address isn't supported " )
108
108
}
109
- var options = options ?? defaultTransaction
109
+ var options = transaction ?? defaultTransaction
110
110
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 {
112
112
throw Web3Error . processingError ( desc: " Can't get result " )
113
113
}
114
114
return result
@@ -131,7 +131,7 @@ public class ENS {
131
131
}
132
132
133
133
// 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 {
135
135
guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
136
136
throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
137
137
}
@@ -141,9 +141,9 @@ public class ENS {
141
141
guard isNameSupports else {
142
142
throw Web3Error . processingError ( desc: " Name isn't supported " )
143
143
}
144
- var options = options ?? defaultTransaction
144
+ var options = transaction ?? defaultTransaction
145
145
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 {
147
147
throw Web3Error . processingError ( desc: " Can't get result " )
148
148
}
149
149
return result
@@ -167,7 +167,7 @@ public class ENS {
167
167
}
168
168
169
169
// 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 {
171
171
guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
172
172
throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
173
173
}
@@ -177,9 +177,9 @@ public class ENS {
177
177
guard isContentSupports else {
178
178
throw Web3Error . processingError ( desc: " Content isn't supported " )
179
179
}
180
- var options = options ?? defaultTransaction
180
+ var options = transaction ?? defaultTransaction
181
181
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 {
183
183
throw Web3Error . processingError ( desc: " Can't get result " )
184
184
}
185
185
return result
@@ -202,7 +202,7 @@ public class ENS {
202
202
}
203
203
204
204
// 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 {
206
206
guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
207
207
throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
208
208
}
@@ -212,9 +212,9 @@ public class ENS {
212
212
guard isABISupports else {
213
213
throw Web3Error . processingError ( desc: " ABI isn't supported " )
214
214
}
215
- var options = options ?? defaultTransaction
215
+ var options = transaction ?? defaultTransaction
216
216
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 {
218
218
throw Web3Error . processingError ( desc: " Can't get result " )
219
219
}
220
220
return result
@@ -237,7 +237,7 @@ public class ENS {
237
237
}
238
238
239
239
// 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 {
241
241
guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
242
242
throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
243
243
}
@@ -247,9 +247,9 @@ public class ENS {
247
247
guard isPKSupports else {
248
248
throw Web3Error . processingError ( desc: " Public Key isn't supported " )
249
249
}
250
- var options = options ?? defaultTransaction
250
+ var options = transaction ?? defaultTransaction
251
251
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 {
253
253
throw Web3Error . processingError ( desc: " Can't get result " )
254
254
}
255
255
return result
@@ -272,7 +272,7 @@ public class ENS {
272
272
}
273
273
274
274
// 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 {
276
276
guard let resolver = try ? await self . registry. getResolver ( forDomain: node) else {
277
277
throw Web3Error . processingError ( desc: " Failed to get resolver for domain " )
278
278
}
@@ -282,9 +282,9 @@ public class ENS {
282
282
guard isTextSupports else {
283
283
throw Web3Error . processingError ( desc: " Text isn't supported " )
284
284
}
285
- var options = options ?? defaultTransaction
285
+ var options = transaction ?? defaultTransaction
286
286
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 {
288
288
throw Web3Error . processingError ( desc: " Can't get result " )
289
289
}
290
290
return result
0 commit comments