Created
January 20, 2023 00:29
-
-
Save quocble/9d364228819c9b01ad719dd046859274 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# PATCH in brownie/network/contract.py | |
while True: | |
response = requests.get(url, params=params_tx, headers=REQUEST_HEADERS) | |
if response.status_code != 200: | |
raise ConnectionError( | |
f"Status {response.status_code} when querying {url}: {response.text}" | |
) | |
data = response.json() | |
break | |
# if int(data["status"]) == 1: | |
# # Constructor arguments received | |
# break | |
# else: | |
# # Wait for contract to be recognized by etherscan | |
# # This takes a few seconds after the contract is deployed | |
# # After 10 loops we throw with the API result message (includes address) | |
# if i >= 10: | |
# raise ValueError(f"API request failed with: {data['result']}") | |
# elif i == 0 and not silent: | |
# print(f"Waiting for {url} to process contract...") | |
# i += 1 | |
# time.sleep(10) | |
# if data["message"] == "OK": | |
# constructor_arguments = data["result"][0]["input"][contract_info["bytecode_len"] + 2 :] | |
# else: | |
constructor_arguments = "0000000000000000000000008862d8DaB077D529Ca3F976B6518bE3862207372" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment