Skip to content

Commit 6534980

Browse files
fix: some spacing and docs fixed
1 parent 79886de commit 6534980

File tree

16 files changed

+148
-148
lines changed

16 files changed

+148
-148
lines changed

Sources/Web3Core/Contract/ContractProtocol.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ import BigInt
3535
/// let inputArgsTypes: [ABI.Element.InOut] = [.init(name: "firstArgument", type: ABI.Element.ParameterType.string),
3636
/// .init(name: "secondArgument", type: ABI.Element.ParameterType.uint(bits: 256))]
3737
/// let constructor = ABI.Element.Constructor(inputs: inputArgsTypes, constant: false, payable: payable)
38-
/// let constructorArguments = ["This is the array of constructor arguments", 10_000]
38+
/// let constructorArguments: [Any] = ["This is the array of constructor arguments", 10_000]
3939
///
4040
/// contract.deploy(bytecode: smartContractBytecode,
4141
/// constructor: constructor,
@@ -48,7 +48,7 @@ import BigInt
4848
///
4949
/// ```swift
5050
/// let contract = EthereumContract(abiString)
51-
/// let constructorArguments = ["This is the array of constructor arguments", 10_000]
51+
/// let constructorArguments: [Any] = ["This is the array of constructor arguments", 10_000]
5252
///
5353
/// contract.deploy(bytecode: smartContractBytecode,
5454
/// constructor: contract.constructor,

