From e731a2c32f938e511cd6c70ff9c39a3f106c5154 Mon Sep 17 00:00:00 2001 From: William Luke Date: Thu, 3 Mar 2022 10:44:12 +0300 Subject: [PATCH] chore: remove gas-safety-valve test --- cic/contract/helpers.py | 20 +++++++------------- config/prod/config.ini | 4 ++-- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/cic/contract/helpers.py b/cic/contract/helpers.py index 93c41c5..c5b855d 100644 --- a/cic/contract/helpers.py +++ b/cic/contract/helpers.py @@ -22,10 +22,6 @@ CONTRACTS = [ { "url": "https://gitlab.com/cicnet/erc20-demurrage-token/-/raw/master/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap", "name": "Demurrage Token Single No Cap", - }, - { - "url":"https://gitlab.com/cicnet/erc20-demurrage-token/-/raw/lash/gas-safety-valve/python/erc20_demurrage_token/data/DemurrageTokenSingleNocap", - "name": "Demurrage Token Single No Cap (gas-safety-valve)", } ] @@ -33,15 +29,13 @@ CONTRACTS = [ def download_file(url: str, filename=None) -> (str, bytes): directory = tempfile.gettempdir() filename = filename if filename else url.split("/")[-1] - hash_object = hashlib.md5(url.encode()) - path = os.path.join(directory, hash_object.hexdigest()) - log.debug(f"Downloading {filename} to {path}") - if not os.path.exists(path): - log.debug(f"Downloading {filename}") - r = requests.get(url, allow_redirects=True) - with open(path, "wb") as f: - f.write(r.content) - return path + log.debug(f"Downloading {filename}") + r = requests.get(url, allow_redirects=True) + content_hash = hashlib.md5(r.content).hexdigest() + path = os.path.join(directory, content_hash) + with open(path, "wb") as f: + f.write(r.content) + log.debug(f"{filename} downloaded to {path}") return path def get_contract_args(data: list): diff --git a/config/prod/config.ini b/config/prod/config.ini index ce1aa8f..4bc766c 100644 --- a/config/prod/config.ini +++ b/config/prod/config.ini @@ -5,7 +5,7 @@ proof_writer = cic.writers.KVWriter ext_writer = cic.writers.KVWriter [cic] -registry_address = 0xcf60ebc445b636a5ab787f9e8bc465a2a3ef8299 +registry_address = 0x86c616fd2f020289d6fd7a98f3bd7539b335c995 [meta] url = https://meta.grassecon.net @@ -24,4 +24,4 @@ key_file = /home/will/grassroots/cic-internal-integration/apps/contract-migratio passphrase = [chain] -spec = evm:byzantium:5050:bloxberg \ No newline at end of file +spec = evm:kitabu:5050:sarafu \ No newline at end of file