def deployed_contracts(self): contract_classes = { contract_name: self.get_contract(contract_name) for contract_name in self.contract_factories.keys() if self.is_contract_available(contract_name) } return package_contracts(contract_classes)
def test_contract_factories(web3): from solc import compile_files from populus.utils.filesystem import recursive_find_files from populus.utils.contracts import ( package_contracts, construct_contract_factories, ) base_tests_dir = os.path.dirname(__file__) solidity_source_files = recursive_find_files(base_tests_dir, '*.sol') compiled_contracts = compile_files(solidity_source_files) test_contract_factories = construct_contract_factories(web3, compiled_contracts) return package_contracts(test_contract_factories)
def deployed_contracts(self): warnings.warn( DeprecationWarning( "The `deployed_contracts` API has been relocated to " "`chain.provider.deployed_contracts`. Please update your code to " "use this new API. The `chain.deployed_contracts` API will be " "removed in subsequent releases.")) contract_classes = { contract_identifier: self.provider.get_contract(contract_identifier) for contract_identifier in self.provider.get_all_contract_names() if self.provider.is_contract_available(contract_identifier) } return package_contracts(contract_classes)
def test_contract_factories(web3): from solc import compile_files from populus.utils.filesystem import recursive_find_files from populus.utils.contracts import ( package_contracts, construct_contract_factories, ) base_tests_dir = os.path.dirname(__file__) solidity_source_files = recursive_find_files(base_tests_dir, '*.sol') compiled_contracts = compile_files(solidity_source_files) test_contract_factories = construct_contract_factories( web3, compiled_contracts) return package_contracts(test_contract_factories)
def base_contract_factories(chain): return package_contracts({ contract_name: chain.provider.get_base_contract_factory(contract_name) for contract_name in chain.provider.get_all_contract_names() })
def base_contract_factories(chain): # TODO: figure out what to do with thi API return package_contracts({ contract_name: chain.provider.get_base_contract_factory(contract_name) for contract_name in chain.provider.get_all_contract_names() })
def base_contract_factories(chain): return package_contracts({ contract_name: chain.provider.get_base_contract_factory(contract_name) for contract_name in chain.provider.get_all_contract_names() })