Esempio n. 1
0
 def get_all_contract_data(self):
     project_contract_data = {
         contract_name: contract_data
         for contract_name, contract_data in
         self.chain.project.compiled_contract_data.items()
         if is_project_contract(self.chain.project.contracts_source_dir,
                                contract_data)
     }
     return project_contract_data
Esempio n. 2
0
def build_populus_meta(chain, contract_identifier, contract_data):
    yield (
        'is_project_contract',
        is_project_contract(chain.project.contracts_source_dir, contract_data),
    )
    yield (
        'is_test_contract',
        is_test_contract(chain.project.tests_dir, contract_data),
    )
    yield 'contract_type_name', normalize_class_name(contract_identifier)
Esempio n. 3
0
def build_populus_meta(chain, contract_data):
    yield (
        'is_project_contract',
        is_project_contract(chain.project.contracts_source_dirs, contract_data),
    )
    yield (
        'is_test_contract',
        is_test_contract(chain.project.tests_dir, contract_data),
    )
    yield 'contract_type_name', contract_data['name']
    yield 'source_path', contract_data['source_path']
Esempio n. 4
0
 def get_all_contract_data(self):
     compiled_contracts = self.chain.project.compiled_contract_data
     for contract_name, contract_data in compiled_contracts.items():
         if is_project_contract(self.chain.project.contracts_source_dirs,
                                contract_data):
             yield contract_name, contract_data