chore: remove gas-safety-valve test
All checks were successful
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-03-03 10:44:12 +03:00
parent 9ae198f0f6
commit e731a2c32f
2 changed files with 9 additions and 15 deletions

View File

@@ -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):