mirror of https://github.com/nucypher/nucypher.git
Update the InPackageRegistrySource to use the new registries dir
parent
623f39bdb1
commit
2eb94b7d7a
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -1 +0,0 @@
|
|||
{"BENEFICIARY_ADDRESS": ["ALLOCATION_CONTRACT_ADDRESS", [{"constant": true, "inputs": [], "name": "linker", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_value", "type": "uint256"}], "name": "withdrawTokens", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "getLockedTokens", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [{"name": "_value", "type": "uint256"}, {"name": "_duration", "type": "uint256"}], "name": "initialDeposit", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [], "name": "renounceOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "owner", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "isOwner", "outputs": [{"name": "", "type": "bool"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "endLockTimestamp", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": true, "inputs": [], "name": "lockedValue", "outputs": [{"name": "", "type": "uint256"}], "payable": false, "stateMutability": "view", "type": "function"}, {"constant": false, "inputs": [], "name": "withdrawETH", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": false, "inputs": [{"name": "newOwner", "type": "address"}], "name": "transferOwnership", "outputs": [], "payable": false, "stateMutability": "nonpayable", "type": "function"}, {"constant": true, "inputs": [], "name": "token", "outputs": [{"name": "", "type": "address"}], "payable": false, "stateMutability": "view", "type": "function"}, {"inputs": [{"name": "_linker", "type": "address"}, {"name": "_token", "type": "address"}], "payable": false, "stateMutability": "nonpayable", "type": "constructor"}, {"payable": true, "stateMutability": "payable", "type": "fallback"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "sender", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}, {"indexed": false, "name": "duration", "type": "uint256"}], "name": "TokensDeposited", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "TokensWithdrawn", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "owner", "type": "address"}, {"indexed": false, "name": "value", "type": "uint256"}], "name": "ETHWithdrawn", "type": "event"}, {"anonymous": false, "inputs": [{"indexed": true, "name": "previousOwner", "type": "address"}, {"indexed": true, "name": "newOwner", "type": "address"}], "name": "OwnershipTransferred", "type": "event"}]]}
|
|
@ -29,7 +29,7 @@ from constant_sorrow.constants import REGISTRY_COMMITTED, NO_REGISTRY_SOURCE
|
|||
from twisted.logger import Logger
|
||||
|
||||
from nucypher.blockchain.eth.networks import NetworksInventory
|
||||
from nucypher.config.constants import DEFAULT_CONFIG_ROOT
|
||||
from nucypher.config.constants import BASE_DIR, DEFAULT_CONFIG_ROOT
|
||||
from nucypher.blockchain.eth.constants import PREALLOCATION_ESCROW_CONTRACT_NAME
|
||||
|
||||
|
||||
|
@ -97,14 +97,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(BASE_DIR, "registries")
|
||||
|
||||
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]:
|
||||
|
|
Loading…
Reference in New Issue