INNER CODE UNIT · Python

parse_abis

skalenetwork/skale-network · packages/ima-artifacts/scripts/prepare.py:104

def parse_abis():
    IMA_DIR = 'IMA'
    releases_path = os.path.join(get_root_path(), 'releases')
    artifacts_dir = os.path.join(
                            get_root_path(),
                            'packages/ima-artifacts/deployments')
    for deployment in os.listdir(releases_path):
        item = os.path.join(releases_path, deployment)
        if os.path.isdir(item):
            if IMA_DIR not in os.listdir(item):
                logging.warning(f'{IMA_DIR} folder is missing in {item}')
            else:
                deployments_dir = os.path.join(item, IMA_DIR)
                artifacts_filename = os.path.join(
                    artifacts_dir,
                    f'{deployment}.json')
                if os.path.exists(artifacts_filename):
                    raise ValueError(f'{artifacts_filename} already exists')

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…