Skip to content

Commit

Permalink
Merge pull request #41 from unstoppabledomains/removeEns
Browse files Browse the repository at this point in the history
Remove ens
  • Loading branch information
JohnnyJumper authored Jun 3, 2021
2 parents 4ea6607 + 135af18 commit a1cbfea
Show file tree
Hide file tree
Showing 13 changed files with 22 additions and 1,116 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Resolution-swift CHANGELOG

## 1.0.0
- Remove Ens support ([#41](https://github.com/unstoppabledomains/resolution-swift/pull/41)) via [@JohnnyJumper](https://github.com/JohnnyJumper)

## 0.3.7
- Zns fix ([#40](https://github.com/unstoppabledomains/resolution-swift/pull/40)) via [@merenkoff](https://github.com/merenkoff)
- Warning in project due to incorrect podspec #38 ([#39](https://github.com/unstoppabledomains/resolution-swift/pull/39)) via [@merenkoff](https://github.com/merenkoff)
Expand Down
27 changes: 3 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,25 +13,19 @@ Resoultion supports decentralized domains across three main zones:
- `.crypto`
- Zilliqa Name Service (ZNS)
- `.zil`
- Ethereum Name Service (ENS)
- `.eth`
- `.kred`
- `.xyz`
- `.luxe`

# Installation into the project

## Cocoa Pods

```ruby
pod 'UnstoppableDomainsResolution', '~> 0.3.7'
pod 'UnstoppableDomainsResolution', '~> 1.0.0'
```

## Swift Package Manager

```swift
package.dependencies.append(
.package(url: "https://github.com/unstoppabledomains/resolution-swift", from: "0.3.7")
.package(url: "https://github.com/unstoppabledomains/resolution-swift", from: "1.0.0")
)
```

Expand Down Expand Up @@ -127,12 +121,10 @@ Version 0.3.0 introduced the `Configurations` struct that is used for configurin
Library can offer three naming services at the moment:

* `cns` resolves `.crypto` domains,
* `ens` resolves `.eth` domains,
* `zns` resolves `.zil` domains

By default, each of them is using the mainnet network via infura provider.
Unstoppable domains are using the infura key with no restriction for CNS.
Unstoppable domains recommends setting up your own provider for ENS, as we don't guarantee ENS Infura key availability.
Unstoppable domains are using the infura key with no restriction for CNS.
You can update each naming service separately

```swift
Expand All @@ -155,19 +147,6 @@ resolution.addr(domain: "udtestdev-creek.crypto", ticker: "eth") { (result) in
XCTFail("Expected Eth Address, but got \(error)")
}
}

// naming services that hasn't been touched by Configrations struct are using default settings
// the following will look up monkybrain.eth on the mainnet via infura provider

resolution.addr(domain: "monkybrain.eth", ticker: "eth") { (result) in
switch result {
case .success(let returnValue):
ethENSAddress = returnValue
domainEthReceived.fulfill()
case .failure(let error):
XCTFail("Expected Eth Address, but got \(error)")
}
}
```

## Batch requesting of owners
Expand Down
48 changes: 2 additions & 46 deletions Resolution.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,9 @@
3EE4DA1424E367720097540B /* resolution.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EE4DA0624E367720097540B /* resolution.h */; settings = {ATTRIBUTES = (Public, ); }; };
3EE4DA1E24E367D40097540B /* Resolution.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3EE4DA1D24E367D40097540B /* Resolution.swift */; };
8402F708250935FE0007F01D /* ContractZNS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8402F707250935FD0007F01D /* ContractZNS.swift */; };
8449EDFA25139F2500DABB57 /* ensRegistry.json in Resources */ = {isa = PBXBuildFile; fileRef = 8449EDF925139F2500DABB57 /* ensRegistry.json */; };
8449EDFC2513BA3D00DABB57 /* ensResolver.json in Resources */ = {isa = PBXBuildFile; fileRef = 8449EDFB2513BA3D00DABB57 /* ensResolver.json */; };
845B401D251389A4006AB08E /* ENS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 845B401C251389A4006AB08E /* ENS.swift */; };
848E21092507890A008707D2 /* ZNS.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848E21082507890A008707D2 /* ZNS.swift */; };
848E210C25079D61008707D2 /* Types.swift in Sources */ = {isa = PBXBuildFile; fileRef = 848E210B25079D61008707D2 /* Types.swift */; };
B6B202C8260226B700A72AF2 /* BigInt in Frameworks */ = {isa = PBXBuildFile; productRef = B6B202C7260226B700A72AF2 /* BigInt */; };
B6E79937260223CE00F65894 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = B6E79935260223CE00F65894 /* README.md */; };
B6E79938260223CE00F65894 /* Base58.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6E79936260223CE00F65894 /* Base58.swift */; };
B6F2075425DBD89800140CE3 /* ABIEncoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6F2074C25DBD89800140CE3 /* ABIEncoder.swift */; };
B6F2075525DBD89800140CE3 /* ABIDecoder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6F2074D25DBD89800140CE3 /* ABIDecoder.swift */; };
B6F2075625DBD89800140CE3 /* ABIElements.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6F2074E25DBD89800140CE3 /* ABIElements.swift */; };
Expand Down Expand Up @@ -90,15 +85,10 @@
3EE4DA1D24E367D40097540B /* Resolution.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Resolution.swift; sourceTree = "<group>"; };
8402F707250935FD0007F01D /* ContractZNS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ContractZNS.swift; sourceTree = "<group>"; };
8425AED824FFBADF00BBCBBA /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
8449EDF925139F2500DABB57 /* ensRegistry.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ensRegistry.json; sourceTree = "<group>"; };
8449EDFB2513BA3D00DABB57 /* ensResolver.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = ensResolver.json; sourceTree = "<group>"; };
845B401C251389A4006AB08E /* ENS.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ENS.swift; sourceTree = "<group>"; };
848E21082507890A008707D2 /* ZNS.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ZNS.swift; sourceTree = "<group>"; };
848E210B25079D61008707D2 /* Types.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Types.swift; sourceTree = "<group>"; };
849E07CC24F946CA00A793D3 /* LinuxMain.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LinuxMain.swift; sourceTree = "<group>"; };
849E07D124F9499900A793D3 /* XCTestManifests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = XCTestManifests.swift; sourceTree = "<group>"; };
B6E79935260223CE00F65894 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
B6E79936260223CE00F65894 /* Base58.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Base58.swift; sourceTree = "<group>"; };
B6F2074C25DBD89800140CE3 /* ABIEncoder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ABIEncoder.swift; sourceTree = "<group>"; };
B6F2074D25DBD89800140CE3 /* ABIDecoder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ABIDecoder.swift; sourceTree = "<group>"; };
B6F2074E25DBD89800140CE3 /* ABIElements.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ABIElements.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -137,7 +127,6 @@
isa = PBXGroup;
children = (
3E2AC92124E4FA3E008EBC39 /* CNS */,
8449EDF825139F2500DABB57 /* ENS */,
);
path = Resources;
sourceTree = "<group>";
Expand All @@ -157,7 +146,6 @@
children = (
3EAFA40324EE32B2008791E9 /* CommonNamingService.swift */,
3E2AC91B24E4FA28008EBC39 /* CNS.swift */,
845B401C251389A4006AB08E /* ENS.swift */,
848E21082507890A008707D2 /* ZNS.swift */,
);
path = NamingServices;
Expand Down Expand Up @@ -216,7 +204,6 @@
3EE4DA0524E367720097540B /* Resolution */ = {
isa = PBXGroup;
children = (
B6E79933260223CE00F65894 /* Support */,
3045D143251E071200B65A06 /* Resources */,
848E210A25079D43008707D2 /* Helpers */,
3E2AC92024E4FA3E008EBC39 /* ABI */,
Expand Down Expand Up @@ -253,15 +240,6 @@
path = Sources;
sourceTree = "<group>";
};
8449EDF825139F2500DABB57 /* ENS */ = {
isa = PBXGroup;
children = (
8449EDF925139F2500DABB57 /* ensRegistry.json */,
8449EDFB2513BA3D00DABB57 /* ensResolver.json */,
);
path = ENS;
sourceTree = "<group>";
};
848E210A25079D43008707D2 /* Helpers */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -290,23 +268,6 @@
name = Frameworks;
sourceTree = "<group>";
};
B6E79933260223CE00F65894 /* Support */ = {
isa = PBXGroup;
children = (
B6E79934260223CE00F65894 /* Base58Swift */,
);
path = Support;
sourceTree = "<group>";
};
B6E79934260223CE00F65894 /* Base58Swift */ = {
isa = PBXGroup;
children = (
B6E79935260223CE00F65894 /* README.md */,
B6E79936260223CE00F65894 /* Base58.swift */,
);
path = Base58Swift;
sourceTree = "<group>";
};
B6F2074B25DBD89800140CE3 /* EthereumABI */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -407,7 +368,7 @@
};
};
};
buildConfigurationList = 3EE4D9FD24E367720097540B /* Build configuration list for PBXProject "Resolution" */;
buildConfigurationList = 3EE4D9FD24E367720097540B /* Build configuration list for PBXProject "resolution" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
Expand Down Expand Up @@ -438,10 +399,7 @@
files = (
30AE8615257A8CCD003A0142 /* network-config.json in Resources */,
30A69245251385A70079EC69 /* cnsProxyReader.json in Resources */,
8449EDFC2513BA3D00DABB57 /* ensResolver.json in Resources */,
B6E79937260223CE00F65894 /* README.md in Resources */,
3E2AC93E24E4FC9F008EBC39 /* cnsResolver.json in Resources */,
8449EDFA25139F2500DABB57 /* ensRegistry.json in Resources */,
3E2AC93F24E4FC9F008EBC39 /* cnsRegistry.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -500,7 +458,6 @@
files = (
3ECD84AE25A6AEE1001772DD /* UsdtVersion.swift in Sources */,
3E2AC91C24E4FA28008EBC39 /* CNS.swift in Sources */,
845B401D251389A4006AB08E /* ENS.swift in Sources */,
3E33F99925DCFAB400627C71 /* Configurations.swift in Sources */,
B6F2075825DBD89800140CE3 /* ABIParameterTypes.swift in Sources */,
B6F2075A25DBD89800140CE3 /* ABIExtensions.swift in Sources */,
Expand All @@ -509,7 +466,6 @@
3E2AC91F24E4FA35008EBC39 /* NamingService.swift in Sources */,
B6F2075525DBD89800140CE3 /* ABIDecoder.swift in Sources */,
848E21092507890A008707D2 /* ZNS.swift in Sources */,
B6E79938260223CE00F65894 /* Base58.swift in Sources */,
3E65912824E381E900D7EC35 /* Errors.swift in Sources */,
3EAFA3F724EB59DA008791E9 /* ABICoder.swift in Sources */,
3E105520258C95D300652FC7 /* DnsType.swift in Sources */,
Expand Down Expand Up @@ -765,7 +721,7 @@
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
3EE4D9FD24E367720097540B /* Build configuration list for PBXProject "Resolution" */ = {
3EE4D9FD24E367720097540B /* Build configuration list for PBXProject "resolution" */ = {
isa = XCConfigurationList;
buildConfigurations = (
3EE4DA1524E367720097540B /* Debug */,
Expand Down
5 changes: 0 additions & 5 deletions Sources/UnstoppableDomainsResolution/Configurations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,15 @@ public struct NamingServiceConfig {
public struct Configurations {
let cns: NamingServiceConfig
let zns: NamingServiceConfig
let ens: NamingServiceConfig

public init(
cns: NamingServiceConfig = NamingServiceConfig(
providerUrl: "https://mainnet.infura.io/v3/3c25f57353234b1b853e9861050f4817",
network: "mainnet"),
ens: NamingServiceConfig = NamingServiceConfig(
providerUrl: "https://mainnet.infura.io/v3/d423cf2499584d7fbe171e33b42cfbee",
network: "mainnet"),
zns: NamingServiceConfig = NamingServiceConfig(
providerUrl: "https://api.zilliqa.com",
network: "mainnet")
) {
self.ens = ens
self.cns = cns
self.zns = zns
}
Expand Down
1 change: 0 additions & 1 deletion Sources/UnstoppableDomainsResolution/Helpers/Types.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,3 @@ public typealias StringResultConsumer = (Result<String, ResolutionError>) -> Voi
public typealias StringsArrayResultConsumer = (Result<[String?], ResolutionError>) -> Void
public typealias DictionaryResultConsumer = (Result<[String: String], ResolutionError>) -> Void
public typealias DnsRecordsResultConsumer = (Result<[DnsRecord], Error>) -> Void
public let ethCoinIndex = 60
Loading

0 comments on commit a1cbfea

Please sign in to comment.