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