Skip to content

Commit f0905c2

Browse files
Merge pull request #816 from JeneaVranceanu/develop-v4-update
Develop v4 update
2 parents 318f8da + 49cab7d commit f0905c2

File tree

160 files changed

+12832
-12367
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+12832
-12367
lines changed

.codespellrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[codespell]
2+
count = True
3+
ignore-words-list = ans,deriver,inout,packag
4+
skip = *.js,*WordLists.swift,.git,Carthage,.build,build

.github/workflows/macOS-tests.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,22 @@ jobs:
2929
spm:
3030
name: Swift Package Manager 5.7
3131
runs-on: macOS-12
32-
concurrency:
32+
concurrency:
3333
group: spm-${{ github.run_id }}
3434
cancel-in-progress: false
3535
steps:
36-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v3
37+
- name: Discover typos
38+
run: |
39+
pip3 install --upgrade pip
40+
pip3 install codespell
41+
codespell # See .codespellrc for args
42+
- name: SwiftLint
43+
run: |
44+
# 1. Make all automated fixes that are possible
45+
# 2. git diff to see what (if any) automated fixes were made
46+
# 3. See https://github.com/realm/SwiftLint#xcode explains why the double run
47+
swiftlint --fix --quiet && git diff && swiftlint --quiet
3748
- name: Resolve dependencies
3849
run: swift package resolve
3950
- name: Build

.github/workflows/pre-commit.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# https://pre-commit.com
2+
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
3+
# Using pre-commit.ci is even better than using GitHub Actions for pre-commit.
4+
name: pre-commit
5+
on:
6+
pull_request:
7+
branches: [develop]
8+
push:
9+
branches: [develop]
10+
workflow_dispatch:
11+
jobs:
12+
pre-commit:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: actions/setup-python@v4
17+
with:
18+
python-version: 3.x
19+
- run: pip install pre-commit
20+
- run: pre-commit --version
21+
- run: pre-commit install
22+
- run: pre-commit run --all-files

.pre-commit-config.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v3.2.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
- id: check-case-conflict
10+
- id: check-json
11+
- id: mixed-line-ending
12+
- id: no-commit-to-branch
13+
args: [--branch, staging, --branch, main, --branch, master, --branch, develop-4.0, --branch, develop-upstream]
14+
- repo: https://github.com/codespell-project/codespell
15+
rev: v2.2.2
16+
hooks:
17+
- id: codespell # See .codespellrc for args
18+
# - repo: https://github.com/realm/SwiftLint # Too slow in pre-commit
19+
# rev: 0.50.3
20+
# hooks:
21+
# - id: swiftlint
22+
# args: [--fix, Sources, Tests]

.swiftlint.yml

Lines changed: 55 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,73 @@
11
excluded:
2-
- Carthage
3-
- Pods
42
- .build
53
- Build
4+
- Carthage
65
- DerivedData
6+
- Pods
7+
8+
analyzer_rules:
9+
- unused_import
710

811
disabled_rules:
9-
- type_name
12+
- block_based_kvo
13+
- closure_body_length
14+
- computed_accessors_order
15+
- cyclomatic_complexity
16+
- duplicate_imports
17+
- empty_enum_arguments
18+
- empty_string
19+
- file_length
20+
- for_where
21+
- force_cast
22+
- force_try
23+
- force_unwrapping
24+
- function_body_length
25+
- function_parameter_count
1026
- identifier_name
27+
- implicit_getter
28+
- implicitly_unwrapped_optional
29+
- indentation_width
30+
- large_tuple
31+
- legacy_objc_type
1132
- line_length
1233
- multiple_closures_with_trailing_closure
34+
- nesting
35+
- orphaned_doc_comment
36+
- operator_whitespace
37+
- return_arrow_whitespace
38+
- shorthand_operator
1339
- todo
40+
- trailing_closure
41+
- type_body_length
42+
- type_name
43+
- unneeded_break_in_switch
44+
- unused_optional_binding
45+
- vertical_parameter_alignment
46+
- xctfail_message
1447