Sources/web3swift/Browser/browser.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5379,7 +5379,7 @@
53795379
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
53805380
* The iteratee must complete with a boolean value as its result.
53815381
* Invoked with (item, callback).
5382-
* @param {Function} [callback] - A callback which is called as soon
5382+
* @param {Function} [callback] - A callback which is called as soon as any
53835383
* iteratee returns `true`, or after all the `iteratee` functions have finished.
53845384
* Result will be the first item in the array that passes the truth test
53855385
* (iteratee) or the value `undefined` if none passed. Invoked with
@@ -5412,7 +5412,7 @@
54125412
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
54135413
* The iteratee must complete with a boolean value as its result.
54145414
* Invoked with (item, callback).
5415-
* @param {Function} [callback] - A callback which is called as soon
5415+
* @param {Function} [callback] - A callback which is called as soon as any
54165416
* iteratee returns `true`, or after all the `iteratee` functions have finished.
54175417
* Result will be the first item in the array that passes the truth test
54185418
* (iteratee) or the value `undefined` if none passed. Invoked with
@@ -5434,7 +5434,7 @@
54345434
* @param {AsyncFunction} iteratee - A truth test to apply to each item in `coll`.
54355435
* The iteratee must complete with a boolean value as its result.
54365436
* Invoked with (item, callback).
5437-
* @param {Function} [callback] - A callback which is called as soon
5437+
* @param {Function} [callback] - A callback which is called as soon as any
54385438
* iteratee returns `true`, or after all the `iteratee` functions have finished.
54395439
* Result will be the first item in the array that passes the truth test
54405440
* (iteratee) or the value `undefined` if none passed. Invoked with
@@ -7297,7 +7297,7 @@
72977297
* in the collections in parallel.
72987298
* The iteratee should complete with a boolean `result` value.
72997299
* Invoked with (item, callback).
7300-
* @param {Function} [callback] - A callback which is called as soon
7300+
* @param {Function} [callback] - A callback which is called as soon as any
73017301
* iteratee returns `true`, or after all the iteratee functions have finished.
73027302
* Result will be either `true` or `false` depending on the values of the async
73037303
* tests. Invoked with (err, result).
@@ -7329,7 +7329,7 @@
73297329
* in the collections in parallel.
73307330
* The iteratee should complete with a boolean `result` value.
73317331
* Invoked with (item, callback).
7332-
* @param {Function} [callback] - A callback which is called as soon
7332+
* @param {Function} [callback] - A callback which is called as soon as any
73337333
* iteratee returns `true`, or after all the iteratee functions have finished.
73347334
* Result will be either `true` or `false` depending on the values of the async
73357335
* tests. Invoked with (err, result).
@@ -7351,7 +7351,7 @@
73517351
* in the collections in series.
73527352
* The iteratee should complete with a boolean `result` value.
73537353
* Invoked with (item, callback).
7354-
* @param {Function} [callback] - A callback which is called as soon
7354+
* @param {Function} [callback] - A callback which is called as soon as any
73557355
* iteratee returns `true`, or after all the iteratee functions have finished.
73567356
* Result will be either `true` or `false` depending on the values of the async
73577357
* tests. Invoked with (err, result).
@@ -41538,7 +41538,7 @@
4153841538
addUnderlyingListener(
4153941539
fullEventName,
4154041540
predicateEvent,
41541-
jsonPathCompiler( match[2] )
41541+
jsonPathCompiler( match[2])
4154241542
);
4154341543
}
4154441544
}
@@ -41566,7 +41566,7 @@
4156641566
*/
4156741567
addListener = varArgs(function( eventId, parameters ){
4156841568

41569-
if( oboeApi[eventId] ) {
41569+
if( oboeApi[eventId]) {
4157041570

4157141571
// for events added as .on(event, callback), if there is a
4157241572
// .event() equivalent with special behaviour , pass through

Sources/web3swift/Tokens/ERC1155/Web3+ERC1155.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public class ERC1155: IERC1155 {
8484
self.transaction.from = from
8585
self.transaction.to = self.address
8686

87-
let tx = contract.createWriteOperation("safeTransferFrom", parameters: [originalOwner, to, id, value, data] )!
87+
let tx = contract.createWriteOperation("safeTransferFrom", parameters: [originalOwner, to, id, value, data])!
8888
return tx
8989
}
9090

@@ -94,7 +94,7 @@ public class ERC1155: IERC1155 {
9494
self.transaction.to = self.address
9595

9696
let tx = contract
97-
.createWriteOperation("safeBatchTransferFrom", parameters: [originalOwner, to, ids, values, data] )!
97+
.createWriteOperation("safeBatchTransferFrom", parameters: [originalOwner, to, ids, values, data])!
9898
return tx
9999
}
100100

@@ -121,7 +121,7 @@ public class ERC1155: IERC1155 {
121121
self.transaction.from = from
122122
self.transaction.to = self.address
123123

124-
let tx = contract.createWriteOperation("setApprovalForAll", parameters: [user, approved, scope] )!
124+
let tx = contract.createWriteOperation("setApprovalForAll", parameters: [user, approved, scope])!
125125
return tx
126126
}
127127

Sources/web3swift/Tokens/ERC1376/Web3+ERC1376.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
121121
guard let value = Utilities.parseToBigUInt(amount, decimals: intDecimals) else {
122122
throw Web3Error.inputError(desc: "Can not parse inputted amount")
123123
}
124-
let tx = contract.createWriteOperation("transfer", parameters: [to, value] )!
124+
let tx = contract.createWriteOperation("transfer", parameters: [to, value])!
125125
return tx
126126
}
127127

@@ -143,7 +143,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
143143
throw Web3Error.inputError(desc: "Can not parse inputted amount")
144144
}
145145

146-
let tx = contract.createWriteOperation("transferFrom", parameters: [originalOwner, to, value] )!
146+
let tx = contract.createWriteOperation("transferFrom", parameters: [originalOwner, to, value])!
147147
return tx
148148
}
149149

@@ -165,7 +165,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
165165
throw Web3Error.inputError(desc: "Can not parse inputted amount")
166166
}
167167

168-
let tx = contract.createWriteOperation("setAllowance", parameters: [to, value] )!
168+
let tx = contract.createWriteOperation("setAllowance", parameters: [to, value])!
169169
return tx
170170
}
171171

@@ -187,7 +187,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
187187
throw Web3Error.inputError(desc: "Can not parse inputted amount")
188188
}
189189

190-
let tx = contract.createWriteOperation("approve", parameters: [spender, value] )!
190+
let tx = contract.createWriteOperation("approve", parameters: [spender, value])!
191191
return tx
192192
}
193193

@@ -220,7 +220,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
220220
throw Web3Error.inputError(desc: "Can not parse inputted amount")
221221
}
222222

223-
let tx = contract.createWriteOperation("approve", parameters: [spender, eValue, nValue] )!
223+
let tx = contract.createWriteOperation("approve", parameters: [spender, eValue, nValue])!
224224
return tx
225225
}
226226

