Example #1
0
def _get_registry(provider_uri, registry_filepath):
    BlockchainInterfaceFactory.initialize_interface(provider_uri=provider_uri)
    if registry_filepath:
        registry = LocalContractRegistry.from_latest_publication()
    else:
        registry = InMemoryContractRegistry.from_latest_publication()

    return registry
Example #2
0
def _get_registry(registry_filepath, network):

    if registry_filepath:
        registry = LocalContractRegistry.from_latest_publication(
            network=network)
    else:
        registry = InMemoryContractRegistry.from_latest_publication(
            network=network)

    return registry