Skip to content

Instantly share code, notes, and snippets.

@araa47
Created October 6, 2020 07:53
Show Gist options
  • Save araa47/4f416ce69feffab9fb1ab20df2dc774e to your computer and use it in GitHub Desktop.
Save araa47/4f416ce69feffab9fb1ab20df2dc774e to your computer and use it in GitHub Desktop.

Code

from ocean_utils.agreements.service_factory import ServiceDescriptor

from ocean_lib.ocean.ocean import Ocean
from ocean_lib.web3_internal.wallet import Wallet
from ocean_lib.ocean.util import to_base_18
from ocean_lib.data_provider.data_service_provider import DataServiceProvider
from dotenv import load_dotenv
from ocean_lib.config_provider import ConfigProvider
from ocean_lib.ocean.ocean import Ocean
from ocean_lib.models.dtfactory import DTFactory

from ocean_lib.web3_internal.web3helper import Web3Helper
import os

load_dotenv()

private_key = os.environ.get("WALLET_PRIVATE_KEY")

config = {
   'network' : 'rinkeby',
   'metadataStoreUri' : 'https://aquarius.d5dao.dev-ocean.com/',
   'providerUri' : 'https://provider.d5dao.dev-ocean.com/',
     'dtfactory.address': '0xB9d406D24B310A7D821D0b782a36909e8c925471',
     'provider.address': '0x00C51c469E5e98115F82602C6464E338F2057c26'
 }
ocean = Ocean(config)

Error

cannot find contract addresses: 
artifacts path is /home/rex/.cache/pypoetry/virtualenvs/ocean-d5-py-qMCiAuk--py3.8/artifacts, address file is /home/rex/.cache/pypoetry/virtualenvs/ocean-d5-py-qMCiAuk--py3.8/artifacts/address.json
address file exists? True
artifacts path exists? True
contents of artifacts folder: 
['IERC20.json', 'Migrations.json', 'Ownable.json', 'Metadata.json', 'DTFactory.json', 'DataTokenTemplate.json', 'SafeMath.json', 'FixedRateExchange.json', 'OPFCommunityFeeCollector.json', 'ERC20.json', 'BFactory.json', 'Context.json', 'ERC20Pausable.json', 'DDO.json', 'address.json', 'BPool.json', 'BToken.json', 'IERC20Template.json', 'BMath.json', 'Deployer.json', 'BNum.json', 'BTokenBase.json', 'BConst.json']
cannot find contract addresses: 
artifacts path is /home/rex/.cache/pypoetry/virtualenvs/ocean-d5-py-qMCiAuk--py3.8/artifacts, address file is /home/rex/.cache/pypoetry/virtualenvs/ocean-d5-py-qMCiAuk--py3.8/artifacts/address.json
address file exists? True
artifacts path exists? True
contents of artifacts folder: 
['IERC20.json', 'Migrations.json', 'Ownable.json', 'Metadata.json', 'DTFactory.json', 'DataTokenTemplate.json', 'SafeMath.json', 'FixedRateExchange.json', 'OPFCommunityFeeCollector.json', 'ERC20.json', 'BFactory.json', 'Context.json', 'ERC20Pausable.json', 'DDO.json', 'address.json', 'BPool.json', 'BToken.json', 'IERC20Template.json', 'BMath.json', 'Deployer.json', 'BNum.json', 'BTokenBase.json', 'BConst.json']


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment