Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

2.2.1 #210

Merged
merged 28 commits into from
Jun 24, 2019
Merged

2.2.1 #210

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
2f61796
Add new resolver ABI
May 1, 2019
c071915
Add interfaceImplementer function
May 1, 2019
5ab6a9d
Update ENSResolver.swift
May 1, 2019
fb0be8f
Expose errorDescription.
andresousa May 2, 2019
7460ff1
Fix typo in Usage
sweepty May 3, 2019
3256a6c
Update ETHRegistrarController.swift
May 3, 2019
542bc02
Merge pull request #183 from barrasso/patch-5
TonioMacaronio May 4, 2019
3c1e8dc
Merge pull request #182 from sweepty/sweepty-patch-1
TonioMacaronio May 4, 2019
e2451d4
Merge pull request #181 from andresousa/issue-172
TonioMacaronio May 4, 2019
631422a
Merge pull request #180 from barrasso/patch-3
TonioMacaronio May 4, 2019
041053d
docs updated
TonioMacaronio May 4, 2019
0ac5243
Update ETHRegistrarController.swift
May 5, 2019
282f919
Merge pull request #187 from barrasso/patch-6
TonioMacaronio May 6, 2019
6f09b81
websockets improvements and fixes
TonioMacaronio May 7, 2019
e17d6b1
Merge pull request #189 from matter-labs/websocketsFix
TonioMacaronio May 7, 2019
c7ff246
Update ENSBaseRegistrar.swift
May 19, 2019
f18f1c2
Merge pull request #198 from barrasso/patch-7
TonioMacaronio May 28, 2019
5be6ea6
v handle fix
TonioMacaronio May 28, 2019
02c7e42
fix
TonioMacaronio May 29, 2019
b59e702
Merge pull request #201 from matter-labs/fixV
TonioMacaronio May 29, 2019
0d9b2c9
Merge branch 'master' into develop
skywinder Jun 14, 2019
9342d89
add missed spaces
skywinder Jun 14, 2019
34850ad
upfate TOC and structure
skywinder Jun 14, 2019
5c0e7e8
update
skywinder Jun 14, 2019
363955f
infura v3 complete update
TonioMacaronio Jun 24, 2019
debe911
update bigint 4.0
TonioMacaronio Jun 24, 2019
c5212c1
docs
TonioMacaronio Jun 24, 2019
e94f2e1
Merge pull request #209 from matter-labs/infuraV3update
TonioMacaronio Jun 24, 2019
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
35 changes: 35 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,40 @@
# Change Log

## [Unreleased](https://github.com/matter-labs/web3swift/tree/HEAD)

[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.2.0...HEAD)

**Closed issues:**

