Skip to content

Develop v4 update #816

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[codespell]
count = True
ignore-words-list = ans,deriver,inout,packag
skip = *.js,*WordLists.swift,.git,Carthage,.build,build
15 changes: 13 additions & 2 deletions .github/workflows/macOS-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,22 @@ jobs:
spm:
name: Swift Package Manager 5.7
runs-on: macOS-12
concurrency:
concurrency:
group: spm-${{ github.run_id }}
cancel-in-progress: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Discover typos
run: |
pip3 install --upgrade pip
pip3 install codespell
codespell # See .codespellrc for args
- name: SwiftLint
run: |
# 1. Make all automated fixes that are possible
# 2. git diff to see what (if any) automated fixes were made
# 3. See https://github.com/realm/SwiftLint#xcode explains why the double run
swiftlint --fix --quiet && git diff && swiftlint --quiet
- name: Resolve dependencies
run: swift package resolve
- name: Build
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# https://pre-commit.com
# This GitHub Action assumes that the repo contains a valid .pre-commit-config.yaml file.
# Using pre-commit.ci is even better than using GitHub Actions for pre-commit.
name: pre-commit
on:
pull_request:
branches: [develop]
push:
branches: [develop]
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: pip install pre-commit
- run: pre-commit --version
- run: pre-commit install
- run: pre-commit run --all-files
22 changes: 22 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-case-conflict
- id: check-json
- id: mixed-line-ending
- id: no-commit-to-branch
args: [--branch, staging, --branch, main, --branch, master, --branch, develop-4.0, --branch, develop-upstream]
- repo: https://github.com/codespell-project/codespell
rev: v2.2.2
hooks:
- id: codespell # See .codespellrc for args
# - repo: https://github.com/realm/SwiftLint # Too slow in pre-commit
# rev: 0.50.3
# hooks:
# - id: swiftlint
# args: [--fix, Sources, Tests]
82 changes: 55 additions & 27 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,73 @@
excluded:
- Carthage
- Pods
- .build
- Build
- Carthage
- DerivedData
- Pods

analyzer_rules:
- unused_import

disabled_rules:
- type_name
- block_based_kvo
- closure_body_length
- computed_accessors_order
- cyclomatic_complexity
- duplicate_imports
- empty_enum_arguments
- empty_string
- file_length
- for_where
- force_cast
- force_try
- force_unwrapping
- function_body_length
- function_parameter_count
- identifier_name
- implicit_getter
- implicitly_unwrapped_optional
- indentation_width
- large_tuple
- legacy_objc_type
- line_length
- multiple_closures_with_trailing_closure
- nesting
- orphaned_doc_comment
- operator_whitespace
- return_arrow_whitespace
- shorthand_operator
- todo
- trailing_closure
- type_body_length
- type_name
- unneeded_break_in_switch
- unused_optional_binding
- vertical_parameter_alignment
- xctfail_message

opt_in_rules:
- weak_delegate
- unused_import
- unneeded_parentheses_in_closure_argument
- trailing_closure
- static_operator
- redundant_nil_coalescing
- override_in_extension
- legacy_objc_type
- implicitly_unwrapped_optional
- force_unwrapping
- empty_string
- closure_body_length
- fallthrough
- indentation_width

# force warnings
force_cast: error
force_try: error
- closure_body_length
- empty_string
- fallthrough
- force_unwrapping
- implicitly_unwrapped_optional
- indentation_width
- legacy_objc_type
- override_in_extension
- redundant_nil_coalescing
- static_operator
- trailing_closure
- unneeded_parentheses_in_closure_argument
- weak_delegate

