You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CONTRIBUTION.md
-2
Original file line number
Diff line number
Diff line change
@@ -35,8 +35,6 @@ In ci/cd we’re using Xcode test plans feature to spread tests to local and rem
35
35
Please add any files unused due build process to `excludeFiles` array in `Package.swift`.
36
36
### Carthage
37
37
Please do not forget to add & remove all new or dropped files and dependencies in carthage `.xcodeproj` file if you’re working with project anywhere but carthage project.
38
-
### Cocoapods
39
-
Please do not forget to add & remove all dependencies within `web3swift.podspec` file.
40
38
### GitHub actions
41
39
You’re able to use our github actions checks in your fork without needing to make PR to this repo. To get that just add your branch name to the branch list in file on path `.github/actions/ci.yml` to let the magic happening like follow:
Copy file name to clipboardexpand all lines: README.md
+48-32
Original file line number
Diff line number
Diff line change
@@ -5,23 +5,23 @@
5
5
[Join our discord](https://discord.gg/8bHCNmhS7x) or [Telegram](https://t.me/web3swift) if you need support or want to contribute to web3swift development!
-[Write Transaction and call smart contract method](#write-transaction-and-call-smart-contract-method)
@@ -48,11 +48,11 @@
48
48
-[x]:thought_balloon: Interaction with remote node via **JSON RPC**
49
49
-[x] 🔐 Local **keystore management** (`geth` compatible)
50
50
-[x] 🤖 Smart-contract **ABI parsing**
51
-
-[x] 🔓**ABI decoding** (V2 is supported with return of structures from public functions. Part of 0.4.22 Solidity compiler)
51
+
-[x] 🔓**ABI decoding** (V2 is supported with a return of structures from public functions. Part of 0.4.22 Solidity compiler)
52
52
-[x] 🕸Ethereum Name Service **(ENS) support** - a secure & decentralised way to address resources both on and off the blockchain using simple, human-readable names
-[x] ⚒ **Parsing TxPool** content into native values (ethereum addresses and transactions) - easy to get pending transactions
55
+
-[x] ⚒ **Parsing TxPool** content into native values (Ethereum addresses and transactions) - easy to get pending transactions
56
56
-[x] 🖇 **Event loops** functionality
57
57
-[x] 🕵️♂️ Possibility to **add or remove "middleware" that intercepts**, modifies and even **cancel transaction** workflow on stages "before assembly", "after assembly" and "before submission"
58
58
-[x] ✅**Literally following the standards** (BIP, EIP, etc):
@@ -66,7 +66,7 @@
66
66
67
67
## Installation
68
68
69
-
### Swift Package (Recommended)
69
+
### Swift Package
70
70
The [Swift Package Manager](https://swift.org/package-manager/"") is a tool for automating the distribution of Swift code that is well integrated with Swift build system.
71
71
72
72
Once you have your Swift package set up, adding `web3swift` as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.
@@ -89,30 +89,45 @@ import Web3Core
89
89
90
90
### CocoaPods
91
91
92
-
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
92
+
CocoaPods is not supported.
93
93
94
-
```bash
95
-
$ sudo gem install cocoapods
94
+
### Create Web3 Provider
95
+
Currently, web3swift supports only HTTP providers. WebSocket provider support was removed and is planned to be rebuilt from scratch.
96
+
To create a Web3HttpProvider you only need an RPC URL:
97
+
```swift
98
+
tryawaitWeb3HttpProvider(url: rpcUrl)
96
99
```
97
100
98
-
To integrate web3swift into your Xcode project using CocoaPods, specify it in your `Podfile`:
101
+
But if you know chain ID upfront it's better to specify one as well as with chain ID, the initializer won't have to ask the RPC for it and thus you guarantee that the initializer completes successfully without any asynchronous calls, considering your URL using `http/s` scheme:
102
+
```swift
103
+
let optionalChainId: Networks = .Custom(networkID: 42)
> **WARNING**: CocoaPods is a powerful tool for managing dependencies in iOS development, but it also has some limitations that preventing us of providing first class support there. We highly recommend using SPM first as using CocoaPods will delay new updates and bug fixes being delivered to you.
124
+
If you have a URL or you are using Infura you can use the following:
125
+
```swift
126
+
tryawait Web3.new(url, network: chainIdHere)
127
+
// or
128
+
let web3 =tryawait Web3.InfuraMainnetWeb3(accessToken: optionalInfuraToken)
129
+
let web3 =tryawait Web3.InfuraGoerliWeb3(accessToken: optionalGoerliToken)
Documentation is under construction👷🏻👷🏼♀️. We’re trying our best to comment all public API as detailed as we can, but the end it still far to come. But in one of the nearest minor updates we’ll bring DocC support of already done amount of docs. And your PR in such are more than welcome.
185
+
Documentation is under construction👷🏻👷🏼♀️. We’re trying our best to comment on all public APIs as detailed as possible, but the end is still far to come. But in one of the nearest minor updates we’ll bring DocC support of already done amount of docs. And your PR in such are more than welcome.
170
186
171
187
## Projects that are using web3swift
172
188
Please take a look at [Our customers](https://github.com/web3swift-team/web3swift/wiki/Our-Customers) wiki page.
@@ -180,7 +196,7 @@ Please take a look at [Our customers](https://github.com/web3swift-team/web3swif
180
196
- If you **found a bug**, [open an issue](https://github.com/web3swift-team/web3swift/issues).
181
197
182
198
## Development
183
-
To do local development and run the local tests, we recommend to use [ganache](https://github.com/trufflesuite/ganache) which is also used by CI when running github actions.
199
+
To do local development and run the local tests, we recommend using [ganache](https://github.com/trufflesuite/ganache) which is also used by CI when running GitHub actions.
184
200
185
201
```cli
186
202
// To install
@@ -195,24 +211,24 @@ Make sure that `ganache` is running on its default port `8546`. To change the po
195
211
196
212
### Before you commit
197
213
198
-
We are using [pre-commit](https://pre-commit.com) to run validations locally before a commit is created. Please, install pre-commit and run `pre-commit install` from project's root directory. After that before every commit git hook will run and execute `codespell`, `swiftlint` and other checks.
214
+
We are using [pre-commit](https://pre-commit.com) to run validations locally before a commit is created. Please, install pre-commit and run `pre-commit install` from the project's root directory. After that before every commit git hook will run and execute `codespell`, `swiftlint` and other checks.
199
215
200
216
## Contribute
201
217
Want to improve? It's awesome:
202
-
Then good news for you: **We are ready to pay for your contribution via [@gitcoin bot](https://gitcoin.co/grants/358/web3swift)!**
218
+
The good news for you: **We are ready to pay for your contribution via [@gitcoin bot](https://gitcoin.co/grants/358/web3swift)!**
203
219
204
220
- If you **have a feature request**, [open an issue](https://github.com/web3swift-team/web3swift/issues).
205
221
- If you **want to contribute**, [submit a pull request](https://github.com/web3swift-team/web3swift/pulls).
206
222
207
223
### Contribution
208
-
1. You are more than welcome to participate and get bounty by contributing! **Your contribution will be paid via [@gitcoin Grant program](https://gitcoin.co/grants/358/web3swift).**
224
+
1. You are more than welcome to participate and get a bounty by contributing! **Your contribution will be paid via [@gitcoin Grant program](https://gitcoin.co/grants/358/web3swift).**
209
225
2. Find or create an [issue](https://github.com/web3swift-team/web3swift/issues)
210
226
3. You can find open bounties in [Gitcoin Bounties](https://gitcoin.co/explorer?applicants=ALL&keywords=web3swift&order_by=-web3_created) list
211
-
4. Commita fix or a new feature in branch, push your changes
227
+
4. Commita fix or a new feature in a branch, push your changes
212
228
5.[Submit a pull request to **develop** branch](https://github.com/web3swift-team/web3swift/pulls)
213
-
1. Please, provide detailed description to it to help us proceed it faster.
229
+
1. Please, provide a detailed description of it to help us proceed faster.
214
230
215
-
[@skywinder](https://github.com/skywinder) are charged with open-sourсe and do not require money for using web3swift library.
231
+
[@skywinder](https://github.com/skywinder) are charged with open-sourсe and do not require money to use the web3swift library.
216
232
We want to continue to do everything we can to move the needle forward.
217
233
218
234
-**Support us** via [@gitcoin Grant program](https://gitcoin.co/grants/358/web3swift)
0 commit comments