1548
opt_in_rules:
16-
- weak_delegate
17-
- unused_import
18-
- unneeded_parentheses_in_closure_argument
19-
- trailing_closure
20-
- static_operator
21-
- redundant_nil_coalescing
22-
- override_in_extension
23-
- legacy_objc_type
24-
- implicitly_unwrapped_optional
25-
- force_unwrapping
26-
- empty_string
27-
- closure_body_length
28-
- fallthrough
29-
- indentation_width
30-
31-
# force warnings
32-
force_cast: error
33-
force_try: error
49+
- closure_body_length
50+
- empty_string
51+
- fallthrough
52+
- force_unwrapping
53+
- implicitly_unwrapped_optional
54+
- indentation_width
55+
- legacy_objc_type
56+
- override_in_extension
57+
- redundant_nil_coalescing
58+
- static_operator
59+
- trailing_closure
60+
- unneeded_parentheses_in_closure_argument
61+
- weak_delegate
3462

3563
custom_rules:
36-
commented_out_code:
37-
included: ".*\\.swift" # regex that defines paths to include during linting. optional.
38-
excluded: ".*Test(s)?\\.swift" # regex that defines paths to exclude during linting. optional
39-
name: "Commented out code" # rule name. optional.
40-
regex: "^\\/\\/\\s*(@|\\.?([a-z]|(\\})))" # matching pattern
64+
commented_out_code:
65+
included: .*\.swift # regex that defines paths to include during linting. optional.
66+
excluded: .*Test(s)?\.swift # regex that defines paths to exclude during linting. optional
67+
name: Commented out code # rule name. optional.
68+
regex: ^\s*(\/\/(?!\s*swiftlint:).*|\/\*[\s\S]*?\*\/) # matching pattern
4169
capture_group: 0 # number of regex capture group to highlight the rule violation at. optional.
4270
match_kinds: # SyntaxKinds to match. optional.
4371
- comment
44-
message: "No commented code in devel branch allowed." # violation message. optional.
72+
message: No commented code in devel branch allowed. # violation message. optional.
4573
severity: warning # violation severity. optional.

CHANGELOG.md

Lines changed: 7 additions & 7 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)
@@ -162,7 +162,7 @@
162162
- Update libs versions, Cartfile and Pods dependencies [\#334](https://github.com/skywinder/web3swift/pull/334) ([AnnaYatsun1](https://github.com/AnnaYatsun1))
163163
- fix crash when 'payable' nil [\#332](https://github.com/skywinder/web3swift/pull/332) ([xdozorx](https://github.com/xdozorx))
164164
- Update README.md [\#331](https://github.com/skywinder/web3swift/pull/331) ([Iysbaera](https://github.com/Iysbaera))
165-
- CrytoSwift update version 1.4.0 [\#327](https://github.com/skywinder/web3swift/pull/327) ([lzttxs](https://github.com/lzttxs))
165+
- CryptoSwift update version 1.4.0 [\#327](https://github.com/skywinder/web3swift/pull/327) ([lzttxs](https://github.com/lzttxs))
166166
- Update carthage libraries [\#325](https://github.com/skywinder/web3swift/pull/325) ([alex78pro](https://github.com/alex78pro))
167167
- Gas estimate fix [\#324](https://github.com/skywinder/web3swift/pull/324) ([frostiq](https://github.com/frostiq))
168168
- Update README.md [\#306](https://github.com/skywinder/web3swift/pull/306) ([manuG420](https://github.com/manuG420))
@@ -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 subscribe 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)

CONTRIBUTION.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Please take it from the [roadmap](https://hackmd.io/G5znP3xAQY-BVc1X8Y1jSg) or f
1717
1818
## Codestyle guideline
1919
- `swiftlint` check should goes with no warnings.
20-
- Here’s some more detailed and human readable code style [guidelines](https://hackmd.io/8bACoAnTSsKc55Os596yCg "") (you can add there some suggestion if you’d like to).
20+
- Here’s some more detailed and human readable code style [guidelines](https://hackmd.io/8bACoAnTSsKc55Os596yCg "") (you can add there some suggestion if you’d like to).
2121
- We use [swift](https://www.swift.org/documentation/api-design-guidelines/ "") name convention.
2222
## Tests guideline
2323
1. Cover each new public method with tests.
@@ -67,4 +67,4 @@ on:
6767
- [ ] All public method have `///` styled comments.
6868
- [ ] All magic or nonintuitive internal code parts are clearly explained in inline comments.
6969
- [ ] `swiftlint` ran have no warnings.
70-
- [ ] No commented out code lefts in PR.
70+
- [ ] No commented out code lefts in PR.

Example/myWeb3Wallet/Podfile

Lines changed: 0 additions & 30 deletions
This file was deleted.

Example/myWeb3Wallet/Podfile.lock

Lines changed: 0 additions & 53 deletions
This file was deleted.

0 commit comments

Comments
 (0)