- EIP67Code missing in web3swift 2.1.6 [\#176](https://github.com/matter-labs/web3swift/issues/176)
- ENS initializer is inaccessible due to `internal` protection level [\#171](https://github.com/matter-labs/web3swift/issues/171)

**Merged pull requests:**

- Update ETHRegistrarController.swift [\#183](https://github.com/matter-labs/web3swift/pull/183) ([barrasso](https://github.com/barrasso))
- Fix typo in Usage [\#182](https://github.com/matter-labs/web3swift/pull/182) ([sweepty](https://github.com/sweepty))
- Expose errorDescription. [\#181](https://github.com/matter-labs/web3swift/pull/181) ([andresousa](https://github.com/andresousa))
- Update ENS Resolver [\#180](https://github.com/matter-labs/web3swift/pull/180) ([barrasso](https://github.com/barrasso))

## [2.2.0](https://github.com/matter-labs/web3swift/tree/2.2.0) (2019-04-30)
[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.6...2.2.0)

**Closed issues:**

- Failed to fetch gas estimate [\#178](https://github.com/matter-labs/web3swift/issues/178)

**Merged pull requests:**

- 2.2.0 [\#179](https://github.com/matter-labs/web3swift/pull/179) ([BaldyAsh](https://github.com/BaldyAsh))

## [2.1.6](https://github.com/matter-labs/web3swift/tree/2.1.6) (2019-04-26)
[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.5...2.1.6)

**Merged pull requests:**

- 2.1.6 [\#175](https://github.com/matter-labs/web3swift/pull/175) ([BaldyAsh](https://github.com/BaldyAsh))
- Quickfix ens [\#174](https://github.com/matter-labs/web3swift/pull/174) ([BaldyAsh](https://github.com/BaldyAsh))

## [2.1.5](https://github.com/matter-labs/web3swift/tree/2.1.5) (2019-04-24)
[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.4...2.1.5)

Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
github "mxcl/PromiseKit" ~> 6.8.4
github "attaswift/BigInt" ~> 3.1
github "attaswift/BigInt" ~> 4.0
github "daltoniam/Starscream" ~> 3.1.0
github "krzyzanowskim/CryptoSwift" ~> 1.0.0
34 changes: 29 additions & 5 deletions Documentation/Usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,12 @@
- [Infura Websocket interactions](#infura-websocket-interactions)
- [Connect to Infura endpoint](#connect-to-infura-endpoint)
- [Connect to custom Infura-like endpoint](#connect-to-custom-infura-like-endpoint)
- [Create a filter in the node to notify when something happened](#create-a-filter-in-the-node-to-notify-when-something-happened)
- [Set a filter in the node to notify when something happened](#set-a-filter-in-the-node-to-notify-when-something-happened)
- [Get new pending transactions](#get-new-pending-transactions)
- [Create a new subscription over particular events](#create-a-new-subscription-over-particular-events)
- [Subscribe on new pending transactions](#subscribe-on-new-pending-transactions)
- [Subscribe on logs](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#subscribe-on-logs)
- [Subscribe on new heads](https://github.com/matter-labs/web3swift/blob/master/Documentation/Usage.md#subscribe-on-new-heads)
- [ENS](#ens)
- [Registry](#registry)
- [Resolver](#resolver)
Expand Down Expand Up @@ -181,7 +183,7 @@ if wallet.isHD {
```swift
let password = "web3swift"
let ethereumAddress = EthereumAddress(wallet.address)!
let pkData = try! keysoreManager.UNSAFE_getPrivateKeyData(password: password, account: ethereumAddress).toHexString()
let pkData = try! keystoreManager.UNSAFE_getPrivateKeyData(password: password, account: ethereumAddress).toHexString()
```

## Ethereum Endpoints interaction
Expand Down Expand Up @@ -421,18 +423,28 @@ socketProvider = InfuraWebsocketProvider.connectToInfuraSocket(.Mainnet, delegat
socketProvider = InfuraWebsocketProvider.connectToSocket("ws://your.endpoint", delegate: delegate)
```

#### Create a filter in the node to notify when something happened
#### Set a filter in the node to notify when something happened

To study possible filters read [Infura WSS filters documentation](https://infura.io/docs/ethereum/wss/introduction)

```swift
try! socketProvider.filter(method: <InfuraWebsocketMethod>, params: <[Encodable]?>)
// Getting logs
try! socketProvider.setFilterAndGetLogs(method: <InfuraWebsocketMethod>, params: <[Encodable]?>)
// Getting changes
try! socketProvider.setFilterAndGetChanges(method: <InfuraWebsocketMethod>, params: <[Encodable]?>)
```
Or you can provide parameters in more convenient way:
```swift
// Getting logs
try! socketProvider.setFilterAndGetLogs(method: <InfuraWebsocketMethod>, address: <EthereumAddress?>, fromBlock: <BlockNumber?>, toBlock: <BlockNumber?>, topics: <[String]?>)
// Getting changes
try! socketProvider.setFilterAndGetChanges(method: <InfuraWebsocketMethod>, address: <EthereumAddress?>, fromBlock: <BlockNumber?>, toBlock: <BlockNumber?>, topics: <[String]?>)
```

#### Get new pending transactions

```swift
try! socketProvider.filter(method: .newPendingTransactionFilter)
try! socketProvider.setFilterAndGetLogs(method: .newPendingTransactionFilter)
```

#### Create a new subscription over particular events
Expand All @@ -449,6 +461,18 @@ try! socketProvider.subscribe(params: <[Encodable]>)
try! socketProvider.subscribeOnNewPendingTransactions()
```

#### Subscribe on logs

```swift
try! socketProvider.subscribeOnLogs(addresses: <[EthereumAddress]?>, topics: <[String]?>)
```

#### Subscribe on new heads

```swift
try! socketProvider.subscribeOnNewHeads()
```

## ENS

You need ENS instance for future actions:
Expand Down
Loading