custom_rules:
commented_out_code:
included: ".*\\.swift" # regex that defines paths to include during linting. optional.
excluded: ".*Test(s)?\\.swift" # regex that defines paths to exclude during linting. optional
name: "Commented out code" # rule name. optional.
regex: "^\\/\\/\\s*(@|\\.?([a-z]|(\\})))" # matching pattern
commented_out_code:
included: .*\.swift # regex that defines paths to include during linting. optional.
excluded: .*Test(s)?\.swift # regex that defines paths to exclude during linting. optional
name: Commented out code # rule name. optional.
regex: ^\s*(\/\/(?!\s*swiftlint:).*|\/\*[\s\S]*?\*\/) # matching pattern
capture_group: 0 # number of regex capture group to highlight the rule violation at. optional.
match_kinds: # SyntaxKinds to match. optional.
- comment
message: "No commented code in devel branch allowed." # violation message. optional.
message: No commented code in devel branch allowed. # violation message. optional.
severity: warning # violation severity. optional.
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
- `subscribeOnLogs` method with specific contract address is not working!!!! [\#366](https://github.com/skywinder/web3swift/issues/366)
- EthereumContract with Custom ABI returns nil [\#342](https://github.com/skywinder/web3swift/issues/342)
- Error on running tests [\#290](https://github.com/skywinder/web3swift/issues/290)
- Serialisation of BIP32 misplaced address postition [\#257](https://github.com/skywinder/web3swift/issues/257)
- Serialisation of BIP32 misplaced address position [\#257](https://github.com/skywinder/web3swift/issues/257)
- Xcode 10.2.1 carthage update hangs while building web3swift.xcodeproj [\#197](https://github.com/skywinder/web3swift/issues/197)

**Closed issues:**
Expand Down Expand Up @@ -118,15 +118,15 @@
- @ravi-ranjan-oodles thanks for the update. [\#329](https://github.com/skywinder/web3swift/issues/329)
- Issue in Uploading to Test Flight [\#328](https://github.com/skywinder/web3swift/issues/328)
- Update CryptoSwift podspec [\#322](https://github.com/skywinder/web3swift/issues/322)
- cann't open DApp, such as "https://uniswap.tokenpocket.pro/\#/swap" [\#321](https://github.com/skywinder/web3swift/issues/321)
- can't open DApp, such as "https://uniswap.tokenpocket.pro/\#/swap" [\#321](https://github.com/skywinder/web3swift/issues/321)
- CryptoSwift version is too low to work properly in Xcode12.5 [\#318](https://github.com/skywinder/web3swift/issues/318)
- web3swift.Web3Error.processingError\(desc: "Failed to fetch gas estimate"\)(BSC Chain) [\#317](https://github.com/skywinder/web3swift/issues/317)
- Quick simple steps for minting ERC20 or ERC721 tokens [\#314](https://github.com/skywinder/web3swift/issues/314)
- Generate Contract Bytecode / Address [\#313](https://github.com/skywinder/web3swift/issues/313)
- I can't find func 'Web3.InfuraKovanWeb3\(\)' [\#311](https://github.com/skywinder/web3swift/issues/311)
- web3 instance error: Variable used within its own initial value [\#310](https://github.com/skywinder/web3swift/issues/310)
- Failed to fetch gas estimate when sending erc20 [\#307](https://github.com/skywinder/web3swift/issues/307)
- DApp browser cann't open Uniswap in a right way [\#304](https://github.com/skywinder/web3swift/issues/304)
- DApp browser can't open Uniswap in a right way [\#304](https://github.com/skywinder/web3swift/issues/304)
- Update cocoapods bigint to 5.0 [\#288](https://github.com/skywinder/web3swift/issues/288)
- When I use getBlockByNumber , hash Unable to check [\#287](https://github.com/skywinder/web3swift/issues/287)
- How to parse the return value of read transaction [\#284](https://github.com/skywinder/web3swift/issues/284)
Expand Down Expand Up @@ -162,7 +162,7 @@
- Update libs versions, Cartfile and Pods dependencies [\#334](https://github.com/skywinder/web3swift/pull/334) ([AnnaYatsun1](https://github.com/AnnaYatsun1))
- fix crash when 'payable' nil [\#332](https://github.com/skywinder/web3swift/pull/332) ([xdozorx](https://github.com/xdozorx))
- Update README.md [\#331](https://github.com/skywinder/web3swift/pull/331) ([Iysbaera](https://github.com/Iysbaera))
- CrytoSwift update version 1.4.0 [\#327](https://github.com/skywinder/web3swift/pull/327) ([lzttxs](https://github.com/lzttxs))
- CryptoSwift update version 1.4.0 [\#327](https://github.com/skywinder/web3swift/pull/327) ([lzttxs](https://github.com/lzttxs))
- Update carthage libraries [\#325](https://github.com/skywinder/web3swift/pull/325) ([alex78pro](https://github.com/alex78pro))
- Gas estimate fix [\#324](https://github.com/skywinder/web3swift/pull/324) ([frostiq](https://github.com/frostiq))
- Update README.md [\#306](https://github.com/skywinder/web3swift/pull/306) ([manuG420](https://github.com/manuG420))
Expand Down Expand Up @@ -231,7 +231,7 @@
- policy [\#247](https://github.com/skywinder/web3swift/pull/247) ([BaldyAsh](https://github.com/BaldyAsh))
- Fix dependencies, build [\#245](https://github.com/skywinder/web3swift/pull/245) ([BaldyAsh](https://github.com/BaldyAsh))
- chore: update ENS Registry migration [\#243](https://github.com/skywinder/web3swift/pull/243) ([aranhaagency](https://github.com/aranhaagency))
- improtant notice update [\#232](https://github.com/skywinder/web3swift/pull/232) ([skywinder](https://github.com/skywinder))
- important notice update [\#232](https://github.com/skywinder/web3swift/pull/232) ([skywinder](https://github.com/skywinder))
- Add Alice Wallet to project list [\#230](https://github.com/skywinder/web3swift/pull/230) ([lmcmz](https://github.com/lmcmz))
- Update Extensions.swift [\#225](https://github.com/skywinder/web3swift/pull/225) ([kocherovets](https://github.com/kocherovets))
- correct gasLimit [\#222](https://github.com/skywinder/web3swift/pull/222) ([luqz](https://github.com/luqz))
Expand All @@ -249,10 +249,10 @@
**Closed issues:**

- BigInt 3.1 [\#207](https://github.com/skywinder/web3swift/issues/207)
- 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)
- 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)
- How do I fetch information such as balance, decimal,symbol and name of ERC20token ? [\#199](https://github.com/skywinder/web3swift/issues/199)
- Starscream 3.1.0 not compatible with Swift 5.0 [\#195](https://github.com/skywinder/web3swift/issues/195)
- How to Connect infuraWebsocket and subsribe perticular event in swift? [\#193](https://github.com/skywinder/web3swift/issues/193)
- How to Connect infuraWebsocket and subscribe particular event in swift? [\#193](https://github.com/skywinder/web3swift/issues/193)
- Use of unresolved identifier 'Wallet' [\#192](https://github.com/skywinder/web3swift/issues/192)
- V in Signed Message Hash not being calculated properly [\#191](https://github.com/skywinder/web3swift/issues/191)
- Not possible to calculate fast, normal and cheap transaction fee ? [\#190](https://github.com/skywinder/web3swift/issues/190)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Please take it from the [roadmap](https://hackmd.io/G5znP3xAQY-BVc1X8Y1jSg) or f

## Codestyle guideline
- `swiftlint` check should goes with no warnings.
- 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).
- 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).
- We use [swift](https://www.swift.org/documentation/api-design-guidelines/ "") name convention.
## Tests guideline
1. Cover each new public method with tests.
Expand Down Expand Up @@ -67,4 +67,4 @@ on:
- [ ] All public method have `///` styled comments.
- [ ] All magic or nonintuitive internal code parts are clearly explained in inline comments.
- [ ] `swiftlint` ran have no warnings.
- [ ] No commented out code lefts in PR.
- [ ] No commented out code lefts in PR.
30 changes: 0 additions & 30 deletions Example/myWeb3Wallet/Podfile

This file was deleted.

53 changes: 0 additions & 53 deletions Example/myWeb3Wallet/Podfile.lock

This file was deleted.

Loading