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
@@ -70,39 +70,140 @@ You can try it by yourself by running the example project:
70
70
- run `pod install` from the `Example/web3swiftExample` directory.
71
71
-`open ./web3swiftExample.xcworkspace`
72
72
73
-
###Requirements
73
+
## Requirements
74
74
75
75
Web3swift requires Swift 4.1 and iOS 9.0 or macOS 10.13 although we recommend to use the latest iOS and MacOS versions for your own safety. Don't forget to set iOS version in a Podfile, otherwise you get an error if deployment target is less than the latest SDK.
76
76
77
-
### Installation
77
+
## Communication
78
+
79
+
- if you **need help**, use [Stack Overflow](https://stackoverflow.com/questions/tagged/web3swift) (tag 'web3swift')
80
+
- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/web3swift).
81
+
- If you **found a bug**, [open an issue](https://github.com/BANKEX/web3swift/issues).
82
+
- If you **have a feature request**, [open an issue](https://github.com/BANKEX/web3swift/issues).
83
+
- If you **want to contribute**, [submit a pull request](https://github.com/BANKEX/web3swift/pulls).
84
+
85
+
## Installation
86
+
87
+
### CocoaPods
88
+
89
+
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
90
+
91
+
```bash
92
+
$ sudo gem install cocoapods
93
+
```
94
+
95
+
96
+
To integrate web3swift into your Xcode project using CocoaPods, specify it in your `Podfile`:
78
97
79
-
web3swift is available through [CocoaPods](http://cocoapods.org). To install
80
-
it, simply add the following line to your `Podfile`:
81
98
82
99
```ruby
83
-
pod 'web3swift', git:'https://github.com/BANKEX/web3swift.git'
100
+
source 'https://github.com/CocoaPods/Specs.git'
101
+
platform :ios, '9.0'
102
+
103
+
target '<Your Target Name>'do
104
+
use_frameworks!
105
+
pod 'web3swift', :git => 'https://github.com/BANKEX/web3swift.git'
106
+
end
107
+
```
108
+
109
+
Then, run the following command:
110
+
111
+
```bash
112
+
$ pod install
113
+
```
114
+
## Features
115
+
116
+
-[x] Create Account
117
+
-[x] Import Account
118
+
-[x] Sign transictions
119
+
-[x] Send transactions, call functions of smart-contracts, estimate gas costs
120
+
-[x] Serialize and deserialize transactions and results to native Swift types
121
+
-[x] Convenience functions for chain state: block number, gas price
122
+
-[x] Check transaction results and get receipt
123
+
-[x] Parse event logs for transaction
124
+
-[x] Manage user's private keys through encrypted keystore abstractions
125
+
-[x] Batched requests in concurrent mode, checks balances of 580 tokens (from the latest MyEtherWallet repo) over 3 seconds
126
+
127
+
## Usage
128
+
129
+
Here you can see a few examples of use of our library
130
+
### Initializing Ethereum address
131
+
```bash
132
+
let coldWalletAddress = EthereumAddress("0x6394b37Cf80A7358b38068f0CA4760ad49983a1B")!
133
+
let constractAddress = EthereumAddress("0x45245bc59219eeaaf6cd3f382e078a461ff9de7b")!
134
+
```
135
+
136
+
### Getting gas price
137
+
```bash
138
+
let web3Main = Web3.InfuraMainnetWeb3()
139
+
let gasPriceResult = web3Main.eth.getGasPrice()
140
+
guard case .success(let gasPrice) = gasPriceResult else {return}
let convenienceTransferResult = convenienceTokenTransfer!.send(password: "BANKEXFOUNDATION", options: convenienceTransferOptions)
182
+
switch convenienceTransferResult {
183
+
case .success(let res):
184
+
print("Token transfer successful")
185
+
print(res)
186
+
case .failure(let error):
187
+
print(error)
188
+
}
189
+
```
96
190
97
-
###Global plans
191
+
## Global plans
98
192
- Full reference `web3js` functionality
99
193
- Light Ethereum subprotocol (LES) integration
100
194
195
+
## [Apps using this library](https://github.com/BANKEX/web3swift/wiki/Apps-using-web3swift)
196
+
197
+
If you've used this project in a live app, please let us know!
198
+
199
+
*If you are using `web3swift` in your app or know of an app that uses it, please add it to [this] (https://github.com/BANKEX/web3swift/wiki/Apps-using-web3swift) list.*
200
+
101
201
## Special thanks to
102
202
103
203
- Gnosis team and their library [Bivrost-swift](https://github.com/gnosis/bivrost-swift) for inspiration for the ABI decoding approach
104
204
- [Trust iOS Wallet](https://github.com/TrustWallet/trust-wallet-ios) for collaboration and discussion for initial idea
105
205
- Official Ethereum and Solidity docs, everything was written from ground truth standards
206
+
106
207
## Contribution
107
208
108
209
For the latest version, please check [develop](https://github.com/BANKEX/web3swift/tree/develop) branch.
0 commit comments