web3-wizzard-lib 0.0.2__py3-none-any.whl → 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- web3_wizzard_lib/core/modules/linea_appeal.py +69 -52
- web3_wizzard_lib/core/modules/stargate/farming.py +1 -1
- web3_wizzard_lib/core/utils/ai_utils.py +45 -0
- web3_wizzard_lib/core/utils/benchmark_utils.py +12 -0
- web3_wizzard_lib/core/utils/module_memory.py +26 -0
- web3_wizzard_lib-0.1.0.data/data/requirements.txt +1 -0
- {web3_wizzard_lib-0.0.2.dist-info → web3_wizzard_lib-0.1.0.dist-info}/METADATA +9 -4
- {web3_wizzard_lib-0.0.2.dist-info → web3_wizzard_lib-0.1.0.dist-info}/RECORD +10 -294
- {web3_wizzard_lib-0.0.2.dist-info → web3_wizzard_lib-0.1.0.dist-info}/WHEEL +1 -1
- core/__init__.py +0 -1
- core/contract/__init__.py +0 -0
- core/contract/aavecontract.py +0 -36
- core/contract/alienswap_contract.py +0 -21
- core/contract/arena_games_contract.py +0 -16
- core/contract/basiliskcontract.py +0 -58
- core/contract/bilinear_contract.py +0 -22
- core/contract/bungee.py +0 -33
- core/contract/coredao_contract.py +0 -35
- core/contract/coredao_from_contract.py +0 -40
- core/contract/dmail_send_mail.py +0 -18
- core/contract/empty_nft.py +0 -18
- core/contract/era_name.py +0 -23
- core/contract/eralendcontract.py +0 -34
- core/contract/eth_scroll_bridge_contract.py +0 -25
- core/contract/frog_war_contract.py +0 -48
- core/contract/horizondex_quoter.py +0 -14
- core/contract/horizondex_router.py +0 -91
- core/contract/imagine_contract.py +0 -18
- core/contract/izumi.py +0 -63
- core/contract/kreatorland_contract.py +0 -21
- core/contract/l0_claim.py +0 -254
- core/contract/l2_telegraph.py +0 -21
- core/contract/layerbank_price.py +0 -18
- core/contract/layerbank_token.py +0 -29
- core/contract/layerbankcontract.py +0 -59
- core/contract/linea_day_2_contract.py +0 -19
- core/contract/linea_day_3_contract.py +0 -55
- core/contract/linea_ens_names_contract.py +0 -55
- core/contract/lineaswaprouter.py +0 -52
- core/contract/maverick_multicall.py +0 -52
- core/contract/mendi_finance_contract.py +0 -11
- core/contract/mendi_token.py +0 -25
- core/contract/merkly_minter.py +0 -47
- core/contract/micro3_contract.py +0 -18
- core/contract/mute_router.py +0 -93
- core/contract/nidum_contract.py +0 -44
- core/contract/nile_contract.py +0 -60
- core/contract/nomis_attest_contract.py +0 -40
- core/contract/nomis_contract.py +0 -40
- core/contract/octomos.py +0 -31
- core/contract/odos.py +0 -104
- core/contract/omnisea.py +0 -29
- core/contract/orbiter_starknet.py +0 -30
- core/contract/pancake_pool.py +0 -19
- core/contract/pancake_quoter.py +0 -20
- core/contract/pancake_router.py +0 -72
- core/contract/rage_claim.py +0 -24
- core/contract/reactor_fusion_contract.py +0 -78
- core/contract/readon_contract.py +0 -19
- core/contract/rubyscore_contract.py +0 -31
- core/contract/satoshi_universe_contract.py +0 -29
- core/contract/scroll_bridge_contract.py +0 -24
- core/contract/scroll_canvas_mint_contract.py +0 -26
- core/contract/scroll_oracle.py +0 -11
- core/contract/snap_contract.py +0 -16
- core/contract/social_scan_contract.py +0 -20
- core/contract/stargate_farming.py +0 -37
- core/contract/stargate_router.py +0 -84
- core/contract/stargate_router_eth.py +0 -41
- core/contract/stargate_token_pool.py +0 -46
- core/contract/stargate_v2_contract.py +0 -36
- core/contract/syncswap_classic_pool.py +0 -15
- core/contract/syncswap_classic_pool_factory.py +0 -15
- core/contract/syncswap_pool.py +0 -25
- core/contract/syncswap_router.py +0 -123
- core/contract/tavaera_id.py +0 -18
- core/contract/tavaera_mint.py +0 -17
- core/contract/townstory_bonus_contract.py +0 -19
- core/contract/townstory_contract.py +0 -21
- core/contract/velocore_lens.py +0 -44
- core/contract/velocore_pool.py +0 -198
- core/contract/velocore_router.py +0 -80
- core/contract/woofi_swap.py +0 -29
- core/contract/xy_finance_contract.py +0 -87
- core/contract/yoddlo_contract.py +0 -19
- core/contract/yuliverse_contract.py +0 -36
- core/contract/zebra_contract.py +0 -68
- core/contract/zerolend_contract.py +0 -34
- core/contract/zerolend_liq_contract.py +0 -20
- core/contract/zkdx_contract.py +0 -40
- core/contract/zkdx_data.py +0 -14
- core/contract/zks.py +0 -24
- core/modules/__init__.py +0 -0
- core/modules/ads_import_proxy.py +0 -52
- core/modules/airdrop_printer.py +0 -80
- core/modules/bank/__init__.py +0 -0
- core/modules/bank/aave.py +0 -25
- core/modules/bank/bank.py +0 -15
- core/modules/bank/bank_module.py +0 -99
- core/modules/bank/basilisk.py +0 -25
- core/modules/bank/eralend.py +0 -25
- core/modules/bank/layerbank.py +0 -116
- core/modules/bank/mendi_finance.py +0 -57
- core/modules/bank/reactorfusion.py +0 -25
- core/modules/bank/zerolend.py +0 -36
- core/modules/bridge/__init__.py +0 -0
- core/modules/bridge/bridge.py +0 -8
- core/modules/bridge/coredao_bridge_sub.py +0 -47
- core/modules/bridge/orbiter_sub.py +0 -112
- core/modules/bridge/scroll_bridge_sub.py +0 -42
- core/modules/bridge/stargate_v2_sub.py +0 -74
- core/modules/bridge_module.py +0 -47
- core/modules/bungee.py +0 -109
- core/modules/cex_sender.py +0 -60
- core/modules/cex_subaccount_transfer.py +0 -34
- core/modules/cex_withdraw.py +0 -91
- core/modules/claimer.py +0 -45
- core/modules/claims/__init__.py +0 -0
- core/modules/claims/layerzero_claimer.py +0 -64
- core/modules/claims/rabby_claimer.py +0 -81
- core/modules/concrete_swap.py +0 -97
- core/modules/coredao_bridge.py +0 -32
- core/modules/coredao_bridge_auto.py +0 -39
- core/modules/debank_checker.py +0 -90
- core/modules/dmail.py +0 -54
- core/modules/erc20_balance.py +0 -42
- core/modules/intract/__init__.py +0 -0
- core/modules/intract/intract_api.py +0 -212
- core/modules/intract/utils.py +0 -81
- core/modules/intract_claim.py +0 -104
- core/modules/layer_2_20.py +0 -65
- core/modules/lending_module.py +0 -134
- core/modules/linea_appeal.py +0 -70
- core/modules/linea_poh_lxp.py +0 -64
- core/modules/liquidity/__init__.py +0 -0
- core/modules/liquidity/nile_pool.py +0 -64
- core/modules/liquidity/pool.py +0 -16
- core/modules/liquidity/syncswap_pool.py +0 -61
- core/modules/liquidity/velocore_pool.py +0 -55
- core/modules/liquidity/zerolend_liquidity.py +0 -26
- core/modules/liquidity_pool.py +0 -60
- core/modules/merkly_refuel.py +0 -87
- core/modules/modules.py +0 -4
- core/modules/nft/__init__.py +0 -0
- core/modules/nft/abbys_world.py +0 -22
- core/modules/nft/acg_worlds.py +0 -25
- core/modules/nft/alienswap_linea.py +0 -22
- core/modules/nft/arena_games.py +0 -22
- core/modules/nft/asmatch.py +0 -22
- core/modules/nft/battlemon.py +0 -25
- core/modules/nft/bilinear.py +0 -22
- core/modules/nft/bitavatar.py +0 -25
- core/modules/nft/culture_satoshi_universe.py +0 -24
- core/modules/nft/efrogs.py +0 -26
- core/modules/nft/empty_nft.py +0 -22
- core/modules/nft/era_domain.py +0 -42
- core/modules/nft/frog_war.py +0 -22
- core/modules/nft/frog_war_bonus.py +0 -22
- core/modules/nft/gamerboom.py +0 -25
- core/modules/nft/gamerboom_bonus.py +0 -26
- core/modules/nft/imagine.py +0 -32
- core/modules/nft/kreatorland_module.py +0 -35
- core/modules/nft/l2_telegraph_module.py +0 -22
- core/modules/nft/layer3_meta.py +0 -25
- core/modules/nft/linea_culture_2_2_linus.py +0 -24
- core/modules/nft/linea_culture_2_3_yooldo.py +0 -24
- core/modules/nft/linea_culture_2_4_frogwar.py +0 -24
- core/modules/nft/linea_culture_2_5_acg.py +0 -25
- core/modules/nft/linea_culture_2_6_ascend_the_end.py +0 -25
- core/modules/nft/linea_culture_3_1_ascend_the_end.py +0 -25
- core/modules/nft/linea_culture_3_2_sending_me.py +0 -25
- core/modules/nft/linea_culture_3_3_townstory.py +0 -25
- core/modules/nft/linea_culture_3_4_daniele.py +0 -25
- core/modules/nft/linea_culture_3_5_demmortal.py +0 -25
- core/modules/nft/linea_culture_3_6_foxy.py +0 -25
- core/modules/nft/linea_culture_4_1_coop_records.py +0 -60
- core/modules/nft/linea_culture_4_2_borja_moskv.py +0 -65
- core/modules/nft/linea_culture_4_2_borja_moskv_approve.py +0 -27
- core/modules/nft/linea_culture_4_3_fruit.py +0 -66
- core/modules/nft/linea_culture_4_4_fruit_crux.py +0 -67
- core/modules/nft/linea_culture_4_5_forbidden_fruit.py +0 -67
- core/modules/nft/linea_culture_4_6_laurent.py +0 -67
- core/modules/nft/linea_culture_day2.py +0 -20
- core/modules/nft/linea_culture_day3.py +0 -20
- core/modules/nft/linea_ens_names.py +0 -107
- core/modules/nft/lucky_cat.py +0 -25
- core/modules/nft/merkly_minter_module.py +0 -22
- core/modules/nft/micro3.py +0 -23
- core/modules/nft/mint_2048.py +0 -28
- core/modules/nft/nft_submodule.py +0 -16
- core/modules/nft/nidum.py +0 -87
- core/modules/nft/nidum_bonus.py +0 -23
- core/modules/nft/nomis.py +0 -64
- core/modules/nft/nomis_attest.py +0 -66
- core/modules/nft/nouns.py +0 -27
- core/modules/nft/octomos.py +0 -32
- core/modules/nft/omnisea.py +0 -33
- core/modules/nft/omnizone.py +0 -25
- core/modules/nft/orbiter_claim.py +0 -87
- core/modules/nft/readon.py +0 -30
- core/modules/nft/rubyscore.py +0 -45
- core/modules/nft/sarubol.py +0 -22
- core/modules/nft/satoshi_universe.py +0 -22
- core/modules/nft/scroll_canvas_attest_year_badge.py +0 -35
- core/modules/nft/scroll_canvas_mint.py +0 -51
- core/modules/nft/sign.py +0 -32
- core/modules/nft/snap.py +0 -25
- core/modules/nft/snap_bonus.py +0 -31
- core/modules/nft/social_scan.py +0 -22
- core/modules/nft/sub_module.py +0 -8
- core/modules/nft/tavaera.py +0 -30
- core/modules/nft/townstory.py +0 -75
- core/modules/nft/townstory_bonus.py +0 -45
- core/modules/nft/trusta_reputation.py +0 -48
- core/modules/nft/trustaa_poh.py +0 -49
- core/modules/nft/uber_poh.py +0 -24
- core/modules/nft/wizards_of_linea.py +0 -26
- core/modules/nft/yoddlo.py +0 -22
- core/modules/nft/yuliverse.py +0 -22
- core/modules/nft/zace.py +0 -25
- core/modules/nft/zks_domain.py +0 -41
- core/modules/nft_minter.py +0 -107
- core/modules/orbiter.py +0 -39
- core/modules/orbiter_checker.py +0 -26
- core/modules/rage.py +0 -54
- core/modules/scroll_bridge.py +0 -45
- core/modules/sell_all.py +0 -51
- core/modules/sleep_module.py +0 -25
- core/modules/smart_contract_deployment.py +0 -37
- core/modules/stargate/__init__.py +0 -0
- core/modules/stargate/auto_bridge.py +0 -91
- core/modules/stargate/bridge.py +0 -38
- core/modules/stargate/bridge_eth.py +0 -59
- core/modules/stargate/bridge_tokens.py +0 -48
- core/modules/stargate/classic_bridge.py +0 -34
- core/modules/stargate/farming.py +0 -163
- core/modules/stargate/l0_data.py +0 -10
- core/modules/stargate/pool.py +0 -74
- core/modules/stargate/stargate_balance_utils.py +0 -25
- core/modules/stargate/stargate_gas_checker.py +0 -68
- core/modules/swap/__init__.py +0 -1
- core/modules/swap/horizondex.py +0 -38
- core/modules/swap/izumi.py +0 -41
- core/modules/swap/lineaswap.py +0 -34
- core/modules/swap/maverick.py +0 -66
- core/modules/swap/mute.py +0 -39
- core/modules/swap/odos.py +0 -58
- core/modules/swap/one_inch.py +0 -58
- core/modules/swap/pancake.py +0 -41
- core/modules/swap/swap_facade.py +0 -10
- core/modules/swap/syncswap.py +0 -62
- core/modules/swap/velocore.py +0 -40
- core/modules/swap/woofi.py +0 -38
- core/modules/swap/xy_finance.py +0 -43
- core/modules/swap/zebra.py +0 -32
- core/modules/warm_up.py +0 -98
- core/modules/wrapping.py +0 -74
- core/modules/zkdx.py +0 -63
- tests/core/__init__.py +0 -0
- tests/core/contracts/__init__.py +0 -0
- tests/core/contracts/test_horizondex_quoter.py +0 -37
- tests/core/contracts/test_uniswap_quoter.py +0 -35
- tests/core/contracts/test_velocore_lens.py +0 -67
- tests/core/contracts/test_velocore_pool.py +0 -57
- tests/core/modules/__init__.py +0 -67
- tests/core/modules/swap/__init__.py +0 -0
- tests/core/modules/swap/test_horizondex.py +0 -37
- tests/core/modules/swap/test_lineaswap.py +0 -28
- tests/core/modules/swap/test_maverick.py +0 -31
- tests/core/modules/swap/test_mute.py +0 -29
- tests/core/modules/swap/test_odos.py +0 -36
- tests/core/modules/swap/test_pancake.py +0 -54
- tests/core/modules/swap/test_syncswap.py +0 -59
- tests/core/modules/swap/test_velocore.py +0 -33
- tests/core/modules/swap/test_woofi.py +0 -22
- tests/core/modules/test_bungee.py +0 -27
- tests/core/modules/test_concrete_swap.py +0 -62
- tests/core/modules/test_dmail.py +0 -41
- tests/core/modules/test_lending.py +0 -122
- tests/core/modules/test_nft.py +0 -32
- tests/core/modules/test_nft_minter.py +0 -30
- tests/core/modules/test_orbiter.py +0 -28
- tests/core/modules/test_sellall.py +0 -27
- tests/core/modules/test_send_to_cex.py +0 -27
- tests/core/modules/test_stargate_auto_bridge.py +0 -32
- tests/core/modules/test_stargate_bridge.py +0 -25
- tests/core/modules/test_stargate_farming.py +0 -108
- tests/core/modules/test_warmup.py +0 -78
- tests/core/modules/test_wrapping.py +0 -68
- tests/core/scenario/__init__.py +0 -0
- tests/core/scenario/module_0_test_config.py +0 -91
- tests/core/test_app.py +0 -19
- tests/core/test_config.py +0 -34
- web3_wizzard_lib/core/modules/modules.py +0 -27
- web3_wizzard_lib/core/modules/nft/sub_module.py +0 -8
- web3_wizzard_lib/core/modules/swap/swap_facade.py +0 -10
- web3_wizzard_lib-0.0.2.data/data/requirements.txt +0 -1
- {web3_wizzard_lib-0.0.2.dist-info → web3_wizzard_lib-0.1.0.dist-info}/top_level.txt +0 -0
@@ -1,62 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.domain.balance.balance import NotEnoughERC20Balance
|
5
|
-
|
6
|
-
from web3_wizzard_lib.core.modules import ConcreteSwap
|
7
|
-
from tests.core.modules.__init__ import zksync_min_native_balance, init_set_test_config, \
|
8
|
-
local_evm_test_account
|
9
|
-
|
10
|
-
|
11
|
-
def create_swap_config(app, chain, from_token, to_token, amount_interval={'from': 1, 'to': 1}):
|
12
|
-
return {
|
13
|
-
'chain': chain,
|
14
|
-
'app': app,
|
15
|
-
'from_token': from_token,
|
16
|
-
'to_token': to_token,
|
17
|
-
'amount_interval': amount_interval
|
18
|
-
}
|
19
|
-
|
20
|
-
|
21
|
-
class TestConcreteSwapModule(unittest.TestCase):
|
22
|
-
|
23
|
-
def test_syncswapShouldSwapInZKSync(self, chain='ZKSYNC', app='syncswap'):
|
24
|
-
logger.info("Test module [CONCRETE_SWAP, 3]")
|
25
|
-
|
26
|
-
init_set_test_config()
|
27
|
-
|
28
|
-
concrete_swap = ConcreteSwap(zksync_min_native_balance, local_evm_test_account)
|
29
|
-
|
30
|
-
test_config_buy_usdc = create_swap_config(app, chain, 'ETH', 'USDC')
|
31
|
-
test_config_sell_usdc = create_swap_config(app, chain, 'USDC', 'ETH', 'all_balance')
|
32
|
-
test_config_buy_usdt = create_swap_config(app, chain, 'ETH', 'USDT')
|
33
|
-
test_config_sell_usdt = create_swap_config(app, chain, 'USDT', 'ETH', 'all_balance')
|
34
|
-
test_config_buy_wbtc = create_swap_config(app, chain, 'ETH', 'WBTC')
|
35
|
-
test_config_sell_wbtc = create_swap_config(app, chain, 'WBTC', 'ETH', 'all_balance')
|
36
|
-
|
37
|
-
try:
|
38
|
-
concrete_swap.execute(*concrete_swap.parse_params(test_config_buy_usdc), local_evm_test_account)
|
39
|
-
concrete_swap.execute(*concrete_swap.parse_params(test_config_sell_usdc), local_evm_test_account)
|
40
|
-
concrete_swap.execute(*concrete_swap.parse_params(test_config_buy_usdt), local_evm_test_account)
|
41
|
-
concrete_swap.execute(*concrete_swap.parse_params(test_config_sell_usdt), local_evm_test_account)
|
42
|
-
concrete_swap.execute(*concrete_swap.parse_params(test_config_buy_wbtc), local_evm_test_account)
|
43
|
-
concrete_swap.execute(*concrete_swap.parse_params(test_config_sell_wbtc), local_evm_test_account)
|
44
|
-
except Exception as e:
|
45
|
-
self.fail(f"Some function raised an exception: {e}")
|
46
|
-
|
47
|
-
def test_shouldThrowNotEnoughERC20Exception(self):
|
48
|
-
logger.info("Test module [CONCRETE_SWAP, 3]")
|
49
|
-
|
50
|
-
init_set_test_config()
|
51
|
-
|
52
|
-
swap_test_config = create_swap_config('syncswap', 'ZKSYNC', 'USDC', 'ETH', 'all_balance')
|
53
|
-
|
54
|
-
concrete_swap = ConcreteSwap(zksync_min_native_balance, local_evm_test_account)
|
55
|
-
|
56
|
-
with self.assertRaises(NotEnoughERC20Balance):
|
57
|
-
concrete_swap.execute(*concrete_swap.parse_params(swap_test_config), local_evm_test_account)
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
tests/core/modules/test_dmail.py
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.domain.account_storage import AccountStorage
|
5
|
-
from sybil_engine.utils.utils import ConfigurationException
|
6
|
-
|
7
|
-
from web3_wizzard_lib.core.modules import Dmail
|
8
|
-
from tests.core.modules.__init__ import init_set_test_config, test_min_native_balance, local_evm_test_account
|
9
|
-
|
10
|
-
|
11
|
-
class TestDmailModule(unittest.TestCase):
|
12
|
-
init_set_test_config()
|
13
|
-
|
14
|
-
def test_shouldSendDmail(self, chains=['LINEA', 'SCROLL']):
|
15
|
-
logger.info("Test module [DMAIL, 5]")
|
16
|
-
|
17
|
-
for chain in chains:
|
18
|
-
send_dmail_test_config = {
|
19
|
-
'chain': chain,
|
20
|
-
'email_amount': {'from': 3, 'to': 4}
|
21
|
-
}
|
22
|
-
|
23
|
-
try:
|
24
|
-
dmail = Dmail(test_min_native_balance, AccountStorage(), range(3))
|
25
|
-
|
26
|
-
dmail.execute(*dmail.parse_params(send_dmail_test_config), local_evm_test_account)
|
27
|
-
except Exception as e:
|
28
|
-
self.fail(f"Some function raised an exception: {e}")
|
29
|
-
|
30
|
-
def test_shouldThrowConfigurationExceptionOnUnsupportedChain(self, chains=['ARBITRUM']):
|
31
|
-
logger.info("Test module [DMAIL, 5]")
|
32
|
-
|
33
|
-
for chain in chains:
|
34
|
-
send_dmail_test_config = {
|
35
|
-
'chain': chain,
|
36
|
-
'email_amount': {'from': 3, 'to': 4}
|
37
|
-
}
|
38
|
-
dmail = Dmail(test_min_native_balance, AccountStorage(), range(3))
|
39
|
-
|
40
|
-
with self.assertRaises(ConfigurationException):
|
41
|
-
dmail.parse_params(send_dmail_test_config)
|
@@ -1,122 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.domain.account_storage import AccountStorage
|
5
|
-
|
6
|
-
from web3_wizzard_lib.core.modules import Lending, EmptyDepositException
|
7
|
-
from tests.core.modules.__init__ import local_evm_test_account, zksync_min_native_balance, init_set_test_config
|
8
|
-
|
9
|
-
withdraw_interval = {'from': 60 * 15, 'to': 60 * 60}
|
10
|
-
|
11
|
-
|
12
|
-
class TestLending(unittest.TestCase):
|
13
|
-
init_set_test_config()
|
14
|
-
|
15
|
-
def test_shouldDepositAndWithdraw(self):
|
16
|
-
logger.info("Test module [LENDING]")
|
17
|
-
|
18
|
-
lending_deposit_test_config = {
|
19
|
-
'amount': {'from': 0.001, 'to': 0.001},
|
20
|
-
'action': 'DEPOSIT',
|
21
|
-
'lending_apps': ['ERALEND'],
|
22
|
-
'withdraw_sleep_interval': withdraw_interval
|
23
|
-
}
|
24
|
-
|
25
|
-
lending_withdraw_test_config = {
|
26
|
-
'amount': {'from': 0.001, 'to': 0.001},
|
27
|
-
'action': 'WITHDRAW',
|
28
|
-
'lending_apps': ['ERALEND'],
|
29
|
-
'withdraw_sleep_interval': withdraw_interval
|
30
|
-
}
|
31
|
-
|
32
|
-
lending = Lending(zksync_min_native_balance, AccountStorage(), 1)
|
33
|
-
|
34
|
-
lending.execute(*lending.parse_params(lending_deposit_test_config), local_evm_test_account)
|
35
|
-
lending.execute(*lending.parse_params(lending_withdraw_test_config), local_evm_test_account)
|
36
|
-
|
37
|
-
def test_shouldDepositAndWithdrawAll(self):
|
38
|
-
logger.info("Test module [LENDING]")
|
39
|
-
|
40
|
-
lending_deposit_test_config_eralend = {
|
41
|
-
'amount': {'from': 0.001, 'to': 0.001},
|
42
|
-
'action': 'DEPOSIT',
|
43
|
-
'lending_apps': ['ERALEND'],
|
44
|
-
'withdraw_sleep_interval': withdraw_interval
|
45
|
-
}
|
46
|
-
lending_deposit_test_config_fusion = {
|
47
|
-
'amount': {'from': 0.001, 'to': 0.001},
|
48
|
-
'action': 'DEPOSIT',
|
49
|
-
'lending_apps': ['REACTORFUSION_LANDING'],
|
50
|
-
'withdraw_sleep_interval': withdraw_interval
|
51
|
-
}
|
52
|
-
lending_deposit_test_config_basilisk = {
|
53
|
-
'amount': {'from': 0.001, 'to': 0.001},
|
54
|
-
'action': 'DEPOSIT',
|
55
|
-
'lending_apps': ['BASILISK_LANDING'],
|
56
|
-
'withdraw_sleep_interval': withdraw_interval
|
57
|
-
}
|
58
|
-
|
59
|
-
lending_withdraw_test_config = {
|
60
|
-
'amount': {'from': 0.001, 'to': 0.001},
|
61
|
-
'action': 'WITHDRAW_ALL',
|
62
|
-
'lending_apps': ['ERALEND'],
|
63
|
-
'withdraw_sleep_interval': withdraw_interval
|
64
|
-
}
|
65
|
-
|
66
|
-
lending = Lending(zksync_min_native_balance, AccountStorage(), 1)
|
67
|
-
|
68
|
-
lending.execute(*lending.parse_params(lending_deposit_test_config_basilisk), local_evm_test_account)
|
69
|
-
lending.execute(*lending.parse_params(lending_deposit_test_config_eralend), local_evm_test_account)
|
70
|
-
lending.execute(*lending.parse_params(lending_deposit_test_config_fusion), local_evm_test_account)
|
71
|
-
|
72
|
-
lending.execute(*lending.parse_params(lending_withdraw_test_config), local_evm_test_account)
|
73
|
-
|
74
|
-
def test_shouldFailToWithdraw0(self):
|
75
|
-
logger.info("Test module [LENDING]")
|
76
|
-
|
77
|
-
lending_withdraw_test_config = {
|
78
|
-
'amount': {'from': 0.001, 'to': 0.001},
|
79
|
-
'action': 'WITHDRAW',
|
80
|
-
'lending_apps': ['ERALEND'],
|
81
|
-
'withdraw_sleep_interval': withdraw_interval
|
82
|
-
}
|
83
|
-
|
84
|
-
lending = Lending(zksync_min_native_balance, AccountStorage(), 1)
|
85
|
-
|
86
|
-
with self.assertRaises(EmptyDepositException):
|
87
|
-
lending.execute(*lending.parse_params(lending_withdraw_test_config), local_evm_test_account)
|
88
|
-
|
89
|
-
def test_shouldDepositAndWithdrawAll_balance(self, apps=['ERALEND', 'REACTORFUSION_LANDING', 'BASILISK_LANDING']):
|
90
|
-
logger.info("Test module [LENDING]")
|
91
|
-
|
92
|
-
for app in apps:
|
93
|
-
lending_deposit_test_config = {
|
94
|
-
'amount': 'all_balance',
|
95
|
-
'action': 'DEPOSIT',
|
96
|
-
'lending_apps': [app],
|
97
|
-
'withdraw_sleep_interval': withdraw_interval
|
98
|
-
}
|
99
|
-
lending_withdraw_test_config = {
|
100
|
-
'amount': 'all_balance',
|
101
|
-
'action': 'WITHDRAW',
|
102
|
-
'lending_apps': [app],
|
103
|
-
'withdraw_sleep_interval': withdraw_interval
|
104
|
-
}
|
105
|
-
|
106
|
-
lending = Lending(zksync_min_native_balance, AccountStorage(), 1)
|
107
|
-
lending.execute(*lending.parse_params(lending_deposit_test_config), local_evm_test_account)
|
108
|
-
lending.execute(*lending.parse_params(lending_withdraw_test_config), local_evm_test_account)
|
109
|
-
|
110
|
-
def test_shouldDeposit_WithdrawAll_balance(self, apps=['ERALEND', 'REACTORFUSION_LANDING', 'BASILISK_LANDING']):
|
111
|
-
logger.info("Test module [LENDING]")
|
112
|
-
|
113
|
-
for app in apps:
|
114
|
-
lending_deposit_test_config = {
|
115
|
-
'amount': 'all_balance',
|
116
|
-
'action': 'DEPOSIT+WITHDRAW',
|
117
|
-
'lending_apps': [app],
|
118
|
-
'withdraw_sleep_interval': {'from': 0, 'to': 0}
|
119
|
-
}
|
120
|
-
|
121
|
-
lending = Lending(zksync_min_native_balance, AccountStorage(), 1)
|
122
|
-
lending.execute(*lending.parse_params(lending_deposit_test_config), local_evm_test_account)
|
tests/core/modules/test_nft.py
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
|
5
|
-
from web3_wizzard_lib.core.modules.nft.era_domain import EraDomain
|
6
|
-
from web3_wizzard_lib.core.modules.nft.zks_domain import ZksDomain
|
7
|
-
from tests.core.modules.__init__ import init_set_test_config, \
|
8
|
-
local_evm_test_account
|
9
|
-
|
10
|
-
|
11
|
-
class NftTest(unittest.TestCase):
|
12
|
-
init_set_test_config()
|
13
|
-
|
14
|
-
def test_shouldTestEraDomain(self):
|
15
|
-
logger.info("Test module [ERA_DOMAIN, 8]")
|
16
|
-
|
17
|
-
try:
|
18
|
-
era_domain = EraDomain()
|
19
|
-
|
20
|
-
era_domain.execute(local_evm_test_account)
|
21
|
-
except Exception as e:
|
22
|
-
self.fail(f"Some function raised an exception: {e}")
|
23
|
-
|
24
|
-
def test_shouldTestZKSDomain(self):
|
25
|
-
logger.info("Test module [ZKSDomain, 9]")
|
26
|
-
|
27
|
-
try:
|
28
|
-
zks_domain = ZksDomain()
|
29
|
-
|
30
|
-
zks_domain.execute(local_evm_test_account)
|
31
|
-
except Exception as e:
|
32
|
-
self.fail(f"Some function raised an exception: {e}")
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.config.app_config import set_network
|
5
|
-
from sybil_engine.domain.account_storage import AccountStorage
|
6
|
-
|
7
|
-
from web3_wizzard_lib.core.modules import NFTMinter
|
8
|
-
from tests.core.modules.__init__ import zksync_test_account, zksync_min_native_balance, init_set_test_config
|
9
|
-
|
10
|
-
nft_minter_test_config = {
|
11
|
-
'nft_amount_interval': {'from': 7, 'to': 7},
|
12
|
-
'nft_modules': ["TAVAERA", "ZKS_DOMAIN", "ERA_DOMAIN", "EMPTY_NFT", "OMNI_SEA", "MERKLY_MINTER", "KREATOR_LAND"],
|
13
|
-
'sleep_interval': {'from': 0, 'to': 0}
|
14
|
-
}
|
15
|
-
|
16
|
-
|
17
|
-
class TestRandomNFTModule(unittest.TestCase):
|
18
|
-
init_set_test_config()
|
19
|
-
|
20
|
-
def test_shouldMintRandomNFT(self):
|
21
|
-
logger.info("Test module [NFT_MINTER, 15]")
|
22
|
-
|
23
|
-
set_network('LOCAL')
|
24
|
-
|
25
|
-
try:
|
26
|
-
nft_minter = NFTMinter(zksync_min_native_balance, AccountStorage(), range(4))
|
27
|
-
|
28
|
-
nft_minter.execute(*nft_minter.parse_params(nft_minter_test_config), zksync_test_account)
|
29
|
-
except Exception as e:
|
30
|
-
self.fail(f"Some function raised an exception: {e}")
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
|
5
|
-
from web3_wizzard_lib.core.modules.orbiter import OrbiterModule
|
6
|
-
from tests.core.modules.__init__ import zksync_min_native_balance, init_set_test_config, \
|
7
|
-
local_evm_test_account
|
8
|
-
|
9
|
-
orbiter_params = {
|
10
|
-
'bridge_amount_interval': {'from': 0.1, 'to': 1},
|
11
|
-
'from_chain': 'ZKSYNC',
|
12
|
-
'to_chain': 'ARBITRUM',
|
13
|
-
}
|
14
|
-
|
15
|
-
|
16
|
-
class TestOrbiterModule(unittest.TestCase):
|
17
|
-
init_set_test_config()
|
18
|
-
|
19
|
-
def test_shouldBridge(self):
|
20
|
-
logger.info("Test module [ORBITER, 7]")
|
21
|
-
|
22
|
-
try:
|
23
|
-
orbiter = OrbiterModule(zksync_min_native_balance, local_evm_test_account)
|
24
|
-
|
25
|
-
orbiter.execute(*orbiter.parse_params(orbiter_params), local_evm_test_account)
|
26
|
-
except Exception as e:
|
27
|
-
self.fail(f"Some function raised an exception: {e}")
|
28
|
-
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
|
5
|
-
from web3_wizzard_lib.core.modules import SellAll
|
6
|
-
from tests.core.modules.__init__ import zksync_test_account, zksync_min_native_balance, init_set_test_config
|
7
|
-
|
8
|
-
|
9
|
-
class TestSetAllModule(unittest.TestCase):
|
10
|
-
|
11
|
-
def test_shouldSellAllzkSync(self, chain='ZKSYNC', account=zksync_test_account):
|
12
|
-
sell_all_test_config = {
|
13
|
-
'chain': chain,
|
14
|
-
'receive_token': 'ETH', # [USDC, ETH]
|
15
|
-
'sleep_interval': {'from': 0, 'to': 0} # Interval between selling different tokens of 1 account
|
16
|
-
}
|
17
|
-
|
18
|
-
logger.info("Test module [SELL_ALL, 2]")
|
19
|
-
|
20
|
-
init_set_test_config()
|
21
|
-
|
22
|
-
try:
|
23
|
-
sell_all = SellAll(zksync_min_native_balance, account)
|
24
|
-
|
25
|
-
sell_all.execute(*sell_all.parse_params(sell_all_test_config), account)
|
26
|
-
except Exception as e:
|
27
|
-
self.fail(f"Some function raised an exception: {e}")
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
|
5
|
-
from web3_wizzard_lib.core.modules import SendToCex
|
6
|
-
from tests.core.modules.__init__ import zksync_min_native_balance, init_set_test_config, \
|
7
|
-
local_evm_test_account
|
8
|
-
|
9
|
-
send_to_cex_test_config = {
|
10
|
-
'chain': 'ZKSYNC',
|
11
|
-
'amount': {'from': 1, 'to': 1},
|
12
|
-
'token': 'NATIVE'
|
13
|
-
}
|
14
|
-
|
15
|
-
|
16
|
-
class TestSendToCexModule(unittest.TestCase):
|
17
|
-
init_set_test_config()
|
18
|
-
|
19
|
-
def test_shouldSendToCex(self):
|
20
|
-
logger.info("Test module [SEND_TO_CEX, 6]")
|
21
|
-
|
22
|
-
try:
|
23
|
-
send_to_cex = SendToCex(zksync_min_native_balance, local_evm_test_account)
|
24
|
-
|
25
|
-
send_to_cex.execute(*send_to_cex.parse_params(send_to_cex_test_config), local_evm_test_account)
|
26
|
-
except Exception as e:
|
27
|
-
self.fail(f"Some function raised an exception: {e}")
|
@@ -1,32 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.domain.account_storage import AccountStorage
|
5
|
-
|
6
|
-
from web3_wizzard_lib.core.modules.stargate.auto_bridge import StargateAutoBridge
|
7
|
-
from tests.core.modules.__init__ import init_set_test_config, \
|
8
|
-
test_account, test_min_native_balance
|
9
|
-
|
10
|
-
stargate_auto_bridge_test_config = {
|
11
|
-
'bridge_amount_interval': {'from': 1, 'to': 1},
|
12
|
-
'bridge_token': 'ETH',
|
13
|
-
'end_network': '', # name of network where all tokens will be collected
|
14
|
-
'retry_interval': {'from': 0, 'to': 0},
|
15
|
-
'sleep_interval': {'from': 0, 'to': 0},
|
16
|
-
'only_end_network_bridge': False, # if True, then only bridge will be to END NETWORK
|
17
|
-
'original_chain_sequence': ['ARBITRUM', 'LINEA', 'BASE']
|
18
|
-
}
|
19
|
-
|
20
|
-
|
21
|
-
class TestStargateAutoBridge(unittest.TestCase):
|
22
|
-
init_set_test_config()
|
23
|
-
|
24
|
-
def test_shouldMakeAutoBridge(self, account=test_account):
|
25
|
-
logger.info("Test module [STARGATE_AUTO_BRIDGE, 13]")
|
26
|
-
|
27
|
-
try:
|
28
|
-
stargate_auto_bridge = StargateAutoBridge(test_min_native_balance, AccountStorage())
|
29
|
-
|
30
|
-
stargate_auto_bridge.execute(*stargate_auto_bridge.parse_params(stargate_auto_bridge_test_config), account)
|
31
|
-
except Exception as e:
|
32
|
-
self.fail(f"Some function raised an exception: {e}")
|
@@ -1,25 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
|
5
|
-
from web3_wizzard_lib.core.modules.stargate.classic_bridge import StargateBridgeModule
|
6
|
-
from tests.core.modules.__init__ import init_set_test_config, test_min_native_balance, \
|
7
|
-
local_evm_test_account
|
8
|
-
|
9
|
-
stargate_classic_test_config = {
|
10
|
-
'from_chain': 'LINEA',
|
11
|
-
'to_chain': 'BASE',
|
12
|
-
'bridge_amount_interval': {'from': 1, 'to': 1},
|
13
|
-
'bridge_token': 'ETH',
|
14
|
-
'retry_interval': {'from': 60 * 25, 'to': 60 * 40}
|
15
|
-
}
|
16
|
-
|
17
|
-
|
18
|
-
class TestStargateBridgeModule(unittest.TestCase):
|
19
|
-
def test_bridgeStargate(self, account=local_evm_test_account):
|
20
|
-
logger.info("Test module [STARGATE_BRIDGE, 12]")
|
21
|
-
|
22
|
-
init_set_test_config()
|
23
|
-
|
24
|
-
stargate_bridge = StargateBridgeModule(test_min_native_balance, account)
|
25
|
-
stargate_bridge.execute(*stargate_bridge.parse_params(stargate_classic_test_config), account)
|
@@ -1,108 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.config.app_config import set_network
|
5
|
-
|
6
|
-
from web3_wizzard_lib.core.modules.stargate.farming import StargateFarmingModule
|
7
|
-
from web3_wizzard_lib.core.modules.stargate.pool import get_pool_balance_for_chain
|
8
|
-
from tests.core.modules.__init__ import test_account, init_set_test_config, test_min_native_balance
|
9
|
-
|
10
|
-
# Module [STARGATE_FARMING, 14] Stargate farming
|
11
|
-
test_stargate_farming_config = {
|
12
|
-
'chain': 'BASE',
|
13
|
-
'bridge_amount_interval': {'from': 1, 'to': 1},
|
14
|
-
'all_balance_mode': 0,
|
15
|
-
# 0 - all balance ignores CHAIN stakes blockchain with maximum balance
|
16
|
-
# 1 - all balance stakes all balance from CHAIN
|
17
|
-
'operation': {'ADD_TO_POOL', 'DEPOSIT', 'WITHDRAW', 'REDEEM_FROM_POOL'},
|
18
|
-
# 'operation': {'REDEEM_FROM_POOL'},
|
19
|
-
'token': 'ETH', # ['ETH', 'USDC']
|
20
|
-
# 'operation': {'WITHDRAW', 'REDEEM_FROM_POOL'}
|
21
|
-
'operation_sleep_interval': {'from': 0, 'to': 0}
|
22
|
-
}
|
23
|
-
|
24
|
-
|
25
|
-
class TestStargateFarming(unittest.TestCase):
|
26
|
-
init_set_test_config()
|
27
|
-
|
28
|
-
def test_shouldStargateFarming(self):
|
29
|
-
logger.info("Test module [STARGATE_FARMING, 14]")
|
30
|
-
|
31
|
-
test_stargate_farming_config['bridge_amount_interval'] = {'from': 1, 'to': 1}
|
32
|
-
stargate_farming = StargateFarmingModule(test_min_native_balance, test_account)
|
33
|
-
|
34
|
-
try:
|
35
|
-
stargate_farming.execute(*stargate_farming.parse_params(test_stargate_farming_config), test_account)
|
36
|
-
except Exception as e:
|
37
|
-
self.fail(f"Some function raised an exception: {e}")
|
38
|
-
|
39
|
-
def test_shouldStargateFarmingWithAllBalance(self):
|
40
|
-
logger.info("Test module [STARGATE_FARMING, 14]")
|
41
|
-
|
42
|
-
test_stargate_farming_config['bridge_amount_interval'] = 'all_balance'
|
43
|
-
stargate_farming = StargateFarmingModule(test_min_native_balance, test_account)
|
44
|
-
|
45
|
-
try:
|
46
|
-
stargate_farming.execute(*stargate_farming.parse_params(test_stargate_farming_config), test_account)
|
47
|
-
except Exception as e:
|
48
|
-
self.fail(f"Some function raised an exception: {e}")
|
49
|
-
|
50
|
-
def test_shouldStargateFarmingWithAllBalanceMode1(self):
|
51
|
-
logger.info("Test module [STARGATE_FARMING, 14]")
|
52
|
-
|
53
|
-
test_stargate_farming_config['bridge_amount_interval'] = 'all_balance'
|
54
|
-
test_stargate_farming_config['all_balance_mode'] = 1
|
55
|
-
|
56
|
-
stargate_farming = StargateFarmingModule(test_min_native_balance, test_account)
|
57
|
-
|
58
|
-
try:
|
59
|
-
stargate_farming.execute(*stargate_farming.parse_params(test_stargate_farming_config), test_account)
|
60
|
-
except Exception as e:
|
61
|
-
self.fail(f"Some function raised an exception: {e}")
|
62
|
-
|
63
|
-
def test_shouldStargateFarmingStepByStep(self):
|
64
|
-
set_network('LOCAL')
|
65
|
-
|
66
|
-
logger.info("Test module [STARGATE_FARMING, 14]")
|
67
|
-
|
68
|
-
test_stargate_farming_config['bridge_amount_interval'] = {'from': 10, 'to': 10}
|
69
|
-
test_stargate_farming_config['all_balance_mode'] = 1
|
70
|
-
|
71
|
-
stargate_farming = StargateFarmingModule(test_min_native_balance, test_account)
|
72
|
-
|
73
|
-
try:
|
74
|
-
#PREPARE
|
75
|
-
test_stargate_farming_config['operation'] = {'REDEEM_FROM_POOL'}
|
76
|
-
stargate_farming.execute(*stargate_farming.parse_params(test_stargate_farming_config), test_account)
|
77
|
-
|
78
|
-
chain, pool_balance_1, web3 = get_pool_balance_for_chain('BASE', 'ETH', test_account)
|
79
|
-
|
80
|
-
test_stargate_farming_config['operation'] = {'ADD_TO_POOL'}
|
81
|
-
stargate_farming.execute(*stargate_farming.parse_params(test_stargate_farming_config), test_account)
|
82
|
-
|
83
|
-
chain, pool_balance_2, web3 = get_pool_balance_for_chain('BASE', 'ETH', test_account)
|
84
|
-
|
85
|
-
self.assertAlmostEqual(
|
86
|
-
float(pool_balance_2.minus(pool_balance_1).readable()),
|
87
|
-
10.0,
|
88
|
-
delta=0.02
|
89
|
-
)
|
90
|
-
|
91
|
-
test_stargate_farming_config['operation'] = {'DEPOSIT'}
|
92
|
-
stargate_farming.execute(*stargate_farming.parse_params(test_stargate_farming_config), test_account)
|
93
|
-
|
94
|
-
test_stargate_farming_config['operation'] = {'WITHDRAW'}
|
95
|
-
stargate_farming.execute(*stargate_farming.parse_params(test_stargate_farming_config), test_account)
|
96
|
-
|
97
|
-
test_stargate_farming_config['operation'] = {'REDEEM_FROM_POOL'}
|
98
|
-
stargate_farming.execute(*stargate_farming.parse_params(test_stargate_farming_config), test_account)
|
99
|
-
|
100
|
-
chain, pool_balance_result, web3 = get_pool_balance_for_chain('BASE', 'ETH', test_account)
|
101
|
-
|
102
|
-
self.assertAlmostEqual(
|
103
|
-
first=pool_balance_result.readable(),
|
104
|
-
second=pool_balance_1.readable(),
|
105
|
-
delta=0.01
|
106
|
-
)
|
107
|
-
except Exception as e:
|
108
|
-
self.fail(f"Some function raised an exception: {e}")
|
@@ -1,78 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.domain.account_storage import AccountStorage
|
5
|
-
from sybil_engine.utils.utils import ConfigurationException
|
6
|
-
|
7
|
-
from web3_wizzard_lib.core.modules import WarmUp
|
8
|
-
from tests.core.modules.__init__ import zksync_min_native_balance, init_set_test_config, \
|
9
|
-
test_min_native_balance, local_evm_test_account
|
10
|
-
from tests.core.test_config import warmup_allowed_dex
|
11
|
-
|
12
|
-
warmup_test_config = {
|
13
|
-
'auto_withdrawal': True,
|
14
|
-
'chain': 'LINEA',
|
15
|
-
'swap_amount_interval': {'from': 1, 'to': 1},
|
16
|
-
'token': 'ETH',
|
17
|
-
'amount_of_warmups': {'from': 3, 'to': 6},
|
18
|
-
'allowed_dex': ['syncswap', 'velocore', 'lineaswap', 'horizondex', 'pancake'],
|
19
|
-
# 'allowed_dex': warmup_allowed_dex,
|
20
|
-
'warmup_pairs': [], # specify for warming up by concrete pair
|
21
|
-
'sell_tokens': True,
|
22
|
-
'pair_sleep_interval': {'from': 0, 'to': 0} # Interval between different tokens warm up of 1 account
|
23
|
-
}
|
24
|
-
|
25
|
-
|
26
|
-
class TestWarmUp(unittest.TestCase):
|
27
|
-
def test_shouldWarmUp(self):
|
28
|
-
init_set_test_config()
|
29
|
-
|
30
|
-
logger.info("Test module [WARMUP, 1]")
|
31
|
-
|
32
|
-
warmup = WarmUp(test_min_native_balance, AccountStorage(), 3)
|
33
|
-
warmup_test_config['warmup_pairs'] = []
|
34
|
-
|
35
|
-
try:
|
36
|
-
warmup.execute(*warmup.parse_params(warmup_test_config), local_evm_test_account)
|
37
|
-
except Exception as e:
|
38
|
-
self.fail(f"Some function raised an exception: {e}")
|
39
|
-
|
40
|
-
def test_shouldWarmUpPair(self):
|
41
|
-
init_set_test_config()
|
42
|
-
|
43
|
-
logger.info("Test module [WARMUP, 1]")
|
44
|
-
|
45
|
-
warmup = WarmUp(zksync_min_native_balance, AccountStorage(), 3)
|
46
|
-
warmup_test_config['warmup_pairs'] = ['ETH>USDC']
|
47
|
-
|
48
|
-
try:
|
49
|
-
warmup.execute(*warmup.parse_params(warmup_test_config), local_evm_test_account)
|
50
|
-
except Exception as e:
|
51
|
-
self.fail(f"Some function raised an exception: {e}")
|
52
|
-
|
53
|
-
def test_shouldWarmUp2Pairs(self):
|
54
|
-
logger.info("Test module [WARMUP, 1]")
|
55
|
-
|
56
|
-
warmup_test_config['pair_sleep_interval'] = {'from': 0, 'to': 0}
|
57
|
-
warmup_test_config['allowed_dex'] = warmup_allowed_dex
|
58
|
-
warmup_test_config['warmup_pairs'] = ['ETH>USDC', 'ETH>USDT']
|
59
|
-
|
60
|
-
warmup = WarmUp(zksync_min_native_balance, AccountStorage(), 2)
|
61
|
-
|
62
|
-
try:
|
63
|
-
warmup.execute(*warmup.parse_params(warmup_test_config), local_evm_test_account)
|
64
|
-
except Exception as e:
|
65
|
-
self.fail(f"Some function raised an exception: {e}")
|
66
|
-
|
67
|
-
def test_shouldSkipNonExistingPair(self):
|
68
|
-
init_set_test_config()
|
69
|
-
|
70
|
-
logger.info("Test module [WARMUP, 1]")
|
71
|
-
|
72
|
-
warmup = WarmUp(zksync_min_native_balance, AccountStorage(), 3)
|
73
|
-
warmup_test_config['warmup_pairs'] = ['nonExisting']
|
74
|
-
|
75
|
-
with self.assertRaises(ConfigurationException):
|
76
|
-
warmup.execute(*warmup.parse_params(warmup_test_config), local_evm_test_account)
|
77
|
-
|
78
|
-
|