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,68 +0,0 @@
|
|
1
|
-
import decimal
|
2
|
-
import unittest
|
3
|
-
|
4
|
-
from loguru import logger
|
5
|
-
from sybil_engine.data.networks import get_chain_instance_for_network
|
6
|
-
from sybil_engine.domain.balance.tokens import WETHToken
|
7
|
-
from sybil_engine.utils.web3_utils import init_web3
|
8
|
-
|
9
|
-
from web3_wizzard_lib.core.modules import Wrapping
|
10
|
-
from tests.core.modules.__init__ import zksync_min_native_balance, init_set_test_config, \
|
11
|
-
local_evm_test_account
|
12
|
-
|
13
|
-
|
14
|
-
class TestWrappingModule(unittest.TestCase):
|
15
|
-
init_set_test_config()
|
16
|
-
|
17
|
-
web3 = init_web3(get_chain_instance_for_network('SCROLL', 'LOCAL'), None)
|
18
|
-
|
19
|
-
def test_shouldWrapWETH(self, chain='SCROLL', account=local_evm_test_account):
|
20
|
-
logger.info("Test module [WRAPPING, 4] WRAP 1 ETH")
|
21
|
-
|
22
|
-
wrap_test_config = {
|
23
|
-
'chain': chain,
|
24
|
-
'action': 'UNWRAP', # [WRAP, UNWRAP]
|
25
|
-
'amount_interval': {'from': 0, 'to': 0}
|
26
|
-
}
|
27
|
-
|
28
|
-
begin_balance = WETHToken(chain, self.web3).balance(account)
|
29
|
-
|
30
|
-
wrapping = Wrapping(zksync_min_native_balance, account)
|
31
|
-
wrap_test_config['action'] = 'WRAP'
|
32
|
-
wrap_test_config['amount_interval'] = {'from': 1, 'to': 1}
|
33
|
-
|
34
|
-
try:
|
35
|
-
wrapping.execute(*wrapping.parse_params(wrap_test_config), account)
|
36
|
-
except Exception as e:
|
37
|
-
self.fail(f"Some function raised an exception: {e}")
|
38
|
-
|
39
|
-
end_balance = WETHToken(chain, self.web3).balance(account)
|
40
|
-
|
41
|
-
self.assertEqual(end_balance.readable() - begin_balance.readable(), decimal.Decimal(1))
|
42
|
-
|
43
|
-
def test_shouldUnwrapWETH(self, chain='SCROLL', account=local_evm_test_account):
|
44
|
-
init_set_test_config()
|
45
|
-
|
46
|
-
logger.info("Test module [WRAPPING, 4] UNWRAP ALL ETH")
|
47
|
-
|
48
|
-
wrap_test_config = {
|
49
|
-
'chain': chain,
|
50
|
-
'action': 'UNWRAP', # [WRAP, UNWRAP]
|
51
|
-
'amount_interval': {'from': 0, 'to': 0}
|
52
|
-
}
|
53
|
-
|
54
|
-
wrapping = Wrapping(zksync_min_native_balance, account)
|
55
|
-
|
56
|
-
wrap_test_config['action'] = 'UNWRAP'
|
57
|
-
wrap_test_config['amount_interval'] = 'all_balance'
|
58
|
-
|
59
|
-
try:
|
60
|
-
wrapping.execute(*wrapping.parse_params(wrap_test_config), account)
|
61
|
-
except Exception as e:
|
62
|
-
self.fail(f"Some function raised an exception: {e}")
|
63
|
-
end_balance = WETHToken(chain, self.web3).balance(account)
|
64
|
-
|
65
|
-
self.assertEqual(
|
66
|
-
end_balance.readable(),
|
67
|
-
decimal.Decimal(0)
|
68
|
-
)
|
tests/core/scenario/__init__.py
DELETED
File without changes
|
@@ -1,91 +0,0 @@
|
|
1
|
-
from tests.core.test_config import warmup_allowed_dex
|
2
|
-
|
3
|
-
TEST_module_0_config = {
|
4
|
-
'scenario_name': 'TEST_module_0_config',
|
5
|
-
'scenario': [
|
6
|
-
{
|
7
|
-
'module': 'WARMUP',
|
8
|
-
'params': {
|
9
|
-
'chain': 'ZKSYNC',
|
10
|
-
'swap_amount_interval': {'from': 1, 'to': 1},
|
11
|
-
'token': 'ETH',
|
12
|
-
'amount_of_warmups': {'from': 5, 'to': 6},
|
13
|
-
'allowed_dex': warmup_allowed_dex,
|
14
|
-
'warmup_pairs': [],
|
15
|
-
'sell_tokens': True,
|
16
|
-
'pair_sleep_interval': {'from': 0, 'to': 0}
|
17
|
-
}
|
18
|
-
},
|
19
|
-
{
|
20
|
-
'module': 'NFT_MINTER',
|
21
|
-
'params': {
|
22
|
-
'nft_amount_interval': {'from': 2, 'to': 5},
|
23
|
-
'nft_modules': ["ZKS_DOMAIN", "ERA_DOMAIN", "OMNI_SEA", "MERKLY_MINTER", "L2_TELEGRAPH_MINTER"],
|
24
|
-
'sleep_interval': {'from': 0, 'to': 0}
|
25
|
-
}
|
26
|
-
},
|
27
|
-
{
|
28
|
-
'module': 'LENDING',
|
29
|
-
'params': {
|
30
|
-
'amount': {'from': 0.001, 'to': 0.001},
|
31
|
-
# 'amount': 'all_balance',
|
32
|
-
'action': 'DEPOSIT+WITHDRAW', # ['DEPOSIT', WITHDRAW', DEPOSIT+WITHDRAW, WITHDRAW_ALL]
|
33
|
-
'lending_apps': ['ERALEND', 'REACTOR_FUSION', 'BASILISK'], # ['ERALEND', 'REACTOR_FUSION', 'BASILISK'],
|
34
|
-
'withdraw_sleep_interval': {'from': 0, 'to': 0},
|
35
|
-
'repeats': {'from': 4, 'to': 4} # Количество повторов
|
36
|
-
# Интервал между депозитом и выводом, используется только при 'action' DEPOSIT+WITHDRAW
|
37
|
-
}
|
38
|
-
},
|
39
|
-
{
|
40
|
-
'module': 'DMAIL',
|
41
|
-
'params': {
|
42
|
-
'chain': 'ZKSYNC',
|
43
|
-
'email_amount': {'from': 3, 'to': 6}
|
44
|
-
}
|
45
|
-
},
|
46
|
-
{
|
47
|
-
'module': 'SELL_ALL',
|
48
|
-
'params': {
|
49
|
-
'chain': 'ZKSYNC',
|
50
|
-
'receive_token': 'ETH', # [USDC, ETH]
|
51
|
-
'sleep_interval': {'from': 0, 'to': 0} # Interval between selling different tokens of 1 account
|
52
|
-
}
|
53
|
-
},
|
54
|
-
{
|
55
|
-
'module': 'WRAPPING',
|
56
|
-
'params': {
|
57
|
-
'chain': 'ZKSYNC',
|
58
|
-
'amount_interval': 'all_balance',
|
59
|
-
'action': 'UNWRAP' # [WRAP, UNWRAP]
|
60
|
-
}
|
61
|
-
},
|
62
|
-
{
|
63
|
-
'module': 'SEND_TO_CEX',
|
64
|
-
'params': {
|
65
|
-
'chain': 'ZKSYNC',
|
66
|
-
'amount': {'from': 1, 'to': 1}
|
67
|
-
}
|
68
|
-
},
|
69
|
-
{
|
70
|
-
'module': 'WARMUP',
|
71
|
-
'params': {
|
72
|
-
'chain': 'ZKSYNC',
|
73
|
-
'swap_amount_interval': {'from': 1, 'to': 1},
|
74
|
-
'token': 'ETH',
|
75
|
-
'amount_of_warmups': {'from': 5, 'to': 6},
|
76
|
-
'allowed_dex': warmup_allowed_dex,
|
77
|
-
'warmup_pairs': [],
|
78
|
-
'sell_tokens': True,
|
79
|
-
'pair_sleep_interval': {'from': 0, 'to': 0}
|
80
|
-
}
|
81
|
-
},
|
82
|
-
{
|
83
|
-
'module': 'NFT_MINTER',
|
84
|
-
'params': {
|
85
|
-
'nft_amount_interval': {'from': 2, 'to': 5},
|
86
|
-
'nft_modules': ["ZKS_DOMAIN", "ERA_DOMAIN", "OMNI_SEA", "MERKLY_MINTER", "L2_TELEGRAPH_MINTER"],
|
87
|
-
'sleep_interval': {'from': 0, 'to': 0}
|
88
|
-
}
|
89
|
-
}
|
90
|
-
]
|
91
|
-
}
|
tests/core/test_app.py
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.app import launch_app
|
5
|
-
|
6
|
-
from tests.core.scenario.module_0_test_config import TEST_module_0_config
|
7
|
-
from tests.core.test_config import create_config, args
|
8
|
-
|
9
|
-
|
10
|
-
class TestApp(unittest.TestCase):
|
11
|
-
|
12
|
-
def test_moduleScenario(self):
|
13
|
-
logger.info("Test module [SCENARIO, 0]")
|
14
|
-
config = create_config()
|
15
|
-
|
16
|
-
try:
|
17
|
-
launch_app(args, TEST_module_0_config, config)
|
18
|
-
except Exception as e:
|
19
|
-
self.fail(f"Some function raised an exception: {e}")
|
tests/core/test_config.py
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
import argparse
|
2
|
-
import os
|
3
|
-
|
4
|
-
from data.config_default import cex_data, auto_withdrawal, withdraw_interval, proxy_mode, gas_prices
|
5
|
-
from data.module_config_default import min_native_interval
|
6
|
-
|
7
|
-
cdir = os.getcwd()
|
8
|
-
proxy_file = f'{cdir}/tests/proxy.txt'
|
9
|
-
args = argparse.Namespace(password='test', private_keys=f'{cdir}/tests/private_keys.txt',
|
10
|
-
cex_addresses=f'{cdir}/tests/cex_addresses.txt',
|
11
|
-
starknet_addresses=f'{cdir}/tests/starknet_addresses.txt',
|
12
|
-
proxy_file=f'{cdir}/tests/proxy.txt',
|
13
|
-
network='LOCAL')
|
14
|
-
|
15
|
-
|
16
|
-
sleep_interval = {'from': 0, 'to': 0}
|
17
|
-
swap_retry_sleep_interval = {'from': 0, 'to': 0}
|
18
|
-
encryption = False
|
19
|
-
warmup_allowed_dex = ['syncswap', 'mute', 'velocore']
|
20
|
-
|
21
|
-
|
22
|
-
def scenario_from_module(module_config, scenario_name):
|
23
|
-
return {
|
24
|
-
'scenario_name': scenario_name,
|
25
|
-
'scenario': [
|
26
|
-
module_config
|
27
|
-
]
|
28
|
-
}
|
29
|
-
|
30
|
-
|
31
|
-
def create_config():
|
32
|
-
cex_config = (cex_data, auto_withdrawal, withdraw_interval)
|
33
|
-
|
34
|
-
return None, encryption, min_native_interval, proxy_mode, cex_config, sleep_interval, swap_retry_sleep_interval, gas_prices
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import importlib
|
2
|
-
import pkgutil
|
3
|
-
|
4
|
-
from loguru import logger
|
5
|
-
from sybil_engine.app import launch_with_data
|
6
|
-
from sybil_engine.utils.configuration_loader import load_module_vars
|
7
|
-
|
8
|
-
import web3_wizzard_lib.core.modules
|
9
|
-
from web3_wizzard_lib.core.modules.swap.swap_list import swap_facade
|
10
|
-
|
11
|
-
|
12
|
-
def launch():
|
13
|
-
modules_package = "web3_wizzard_lib.core.modules"
|
14
|
-
|
15
|
-
# package = importlib.import_module(modules_package)
|
16
|
-
# for loader, module_name, is_pkg in pkgutil.walk_packages(path=package.__path__):
|
17
|
-
# if not is_pkg:
|
18
|
-
# try:
|
19
|
-
# importlib.import_module('.' + module_name, package=modules_package)
|
20
|
-
# except Exception as e:
|
21
|
-
# logger.error('Failed to import module "{}" from package "{}"'.format(module_name, modules_package))
|
22
|
-
|
23
|
-
#modules_data = load_module_vars(modules_package)['modules_data']
|
24
|
-
|
25
|
-
from sybil_engine.module.modules import Modules
|
26
|
-
modules_data = Modules(None, swap_facade)
|
27
|
-
launch_with_data(modules_data)
|
@@ -1,10 +0,0 @@
|
|
1
|
-
from sybil_engine.domain.dex import Dex
|
2
|
-
from sybil_engine.domain.swap_facade import SwapFacade
|
3
|
-
from sybil_engine.utils.package_import_utils import get_all_subclasses, import_all_modules_in_directory
|
4
|
-
|
5
|
-
|
6
|
-
def get_swap_classes():
|
7
|
-
import_all_modules_in_directory("web3_wizzard_lib.core.modules.swap")
|
8
|
-
return get_all_subclasses(Dex)
|
9
|
-
|
10
|
-
swap_facade = SwapFacade(get_swap_classes())
|
@@ -1 +0,0 @@
|
|
1
|
-
sybil-engine==9.9.0
|
File without changes
|