Skip to content

Commit 3850262

Browse files
committed
Fix typos discovered by codespell
https://pypi.org/project/codespell
1 parent b689a05 commit 3850262

38 files changed

+101
-101
lines changed

CHANGELOG.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
- `subscribeOnLogs` method with specific contract address is not working!!!! [\#366](https://github.com/skywinder/web3swift/issues/366)
8484
- EthereumContract with Custom ABI returns nil [\#342](https://github.com/skywinder/web3swift/issues/342)
8585
- Error on running tests [\#290](https://github.com/skywinder/web3swift/issues/290)
86-
- Serialisation of BIP32 misplaced address postition [\#257](https://github.com/skywinder/web3swift/issues/257)
86+
- Serialisation of BIP32 misplaced address position [\#257](https://github.com/skywinder/web3swift/issues/257)
8787
- Xcode 10.2.1 carthage update hangs while building web3swift.xcodeproj [\#197](https://github.com/skywinder/web3swift/issues/197)
8888

8989
**Closed issues:**
@@ -118,15 +118,15 @@
118118
- @ravi-ranjan-oodles thanks for the update. [\#329](https://github.com/skywinder/web3swift/issues/329)
119119
- Issue in Uploading to Test Flight [\#328](https://github.com/skywinder/web3swift/issues/328)
120120
- Update CryptoSwift podspec [\#322](https://github.com/skywinder/web3swift/issues/322)
121-
- cann't open DApp, such as "https://uniswap.tokenpocket.pro/\#/swap" [\#321](https://github.com/skywinder/web3swift/issues/321)
121+
- can't open DApp, such as "https://uniswap.tokenpocket.pro/\#/swap" [\#321](https://github.com/skywinder/web3swift/issues/321)
122122
- CryptoSwift version is too low to work properly in Xcode12.5 [\#318](https://github.com/skywinder/web3swift/issues/318)
123123
- web3swift.Web3Error.processingError\(desc: "Failed to fetch gas estimate"\)(BSC Chain) [\#317](https://github.com/skywinder/web3swift/issues/317)
124124
- Quick simple steps for minting ERC20 or ERC721 tokens [\#314](https://github.com/skywinder/web3swift/issues/314)
125125
- Generate Contract Bytecode / Address [\#313](https://github.com/skywinder/web3swift/issues/313)
126126
- I can't find func 'Web3.InfuraKovanWeb3\(\)' [\#311](https://github.com/skywinder/web3swift/issues/311)
127127
- web3 instance error: Variable used within its own initial value [\#310](https://github.com/skywinder/web3swift/issues/310)
128128
- Failed to fetch gas estimate when sending erc20 [\#307](https://github.com/skywinder/web3swift/issues/307)
129-
- DApp browser cann't open Uniswap in a right way [\#304](https://github.com/skywinder/web3swift/issues/304)
129+
- DApp browser can't open Uniswap in a right way [\#304](https://github.com/skywinder/web3swift/issues/304)
130130
- Update cocoapods bigint to 5.0 [\#288](https://github.com/skywinder/web3swift/issues/288)
131131
- When I use getBlockByNumber , hash Unable to check [\#287](https://github.com/skywinder/web3swift/issues/287)
132132
- How to parse the return value of read transaction [\#284](https://github.com/skywinder/web3swift/issues/284)
@@ -231,7 +231,7 @@
231231
- policy [\#247](https://github.com/skywinder/web3swift/pull/247) ([BaldyAsh](https://github.com/BaldyAsh))
232232
- Fix dependencies, build [\#245](https://github.com/skywinder/web3swift/pull/245) ([BaldyAsh](https://github.com/BaldyAsh))
233233
- chore: update ENS Registry migration [\#243](https://github.com/skywinder/web3swift/pull/243) ([aranhaagency](https://github.com/aranhaagency))
234-
- improtant notice update [\#232](https://github.com/skywinder/web3swift/pull/232) ([skywinder](https://github.com/skywinder))
234+
- important notice update [\#232](https://github.com/skywinder/web3swift/pull/232) ([skywinder](https://github.com/skywinder))
235235
- Add Alice Wallet to project list [\#230](https://github.com/skywinder/web3swift/pull/230) ([lmcmz](https://github.com/lmcmz))
236236
- Update Extensions.swift [\#225](https://github.com/skywinder/web3swift/pull/225) ([kocherovets](https://github.com/kocherovets))
237237
- correct gasLimit [\#222](https://github.com/skywinder/web3swift/pull/222) ([luqz](https://github.com/luqz))
@@ -249,10 +249,10 @@
249249
**Closed issues:**
250250

251251
- BigInt 3.1 [\#207](https://github.com/skywinder/web3swift/issues/207)
252-
- recevied transaction id from geth node server but not able to see that transaction id at etherscan.io [\#200](https://github.com/skywinder/web3swift/issues/200)
252+
- received transaction id from geth node server but not able to see that transaction id at etherscan.io [\#200](https://github.com/skywinder/web3swift/issues/200)
253253
- How do I fetch information such as balance, decimal,symbol and name of ERC20token ? [\#199](https://github.com/skywinder/web3swift/issues/199)
254254
- Starscream 3.1.0 not compatible with Swift 5.0 [\#195](https://github.com/skywinder/web3swift/issues/195)
255-
- How to Connect infuraWebsocket and subsribe perticular event in swift? [\#193](https://github.com/skywinder/web3swift/issues/193)
255+
- How to Connect infuraWebsocket and subsribe particular event in swift? [\#193](https://github.com/skywinder/web3swift/issues/193)
256256
- Use of unresolved identifier 'Wallet' [\#192](https://github.com/skywinder/web3swift/issues/192)
257257
- V in Signed Message Hash not being calculated properly [\#191](https://github.com/skywinder/web3swift/issues/191)
258258
- Not possible to calculate fast, normal and cheap transaction fee ? [\#190](https://github.com/skywinder/web3swift/issues/190)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# web3swift
22
**web3swift** is an iOS toolbelt for interaction with the Ethereum network.
33

4-
## Social medias
4+
## Social media
55
[Join our discord](https://discord.gg/8bHCNmhS7x) or [Telegram](https://t.me/web3swift) if you need support or want to contribute to web3swift development!
66

77
![matter-github-swift](https://github.com/web3swift-team/web3swift/blob/develop/web3swift-logo.png)
@@ -57,7 +57,7 @@
5757
- [x] 🕵️‍♂️ Possibility to **add or remove "middleware" that intercepts**, modifies and even **cancel transaction** workflow on stages "before assembly", "after assembly" and "before submission"
5858
- [x]**Literally following the standards** (BIP, EIP, etc):
5959
- [x] **[BIP32](https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki) (HD Wallets), [BIP39](https://github.com/bitcoin/bips/blob/master/bip-0039.mediawiki) (Seed phrases), [BIP44](https://github.com/bitcoin/bips/blob/master/bip-0044.mediawiki) (Key generation prefixes)**
60-
- [x] **[EIP-20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md)** (Standart interface for tokens - ERC-20), **[EIP-67](https://github.com/ethereum/EIPs/issues/67)** (Standard URI scheme), **[EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md)** (Replay attacks protection), **[EIP-2718](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2718.md)** (Typed Transaction Envelope), **[EIP-1559](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md)** (Gas Fee market change)
60+
- [x] **[EIP-20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md)** (Standard interface for tokens - ERC-20), **[EIP-67](https://github.com/ethereum/EIPs/issues/67)** (Standard URI scheme), **[EIP-155](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-155.md)** (Replay attacks protection), **[EIP-2718](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2718.md)** (Typed Transaction Envelope), **[EIP-1559](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1559.md)** (Gas Fee market change)
6161
- [x] **And many others** *(For details about this EIP's look at [Documentation page](https://github.com/web3swift-team/web3swift/blob/master/Documentation/))*: EIP-681, EIP-721, EIP-165, EIP-777, EIP-820, EIP-888, EIP-1400, EIP-1410, EIP-1594, EIP-1643, EIP-1644, EIP-1633, EIP-721, EIP-1155, EIP-1376, ST-20
6262
- [x] **RLP encoding**
6363
- [x] Base58 encoding scheme

Sources/Core/EthereumABI/ABIElements.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ extension ABI.Element.Function {
280280

281281
var returnArray = [String: Any]()
282282

283-
// set infomation
283+
// set information
284284
returnArray["_abortedByRequire"] = true
285285
returnArray["_errorMessageFromRequire"] = message
286286

@@ -340,8 +340,8 @@ extension ABI.Element.Constructor {
340340

341341
/// Generic input decoding function.
342342
/// - Parameters:
343-
/// - rawData: data to decode. Must match the followin criteria: `data.count == 0 || data.count % 32 == 4`.
344-
/// - methodEncoding: 4 bytes represeting method signature like `0xFFffFFff`. Can be ommited to avoid checking method encoding.
343+
/// - rawData: data to decode. Must match the following criteria: `data.count == 0 || data.count % 32 == 4`.
344+
/// - methodEncoding: 4 bytes representing method signature like `0xFFffFFff`. Can be omitted to avoid checking method encoding.
345345
/// - inputs: expected input types. Order must be the same as in function declaration.
346346
/// - Returns: decoded dictionary of input arguments mapped to their indices and arguments' names if these are not empty.
347347
/// If decoding of at least one argument fails, `rawData` size is invalid or `methodEncoding` doesn't match - `nil` is returned.

Sources/Web3Core/Contract/ContractProtocol.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ public protocol ContractProtocol {
116116
/// - bytecode: bytecode to deploy.
117117
/// - constructor: constructor of the smart contract bytecode is related to. Used to encode `parameters`.
118118
/// - parameters: parameters for `constructor`.
119-
/// - extraData: any extra data. It can be encoded input arguments for a constuctor but then you should set `constructor` and
119+
/// - extraData: any extra data. It can be encoded input arguments for a constructor but then you should set `constructor` and
120120
/// `parameters` to be `nil`.
121121
/// - Returns: Encoded data for a given parameters, which is should be assigned to ``CodableTransaction.data`` property
122122
func deploy(bytecode: Data,
@@ -185,7 +185,7 @@ public protocol ContractProtocol {
185185
extension ContractProtocol {
186186

187187
/// Overloading of ``ContractProtocol/deploy(bytecode:constructor:parameters:extraData:)`` to allow
188-
/// omitting evertyhing but `bytecode`.
188+
/// omitting everything but `bytecode`.
189189
///
190190
/// See ``ContractProtocol/deploy(bytecode:constructor:parameters:extraData:)`` for details.
191191
func deploy(_ bytecode: Data,

Sources/Web3Core/EthereumABI/ABIDecoding.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ extension ABIDecoder {
196196
let dataSlice = data[pointer ..< pointer + type.memoryUsage]
197197
let bn = BigUInt(dataSlice)
198198
if bn > UInt64.max || bn >= data.count {
199-
// there are ERC20 contracts that use bytes32 intead of string. Let's be optimistic and return some data
199+
// there are ERC20 contracts that use bytes32 instead of string. Let's be optimistic and return some data
200200
if case .string = type {
201201
let nextElement = pointer + type.memoryUsage
202202
let preambula = BigUInt(32).abiEncode(bits: 256)!

Sources/Web3Core/EthereumABI/ABIElements.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,8 +438,8 @@ extension ABI.Element.Constructor {
438438

439439
/// Generic input decoding function.
440440
/// - Parameters:
441-
/// - rawData: data to decode. Must match the followin criteria: `data.count == 0 || data.count % 32 == 4`.
442-
/// - methodEncoding: 4 bytes represeting method signature like `0xFFffFFff`. Can be ommited to avoid checking method encoding.
441+
/// - rawData: data to decode. Must match the following criteria: `data.count == 0 || data.count % 32 == 4`.
442+
/// - methodEncoding: 4 bytes representing method signature like `0xFFffFFff`. Can be omitted to avoid checking method encoding.
443443
/// - inputs: expected input types. Order must be the same as in function declaration.
444444
/// - Returns: decoded dictionary of input arguments mapped to their indices and arguments' names if these are not empty.
445445
/// If decoding of at least one argument fails, `rawData` size is invalid or `methodEncoding` doesn't match - `nil` is returned.

Sources/Web3Core/EthereumABI/Sequence+ABIExtension.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public extension Sequence where Element == ABI.Element {
6363
/// Filters out ``ABI/Element/Constructor``.
6464
/// If there are multiple of them the first encountered will be returned and if there are none a default constructor will be returned
6565
/// that accepts no input parameters.
66-
/// - Returns: the first ``ABI/Element/Constructor`` or default contructor with no input parameters.
66+
/// - Returns: the first ``ABI/Element/Constructor`` or default constructor with no input parameters.
6767
func getConstructor() -> ABI.Element.Constructor {
6868
for case let .constructor(constructor) in self {
6969
return constructor

Sources/Web3Core/EthereumAddress/EthereumAddress.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public struct EthereumAddress: Equatable {
9191
}
9292

9393
/// In swift structs it's better to implement initializers in extension
94-
/// Since it's make available syntetized initializer then for free.
94+
/// Since it's make available synthesized initializer then for free.
9595
extension EthereumAddress {
9696
public init?(_ addressString: String, type: AddressType = .normal, ignoreChecksum: Bool = false) {
9797
switch type {

Sources/Web3Core/EthereumNetwork/Request/APIRequest.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public enum APIRequest {
9595
/// Estimate required gas amount for transaction
9696
/// - Parameters:
9797
/// - TransactionParameters: parameters of planned transaction
98-
/// - BlockNumber: block where it should be evalueated
98+
/// - BlockNumber: block where it should be evaluated
9999
case estimateGas(CodableTransaction, BlockNumber)
100100

101101
/// Send raw transaction
@@ -114,7 +114,7 @@ public enum APIRequest {
114114
case getTransactionByHash(Hash)
115115

116116
/// Get transaction receipt
117-
/// - Paramters:
117+
/// - Parameters:
118118
/// - Hash: transaction hash ID
119119
case getTransactionReceipt(Hash)
120120

@@ -134,7 +134,7 @@ public enum APIRequest {
134134
/// Mostly could be used for intreacting with a contracts, but also could be used for simple transaction sending
135135
/// - Parameters:
136136
/// - TransactionParameters: transaction to be sent into chain
137-
/// - BlockNumber: block where it should be evalueated
137+
/// - BlockNumber: block where it should be evaluated
138138
case call(CodableTransaction, BlockNumber)
139139

140140
/// Get a transaction counts on a given block
@@ -149,7 +149,7 @@ public enum APIRequest {
149149

150150
/// Get a balance of a given address
151151
/// - Parameters:
152-
/// - Address: address which balance would be recieved
152+
/// - Address: address which balance would be received
153153
/// - BlockNumber: block to check
154154
case getBalance(Address, BlockNumber)
155155

@@ -190,7 +190,7 @@ public enum APIRequest {
190190
/// - BlockNumber: Highest block of the requested range.
191191
/// - [Double]: A monotonically increasing list of percentile values.
192192
/// For each block in the requested range, the transactions will be sorted in ascending order
193-
/// by effective tip per gas and the coresponding effective tip for the percentile will be determined, accounting for gas consumed."
193+
/// by effective tip per gas and the corresponding effective tip for the percentile will be determined, accounting for gas consumed."
194194
case feeHistory(BigUInt, BlockNumber, [Double])
195195

196196
// MARK: - Personal Ethereum API

Sources/Web3Core/EthereumNetwork/RequestParameter/RequestParameter+Encodable.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import Foundation
99

1010
extension RequestParameter: Encodable {
1111
/**
12-
This encoder encodes `RequestParameter` assotiated value ignoring self value
12+
This encoder encodes `RequestParameter` associated value ignoring self value
1313

1414
This is required to encode mixed types array, like
1515

@@ -48,7 +48,7 @@ extension RequestParameter: Encodable {
4848

4949
case is CodableTransaction.Type: try enumContainer.encode(rawValue as! CodableTransaction)
5050
case is EventFilterParameters.Type: try enumContainer.encode(rawValue as! EventFilterParameters)
51-
default: break /// can't be executed, coz possible `self.rawValue` types are strictly defined in it's inplementation.`
51+
default: break /// can't be executed, coz possible `self.rawValue` types are strictly defined in it's implementation.`
5252
}
5353
// swiftlint:enable force_cast
5454
}

Sources/Web3Core/EthereumNetwork/Utility/HexDecodableProtocols.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ extension String: APIResultType { }
1717
///
1818
/// You better not use it in any other part of a bit of code except `APIResponse<T>` decoding.
1919
///
20-
/// This protocols intention is to work around that Ethereum API cases, when almost all numbers are comming as strings.
20+
/// This protocols intention is to work around that Ethereum API cases, when almost all numbers are coming as strings.
2121
/// More than that their notation (e.g. 0x12d) are don't fit with the default Numeric decoders behaviours.
2222
/// So to work around that for generic cases we're going to force decode `APIResponse.result` field as `String`
2323
/// and then initiate it

Sources/Web3Core/KeystoreManager/IBAN.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@ public struct IBAN {
6464

6565
internal static func decodeToInts(_ iban: String) -> String {
6666
let uppercasedIBAN = iban.replacingOccurrences(of: " ", with: "").uppercased()
67-
let begining = String(uppercasedIBAN[0..<4])
67+
let beginning = String(uppercasedIBAN[0..<4])
6868
let end = String(uppercasedIBAN[4...])
69-
let IBAN = end + begining
69+
let IBAN = end + beginning
7070
var arrayOfInts = [Int]()
7171
for ch in IBAN {
7272
guard let dataPoint = String(ch).data(using: .ascii) else {return ""}

Sources/Web3Core/Oracle/GasOracle.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ final public class Oracle {
101101
private func suggestTipValue() async throws -> [BigUInt] {
102102
var rearrengedArray: [[BigUInt]] = []
103103

104-
/// reaarange `[[min, middle, max]]` to `[[min], [middle], [max]]`
104+
/// rearrange `[[min, middle, max]]` to `[[min], [middle], [max]]`
105105
try await suggestGasValues().reward
106106
.forEach { percentiles in
107107
percentiles.enumerated().forEach { index, percentile in
@@ -139,7 +139,7 @@ final public class Oracle {
139139
default: throw Web3Error.valueError(desc: "Unable to use '\(block)' policy to resolve block number to calculate gas fee suggestion.")
140140
}
141141

142-
/// checking if latest block number is greather than number of blocks to take in account
142+
/// checking if latest block number is greater than number of blocks to take in account
143143
/// we're ignoring case when `latestBlockNumber` == `blockCount` since it's unlikely case
144144
/// which we could neglect
145145
guard latestBlockNumber > blockCount else { return [] }

Sources/Web3Core/Transaction/CodableTransaction.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import BigInt
1111
/// While most fields in this struct are optional, they are not necessarily
1212
/// optional for the type of transaction they apply to.
1313
public struct CodableTransaction {
14-
/// internal acccess only. The transaction envelope object itself that contains all the transaction data
14+
/// internal access only. The transaction envelope object itself that contains all the transaction data
1515
/// and type specific implementation
1616
internal var envelope: AbstractEnvelope
1717

@@ -73,7 +73,7 @@ public struct CodableTransaction {
7373
set { return envelope.gasLimit = newValue }
7474
}
7575

76-
/// the price per gas unit for the tranaction (Legacy and EIP-2930 only)
76+
/// the price per gas unit for the transaction (Legacy and EIP-2930 only)
7777
public var gasPrice: BigUInt? {
7878
get { return envelope.gasPrice }
7979
set { return envelope.gasPrice = newValue }
@@ -147,7 +147,7 @@ public struct CodableTransaction {
147147

148148
/// Signs the transaction
149149
///
150-
/// This method signs transaction iteself and not related to contract call data signing.
150+
/// This method signs transaction itself and not related to contract call data signing.
151151
/// - Parameters:
152152
/// - privateKey: the private key to use for signing
153153
/// - useExtraEntropy: boolean whether to use extra entropy when signing (default false)
@@ -265,7 +265,7 @@ extension CodableTransaction: Codable {
265265
}
266266

267267
extension CodableTransaction: CustomStringConvertible {
268-
/// required by CustomString convertable
268+
/// required by CustomString convertible
269269
/// returns a string description for the transaction and its data
270270
public var description: String {
271271
var toReturn = ""
@@ -290,7 +290,7 @@ extension CodableTransaction {
290290
/// - v: signature v parameter (default 1) - will get set properly once signed
291291
/// - r: signature r parameter (default 0) - will get set properly once signed
292292
/// - s: signature s parameter (default 0) - will get set properly once signed
293-
/// - parameters: EthereumParameters object containing additional parametrs for the transaction like gas
293+
/// - parameters: EthereumParameters object containing additional parameters for the transaction like gas
294294
public init(type: TransactionType? = nil, to: EthereumAddress, nonce: BigUInt = 0,
295295
chainID: BigUInt = 0, value: BigUInt = 0, data: Data = Data(),
296296
gasLimit: BigUInt = 0, maxFeePerGas: BigUInt? = nil, maxPriorityFeePerGas: BigUInt? = nil, gasPrice: BigUInt? = nil,

0 commit comments

Comments
 (0)