Skip to content

Commit 037f227

Browse files
committed
Merge branch 'develop' of https://github.com/pharms-eth/web3swift into develop
2 parents b5e9fb4 + 8cb9a20 commit 037f227

File tree

215 files changed

+14567
-14075
lines changed

Some content is hidden

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

215 files changed

+14567
-14075
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/pull_request_template.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
## **Summary of Changes**
2+
3+
Fixes # _(if applicable - add the number of issue this PR addresses)_
4+
5+
## **Test Data or Screenshots**
6+
7+
###### _By submitting this pull request, you are confirming the following:_
8+
9+
- I have reviewed the [Contribution Guidelines](https://github.com/web3swift-team/web3swift/blob/develop/CONTRIBUTION.md).
10+
- I have performed a self-review of my own code.
11+
- I have updated my repository to match the `develop` branch.
12+
- I have included test data or screenshots that prove my fix is effective or that my feature works.
13+
- I have checked that all tests work and swiftlint is not throwing any errors/warnings.

.github/workflows/macOS-12.yml renamed to .github/workflows/macOS-tests.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
- master
77
- develop
88
- hotfix
9-
- unstable
109
paths:
1110
- Packag*.swift
1211
- web3swift.podspec
@@ -20,6 +19,8 @@ on:
2019
- master
2120
- develop
2221
- unstable
22+
# Temporary develop-X.Y.Z branches may be added and removed from here as we release new versions
23+
- develop-4.0
2324

2425
env:
2526
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
@@ -28,11 +29,22 @@ jobs:
2829
spm:
2930
name: Swift Package Manager 5.7
3031
runs-on: macOS-12
31-
concurrency:
32+
concurrency:
3233
group: spm-${{ github.run_id }}
3334
cancel-in-progress: false
3435
steps:
35-
- 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
3648
- name: Resolve dependencies
3749
run: swift package resolve
3850
- 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: 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)

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 & 21 deletions
This file was deleted.

Example/myWeb3Wallet/Podfile.lock

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

0 commit comments

Comments
 (0)