Merge pull request #1692 from tuxxy/give-prisoners-e2ee

Merge the registries repo into the monolith
pull/1703/head
David Núñez 2020-02-17 10:18:18 +00:00 committed by GitHub
commit 5f291a9cf6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 22 additions and 7 deletions

View File

@ -0,0 +1,9 @@
# Registries of NuCypher Networks
This repo contains an authorative source of contract registries for several NuCypher networks.
* **Miranda**: Our first decentralized testnet. Not supported anymore
* **Frances**: Our second testnet, Only for development purposes
* **Cassandra**: Incentivized Testnet, supporting our 'Come and Stake It' initiative
* **Mainnet**: (_Soon_)

View File

@ -0,0 +1 @@
# Registry for Incentivized testnet ("Cassandra")

View File

@ -0,0 +1 @@
# Registry for NuCypher Tesnet 2 ("Frances")

View File

@ -0,0 +1 @@
# Registry for NuCypher Mainnet

View File

@ -0,0 +1,2 @@
# Registry for NuCypher Testnet 1 ("Miranda")

View File

@ -67,14 +67,14 @@ class CanonicalRegistrySource(ABC):
class GithubRegistrySource(CanonicalRegistrySource):
_PUBLICATION_REPO = "nucypher/ethereum-contract-registry"
_PUBLICATION_REPO = "nucypher/nucypher"
_BASE_URL = f'https://raw.githubusercontent.com/{_PUBLICATION_REPO}'
name = "GitHub Registry Source"
is_primary = True
def get_publication_endpoint(self) -> str:
url = f'{self._BASE_URL}/master/{self.network}/{self.registry_name}'
url = f'{self._BASE_URL}/master/nucypher/blockchain/eth/contract_registry/{self.network}/{self.registry_name}'
return url
def fetch_latest_publication(self) -> Union[str, bytes]:
@ -98,13 +98,13 @@ class GithubRegistrySource(CanonicalRegistrySource):
class InPackageRegistrySource(CanonicalRegistrySource):
_HERE = os.path.abspath(os.path.dirname(__file__))
_BASE_DIR = os.path.join(_HERE, "contract_registry")
_REGISTRY_DIR = os.path.join(_HERE, "contract_registry")
name = "In-Package Registry Source"
is_primary = False
def get_publication_endpoint(self) -> str:
filepath = str(os.path.join(self._BASE_DIR, self.network, self.registry_name))
filepath = str(os.path.join(self._REGISTRY_DIR, self.network, self.registry_name))
return filepath
def fetch_latest_publication(self) -> Union[str, bytes]:

View File

@ -106,11 +106,12 @@ EXTRAS_REQUIRE = {'development': TESTS_REQUIRE,
'docs': DOCS_REQUIRE,
'benchmark': BENCHMARKS_REQUIRE}
PACKAGE_DATA = ['cli/templates',
'network/templates/basic_status.j2',
PACKAGE_DATA = ['network/templates/basic_status.j2',
'network/nicknames/web_colors.json',
'blockchain/eth/contract_registry/mainnet/*',
'blockchain/eth/contract_registry/goerli/*',
'blockchain/eth/contract_registry/cassandra/*',
'blockchain/eth/contract_registry/frances/*',
'blockchain/eth/contract_registry/miranda/*',
'blockchain/eth/sol/source/contracts/*',
'blockchain/eth/sol/source/contracts/lib/*',
'blockchain/eth/sol/source/contracts/proxy/*',