diff --git a/CHANGELOG.md b/CHANGELOG.md index fc1de418f..782105f30 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,14 @@ # Change Log -## [Unreleased](https://github.com/matter-labs/web3swift/tree/HEAD) +## [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) -[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.3...HEAD) +**Merged pull requests:** + +- 2.1.4 [\#170](https://github.com/matter-labs/web3swift/pull/170) ([BaldyAsh](https://github.com/BaldyAsh)) + +## [2.1.4](https://github.com/matter-labs/web3swift/tree/2.1.4) (2019-04-24) +[Full Changelog](https://github.com/matter-labs/web3swift/compare/2.1.3...2.1.4) **Fixed bugs:** @@ -10,6 +16,8 @@ **Closed issues:** +- How to convert 21000 BigUInt estimated gas price into Wei ? [\#163](https://github.com/matter-labs/web3swift/issues/163) +- ENS Permanent Registrar Support [\#159](https://github.com/matter-labs/web3swift/issues/159) - web3swift 2.1.3 [\#154](https://github.com/matter-labs/web3swift/issues/154) - Sending ETH always results in zero value [\#149](https://github.com/matter-labs/web3swift/issues/149) - WebSockets subscriptions [\#145](https://github.com/matter-labs/web3swift/issues/145) @@ -18,6 +26,10 @@ **Merged pull requests:** +- Fix travis [\#169](https://github.com/matter-labs/web3swift/pull/169) ([BaldyAsh](https://github.com/BaldyAsh)) +- Fix warnings [\#168](https://github.com/matter-labs/web3swift/pull/168) ([BaldyAsh](https://github.com/BaldyAsh)) +- Added reverse registrar [\#165](https://github.com/matter-labs/web3swift/pull/165) ([BaldyAsh](https://github.com/BaldyAsh)) +- WIP: ENS BaseRegistrar and RegistrarController support [\#162](https://github.com/matter-labs/web3swift/pull/162) ([BaldyAsh](https://github.com/BaldyAsh)) - Updated example to 2.1.3 [\#158](https://github.com/matter-labs/web3swift/pull/158) ([BaldyAsh](https://github.com/BaldyAsh)) - Documentation update [\#153](https://github.com/matter-labs/web3swift/pull/153) ([BaldyAsh](https://github.com/BaldyAsh)) diff --git a/web3swift.podspec b/web3swift.podspec index 09166ec2d..44a4dfba2 100755 --- a/web3swift.podspec +++ b/web3swift.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "web3swift" -s.version = "2.1.4" +s.version = "2.1.6" s.summary = "Web3 implementation in vanilla Swift for iOS ans macOS" s.description = <<-DESC @@ -17,7 +17,7 @@ s.swift_version = '5.0' s.module_name = 'Web3swift' s.ios.deployment_target = "9.0" s.osx.deployment_target = "10.11" -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" +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" s.public_header_files = "web3swift/web3swift.h" s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' } diff --git a/web3swift/Utils/ENS/ENS.swift b/web3swift/Utils/ENS/ENS.swift index a1b35e13a..ec8af0c23 100755 --- a/web3swift/Utils/ENS/ENS.swift +++ b/web3swift/Utils/ENS/ENS.swift @@ -10,14 +10,14 @@ import BigInt public class ENS { - let web3: web3 - var registry: Registry - var resolver: Resolver? = nil - var baseRegistrar: BaseRegistrar? = nil - var registrarController: ETHRegistrarController? = nil - var reverseRegistrar: ReverseRegistrar? = nil + public let web3: web3 + public var registry: Registry + public var resolver: Resolver? = nil + public var baseRegistrar: BaseRegistrar? = nil + public var registrarController: ETHRegistrarController? = nil + public var reverseRegistrar: ReverseRegistrar? = nil - init?(web3: web3) { + public init?(web3: web3) { self.web3 = web3 guard let registry = Registry(web3: web3) else { return nil @@ -25,52 +25,52 @@ public class ENS { self.registry = registry } - func setENSResolver(_ resolver: Resolver) throws { + public func setENSResolver(_ resolver: Resolver) throws { guard resolver.web3.provider.url == self.web3.provider.url else { throw Web3Error.processingError(desc: "Resolver should use same provider as ENS") } self.resolver = resolver } - func setENSResolver(withDomain domain: String) throws { + public func setENSResolver(withDomain domain: String) throws { guard let resolver = try? self.registry.getResolver(forDomain: domain) else { throw Web3Error.processingError(desc: "No resolver for this domain") } self.resolver = resolver } - func setBaseRegistrar(_ baseRegistrar: BaseRegistrar) throws { + public func setBaseRegistrar(_ baseRegistrar: BaseRegistrar) throws { guard baseRegistrar.web3.provider.url == self.web3.provider.url else { throw Web3Error.processingError(desc: "Base registrar should use same provider as ENS") } self.baseRegistrar = baseRegistrar } - func setBaseRegistrar(withAddress address: EthereumAddress) { + public func setBaseRegistrar(withAddress address: EthereumAddress) { let baseRegistrar = BaseRegistrar(web3: web3, address: address) self.baseRegistrar = baseRegistrar } - func setRegistrarController(_ registrarController: ETHRegistrarController) throws { + public func setRegistrarController(_ registrarController: ETHRegistrarController) throws { guard registrarController.web3.provider.url == self.web3.provider.url else { throw Web3Error.processingError(desc: "Registrar controller should use same provider as ENS") } self.registrarController = registrarController } - func setRegistrarController(withAddress address: EthereumAddress) { + public func setRegistrarController(withAddress address: EthereumAddress) { let registrarController = ETHRegistrarController(web3: web3, address: address) self.registrarController = registrarController } - func setReverseRegistrar(_ reverseRegistrar: ReverseRegistrar) throws { + public func setReverseRegistrar(_ reverseRegistrar: ReverseRegistrar) throws { guard reverseRegistrar.web3.provider.url == self.web3.provider.url else { throw Web3Error.processingError(desc: "Registrar controller should use same provider as ENS") } self.reverseRegistrar = reverseRegistrar } - func setReverseRegistrar(withAddress address: EthereumAddress) { + public func setReverseRegistrar(withAddress address: EthereumAddress) { let reverseRegistrar = ReverseRegistrar(web3: web3, address: address) self.reverseRegistrar = reverseRegistrar } diff --git a/web3swift/Utils/ENS/ENSRegistry.swift b/web3swift/Utils/ENS/ENSRegistry.swift index 2f14dc413..abb86c14a 100644 --- a/web3swift/Utils/ENS/ENSRegistry.swift +++ b/web3swift/Utils/ENS/ENSRegistry.swift @@ -12,10 +12,10 @@ import BigInt public extension ENS { class Registry { - let web3: web3 - let registryContractAddress: EthereumAddress? + public let web3: web3 + public let registryContractAddress: EthereumAddress? - init?(web3: web3) { + public init?(web3: web3) { self.web3 = web3 switch web3.provider.network { case .Mainnet?: diff --git a/web3swift/Utils/ENS/ENSResolver.swift b/web3swift/Utils/ENS/ENSResolver.swift index 5f4c7181c..6cee1177a 100755 --- a/web3swift/Utils/ENS/ENSResolver.swift +++ b/web3swift/Utils/ENS/ENSResolver.swift @@ -10,8 +10,8 @@ import BigInt public extension ENS { class Resolver { - let web3: web3 - let resolverContractAddress: EthereumAddress + public let web3: web3 + public let resolverContractAddress: EthereumAddress public enum ContentType: BigUInt { case JSON = 1 @@ -56,7 +56,7 @@ public extension ENS { return TransactionOptions.defaultOptions }() - init(web3: web3, resolverContractAddress: EthereumAddress) { + public init(web3: web3, resolverContractAddress: EthereumAddress) { self.web3 = web3 self.resolverContractAddress = resolverContractAddress } diff --git a/web3swift/Utils/ENS/ENSReverseRegistrar.swift b/web3swift/Utils/ENS/ENSReverseRegistrar.swift index fe6b19784..b6440a0c9 100644 --- a/web3swift/Utils/ENS/ENSReverseRegistrar.swift +++ b/web3swift/Utils/ENS/ENSReverseRegistrar.swift @@ -12,8 +12,8 @@ import BigInt public extension ENS { class ReverseRegistrar { - let web3: web3 - let address: EthereumAddress + public let web3: web3 + public let address: EthereumAddress lazy var contract: web3.web3contract = { let contract = self.web3.contract(Web3.Utils.reverseRegistrarABI, at: self.address, abiVersion: 2) @@ -25,7 +25,7 @@ public extension ENS { return TransactionOptions.defaultOptions }() - init(web3: web3, address: EthereumAddress) { + public init(web3: web3, address: EthereumAddress) { self.web3 = web3 self.address = address } diff --git a/web3swift/Utils/ENS/ETHRegistrarController.swift b/web3swift/Utils/ENS/ETHRegistrarController.swift index 94c521a94..4455da8f3 100644 --- a/web3swift/Utils/ENS/ETHRegistrarController.swift +++ b/web3swift/Utils/ENS/ETHRegistrarController.swift @@ -12,8 +12,8 @@ import BigInt public extension ENS { class ETHRegistrarController { - let web3: web3 - let address: EthereumAddress + public let web3: web3 + public let address: EthereumAddress lazy var contract: web3.web3contract = { let contract = self.web3.contract(Web3.Utils.ethRegistrarControllerABI, at: self.address, abiVersion: 2) @@ -25,7 +25,7 @@ public extension ENS { return TransactionOptions.defaultOptions }() - init(web3: web3, address: EthereumAddress) { + public init(web3: web3, address: EthereumAddress) { self.web3 = web3 self.address = address }