diff --git a/scripts/utils/constants.py b/scripts/utils/constants.py index e31be7f..128b307 100644 --- a/scripts/utils/constants.py +++ b/scripts/utils/constants.py @@ -1,8 +1,8 @@ from os.path import abspath, dirname, join -BASE_DIR = join(dirname(abspath(__file__)), "..") +from eth.constants import ZERO_ADDRESS -ZERO_ADDRESS = "0x0000000000000000000000000000000000000000" +BASE_DIR = join(dirname(abspath(__file__)), "..") ADDRESS_PROVIDER = "0x0000000022D53366457F9d5E68Ec105046FC4383" STABLE_REGISTRY_ADDRESS = "0x90E00ACe148ca3b23Ac1bC8C240C2a7Dd9c2d7f5" diff --git a/tests/mainnet/metaregistry/api/test_find_pool_for_coins.py b/tests/mainnet/metaregistry/api/test_find_pool_for_coins.py index 85b0e79..1715c2f 100644 --- a/tests/mainnet/metaregistry/api/test_find_pool_for_coins.py +++ b/tests/mainnet/metaregistry/api/test_find_pool_for_coins.py @@ -2,8 +2,7 @@ from os import environ import pytest - -from scripts.utils.constants import ZERO_ADDRESS +from eth.constants import ZERO_ADDRESS # NOTE: This is the most important method in the metaregistry contract since it will be used # by integrators to find pools for coin pairs. It finds pools even if the coin pair is not diff --git a/tests/mainnet/metaregistry/api/test_get_base_pool.py b/tests/mainnet/metaregistry/api/test_get_base_pool.py index c96d80a..278a8a3 100644 --- a/tests/mainnet/metaregistry/api/test_get_base_pool.py +++ b/tests/mainnet/metaregistry/api/test_get_base_pool.py @@ -1,4 +1,4 @@ -from scripts.utils.constants import ZERO_ADDRESS +from eth.constants import ZERO_ADDRESS def test_all(populated_metaregistry, populated_base_pool_registry, pool): diff --git a/tests/mainnet/metaregistry/api/test_get_coin_indices.py b/tests/mainnet/metaregistry/api/test_get_coin_indices.py index 2121745..73c41bd 100644 --- a/tests/mainnet/metaregistry/api/test_get_coin_indices.py +++ b/tests/mainnet/metaregistry/api/test_get_coin_indices.py @@ -2,8 +2,7 @@ import warnings import pytest - -from scripts.utils.constants import ZERO_ADDRESS +from eth.constants import ZERO_ADDRESS def _reject_pools_with_one_coin(metaregistry, pool): diff --git a/tests/mainnet/metaregistry/api/test_get_gauge.py b/tests/mainnet/metaregistry/api/test_get_gauge.py index a7d8067..a06bf1c 100644 --- a/tests/mainnet/metaregistry/api/test_get_gauge.py +++ b/tests/mainnet/metaregistry/api/test_get_gauge.py @@ -1,6 +1,5 @@ from boa import BoaError - -from scripts.utils.constants import ZERO_ADDRESS +from eth.constants import ZERO_ADDRESS def _is_dao_onboarded_gauge(_gauge, gauge_controller, liquidity_gauge): diff --git a/tests/mainnet/metaregistry/api/test_get_n_coins.py b/tests/mainnet/metaregistry/api/test_get_n_coins.py index 37a183b..91fd545 100644 --- a/tests/mainnet/metaregistry/api/test_get_n_coins.py +++ b/tests/mainnet/metaregistry/api/test_get_n_coins.py @@ -1,4 +1,4 @@ -from scripts.utils.constants import ZERO_ADDRESS +from eth.constants import ZERO_ADDRESS def _get_n_coins_for_pool(registry, pool): diff --git a/tests/mainnet/metaregistry/api/test_get_n_underlying_coins.py b/tests/mainnet/metaregistry/api/test_get_n_underlying_coins.py index 9ca6ccc..ff2caca 100644 --- a/tests/mainnet/metaregistry/api/test_get_n_underlying_coins.py +++ b/tests/mainnet/metaregistry/api/test_get_n_underlying_coins.py @@ -1,4 +1,4 @@ -from scripts.utils.constants import ZERO_ADDRESS +from eth.constants import ZERO_ADDRESS def _get_num_coins(registry, pool, base_pool_registry): diff --git a/tests/mainnet/metaregistry/api/test_get_pool_name.py b/tests/mainnet/metaregistry/api/test_get_pool_name.py index 6a56e2f..fafbfc4 100644 --- a/tests/mainnet/metaregistry/api/test_get_pool_name.py +++ b/tests/mainnet/metaregistry/api/test_get_pool_name.py @@ -1,5 +1,6 @@ +from eth.constants import ZERO_ADDRESS + from scripts.deployment_utils import get_deployed_contract -from scripts.utils.constants import ZERO_ADDRESS def test_stable_registry_pools( diff --git a/tests/mainnet/metaregistry/api/test_get_underlying_balances.py b/tests/mainnet/metaregistry/api/test_get_underlying_balances.py index 013a0c1..3731299 100644 --- a/tests/mainnet/metaregistry/api/test_get_underlying_balances.py +++ b/tests/mainnet/metaregistry/api/test_get_underlying_balances.py @@ -2,9 +2,9 @@ import pytest from boa import BoaError +from eth.constants import ZERO_ADDRESS from scripts.utils import get_deployed_contract -from scripts.utils.constants import ZERO_ADDRESS from tests.utils import assert_negative_coin_balance EXCEPTION_POOLS = ["0x79a8C46DeA5aDa233ABaFFD40F3A0A2B1e5A4F27"] diff --git a/tests/mainnet/metaregistry/api/test_get_underlying_coins.py b/tests/mainnet/metaregistry/api/test_get_underlying_coins.py index 379c6f1..214499c 100644 --- a/tests/mainnet/metaregistry/api/test_get_underlying_coins.py +++ b/tests/mainnet/metaregistry/api/test_get_underlying_coins.py @@ -2,8 +2,7 @@ import boa from boa import BoaError - -from scripts.utils.constants import ZERO_ADDRESS +from eth.constants import ZERO_ADDRESS def _get_underlying_coins( diff --git a/tests/mainnet/metaregistry/api/test_get_underlying_decimals.py b/tests/mainnet/metaregistry/api/test_get_underlying_decimals.py index afe1854..117179f 100644 --- a/tests/mainnet/metaregistry/api/test_get_underlying_decimals.py +++ b/tests/mainnet/metaregistry/api/test_get_underlying_decimals.py @@ -1,8 +1,8 @@ import pytest from boa import BoaError +from eth.constants import ZERO_ADDRESS from scripts.utils import get_deployed_contract -from scripts.utils.constants import ZERO_ADDRESS EXCEPTIONS = { # eth: ankreth pool returns [18, 0] when it should return: diff --git a/tests/mainnet/metaregistry/api/test_get_virtual_price.py b/tests/mainnet/metaregistry/api/test_get_virtual_price.py index 0f95efd..33fb6ec 100644 --- a/tests/mainnet/metaregistry/api/test_get_virtual_price.py +++ b/tests/mainnet/metaregistry/api/test_get_virtual_price.py @@ -4,9 +4,9 @@ import pytest from boa import BoaError from eth.codecs.abi.exceptions import DecodeError as ABIDecodeError +from eth.constants import ZERO_ADDRESS from scripts.utils import get_deployed_contract -from scripts.utils.constants import ZERO_ADDRESS from tests.utils import assert_decode_error, assert_negative_coin_balance # ---- sanity checks since vprice getters can revert for specific pools states ---- diff --git a/tests/mainnet/metaregistry/api/test_pool_is_metapool.py b/tests/mainnet/metaregistry/api/test_pool_is_metapool.py index 89f59f7..08a8cf6 100644 --- a/tests/mainnet/metaregistry/api/test_pool_is_metapool.py +++ b/tests/mainnet/metaregistry/api/test_pool_is_metapool.py @@ -1,4 +1,4 @@ -from scripts.utils.constants import ZERO_ADDRESS +from eth.constants import ZERO_ADDRESS def test_stable_registry_pools( diff --git a/tests/mainnet/metaregistry/test_base_registry_tracking.py b/tests/mainnet/metaregistry/test_base_registry_tracking.py index 6c889b3..e5fe376 100644 --- a/tests/mainnet/metaregistry/test_base_registry_tracking.py +++ b/tests/mainnet/metaregistry/test_base_registry_tracking.py @@ -1,4 +1,4 @@ -from scripts.utils.constants import ZERO_ADDRESS +from eth.constants import ZERO_ADDRESS def test_new_crypto_factory_pool( diff --git a/tests/mainnet/registries/test_add_remove_basepool.py b/tests/mainnet/registries/test_add_remove_basepool.py index d7b2468..c645631 100644 --- a/tests/mainnet/registries/test_add_remove_basepool.py +++ b/tests/mainnet/registries/test_add_remove_basepool.py @@ -1,6 +1,6 @@ import boa +from eth.constants import ZERO_ADDRESS -from scripts.utils.constants import ZERO_ADDRESS from tests.utils import deploy_contract diff --git a/tests/mainnet/registries/test_add_remove_metapool.py b/tests/mainnet/registries/test_add_remove_metapool.py index a988761..568ddca 100644 --- a/tests/mainnet/registries/test_add_remove_metapool.py +++ b/tests/mainnet/registries/test_add_remove_metapool.py @@ -1,6 +1,6 @@ import boa +from eth.constants import ZERO_ADDRESS -from scripts.utils.constants import ZERO_ADDRESS from tests.utils import deploy_contract diff --git a/tests/mainnet/registries/test_add_remove_pool.py b/tests/mainnet/registries/test_add_remove_pool.py index 982176a..59707fa 100644 --- a/tests/mainnet/registries/test_add_remove_pool.py +++ b/tests/mainnet/registries/test_add_remove_pool.py @@ -1,6 +1,6 @@ import boa +from eth.constants import ZERO_ADDRESS -from scripts.utils.constants import ZERO_ADDRESS from tests.utils import deploy_contract