Skip to content

Commit 7011155

Browse files
Merge pull request #170 from matter-labs/develop
2.1.4
2 parents 1cbb0b4 + 121cdc5 commit 7011155

File tree

549 files changed

+21445
-9580
lines changed

Some content is hidden

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

549 files changed

+21445
-9580
lines changed

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
language: objective-c
2-
osx_image: xcode10
3-
xcode_project: web3swift.xcworkspace # path to your xcodeproj folder
1+
language: swift
2+
osx_image: xcode10.2
3+
cache: bundler
4+
xcode_project: web3swift.xcworkspace
45
xcode_scheme: web3swift-iOS
5-
xcode_destination: platform=iOS Simulator, OS=12.0, name=iPhone X
6+
xcode_destination: platform=iOS Simulator, OS=12.2, name=iPhone X
67
before_install:
7-
- gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet
8+
- gem install cocoapods --pre
89
- pod install --repo-update
910
script:
1011
- xcodebuild -scheme web3swift-iOS -workspace web3swift.xcworkspace -sdk iphonesimulator build test

CHANGELOG.md

Lines changed: 262 additions & 193 deletions
Large diffs are not rendered by default.

Documentation/AdvancedUsage.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

Documentation/Usage.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@
4141
- [Get new pending transactions](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#get-new-pending-transactions)
4242
- [Create a new subscription over particular events](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#create-a-new-subscription-over-particular-events)
4343
- [Subscribe on new pending transactions](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#subscribe-on-new-pending-transactions)
44+
- **[ENS](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#ens)**
45+
- [Registry](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#registry)
46+
- [Resolver](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#resolver)
47+
- [BaseRegistrar](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#baseregistrar)
48+
- [RegistrarController](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#registrarcontroller)
49+
- [ReverseRegistrar](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#reverseregistrar)
4450

4551
## Introduction
4652

@@ -432,3 +438,71 @@ try! socketProvider.subscribe(params: <[Encodable]>)
432438
try! socketProvider.subscribeOnNewPendingTransactions()
433439
```
434440

441+
## ENS
442+
443+
You need ENS instance for future actions:
444+
```swift
445+
let web = web3(provider: InfuraProvider(Networks.Mainnet)!)
446+
let ens = ENS(web3: web)!
447+
```
448+
449+
### Registry
450+
451+
You can get/set owner, resolver, ttl via ENS property registry:
452+
```swift
453+
let owner = try! ens.registry.getOwner(node: node)
454+
let resultSettingOwner = try! ens.registry.setOwner(node: node, owner: owner, options: options, password: password)
455+
...
456+
```
457+
458+
### Resolver
459+
460+
You use convenient resolver methods from ENS instance:
461+
```swift
462+
let address = try! ens.getAddress(forNode: node)
463+
let name = try! ens.getName(forNode: node)
464+
let content = try! ens.getContent(forNode: node)
465+
let abi = try! ens.getABI(forNode: node)
466+
let pubkey = try! ens.getPublicKey(forNode: node)
467+
let text = try! ens.getText(forNode: node, key: key)
468+
469+
let result = try! ens.setAddress(forNode: node, address: address, options: options, password: password)
470+
let result = try! ens.setName(forNode: node, name: name, options: options, password: password)
471+
let result = try! ens.setContent(forNode: node, hash: hash, options: options, password: password)
472+
let result = try! ens.setABI(forNode: node, contentType: .JSON, data: data, options: options, password: password)
473+
let result = try! ens.setPublicKey(forNode: node, publicKey: publicKey, options: options, password: password)
474+
let result = try! ens.setText(forNode: node, key: key, value: value, options: options, password: password)
475+
```
476+
or you can get resolver to use its methods directly:
477+
```swift
478+
let resolver = try! ens.registry.getResolver(forDomain: domain)
479+
let doSomething = try! resolver. ...
480+
```
481+
or set it as ENS instance property and use its methods from it:
482+
```swift
483+
try! ens.setENSResolver(withDomain: domain)
484+
let doSomething = try! ens.resolver!. ...
485+
```
486+
487+
### BaseRegistrar
488+
You can set BaseRegistrar as ENS instance property and use its methods from it:
489+
```swift
490+
ens.setBaseRegistrar(withAddress: address)
491+
let doSomething = try! ens.baseRegistrar!. ...
492+
```
493+
494+
### RegistrarController
495+
You can set RegistrarController as ENS instance property and use its methods from it:
496+
```swift
497+
ens.setRegistrarController(withAddresss: address)
498+
let doSomething = try! ens.registrarController!. ...
499+
```
500+
501+
### ReverseRegistrar
502+
You can set ReverseRegistrar as ENS instance property and use its methods from it:
503+
```swift
504+
ens.setReverseRegistrar(withAddresss: address)
505+
let doSomething = try! ens.reverseRegistrar!. ...
506+
```
507+
508+

Documentation/web3swift 2.0 Migration Guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Now you have to do "import Web3swift" (capitalization!) instead of "import web3s
5050

5151
## New pods
5252

53-
Now EthereumAddress and Ethereum ABI are separate projects. Use "import EthereumAddress" and "import Ethereum ABI" everywhere you use them.
53+
Now EthereumAddress and Ethereum ABI are separate projects. Use "//import EthereumAddress" and "import Ethereum ABI" everywhere you use them.
5454

5555
## Breaking API Changes
5656

Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIDecoding.swift

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIEncoding.swift

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/web3swiftBrowser/Pods/EthereumABI/EthereumABI/Classes/ABIParameterTypes.swift

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Example/web3swiftExample/Podfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ platform :ios, '9.0'
44
target 'web3swiftExample' do
55
use_frameworks!
66
#use_modular_headers!
7-
pod 'web3swift'
8-
# pod 'web3swift', :git => 'https://github.com/matterinc/web3swift.git'
7+
pod 'web3swift'
98
end

Example/web3swiftExample/Podfile.lock

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
11
PODS:
22
- BigInt (3.1.0):
33
- SipHash (~> 1.2)
4-
- CryptoSwift (0.13.0)
4+
- CryptoSwift (0.15.0)
55
- EthereumABI (1.1.1):
66
- BigInt (~> 3.1)
77
- CryptoSwift (~> 0.13)
88
- EthereumAddress (~> 1.0.0)
99
- EthereumAddress (1.0.0):
1010
- CryptoSwift (~> 0.13)
11-
- PromiseKit (6.5.2):
12-
- PromiseKit/CorePromise (= 6.5.2)
13-
- PromiseKit/Foundation (= 6.5.2)
14-
- PromiseKit/UIKit (= 6.5.2)
15-
- PromiseKit/CorePromise (6.5.2)
16-
- PromiseKit/Foundation (6.5.2):
11+
- PromiseKit (6.4.1):
12+
- PromiseKit/CorePromise (= 6.4.1)
13+
- PromiseKit/Foundation (= 6.4.1)
14+
- PromiseKit/UIKit (= 6.4.1)
15+
- PromiseKit/CorePromise (6.4.1)
16+
- PromiseKit/Foundation (6.4.1):
1717
- PromiseKit/CorePromise
18-
- PromiseKit/UIKit (6.5.2):
18+
- PromiseKit/UIKit (6.4.1):
1919
- PromiseKit/CorePromise
20-
- scrypt (2.0):
21-
- CryptoSwift (~> 0.11)
2220
- secp256k1_swift (1.0.3)
2321
- SipHash (1.2.2)
24-
- SwiftRLP (1.2):
22+
- Starscream (3.1.0)
23+
- SwiftRLP (1.1):
2524
- BigInt (~> 3.1)
26-
- web3swift (2.0.1):
27-
- BigInt (~> 3.1)
28-
- CryptoSwift (~> 0.13)
29-
- EthereumABI (~> 1.1.1)
30-
- EthereumAddress (~> 1.0.0)
31-
- PromiseKit (~> 6.3)
32-
- scrypt (~> 2.0)
33-
- secp256k1_swift (~> 1.0.3)
34-
- SwiftRLP (~> 1.1)
25+
- web3swift (2.1.3):
26+
- BigInt (= 3.1)
27+
- CryptoSwift (= 0.15.0)
28+
- EthereumABI (= 1.1.1)
29+
- EthereumAddress (= 1.0.0)
30+
- PromiseKit (= 6.4.1)
31+
- secp256k1_swift (= 1.0.3)
32+
- Starscream (= 3.1.0)
33+
- SwiftRLP (= 1.1)
3534

3635
DEPENDENCIES:
3736
- web3swift
@@ -43,24 +42,24 @@ SPEC REPOS:
4342
- EthereumABI
4443
- EthereumAddress
4544
- PromiseKit
46-
- scrypt
4745
- secp256k1_swift
4846
- SipHash
47+
- Starscream
4948
- SwiftRLP
5049
- web3swift
5150

5251
SPEC CHECKSUMS:
5352
BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f
54-
CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa
53+
CryptoSwift: 769f58a9e89f64e8796c2e59ce5f002dc81a2438
5554
EthereumABI: f040f5429e5a4366d028c88b88d9441e137593af
5655
EthereumAddress: f476e1320dca3a0024431e713ede7a09c7eb7796
57-
PromiseKit: 27c1601bfb73405871b805bcb8cf7e55c4dad3db
58-
scrypt: 3fe5b1a3b0976f97cd87488673a8f7c65708cc84
56+
PromiseKit: 4c76a6506638034e3d7bede97b2ff7743f7bd2dc
5957
secp256k1_swift: 4fc5c4b2d2c6d21ee8ccb868cdc92da12f38bed9
6058
SipHash: fad90a4683e420c52ef28063063dbbce248ea6d4
61-
SwiftRLP: 98a02b2210128353ca02e4c2f4d83e2a9796db4f
62-
web3swift: 33f30ca0e061e0f89117dfb46f5ee9f626eff6d6
59+
Starscream: 08172b481e145289c4930cb567230fb55897cfa4
60+
SwiftRLP: 5512899925f1a9e1c78c902ed3bf857880e814a0
61+
web3swift: 23cc365dd3b28e9b990813965af4bd031e108f64
6362

64-
PODFILE CHECKSUM: 6d9e2706704c1b04a380df8a28b2457bc4f325b1
63+
PODFILE CHECKSUM: 7d59dcb370ef0a49f93b0ae5e632bd4a6841c169
6564

66-
COCOAPODS: 1.6.0.beta.2
65+
COCOAPODS: 1.7.0.beta.3

0 commit comments

Comments
 (0)