Skip to content

Commit

Permalink
Merge pull request #170 from matter-labs/develop
Browse files Browse the repository at this point in the history
2.1.4
  • Loading branch information
BaldyAsh authored Apr 24, 2019
2 parents 1cbb0b4 + 121cdc5 commit 7011155
Show file tree
Hide file tree
Showing 549 changed files with 21,445 additions and 9,580 deletions.
11 changes: 6 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
language: objective-c
osx_image: xcode10
xcode_project: web3swift.xcworkspace # path to your xcodeproj folder
language: swift
osx_image: xcode10.2
cache: bundler
xcode_project: web3swift.xcworkspace
xcode_scheme: web3swift-iOS
xcode_destination: platform=iOS Simulator, OS=12.0, name=iPhone X
xcode_destination: platform=iOS Simulator, OS=12.2, name=iPhone X
before_install:
- gem install cocoapods --pre --no-rdoc --no-ri --no-document --quiet
- gem install cocoapods --pre
- pod install --repo-update
script:
- xcodebuild -scheme web3swift-iOS -workspace web3swift.xcworkspace -sdk iphonesimulator build test
Expand Down
455 changes: 262 additions & 193 deletions CHANGELOG.md

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion Documentation/AdvancedUsage.md

This file was deleted.

74 changes: 74 additions & 0 deletions Documentation/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@
- [Get new pending transactions](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#get-new-pending-transactions)
- [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)
- [Subscribe on new pending transactions](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#subscribe-on-new-pending-transactions)
- **[ENS](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#ens)**
- [Registry](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#registry)
- [Resolver](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#resolver)
- [BaseRegistrar](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#baseregistrar)
- [RegistrarController](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#registrarcontroller)
- [ReverseRegistrar](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#reverseregistrar)

## Introduction

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

## ENS

You need ENS instance for future actions:
```swift
let web = web3(provider: InfuraProvider(Networks.Mainnet)!)
let ens = ENS(web3: web)!
```

### Registry

You can get/set owner, resolver, ttl via ENS property registry:
```swift
let owner = try! ens.registry.getOwner(node: node)
let resultSettingOwner = try! ens.registry.setOwner(node: node, owner: owner, options: options, password: password)
...
```

### Resolver

You use convenient resolver methods from ENS instance:
```swift
let address = try! ens.getAddress(forNode: node)
let name = try! ens.getName(forNode: node)
let content = try! ens.getContent(forNode: node)
let abi = try! ens.getABI(forNode: node)
let pubkey = try! ens.getPublicKey(forNode: node)
let text = try! ens.getText(forNode: node, key: key)

let result = try! ens.setAddress(forNode: node, address: address, options: options, password: password)
let result = try! ens.setName(forNode: node, name: name, options: options, password: password)
let result = try! ens.setContent(forNode: node, hash: hash, options: options, password: password)
let result = try! ens.setABI(forNode: node, contentType: .JSON, data: data, options: options, password: password)
let result = try! ens.setPublicKey(forNode: node, publicKey: publicKey, options: options, password: password)
let result = try! ens.setText(forNode: node, key: key, value: value, options: options, password: password)
```
or you can get resolver to use its methods directly:
```swift
let resolver = try! ens.registry.getResolver(forDomain: domain)
let doSomething = try! resolver. ...
```
or set it as ENS instance property and use its methods from it:
```swift
try! ens.setENSResolver(withDomain: domain)
let doSomething = try! ens.resolver!. ...
```

### BaseRegistrar
You can set BaseRegistrar as ENS instance property and use its methods from it:
```swift
ens.setBaseRegistrar(withAddress: address)
let doSomething = try! ens.baseRegistrar!. ...
```

### RegistrarController
You can set RegistrarController as ENS instance property and use its methods from it:
```swift
ens.setRegistrarController(withAddresss: address)
let doSomething = try! ens.registrarController!. ...
```

### ReverseRegistrar
You can set ReverseRegistrar as ENS instance property and use its methods from it:
```swift
ens.setReverseRegistrar(withAddresss: address)
let doSomething = try! ens.reverseRegistrar!. ...
```


2 changes: 1 addition & 1 deletion Documentation/web3swift 2.0 Migration Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Now you have to do "import Web3swift" (capitalization!) instead of "import web3s

## New pods

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

## Breaking API Changes

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Example/web3swiftExample/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ platform :ios, '9.0'
target 'web3swiftExample' do
use_frameworks!
#use_modular_headers!
pod 'web3swift'
# pod 'web3swift', :git => 'https://github.com/matterinc/web3swift.git'
pod 'web3swift'
end
55 changes: 27 additions & 28 deletions Example/web3swiftExample/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,37 +1,36 @@
PODS:
- BigInt (3.1.0):
- SipHash (~> 1.2)
- CryptoSwift (0.13.0)
- CryptoSwift (0.15.0)
- EthereumABI (1.1.1):
- BigInt (~> 3.1)
- CryptoSwift (~> 0.13)
- EthereumAddress (~> 1.0.0)
- EthereumAddress (1.0.0):
- CryptoSwift (~> 0.13)
- PromiseKit (6.5.2):
- PromiseKit/CorePromise (= 6.5.2)
- PromiseKit/Foundation (= 6.5.2)
- PromiseKit/UIKit (= 6.5.2)
- PromiseKit/CorePromise (6.5.2)
- PromiseKit/Foundation (6.5.2):
- PromiseKit (6.4.1):
- PromiseKit/CorePromise (= 6.4.1)
- PromiseKit/Foundation (= 6.4.1)
- PromiseKit/UIKit (= 6.4.1)
- PromiseKit/CorePromise (6.4.1)
- PromiseKit/Foundation (6.4.1):
- PromiseKit/CorePromise
- PromiseKit/UIKit (6.5.2):
- PromiseKit/UIKit (6.4.1):
- PromiseKit/CorePromise
- scrypt (2.0):
- CryptoSwift (~> 0.11)
- secp256k1_swift (1.0.3)
- SipHash (1.2.2)
- SwiftRLP (1.2):
- Starscream (3.1.0)
- SwiftRLP (1.1):
- BigInt (~> 3.1)
- web3swift (2.0.1):
- BigInt (~> 3.1)
- CryptoSwift (~> 0.13)
- EthereumABI (~> 1.1.1)
- EthereumAddress (~> 1.0.0)
- PromiseKit (~> 6.3)
- scrypt (~> 2.0)
- secp256k1_swift (~> 1.0.3)
- SwiftRLP (~> 1.1)
- web3swift (2.1.3):
- BigInt (= 3.1)
- CryptoSwift (= 0.15.0)
- EthereumABI (= 1.1.1)
- EthereumAddress (= 1.0.0)
- PromiseKit (= 6.4.1)
- secp256k1_swift (= 1.0.3)
- Starscream (= 3.1.0)
- SwiftRLP (= 1.1)

DEPENDENCIES:
- web3swift
Expand All @@ -43,24 +42,24 @@ SPEC REPOS:
- EthereumABI
- EthereumAddress
- PromiseKit
- scrypt
- secp256k1_swift
- SipHash
- Starscream
- SwiftRLP
- web3swift

SPEC CHECKSUMS:
BigInt: 76b5dfdfa3e2e478d4ffdf161aeede5502e2742f
CryptoSwift: 16e78bebf567bad1c87b2d58f6547f25b74c31aa
CryptoSwift: 769f58a9e89f64e8796c2e59ce5f002dc81a2438
EthereumABI: f040f5429e5a4366d028c88b88d9441e137593af
EthereumAddress: f476e1320dca3a0024431e713ede7a09c7eb7796
PromiseKit: 27c1601bfb73405871b805bcb8cf7e55c4dad3db
scrypt: 3fe5b1a3b0976f97cd87488673a8f7c65708cc84
PromiseKit: 4c76a6506638034e3d7bede97b2ff7743f7bd2dc
secp256k1_swift: 4fc5c4b2d2c6d21ee8ccb868cdc92da12f38bed9
SipHash: fad90a4683e420c52ef28063063dbbce248ea6d4
SwiftRLP: 98a02b2210128353ca02e4c2f4d83e2a9796db4f
web3swift: 33f30ca0e061e0f89117dfb46f5ee9f626eff6d6
Starscream: 08172b481e145289c4930cb567230fb55897cfa4
SwiftRLP: 5512899925f1a9e1c78c902ed3bf857880e814a0
web3swift: 23cc365dd3b28e9b990813965af4bd031e108f64

PODFILE CHECKSUM: 6d9e2706704c1b04a380df8a28b2457bc4f325b1
PODFILE CHECKSUM: 7d59dcb370ef0a49f93b0ae5e632bd4a6841c169

COCOAPODS: 1.6.0.beta.2
COCOAPODS: 1.7.0.beta.3
30 changes: 20 additions & 10 deletions Example/web3swiftExample/Pods/CryptoSwift/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 7011155

Please sign in to comment.