Skip to content

Commit 8c7bc1a

Browse files
Merge pull request #175 from matter-labs/develop
2.1.6
2 parents 7011155 + 9b10861 commit 8c7bc1a

7 files changed

+43
-31
lines changed

CHANGELOG.md

+14-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,23 @@
11
# Change Log
22

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

5-
[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.3...HEAD)
6+
**Merged pull requests:**
7+
8+
- 2.1.4 [\#170](https://github.com/matter-labs/web3swift/pull/170) ([BaldyAsh](https://github.com/BaldyAsh))
9+
10+
## [2.1.4](https://github.com/matter-labs/web3swift/tree/2.1.4) (2019-04-24)
11+
[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.3...2.1.4)
612

713
**Fixed bugs:**
814

915
- Cannot load module 'Web3swift' as 'web3swift [\#133](https://github.com/matter-labs/web3swift/issues/133)
1016

1117
**Closed issues:**
1218

19+
- How to convert 21000 BigUInt estimated gas price into Wei ? [\#163](https://github.com/matter-labs/web3swift/issues/163)
20+
- ENS Permanent Registrar Support [\#159](https://github.com/matter-labs/web3swift/issues/159)
1321
- web3swift 2.1.3 [\#154](https://github.com/matter-labs/web3swift/issues/154)
1422
- Sending ETH always results in zero value [\#149](https://github.com/matter-labs/web3swift/issues/149)
1523
- WebSockets subscriptions [\#145](https://github.com/matter-labs/web3swift/issues/145)
@@ -18,6 +26,10 @@
1826

1927
**Merged pull requests:**
2028

29+
- Fix travis [\#169](https://github.com/matter-labs/web3swift/pull/169) ([BaldyAsh](https://github.com/BaldyAsh))
30+
- Fix warnings [\#168](https://github.com/matter-labs/web3swift/pull/168) ([BaldyAsh](https://github.com/BaldyAsh))
31+
- Added reverse registrar [\#165](https://github.com/matter-labs/web3swift/pull/165) ([BaldyAsh](https://github.com/BaldyAsh))
32+
- WIP: ENS BaseRegistrar and RegistrarController support [\#162](https://github.com/matter-labs/web3swift/pull/162) ([BaldyAsh](https://github.com/BaldyAsh))
2133
- Updated example to 2.1.3 [\#158](https://github.com/matter-labs/web3swift/pull/158) ([BaldyAsh](https://github.com/BaldyAsh))
2234
- Documentation update [\#153](https://github.com/matter-labs/web3swift/pull/153) ([BaldyAsh](https://github.com/BaldyAsh))
2335

web3swift.podspec

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "web3swift"
3-
s.version = "2.1.4"
3+
s.version = "2.1.6"
44
s.summary = "Web3 implementation in vanilla Swift for iOS ans macOS"
55

66
s.description = <<-DESC
@@ -17,7 +17,7 @@ s.swift_version = '5.0'
1717
s.module_name = 'Web3swift'
1818
s.ios.deployment_target = "9.0"
1919
s.osx.deployment_target = "10.11"
20-
s.source_files = "web3swift/{Promises,Web3,Contract,KeystoreManager,Transaction,Convenience,HookedFunctions,SwiftRLP,EthereumAddress,EthereumABI}/*.{h,swift}", "web3swift/Utils/**/*.swift" "web3swift/PrecompiledContracts/**/*.swift", "web3swift/web3swift.h"
20+
s.source_files = "web3swift/{Promises,Web3,Contract,KeystoreManager,Transaction,Convenience,HookedFunctions,SwiftRLP,EthereumAddress,EthereumABI}/*.{h,swift}", "web3swift/Utils/{ENS,EIP,Hooks}/*.swift" "web3swift/PrecompiledContracts/**/*.swift", "web3swift/web3swift.h"
2121
s.public_header_files = "web3swift/web3swift.h"
2222
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
2323

web3swift/Utils/ENS/ENS.swift

+15-15
Original file line numberDiff line numberDiff line change
@@ -10,67 +10,67 @@ import BigInt
1010

1111
public class ENS {
1212

13-
let web3: web3
14-
var registry: Registry
15-
var resolver: Resolver? = nil
16-
var baseRegistrar: BaseRegistrar? = nil
17-
var registrarController: ETHRegistrarController? = nil
18-
var reverseRegistrar: ReverseRegistrar? = nil
13+
public let web3: web3
14+
public var registry: Registry
15+
public var resolver: Resolver? = nil
16+
public var baseRegistrar: BaseRegistrar? = nil
17+
public var registrarController: ETHRegistrarController? = nil
18+
public var reverseRegistrar: ReverseRegistrar? = nil
1919

20-
init?(web3: web3) {
20+
public init?(web3: web3) {
2121
self.web3 = web3
2222
guard let registry = Registry(web3: web3) else {
2323
return nil
2424
}
2525
self.registry = registry
2626
}
2727

28-
func setENSResolver(_ resolver: Resolver) throws {
28+
public func setENSResolver(_ resolver: Resolver) throws {
2929
guard resolver.web3.provider.url == self.web3.provider.url else {
3030
throw Web3Error.processingError(desc: "Resolver should use same provider as ENS")
3131
}
3232
self.resolver = resolver
3333
}
3434

35-
func setENSResolver(withDomain domain: String) throws {
35+
public func setENSResolver(withDomain domain: String) throws {
3636
guard let resolver = try? self.registry.getResolver(forDomain: domain) else {
3737
throw Web3Error.processingError(desc: "No resolver for this domain")
3838
}
3939
self.resolver = resolver
4040
}
4141

42-
func setBaseRegistrar(_ baseRegistrar: BaseRegistrar) throws {
42+
public func setBaseRegistrar(_ baseRegistrar: BaseRegistrar) throws {
4343
guard baseRegistrar.web3.provider.url == self.web3.provider.url else {
4444
throw Web3Error.processingError(desc: "Base registrar should use same provider as ENS")
4545
}
4646
self.baseRegistrar = baseRegistrar
4747
}
4848

49-
func setBaseRegistrar(withAddress address: EthereumAddress) {
49+
public func setBaseRegistrar(withAddress address: EthereumAddress) {
5050
let baseRegistrar = BaseRegistrar(web3: web3, address: address)
5151
self.baseRegistrar = baseRegistrar
5252
}
5353

54-
func setRegistrarController(_ registrarController: ETHRegistrarController) throws {
54+
public func setRegistrarController(_ registrarController: ETHRegistrarController) throws {
5555
guard registrarController.web3.provider.url == self.web3.provider.url else {
5656
throw Web3Error.processingError(desc: "Registrar controller should use same provider as ENS")
5757
}
5858
self.registrarController = registrarController
5959
}
6060

61-
func setRegistrarController(withAddress address: EthereumAddress) {
61+
public func setRegistrarController(withAddress address: EthereumAddress) {
6262
let registrarController = ETHRegistrarController(web3: web3, address: address)
6363
self.registrarController = registrarController
6464
}
6565

66-
func setReverseRegistrar(_ reverseRegistrar: ReverseRegistrar) throws {
66+
public func setReverseRegistrar(_ reverseRegistrar: ReverseRegistrar) throws {
6767
guard reverseRegistrar.web3.provider.url == self.web3.provider.url else {
6868
throw Web3Error.processingError(desc: "Registrar controller should use same provider as ENS")
6969
}
7070
self.reverseRegistrar = reverseRegistrar
7171
}
7272

73-
func setReverseRegistrar(withAddress address: EthereumAddress) {
73+
public func setReverseRegistrar(withAddress address: EthereumAddress) {
7474
let reverseRegistrar = ReverseRegistrar(web3: web3, address: address)
7575
self.reverseRegistrar = reverseRegistrar
7676
}

web3swift/Utils/ENS/ENSRegistry.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ import BigInt
1212

1313
public extension ENS {
1414
class Registry {
15-
let web3: web3
16-
let registryContractAddress: EthereumAddress?
15+
public let web3: web3
16+
public let registryContractAddress: EthereumAddress?
1717

18-
init?(web3: web3) {
18+
public init?(web3: web3) {
1919
self.web3 = web3
2020
switch web3.provider.network {
2121
case .Mainnet?:

web3swift/Utils/ENS/ENSResolver.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import BigInt
1010

1111
public extension ENS {
1212
class Resolver {
13-
let web3: web3
14-
let resolverContractAddress: EthereumAddress
13+
public let web3: web3
14+
public let resolverContractAddress: EthereumAddress
1515

1616
public enum ContentType: BigUInt {
1717
case JSON = 1
@@ -56,7 +56,7 @@ public extension ENS {
5656
return TransactionOptions.defaultOptions
5757
}()
5858

59-
init(web3: web3, resolverContractAddress: EthereumAddress) {
59+
public init(web3: web3, resolverContractAddress: EthereumAddress) {
6060
self.web3 = web3
6161
self.resolverContractAddress = resolverContractAddress
6262
}

web3swift/Utils/ENS/ENSReverseRegistrar.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import BigInt
1212

1313
public extension ENS {
1414
class ReverseRegistrar {
15-
let web3: web3
16-
let address: EthereumAddress
15+
public let web3: web3
16+
public let address: EthereumAddress
1717

1818
lazy var contract: web3.web3contract = {
1919
let contract = self.web3.contract(Web3.Utils.reverseRegistrarABI, at: self.address, abiVersion: 2)
@@ -25,7 +25,7 @@ public extension ENS {
2525
return TransactionOptions.defaultOptions
2626
}()
2727

28-
init(web3: web3, address: EthereumAddress) {
28+
public init(web3: web3, address: EthereumAddress) {
2929
self.web3 = web3
3030
self.address = address
3131
}

web3swift/Utils/ENS/ETHRegistrarController.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ import BigInt
1212

1313
public extension ENS {
1414
class ETHRegistrarController {
15-
let web3: web3
16-
let address: EthereumAddress
15+
public let web3: web3
16+
public let address: EthereumAddress
1717

1818
lazy var contract: web3.web3contract = {
1919
let contract = self.web3.contract(Web3.Utils.ethRegistrarControllerABI, at: self.address, abiVersion: 2)
@@ -25,7 +25,7 @@ public extension ENS {
2525
return TransactionOptions.defaultOptions
2626
}()
2727

28-
init(web3: web3, address: EthereumAddress) {
28+
public init(web3: web3, address: EthereumAddress) {
2929
self.web3 = web3
3030
self.address = address
3131
}

0 commit comments

Comments
 (0)