web3-wizzard-lib 0.0.2__py3-none-any.whl → 0.0.3__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 +12 -45
- web3_wizzard_lib/core/modules/stargate/farming.py +1 -1
- web3_wizzard_lib/core/utils/ai_utils.py +27 -0
- {web3_wizzard_lib-0.0.2.dist-info → web3_wizzard_lib-0.0.3.dist-info}/METADATA +8 -3
- {web3_wizzard_lib-0.0.2.dist-info → web3_wizzard_lib-0.0.3.dist-info}/RECORD +8 -294
- {web3_wizzard_lib-0.0.2.dist-info → web3_wizzard_lib-0.0.3.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 → web3_wizzard_lib-0.0.3.data}/data/requirements.txt +0 -0
- {web3_wizzard_lib-0.0.2.dist-info → web3_wizzard_lib-0.0.3.dist-info}/top_level.txt +0 -0
@@ -1,37 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from sybil_engine.config.app_config import set_network
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.data.tokens import get_tokens_for_chain
|
6
|
-
from sybil_engine.utils.web3_utils import init_web3
|
7
|
-
|
8
|
-
from web3_wizzard_lib.core.contract.horizondex_quoter import HorizonDexQuoter
|
9
|
-
from tests.core.modules import init_set_test_config
|
10
|
-
|
11
|
-
|
12
|
-
class TestHorizonDexQuoter(unittest.TestCase):
|
13
|
-
|
14
|
-
def test_horizondex_quoter(self):
|
15
|
-
# "ETH": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
16
|
-
# "WETH": "0x4200000000000000000000000000000000000006",
|
17
|
-
# return self.contract.functions.quoteExactInputSingle(
|
18
|
-
# (
|
19
|
-
# from_token, to_token, amount, 3000, 0)
|
20
|
-
# ).call()[0]
|
21
|
-
init_set_test_config()
|
22
|
-
set_network('MAIN')
|
23
|
-
chain = 'LINEA'
|
24
|
-
chain_instance = get_chain_instance(chain)
|
25
|
-
web3 = init_web3(chain_instance, None)
|
26
|
-
|
27
|
-
quoter_contract_address = '0x07AceD5690e09935b1c0e6E88B772d9440F64718'
|
28
|
-
|
29
|
-
horizondex = HorizonDexQuoter(quoter_contract_address, web3)
|
30
|
-
|
31
|
-
#from_token_address = get_tokens_for_chain(chain)['WETH']
|
32
|
-
from_token_address = get_tokens_for_chain(chain)['WETH']
|
33
|
-
to_token_address = get_tokens_for_chain(chain)['USDC']
|
34
|
-
|
35
|
-
price = horizondex.quote_exact_input_single( 1000000000, from_token_address, to_token_address)
|
36
|
-
|
37
|
-
print(price)
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from sybil_engine.config.app_config import set_network
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.data.tokens import get_tokens_for_chain
|
6
|
-
from sybil_engine.utils.file_loader import load_abi
|
7
|
-
from sybil_engine.utils.web3_utils import init_web3
|
8
|
-
from web3 import Web3
|
9
|
-
|
10
|
-
from tests.core.modules import init_set_test_config
|
11
|
-
|
12
|
-
abi = load_abi('resources/abi/uniswap_abi.json')
|
13
|
-
|
14
|
-
|
15
|
-
class TestUniswapQuoter(unittest.TestCase):
|
16
|
-
|
17
|
-
def test_uniswap_quoter(self):
|
18
|
-
init_set_test_config()
|
19
|
-
set_network('MAIN')
|
20
|
-
chain = 'ARBITRUM'
|
21
|
-
chain_instance = get_chain_instance(chain)
|
22
|
-
web3 = init_web3(chain_instance, None)
|
23
|
-
|
24
|
-
quoter_contract_address = '0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6'
|
25
|
-
|
26
|
-
from_token_address = get_tokens_for_chain(chain)['WETH']
|
27
|
-
to_token_address = get_tokens_for_chain(chain)['USDC']
|
28
|
-
|
29
|
-
web3.eth.contract(quoter_contract_address, abi=abi).functions.quoteExactInputSingle(
|
30
|
-
from_token_address,
|
31
|
-
to_token_address,
|
32
|
-
500,
|
33
|
-
Web3.to_wei(1, 'ether'),
|
34
|
-
0
|
35
|
-
).call()
|
@@ -1,67 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from sybil_engine.config.app_config import set_network
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.utils.web3_utils import init_web3
|
6
|
-
|
7
|
-
from web3_wizzard_lib.core.contract.velocore_lens import VelocoreLensContract
|
8
|
-
from tests.core.modules import init_set_test_config
|
9
|
-
|
10
|
-
|
11
|
-
class TestVelocoreLens(unittest.TestCase):
|
12
|
-
|
13
|
-
def test_velocore_pool_get_pool_balance(self):
|
14
|
-
# "ETH": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
15
|
-
# "WETH": "0x4200000000000000000000000000000000000006",
|
16
|
-
# return self.contract.functions.quoteExactInputSingle(
|
17
|
-
# (
|
18
|
-
# from_token, to_token, amount, 3000, 0)
|
19
|
-
# ).call()[0]
|
20
|
-
init_set_test_config()
|
21
|
-
set_network('MAIN')
|
22
|
-
chain = 'LINEA'
|
23
|
-
chain_instance = get_chain_instance(chain)
|
24
|
-
web3 = init_web3(chain_instance, None)
|
25
|
-
|
26
|
-
velocore_lens_contract_address = '0xaA18cDb16a4DD88a59f4c2f45b5c91d009549e06'
|
27
|
-
|
28
|
-
velocore = VelocoreLensContract(velocore_lens_contract_address, web3)
|
29
|
-
|
30
|
-
pool_balance = velocore.getPoolBalance()
|
31
|
-
|
32
|
-
print(pool_balance)
|
33
|
-
|
34
|
-
def test_velocore_pool_user_balances(self):
|
35
|
-
# "ETH": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
|
36
|
-
# "WETH": "0x4200000000000000000000000000000000000006",
|
37
|
-
# return self.contract.functions.quoteExactInputSingle(
|
38
|
-
# (
|
39
|
-
# from_token, to_token, amount, 3000, 0)
|
40
|
-
# ).call()[0]
|
41
|
-
init_set_test_config()
|
42
|
-
set_network('MAIN')
|
43
|
-
chain = 'LINEA'
|
44
|
-
chain_instance = get_chain_instance(chain)
|
45
|
-
web3 = init_web3(chain_instance, None)
|
46
|
-
|
47
|
-
velocore_lens_contract_address = '0xaA18cDb16a4DD88a59f4c2f45b5c91d009549e06'
|
48
|
-
|
49
|
-
velocore = VelocoreLensContract(velocore_lens_contract_address, web3)
|
50
|
-
|
51
|
-
pool_balance = velocore.userBalances()
|
52
|
-
|
53
|
-
print(pool_balance)
|
54
|
-
|
55
|
-
def test_query(self):
|
56
|
-
init_set_test_config()
|
57
|
-
set_network('MAIN')
|
58
|
-
chain = 'LINEA'
|
59
|
-
chain_instance = get_chain_instance(chain)
|
60
|
-
web3 = init_web3(chain_instance, None)
|
61
|
-
|
62
|
-
velocore_lens_contract_address = '0xaA18cDb16a4DD88a59f4c2f45b5c91d009549e06'
|
63
|
-
|
64
|
-
velocore = VelocoreLensContract(velocore_lens_contract_address, web3)
|
65
|
-
|
66
|
-
gauge_gauge = velocore.query_gauge()
|
67
|
-
print(gauge_gauge)
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from sybil_engine.config.app_config import set_network
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.utils.web3_utils import init_web3
|
6
|
-
|
7
|
-
from web3_wizzard_lib.core.contract.velocore_lens import VelocoreLensContract
|
8
|
-
from web3_wizzard_lib.core.contract.velocore_pool import VelocorePoolContract
|
9
|
-
from tests.core.modules import init_set_test_config
|
10
|
-
|
11
|
-
|
12
|
-
class TestVelocoreVault(unittest.TestCase):
|
13
|
-
|
14
|
-
def test_velocore_vault_all_pairs(self):
|
15
|
-
init_set_test_config()
|
16
|
-
set_network('MAIN')
|
17
|
-
chain = 'LINEA'
|
18
|
-
chain_instance = get_chain_instance(chain)
|
19
|
-
web3 = init_web3(chain_instance, None)
|
20
|
-
|
21
|
-
velocore_lens_contract_address = '0x1d0188c4B276A09366D05d6Be06aF61a73bC7535'
|
22
|
-
|
23
|
-
velocore = VelocorePoolContract(velocore_lens_contract_address, web3)
|
24
|
-
|
25
|
-
pool_balance = velocore.allPairs()
|
26
|
-
|
27
|
-
print(pool_balance)
|
28
|
-
|
29
|
-
def test_velocore_vault_facets(self):
|
30
|
-
init_set_test_config()
|
31
|
-
set_network('MAIN')
|
32
|
-
chain = 'LINEA'
|
33
|
-
chain_instance = get_chain_instance(chain)
|
34
|
-
web3 = init_web3(chain_instance, None)
|
35
|
-
|
36
|
-
velocore_lens_contract_address = '0x1d0188c4B276A09366D05d6Be06aF61a73bC7535'
|
37
|
-
|
38
|
-
velocore = VelocorePoolContract(velocore_lens_contract_address, web3)
|
39
|
-
|
40
|
-
facets = velocore.facets()
|
41
|
-
|
42
|
-
for facet in facets:
|
43
|
-
print(facet)
|
44
|
-
|
45
|
-
def test_query(self):
|
46
|
-
init_set_test_config()
|
47
|
-
set_network('MAIN')
|
48
|
-
chain = 'LINEA'
|
49
|
-
chain_instance = get_chain_instance(chain)
|
50
|
-
web3 = init_web3(chain_instance, None)
|
51
|
-
|
52
|
-
velocore_lens_contract_address = '0x1d0188c4B276A09366D05d6Be06aF61a73bC7535'
|
53
|
-
|
54
|
-
velocore = VelocoreLensContract(velocore_lens_contract_address, web3)
|
55
|
-
|
56
|
-
gauge_gauge = velocore.query_gauge()
|
57
|
-
print(gauge_gauge)
|
tests/core/modules/__init__.py
DELETED
@@ -1,67 +0,0 @@
|
|
1
|
-
import importlib
|
2
|
-
import pkgutil
|
3
|
-
|
4
|
-
from sybil_engine.config.app_config import set_network, set_dex_retry_interval, set_gas_prices, set_module_data
|
5
|
-
from sybil_engine.domain.balance.balance_utils import interval_to_eth_balance
|
6
|
-
from sybil_engine.utils.app_account_utils import create_app_account_with_proxies
|
7
|
-
|
8
|
-
zksync_test_account = create_app_account_with_proxies(
|
9
|
-
['0xb98308D11E2B578858Fbe65b793e71C7a0CAa43e'],
|
10
|
-
False,
|
11
|
-
'password',
|
12
|
-
['0xac1e735be8536c6534bb4f17f06f6afc73b2b5ba84ac2cfb12f7461b20c0bbe3'],
|
13
|
-
[],
|
14
|
-
'RANDOM',
|
15
|
-
['0x6317842385f344acf68561f4e65f0f39e4fb4f1ad104b92bd007361aed39d8'],
|
16
|
-
)[0]
|
17
|
-
|
18
|
-
zksync_min_native_balance = interval_to_eth_balance({'from': 10, 'to': 10}, zksync_test_account, None, None)
|
19
|
-
|
20
|
-
test_account = create_app_account_with_proxies(
|
21
|
-
['0xb98308D11E2B578858Fbe65b793e71C7a0CAa43e'],
|
22
|
-
False,
|
23
|
-
'password',
|
24
|
-
['0xea6c44ac03bff858b476bba40716402b03e41b8e97e276d1baec7c37d42484a0'],
|
25
|
-
[],
|
26
|
-
'RANDOM',
|
27
|
-
['0x6317842385f344acf68561f4e65f0f39e4fb4f1ad104b92bd007361aed39d8'],
|
28
|
-
)[0]
|
29
|
-
|
30
|
-
local_evm_test_account = create_app_account_with_proxies(
|
31
|
-
['0xb98308D11E2B578858Fbe65b793e71C7a0CAa43e'],
|
32
|
-
False,
|
33
|
-
'password',
|
34
|
-
['0x0000000000000000000000000000000000000000000000000000000000000001'],
|
35
|
-
[],
|
36
|
-
'RANDOM',
|
37
|
-
['0x6317842385f344acf68561f4e65f0f39e4fb4f1ad104b92bd007361aed39d8'],
|
38
|
-
)[0]
|
39
|
-
|
40
|
-
test_min_native_balance = interval_to_eth_balance({'from': 1, 'to': 1}, test_account, None, None)
|
41
|
-
|
42
|
-
global_vars = globals()
|
43
|
-
|
44
|
-
for loader, module_name, is_pkg in pkgutil.iter_modules(['core/contract']):
|
45
|
-
module = importlib.import_module('.' + module_name, package='core.contract')
|
46
|
-
global_vars[module_name] = module
|
47
|
-
|
48
|
-
|
49
|
-
gas_prices_gwei_test = {
|
50
|
-
'ETH_MAINNET': 100,
|
51
|
-
'ZKSYNC': 2,
|
52
|
-
'BASE': 0.5,
|
53
|
-
'LINEA': 2,
|
54
|
-
'ARBITRUM': 2,
|
55
|
-
'AVALANCHE': 26,
|
56
|
-
'BSC': 5,
|
57
|
-
'FANTOM': 750,
|
58
|
-
'OPTIMISM': 0.5,
|
59
|
-
'POLYGON': 150,
|
60
|
-
'SCROLL': 3
|
61
|
-
}
|
62
|
-
|
63
|
-
|
64
|
-
def init_set_test_config():
|
65
|
-
set_network('LOCAL')
|
66
|
-
set_dex_retry_interval({'from': 0, 'to': 0})
|
67
|
-
set_gas_prices(gas_prices_gwei_test)
|
File without changes
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.domain.balance.balance import NativeBalance
|
6
|
-
from sybil_engine.domain.balance.balance_utils import from_eth_to_wei, get_native_balance
|
7
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
8
|
-
from sybil_engine.utils.web3_utils import init_web3
|
9
|
-
|
10
|
-
from web3_wizzard_lib.core.modules import Horizondex
|
11
|
-
from tests.core.modules import test_account, init_set_test_config
|
12
|
-
|
13
|
-
|
14
|
-
class TestHorizondex(unittest.TestCase):
|
15
|
-
|
16
|
-
def test_shouldSwapHorizondex(self, chains=['BASE', 'LINEA']):
|
17
|
-
init_set_test_config()
|
18
|
-
|
19
|
-
logger.info("Test horizondex")
|
20
|
-
|
21
|
-
for chain in chains:
|
22
|
-
chain_instance = get_chain_instance(chain)
|
23
|
-
web3 = init_web3(chain_instance, None)
|
24
|
-
|
25
|
-
native_balance = get_native_balance(test_account, web3, chain_instance)
|
26
|
-
logger.info(f"Native balance: {native_balance}")
|
27
|
-
|
28
|
-
eth_token = Erc20Token(chain, 'ETH', web3)
|
29
|
-
usdc_token = Erc20Token(chain, 'USDC', web3)
|
30
|
-
|
31
|
-
Horizondex(chain_instance, web3).swap(
|
32
|
-
NativeBalance(from_eth_to_wei(1), 'BASE', 'ETH'),
|
33
|
-
eth_token,
|
34
|
-
usdc_token,
|
35
|
-
0.98,
|
36
|
-
test_account
|
37
|
-
)
|
@@ -1,28 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.domain.balance.balance import NativeBalance
|
6
|
-
from sybil_engine.domain.balance.balance_utils import from_eth_to_wei
|
7
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
8
|
-
from sybil_engine.utils.web3_utils import init_web3
|
9
|
-
|
10
|
-
from web3_wizzard_lib.core.modules import LineaSwap
|
11
|
-
from tests.core.modules import test_account, init_set_test_config
|
12
|
-
|
13
|
-
|
14
|
-
class TestLineaSwap(unittest.TestCase):
|
15
|
-
init_set_test_config()
|
16
|
-
|
17
|
-
def test_lineaswapShouldSwap(self, chain='LINEA'):
|
18
|
-
logger.info("Test lineaswap")
|
19
|
-
|
20
|
-
chain_instance = get_chain_instance(chain)
|
21
|
-
web3 = init_web3(chain_instance, None)
|
22
|
-
|
23
|
-
native_balance = NativeBalance(from_eth_to_wei(1), 'BASE', 'ETH')
|
24
|
-
|
25
|
-
lineaswap = LineaSwap(chain_instance, web3)
|
26
|
-
lineaswap.swap(native_balance, 'ETH', 'LIN', 0.98, test_account)
|
27
|
-
amount_to_swap = Erc20Token(chain_instance['chain'], 'LIN', web3).balance(test_account)
|
28
|
-
lineaswap.swap(amount_to_swap, 'LIN', 'ETH', 0.98, test_account)
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.domain.balance.balance import NativeBalance
|
6
|
-
from sybil_engine.domain.balance.balance_utils import from_eth_to_wei, get_native_balance
|
7
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
8
|
-
from sybil_engine.utils.web3_utils import init_web3
|
9
|
-
|
10
|
-
from web3_wizzard_lib.core.modules import Maverick
|
11
|
-
from tests.core.modules import init_set_test_config, test_account
|
12
|
-
|
13
|
-
|
14
|
-
class TestMaverick(unittest.TestCase):
|
15
|
-
init_set_test_config()
|
16
|
-
|
17
|
-
def test_maverickShouldSwap(self, chain='BASE', account=test_account, token='USDC'):
|
18
|
-
logger.info("Test maverick")
|
19
|
-
|
20
|
-
chain_instance = get_chain_instance(chain)
|
21
|
-
web3 = init_web3(chain_instance, None)
|
22
|
-
native_balance = get_native_balance(account, web3, chain_instance)
|
23
|
-
logger.info(f"{native_balance}")
|
24
|
-
|
25
|
-
native_balance_to_sell = NativeBalance(from_eth_to_wei(1), chain, 'ETH')
|
26
|
-
|
27
|
-
maverick = Maverick(chain_instance, web3, '0x06e6736ca9e922766279a22b75a600fe8b8473b6')
|
28
|
-
maverick.swap(native_balance_to_sell, 'ETH', token, 0.01, account)
|
29
|
-
amount_to_swap = Erc20Token(chain_instance['chain'], token, web3).balance(account)
|
30
|
-
logger.info(f"{native_balance_to_sell} > {amount_to_swap}")
|
31
|
-
maverick.swap(amount_to_swap, token, 'ETH', 0.95, account)
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.domain.balance.balance import NativeBalance
|
6
|
-
from sybil_engine.domain.balance.balance_utils import from_eth_to_wei
|
7
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
8
|
-
from sybil_engine.utils.web3_utils import init_web3
|
9
|
-
|
10
|
-
from web3_wizzard_lib.core.modules.swap.mute import Mute
|
11
|
-
from tests.core.modules import zksync_test_account, init_set_test_config
|
12
|
-
|
13
|
-
|
14
|
-
class TestMute(unittest.TestCase):
|
15
|
-
init_set_test_config()
|
16
|
-
|
17
|
-
def test_muteShouldSwap(self, chain='ZKSYNC', account=zksync_test_account, token='USDC'):
|
18
|
-
logger.info("Test mute")
|
19
|
-
|
20
|
-
chain_instance = get_chain_instance(chain)
|
21
|
-
web3 = init_web3(chain_instance, None)
|
22
|
-
|
23
|
-
native_balance_to_sell = NativeBalance(from_eth_to_wei(1), chain, 'ETH')
|
24
|
-
|
25
|
-
mute = Mute(chain_instance, web3)
|
26
|
-
mute.swap(native_balance_to_sell, 'ETH', token, 0.01, account)
|
27
|
-
amount_to_swap = Erc20Token(chain_instance['chain'], token, web3).balance(account)
|
28
|
-
logger.info(f"{native_balance_to_sell} > {amount_to_swap}")
|
29
|
-
mute.swap(amount_to_swap, token, 'ETH', 0.01, account)
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from tests.core.modules import init_set_test_config
|
4
|
-
|
5
|
-
|
6
|
-
class TestOdos(unittest.TestCase):
|
7
|
-
init_set_test_config()
|
8
|
-
|
9
|
-
# def test_odosShouldSwap(self, chain='ZKSYNC'):
|
10
|
-
# logger.info("Test odos")
|
11
|
-
#
|
12
|
-
# chain_instance = get_chain_instance(chain)
|
13
|
-
# web3 = init_web3(chain_instance, None)
|
14
|
-
#
|
15
|
-
# logger.info(get_native_balance(zksync_test_account, web3, chain_instance))
|
16
|
-
#
|
17
|
-
# odos = OdosSwap(chain_instance, web3)
|
18
|
-
#
|
19
|
-
# odos.swap(
|
20
|
-
# NativeBalance(10000, chain, 'ETH'),
|
21
|
-
# 'ETH',
|
22
|
-
# 'USDC',
|
23
|
-
# 25,
|
24
|
-
# base_test_account
|
25
|
-
# )
|
26
|
-
#
|
27
|
-
# amount_to_swap = Erc20Token(chain, 'USDC', web3).balance(zksync_test_account)
|
28
|
-
#
|
29
|
-
#
|
30
|
-
# odos.swap(
|
31
|
-
# amount_to_swap,
|
32
|
-
# 'LIN',
|
33
|
-
# 'ETH',
|
34
|
-
# 0.98,
|
35
|
-
# base_test_account
|
36
|
-
# )
|
@@ -1,54 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.domain.balance.balance import NativeBalance
|
6
|
-
from sybil_engine.domain.balance.balance_utils import from_eth_to_wei
|
7
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
8
|
-
from sybil_engine.utils.web3_utils import init_web3
|
9
|
-
|
10
|
-
from web3_wizzard_lib.core.modules import Pancake
|
11
|
-
from tests.core.modules import zksync_test_account, test_account, init_set_test_config
|
12
|
-
|
13
|
-
|
14
|
-
class TestPancake(unittest.TestCase):
|
15
|
-
init_set_test_config()
|
16
|
-
|
17
|
-
def test_pancakeShouldSwap(self, chains=[
|
18
|
-
('ZKSYNC', zksync_test_account),
|
19
|
-
('BASE', test_account),
|
20
|
-
('LINEA', test_account),
|
21
|
-
('ARBITRUM', test_account),
|
22
|
-
], token='USDC'):
|
23
|
-
logger.info("Test pancake")
|
24
|
-
|
25
|
-
for chain, account in chains:
|
26
|
-
chain_instance = get_chain_instance(chain)
|
27
|
-
web3 = init_web3(chain_instance, None)
|
28
|
-
|
29
|
-
native_balance_to_sell = NativeBalance(from_eth_to_wei(1), chain, 'ETH')
|
30
|
-
|
31
|
-
pancake = Pancake(chain_instance, web3)
|
32
|
-
|
33
|
-
pancake.swap(native_balance_to_sell, 'ETH', token, 0.01, account)
|
34
|
-
amount_to_swap = Erc20Token(chain_instance['chain'], token, web3).balance(account)
|
35
|
-
logger.info(f"{native_balance_to_sell} > {amount_to_swap}")
|
36
|
-
pancake.swap(amount_to_swap, token, 'ETH', 0.01, account)
|
37
|
-
|
38
|
-
def test_pancakeShouldSwapUSDT(self, chains=[
|
39
|
-
('ZKSYNC', zksync_test_account),
|
40
|
-
], token='USDT'):
|
41
|
-
logger.info("Test mute")
|
42
|
-
|
43
|
-
for chain, account in chains:
|
44
|
-
chain_instance = get_chain_instance(chain)
|
45
|
-
web3 = init_web3(chain_instance, None)
|
46
|
-
|
47
|
-
native_balance_to_sell = NativeBalance(from_eth_to_wei(1), chain, 'ETH')
|
48
|
-
|
49
|
-
mute = Pancake(chain_instance, web3)
|
50
|
-
|
51
|
-
mute.swap(native_balance_to_sell, 'ETH', token, 0.01, account)
|
52
|
-
amount_to_swap = Erc20Token(chain_instance['chain'], token, web3).balance(account)
|
53
|
-
logger.info(f"{native_balance_to_sell} > {amount_to_swap}")
|
54
|
-
mute.swap(amount_to_swap, token, 'ETH', 0.01, account)
|
@@ -1,59 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.domain.balance.balance import NativeBalance
|
6
|
-
from sybil_engine.domain.balance.balance_utils import from_eth_to_wei
|
7
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
8
|
-
from sybil_engine.utils.web3_utils import init_web3
|
9
|
-
|
10
|
-
from web3_wizzard_lib.core.modules import Syncswap
|
11
|
-
from tests.core.modules import zksync_test_account, init_set_test_config, test_account
|
12
|
-
|
13
|
-
|
14
|
-
class TestSyncswap(unittest.TestCase):
|
15
|
-
init_set_test_config()
|
16
|
-
|
17
|
-
def test_syncswapShouldSwap(self, chain='ZKSYNC', account=zksync_test_account):
|
18
|
-
logger.info("Test syncswap")
|
19
|
-
|
20
|
-
chain_instance = get_chain_instance(chain)
|
21
|
-
web3 = init_web3(chain_instance, None)
|
22
|
-
|
23
|
-
native_balance = NativeBalance(from_eth_to_wei(1), chain, 'ETH')
|
24
|
-
|
25
|
-
syncswap = Syncswap(chain_instance, web3)
|
26
|
-
syncswap.swap(native_balance, 'ETH', 'USDC', 0.98, account)
|
27
|
-
amount_to_swap = Erc20Token(chain, 'USDC', web3).balance(account)
|
28
|
-
syncswap.swap(amount_to_swap, 'USDC', 'ETH', 0.98, account)
|
29
|
-
|
30
|
-
syncswap = Syncswap(chain_instance, web3)
|
31
|
-
syncswap.swap(native_balance, 'ETH', 'USDT', 0.98, account)
|
32
|
-
amount_to_swap = Erc20Token(chain, 'USDT', web3).balance(account)
|
33
|
-
syncswap.swap(amount_to_swap, 'USDT', 'ETH', 0.98, account)
|
34
|
-
|
35
|
-
syncswap = Syncswap(chain_instance, web3)
|
36
|
-
syncswap.swap(native_balance, 'ETH', 'WBTC', 0.98, account)
|
37
|
-
amount_to_swap = Erc20Token(chain, 'WBTC', web3).balance(account)
|
38
|
-
syncswap.swap(amount_to_swap, 'WBTC', 'ETH', 0.98, account)
|
39
|
-
|
40
|
-
def test_syncswapShouldSwapForLinea(self, chain='LINEA', account=test_account):
|
41
|
-
logger.info("Test syncswap")
|
42
|
-
|
43
|
-
chain_instance = get_chain_instance(chain)
|
44
|
-
web3 = init_web3(chain_instance, None)
|
45
|
-
|
46
|
-
native_balance = NativeBalance(from_eth_to_wei(0.1), chain, 'ETH')
|
47
|
-
|
48
|
-
syncswap = Syncswap(chain_instance, web3)
|
49
|
-
syncswap.swap(native_balance, 'ETH', 'USDC', 0.98, account)
|
50
|
-
amount_to_swap = Erc20Token(chain, 'USDC', web3).balance(account)
|
51
|
-
syncswap.swap(amount_to_swap, 'USDC', 'ETH', 0.98, account)
|
52
|
-
|
53
|
-
syncswap = Syncswap(chain_instance, web3, {
|
54
|
-
"ETH>USDC": "0x5Ec5b1E9b1Bd5198343ABB6E55Fb695d2F7Bb308",
|
55
|
-
"USDC>USDT": "0x258d5f860B11ec73Ee200eB14f1b60A3B7A536a2"
|
56
|
-
})
|
57
|
-
syncswap.swap(native_balance, 'ETH', 'USDT', 0.98, account)
|
58
|
-
amount_to_swap = Erc20Token(chain, 'USDT', web3).balance(account)
|
59
|
-
syncswap.swap(amount_to_swap, 'USDT', 'ETH', 0.98, account)
|
@@ -1,33 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.domain.balance.balance import NativeBalance
|
6
|
-
from sybil_engine.domain.balance.balance_utils import from_eth_to_wei
|
7
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
8
|
-
from sybil_engine.utils.web3_utils import init_web3
|
9
|
-
|
10
|
-
from web3_wizzard_lib.core.modules import Velocore
|
11
|
-
from tests.core.modules import local_evm_test_account, init_set_test_config
|
12
|
-
|
13
|
-
|
14
|
-
class TestVelocore(unittest.TestCase):
|
15
|
-
init_set_test_config()
|
16
|
-
|
17
|
-
def test_velocoreShouldSwap(self, chain='ZKSYNC'):
|
18
|
-
logger.info("Test velocore")
|
19
|
-
|
20
|
-
chain_instance = get_chain_instance(chain)
|
21
|
-
web3 = init_web3(chain_instance, None)
|
22
|
-
|
23
|
-
velocore = Velocore(chain_instance, web3)
|
24
|
-
|
25
|
-
native_balance_to_swap = NativeBalance(from_eth_to_wei(1), chain, 'ETH')
|
26
|
-
|
27
|
-
velocore.swap(native_balance_to_swap, 'ETH', 'USDC', 0.98, local_evm_test_account)
|
28
|
-
amount_to_swap = Erc20Token(chain_instance['chain'], 'USDC', web3).balance(local_evm_test_account)
|
29
|
-
velocore.swap(amount_to_swap, 'USDC', 'ETH', 0.98, local_evm_test_account)
|
30
|
-
|
31
|
-
velocore.swap(native_balance_to_swap, 'ETH', 'WBTC', 0.98, local_evm_test_account)
|
32
|
-
amount_to_swap = Erc20Token(chain_instance['chain'], 'WBTC', web3).balance(local_evm_test_account)
|
33
|
-
velocore.swap(amount_to_swap, 'WBTC', 'ETH', 0.98, local_evm_test_account)
|
@@ -1,22 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from tests.core.modules import init_set_test_config
|
4
|
-
|
5
|
-
|
6
|
-
class TestWoofi(unittest.TestCase):
|
7
|
-
init_set_test_config()
|
8
|
-
|
9
|
-
# def test_woofiShouldSwap(self, chain='ZKSYNC', account=zksync_test_account, token='USDC'):
|
10
|
-
# logger.info("Test woofi")
|
11
|
-
#
|
12
|
-
# chain_instance = get_chain_instance(chain)
|
13
|
-
# web3 = init_web3(chain_instance, None)
|
14
|
-
#
|
15
|
-
# woofi = Woofi(chain_instance, web3)
|
16
|
-
# native_balance_to_sell = NativeBalance(from_eth_to_wei(1), chain, 'ETH')
|
17
|
-
# woofi.swap(native_balance_to_sell, 'ETH', token, 0.95, account)
|
18
|
-
#
|
19
|
-
# amount_to_swap = Erc20Token(chain, token, web3).balance(account)
|
20
|
-
# logger.info(f"{native_balance_to_sell} > {amount_to_swap}")
|
21
|
-
#
|
22
|
-
# woofi.swap(amount_to_swap, token, 'ETH', 0.95, account)
|
@@ -1,27 +0,0 @@
|
|
1
|
-
import unittest
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
|
5
|
-
from web3_wizzard_lib.core.modules import BungeeRefuel
|
6
|
-
from tests.core.modules.__init__ import local_evm_test_account, zksync_min_native_balance, init_set_test_config
|
7
|
-
|
8
|
-
bungee_test_params = {
|
9
|
-
'from_chain': 'ZKSYNC',
|
10
|
-
'to_chain': 'BASE',
|
11
|
-
'refuel_amount_interval': 'max'
|
12
|
-
}
|
13
|
-
|
14
|
-
|
15
|
-
class TestBungeeModule(unittest.TestCase):
|
16
|
-
init_set_test_config()
|
17
|
-
|
18
|
-
def test_shouldRefuelZksyncToBase(self):
|
19
|
-
logger.info("Test module [BUNGEE, 11]")
|
20
|
-
|
21
|
-
try:
|
22
|
-
bungee = BungeeRefuel(zksync_min_native_balance, local_evm_test_account)
|
23
|
-
|
24
|
-
bungee.execute(*bungee.parse_params(bungee_test_params), local_evm_test_account)
|
25
|
-
except Exception as e:
|
26
|
-
self.fail(f"Some function raised an exception: {e}")
|
27
|
-
|