def METHOD_NAME(skale_bp, skale, schain_config, schain_on_contracts):
    name = schain_on_contracts
    filepath = ConfigFileManager(name).skaled_config_path
    dirname = os.path.dirname(filepath)
    if not os.path.isdir(dirname):
        os.makedirs(os.path.dirname(filepath))
    try:
        with open(filepath, 'w') as f:
            text = {'skaleConfig': {'nodeInfo': {'nodeID': 1}}}
            f.write(json.dumps(text))
        data = get_bp_data(skale_bp, get_api_url(
            BLUEPRINT_NAME, 'config'), {'schain_name': name})
        assert data == {'payload': {'nodeInfo': {'nodeID': 1}},
                        'status': 'ok'}
    finally:
        os.remove(filepath)
        shutil.rmtree(os.path.dirname(filepath))