@@ -242,7 +242,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
242242
throw Web3Error.inputError(desc: "Can not parse inputted amount")
243243
}
244244

245-
let tx = contract.createWriteOperation("increaseAllowance", parameters: [spender, amount] )!
245+
let tx = contract.createWriteOperation("increaseAllowance", parameters: [spender, amount])!
246246
return tx
247247
}
248248

@@ -264,7 +264,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
264264
throw Web3Error.inputError(desc: "Can not parse inputted amount")
265265
}
266266

267-
let tx = contract.createWriteOperation("decreaseAllowance", parameters: [spender, amount, strict] )!
267+
let tx = contract.createWriteOperation("decreaseAllowance", parameters: [spender, amount, strict])!
268268
return tx
269269
}
270270

@@ -273,7 +273,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
273273
self.transaction.from = from
274274
self.transaction.to = self.address
275275

276-
let tx = contract.createWriteOperation("setERC20ApproveChecking", parameters: [approveChecking] )!
276+
let tx = contract.createWriteOperation("setERC20ApproveChecking", parameters: [approveChecking])!
277277
return tx
278278
}
279279

@@ -302,7 +302,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
302302
guard let value = Utilities.parseToBigUInt(data, decimals: intDecimals) else {
303303
throw Web3Error.inputError(desc: "Can not parse inputted amount")
304304
}
305-
let tx = contract.createWriteOperation("transfer", parameters: [value] )!
305+
let tx = contract.createWriteOperation("transfer", parameters: [value])!
306306
return tx
307307
}
308308

@@ -323,7 +323,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
323323
guard let amount = Utilities.parseToBigUInt(value, decimals: intDecimals) else {
324324
throw Web3Error.inputError(desc: "Can not parse inputted amount")
325325
}
326-
let tx = contract.createWriteOperation("transferAndCall", parameters: [to, amount, data] )!
326+
let tx = contract.createWriteOperation("transferAndCall", parameters: [to, amount, data])!
327327
return tx
328328
}
329329

@@ -341,7 +341,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
341341
self.transaction.to = self.address
342342
self.transaction.callOnBlock = .latest
343343

344-
let tx = contract.createWriteOperation("increaseNonce", parameters: [] )!
344+
let tx = contract.createWriteOperation("increaseNonce", parameters: [])!
345345
return tx
346346
}
347347

@@ -365,7 +365,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
365365

366366
let modeValue = mode.rawValue
367367

368-
let tx = contract.createWriteOperation("delegateTransferAndCall", parameters: [nonce, fee, gasAmount, to, amount, data, modeValue, v, r, s] )!
368+
let tx = contract.createWriteOperation("delegateTransferAndCall", parameters: [nonce, fee, gasAmount, to, amount, data, modeValue, v, r, s])!
369369
return tx
370370
}
371371

@@ -382,7 +382,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
382382
self.transaction.from = from
383383
self.transaction.to = self.address
384384

385-
let tx = contract.createWriteOperation("setupDirectDebit", parameters: [receiver, info] )!
385+
let tx = contract.createWriteOperation("setupDirectDebit", parameters: [receiver, info])!
386386
return tx
387387
}
388388

@@ -391,7 +391,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
391391
self.transaction.from = from
392392
self.transaction.to = self.address
393393

394-
let tx = contract.createWriteOperation("terminateDirectDebit", parameters: [receiver] )!
394+
let tx = contract.createWriteOperation("terminateDirectDebit", parameters: [receiver])!
395395
return tx
396396
}
397397

@@ -400,7 +400,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
400400
self.transaction.from = from
401401
self.transaction.to = self.address
402402

403-
let tx = contract.createWriteOperation("withdrawDirectDebit", parameters: [debtor] )!
403+
let tx = contract.createWriteOperation("withdrawDirectDebit", parameters: [debtor])!
404404
return tx
405405
}
406406

@@ -409,7 +409,7 @@ public class ERC1376: IERC1376, ERC20BaseProperties {
409409
self.transaction.from = from
410410
self.transaction.to = self.address
411411

412-
let tx = contract.createWriteOperation("withdrawDirectDebit", parameters: [debtors, strict] )!
412+
let tx = contract.createWriteOperation("withdrawDirectDebit", parameters: [debtors, strict])!
413413
return tx
414414
}
415415
}

0 commit comments

Comments
 (0)