web3-wizzard-lib 0.0.2__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.
- core/__init__.py +1 -0
- core/contract/__init__.py +0 -0
- core/contract/aavecontract.py +36 -0
- core/contract/alienswap_contract.py +21 -0
- core/contract/arena_games_contract.py +16 -0
- core/contract/basiliskcontract.py +58 -0
- core/contract/bilinear_contract.py +22 -0
- core/contract/bungee.py +33 -0
- core/contract/coredao_contract.py +35 -0
- core/contract/coredao_from_contract.py +40 -0
- core/contract/dmail_send_mail.py +18 -0
- core/contract/empty_nft.py +18 -0
- core/contract/era_name.py +23 -0
- core/contract/eralendcontract.py +34 -0
- core/contract/eth_scroll_bridge_contract.py +25 -0
- core/contract/frog_war_contract.py +48 -0
- core/contract/horizondex_quoter.py +14 -0
- core/contract/horizondex_router.py +91 -0
- core/contract/imagine_contract.py +18 -0
- core/contract/izumi.py +63 -0
- core/contract/kreatorland_contract.py +21 -0
- core/contract/l0_claim.py +254 -0
- core/contract/l2_telegraph.py +21 -0
- core/contract/layerbank_price.py +18 -0
- core/contract/layerbank_token.py +29 -0
- core/contract/layerbankcontract.py +59 -0
- core/contract/linea_day_2_contract.py +19 -0
- core/contract/linea_day_3_contract.py +55 -0
- core/contract/linea_ens_names_contract.py +55 -0
- core/contract/lineaswaprouter.py +52 -0
- core/contract/maverick_multicall.py +52 -0
- core/contract/mendi_finance_contract.py +11 -0
- core/contract/mendi_token.py +25 -0
- core/contract/merkly_minter.py +47 -0
- core/contract/micro3_contract.py +18 -0
- core/contract/mute_router.py +93 -0
- core/contract/nidum_contract.py +44 -0
- core/contract/nile_contract.py +60 -0
- core/contract/nomis_attest_contract.py +40 -0
- core/contract/nomis_contract.py +40 -0
- core/contract/octomos.py +31 -0
- core/contract/odos.py +104 -0
- core/contract/omnisea.py +29 -0
- core/contract/orbiter_starknet.py +30 -0
- core/contract/pancake_pool.py +19 -0
- core/contract/pancake_quoter.py +20 -0
- core/contract/pancake_router.py +72 -0
- core/contract/rage_claim.py +24 -0
- core/contract/reactor_fusion_contract.py +78 -0
- core/contract/readon_contract.py +19 -0
- core/contract/rubyscore_contract.py +31 -0
- core/contract/satoshi_universe_contract.py +29 -0
- core/contract/scroll_bridge_contract.py +24 -0
- core/contract/scroll_canvas_mint_contract.py +26 -0
- core/contract/scroll_oracle.py +11 -0
- core/contract/snap_contract.py +16 -0
- core/contract/social_scan_contract.py +20 -0
- core/contract/stargate_farming.py +37 -0
- core/contract/stargate_router.py +84 -0
- core/contract/stargate_router_eth.py +41 -0
- core/contract/stargate_token_pool.py +46 -0
- core/contract/stargate_v2_contract.py +36 -0
- core/contract/syncswap_classic_pool.py +15 -0
- core/contract/syncswap_classic_pool_factory.py +15 -0
- core/contract/syncswap_pool.py +25 -0
- core/contract/syncswap_router.py +123 -0
- core/contract/tavaera_id.py +18 -0
- core/contract/tavaera_mint.py +17 -0
- core/contract/townstory_bonus_contract.py +19 -0
- core/contract/townstory_contract.py +21 -0
- core/contract/velocore_lens.py +44 -0
- core/contract/velocore_pool.py +198 -0
- core/contract/velocore_router.py +80 -0
- core/contract/woofi_swap.py +29 -0
- core/contract/xy_finance_contract.py +87 -0
- core/contract/yoddlo_contract.py +19 -0
- core/contract/yuliverse_contract.py +36 -0
- core/contract/zebra_contract.py +68 -0
- core/contract/zerolend_contract.py +34 -0
- core/contract/zerolend_liq_contract.py +20 -0
- core/contract/zkdx_contract.py +40 -0
- core/contract/zkdx_data.py +14 -0
- core/contract/zks.py +24 -0
- core/modules/__init__.py +0 -0
- core/modules/ads_import_proxy.py +52 -0
- core/modules/airdrop_printer.py +80 -0
- core/modules/bank/__init__.py +0 -0
- core/modules/bank/aave.py +25 -0
- core/modules/bank/bank.py +15 -0
- core/modules/bank/bank_module.py +99 -0
- core/modules/bank/basilisk.py +25 -0
- core/modules/bank/eralend.py +25 -0
- core/modules/bank/layerbank.py +116 -0
- core/modules/bank/mendi_finance.py +57 -0
- core/modules/bank/reactorfusion.py +25 -0
- core/modules/bank/zerolend.py +36 -0
- core/modules/bridge/__init__.py +0 -0
- core/modules/bridge/bridge.py +8 -0
- core/modules/bridge/coredao_bridge_sub.py +47 -0
- core/modules/bridge/orbiter_sub.py +112 -0
- core/modules/bridge/scroll_bridge_sub.py +42 -0
- core/modules/bridge/stargate_v2_sub.py +74 -0
- core/modules/bridge_module.py +47 -0
- core/modules/bungee.py +109 -0
- core/modules/cex_sender.py +60 -0
- core/modules/cex_subaccount_transfer.py +34 -0
- core/modules/cex_withdraw.py +91 -0
- core/modules/claimer.py +45 -0
- core/modules/claims/__init__.py +0 -0
- core/modules/claims/layerzero_claimer.py +64 -0
- core/modules/claims/rabby_claimer.py +81 -0
- core/modules/concrete_swap.py +97 -0
- core/modules/coredao_bridge.py +32 -0
- core/modules/coredao_bridge_auto.py +39 -0
- core/modules/debank_checker.py +90 -0
- core/modules/dmail.py +54 -0
- core/modules/erc20_balance.py +42 -0
- core/modules/intract/__init__.py +0 -0
- core/modules/intract/intract_api.py +212 -0
- core/modules/intract/utils.py +81 -0
- core/modules/intract_claim.py +104 -0
- core/modules/layer_2_20.py +65 -0
- core/modules/lending_module.py +134 -0
- core/modules/linea_appeal.py +70 -0
- core/modules/linea_poh_lxp.py +64 -0
- core/modules/liquidity/__init__.py +0 -0
- core/modules/liquidity/nile_pool.py +64 -0
- core/modules/liquidity/pool.py +16 -0
- core/modules/liquidity/syncswap_pool.py +61 -0
- core/modules/liquidity/velocore_pool.py +55 -0
- core/modules/liquidity/zerolend_liquidity.py +26 -0
- core/modules/liquidity_pool.py +60 -0
- core/modules/merkly_refuel.py +87 -0
- core/modules/modules.py +4 -0
- core/modules/nft/__init__.py +0 -0
- core/modules/nft/abbys_world.py +22 -0
- core/modules/nft/acg_worlds.py +25 -0
- core/modules/nft/alienswap_linea.py +22 -0
- core/modules/nft/arena_games.py +22 -0
- core/modules/nft/asmatch.py +22 -0
- core/modules/nft/battlemon.py +25 -0
- core/modules/nft/bilinear.py +22 -0
- core/modules/nft/bitavatar.py +25 -0
- core/modules/nft/culture_satoshi_universe.py +24 -0
- core/modules/nft/efrogs.py +26 -0
- core/modules/nft/empty_nft.py +22 -0
- core/modules/nft/era_domain.py +42 -0
- core/modules/nft/frog_war.py +22 -0
- core/modules/nft/frog_war_bonus.py +22 -0
- core/modules/nft/gamerboom.py +25 -0
- core/modules/nft/gamerboom_bonus.py +26 -0
- core/modules/nft/imagine.py +32 -0
- core/modules/nft/kreatorland_module.py +35 -0
- core/modules/nft/l2_telegraph_module.py +22 -0
- core/modules/nft/layer3_meta.py +25 -0
- core/modules/nft/linea_culture_2_2_linus.py +24 -0
- core/modules/nft/linea_culture_2_3_yooldo.py +24 -0
- core/modules/nft/linea_culture_2_4_frogwar.py +24 -0
- core/modules/nft/linea_culture_2_5_acg.py +25 -0
- core/modules/nft/linea_culture_2_6_ascend_the_end.py +25 -0
- core/modules/nft/linea_culture_3_1_ascend_the_end.py +25 -0
- core/modules/nft/linea_culture_3_2_sending_me.py +25 -0
- core/modules/nft/linea_culture_3_3_townstory.py +25 -0
- core/modules/nft/linea_culture_3_4_daniele.py +25 -0
- core/modules/nft/linea_culture_3_5_demmortal.py +25 -0
- core/modules/nft/linea_culture_3_6_foxy.py +25 -0
- core/modules/nft/linea_culture_4_1_coop_records.py +60 -0
- core/modules/nft/linea_culture_4_2_borja_moskv.py +65 -0
- core/modules/nft/linea_culture_4_2_borja_moskv_approve.py +27 -0
- core/modules/nft/linea_culture_4_3_fruit.py +66 -0
- core/modules/nft/linea_culture_4_4_fruit_crux.py +67 -0
- core/modules/nft/linea_culture_4_5_forbidden_fruit.py +67 -0
- core/modules/nft/linea_culture_4_6_laurent.py +67 -0
- core/modules/nft/linea_culture_day2.py +20 -0
- core/modules/nft/linea_culture_day3.py +20 -0
- core/modules/nft/linea_ens_names.py +107 -0
- core/modules/nft/lucky_cat.py +25 -0
- core/modules/nft/merkly_minter_module.py +22 -0
- core/modules/nft/micro3.py +23 -0
- core/modules/nft/mint_2048.py +28 -0
- core/modules/nft/nft_submodule.py +16 -0
- core/modules/nft/nidum.py +87 -0
- core/modules/nft/nidum_bonus.py +23 -0
- core/modules/nft/nomis.py +64 -0
- core/modules/nft/nomis_attest.py +66 -0
- core/modules/nft/nouns.py +27 -0
- core/modules/nft/octomos.py +32 -0
- core/modules/nft/omnisea.py +33 -0
- core/modules/nft/omnizone.py +25 -0
- core/modules/nft/orbiter_claim.py +87 -0
- core/modules/nft/readon.py +30 -0
- core/modules/nft/rubyscore.py +45 -0
- core/modules/nft/sarubol.py +22 -0
- core/modules/nft/satoshi_universe.py +22 -0
- core/modules/nft/scroll_canvas_attest_year_badge.py +35 -0
- core/modules/nft/scroll_canvas_mint.py +51 -0
- core/modules/nft/sign.py +32 -0
- core/modules/nft/snap.py +25 -0
- core/modules/nft/snap_bonus.py +31 -0
- core/modules/nft/social_scan.py +22 -0
- core/modules/nft/sub_module.py +8 -0
- core/modules/nft/tavaera.py +30 -0
- core/modules/nft/townstory.py +75 -0
- core/modules/nft/townstory_bonus.py +45 -0
- core/modules/nft/trusta_reputation.py +48 -0
- core/modules/nft/trustaa_poh.py +49 -0
- core/modules/nft/uber_poh.py +24 -0
- core/modules/nft/wizards_of_linea.py +26 -0
- core/modules/nft/yoddlo.py +22 -0
- core/modules/nft/yuliverse.py +22 -0
- core/modules/nft/zace.py +25 -0
- core/modules/nft/zks_domain.py +41 -0
- core/modules/nft_minter.py +107 -0
- core/modules/orbiter.py +39 -0
- core/modules/orbiter_checker.py +26 -0
- core/modules/rage.py +54 -0
- core/modules/scroll_bridge.py +45 -0
- core/modules/sell_all.py +51 -0
- core/modules/sleep_module.py +25 -0
- core/modules/smart_contract_deployment.py +37 -0
- core/modules/stargate/__init__.py +0 -0
- core/modules/stargate/auto_bridge.py +91 -0
- core/modules/stargate/bridge.py +38 -0
- core/modules/stargate/bridge_eth.py +59 -0
- core/modules/stargate/bridge_tokens.py +48 -0
- core/modules/stargate/classic_bridge.py +34 -0
- core/modules/stargate/farming.py +163 -0
- core/modules/stargate/l0_data.py +10 -0
- core/modules/stargate/pool.py +74 -0
- core/modules/stargate/stargate_balance_utils.py +25 -0
- core/modules/stargate/stargate_gas_checker.py +68 -0
- core/modules/swap/__init__.py +1 -0
- core/modules/swap/horizondex.py +38 -0
- core/modules/swap/izumi.py +41 -0
- core/modules/swap/lineaswap.py +34 -0
- core/modules/swap/maverick.py +66 -0
- core/modules/swap/mute.py +39 -0
- core/modules/swap/odos.py +58 -0
- core/modules/swap/one_inch.py +58 -0
- core/modules/swap/pancake.py +41 -0
- core/modules/swap/swap_facade.py +10 -0
- core/modules/swap/syncswap.py +62 -0
- core/modules/swap/velocore.py +40 -0
- core/modules/swap/woofi.py +38 -0
- core/modules/swap/xy_finance.py +43 -0
- core/modules/swap/zebra.py +32 -0
- core/modules/warm_up.py +98 -0
- core/modules/wrapping.py +74 -0
- core/modules/zkdx.py +63 -0
- data/__init__.py +0 -0
- data/config_default.py +52 -0
- data/module_config_default.py +209 -0
- tests/__init__.py +0 -0
- tests/core/__init__.py +0 -0
- tests/core/contracts/__init__.py +0 -0
- tests/core/contracts/test_horizondex_quoter.py +37 -0
- tests/core/contracts/test_uniswap_quoter.py +35 -0
- tests/core/contracts/test_velocore_lens.py +67 -0
- tests/core/contracts/test_velocore_pool.py +57 -0
- tests/core/modules/__init__.py +67 -0
- tests/core/modules/swap/__init__.py +0 -0
- tests/core/modules/swap/test_horizondex.py +37 -0
- tests/core/modules/swap/test_lineaswap.py +28 -0
- tests/core/modules/swap/test_maverick.py +31 -0
- tests/core/modules/swap/test_mute.py +29 -0
- tests/core/modules/swap/test_odos.py +36 -0
- tests/core/modules/swap/test_pancake.py +54 -0
- tests/core/modules/swap/test_syncswap.py +59 -0
- tests/core/modules/swap/test_velocore.py +33 -0
- tests/core/modules/swap/test_woofi.py +22 -0
- tests/core/modules/test_bungee.py +27 -0
- tests/core/modules/test_concrete_swap.py +62 -0
- tests/core/modules/test_dmail.py +41 -0
- tests/core/modules/test_lending.py +122 -0
- tests/core/modules/test_nft.py +32 -0
- tests/core/modules/test_nft_minter.py +30 -0
- tests/core/modules/test_orbiter.py +28 -0
- tests/core/modules/test_sellall.py +27 -0
- tests/core/modules/test_send_to_cex.py +27 -0
- tests/core/modules/test_stargate_auto_bridge.py +32 -0
- tests/core/modules/test_stargate_bridge.py +25 -0
- tests/core/modules/test_stargate_farming.py +108 -0
- tests/core/modules/test_warmup.py +78 -0
- tests/core/modules/test_wrapping.py +68 -0
- tests/core/scenario/__init__.py +0 -0
- tests/core/scenario/module_0_test_config.py +91 -0
- tests/core/test_app.py +19 -0
- tests/core/test_config.py +34 -0
- web3_wizzard_lib/__init__.py +0 -0
- web3_wizzard_lib/core/__init__.py +1 -0
- web3_wizzard_lib/core/contract/__init__.py +0 -0
- web3_wizzard_lib/core/contract/aavecontract.py +36 -0
- web3_wizzard_lib/core/contract/alienswap_contract.py +21 -0
- web3_wizzard_lib/core/contract/arena_games_contract.py +16 -0
- web3_wizzard_lib/core/contract/basiliskcontract.py +58 -0
- web3_wizzard_lib/core/contract/bilinear_contract.py +22 -0
- web3_wizzard_lib/core/contract/bungee.py +33 -0
- web3_wizzard_lib/core/contract/coredao_contract.py +35 -0
- web3_wizzard_lib/core/contract/coredao_from_contract.py +40 -0
- web3_wizzard_lib/core/contract/dmail_send_mail.py +18 -0
- web3_wizzard_lib/core/contract/empty_nft.py +18 -0
- web3_wizzard_lib/core/contract/era_name.py +23 -0
- web3_wizzard_lib/core/contract/eralendcontract.py +34 -0
- web3_wizzard_lib/core/contract/eth_scroll_bridge_contract.py +25 -0
- web3_wizzard_lib/core/contract/frog_war_contract.py +48 -0
- web3_wizzard_lib/core/contract/horizondex_quoter.py +14 -0
- web3_wizzard_lib/core/contract/horizondex_router.py +91 -0
- web3_wizzard_lib/core/contract/imagine_contract.py +18 -0
- web3_wizzard_lib/core/contract/izumi.py +63 -0
- web3_wizzard_lib/core/contract/kreatorland_contract.py +21 -0
- web3_wizzard_lib/core/contract/l0_claim.py +254 -0
- web3_wizzard_lib/core/contract/l2_telegraph.py +21 -0
- web3_wizzard_lib/core/contract/layerbank_price.py +18 -0
- web3_wizzard_lib/core/contract/layerbank_token.py +29 -0
- web3_wizzard_lib/core/contract/layerbankcontract.py +59 -0
- web3_wizzard_lib/core/contract/linea_day_2_contract.py +19 -0
- web3_wizzard_lib/core/contract/linea_day_3_contract.py +55 -0
- web3_wizzard_lib/core/contract/linea_ens_names_contract.py +55 -0
- web3_wizzard_lib/core/contract/lineaswaprouter.py +52 -0
- web3_wizzard_lib/core/contract/maverick_multicall.py +52 -0
- web3_wizzard_lib/core/contract/mendi_finance_contract.py +11 -0
- web3_wizzard_lib/core/contract/mendi_token.py +25 -0
- web3_wizzard_lib/core/contract/merkly_minter.py +47 -0
- web3_wizzard_lib/core/contract/micro3_contract.py +18 -0
- web3_wizzard_lib/core/contract/mute_router.py +93 -0
- web3_wizzard_lib/core/contract/nidum_contract.py +44 -0
- web3_wizzard_lib/core/contract/nile_contract.py +60 -0
- web3_wizzard_lib/core/contract/nomis_attest_contract.py +40 -0
- web3_wizzard_lib/core/contract/nomis_contract.py +40 -0
- web3_wizzard_lib/core/contract/octomos.py +31 -0
- web3_wizzard_lib/core/contract/odos.py +104 -0
- web3_wizzard_lib/core/contract/omnisea.py +29 -0
- web3_wizzard_lib/core/contract/orbiter_starknet.py +30 -0
- web3_wizzard_lib/core/contract/pancake_pool.py +19 -0
- web3_wizzard_lib/core/contract/pancake_quoter.py +20 -0
- web3_wizzard_lib/core/contract/pancake_router.py +72 -0
- web3_wizzard_lib/core/contract/rage_claim.py +24 -0
- web3_wizzard_lib/core/contract/reactor_fusion_contract.py +78 -0
- web3_wizzard_lib/core/contract/readon_contract.py +19 -0
- web3_wizzard_lib/core/contract/rubyscore_contract.py +31 -0
- web3_wizzard_lib/core/contract/satoshi_universe_contract.py +29 -0
- web3_wizzard_lib/core/contract/scroll_bridge_contract.py +24 -0
- web3_wizzard_lib/core/contract/scroll_canvas_mint_contract.py +26 -0
- web3_wizzard_lib/core/contract/scroll_oracle.py +11 -0
- web3_wizzard_lib/core/contract/snap_contract.py +16 -0
- web3_wizzard_lib/core/contract/social_scan_contract.py +20 -0
- web3_wizzard_lib/core/contract/stargate_farming.py +37 -0
- web3_wizzard_lib/core/contract/stargate_router.py +84 -0
- web3_wizzard_lib/core/contract/stargate_router_eth.py +41 -0
- web3_wizzard_lib/core/contract/stargate_token_pool.py +46 -0
- web3_wizzard_lib/core/contract/stargate_v2_contract.py +36 -0
- web3_wizzard_lib/core/contract/syncswap_classic_pool.py +15 -0
- web3_wizzard_lib/core/contract/syncswap_classic_pool_factory.py +15 -0
- web3_wizzard_lib/core/contract/syncswap_pool.py +25 -0
- web3_wizzard_lib/core/contract/syncswap_router.py +123 -0
- web3_wizzard_lib/core/contract/tavaera_id.py +18 -0
- web3_wizzard_lib/core/contract/tavaera_mint.py +17 -0
- web3_wizzard_lib/core/contract/townstory_bonus_contract.py +19 -0
- web3_wizzard_lib/core/contract/townstory_contract.py +21 -0
- web3_wizzard_lib/core/contract/velocore_lens.py +44 -0
- web3_wizzard_lib/core/contract/velocore_pool.py +198 -0
- web3_wizzard_lib/core/contract/velocore_router.py +80 -0
- web3_wizzard_lib/core/contract/woofi_swap.py +29 -0
- web3_wizzard_lib/core/contract/xy_finance_contract.py +87 -0
- web3_wizzard_lib/core/contract/yoddlo_contract.py +19 -0
- web3_wizzard_lib/core/contract/yuliverse_contract.py +36 -0
- web3_wizzard_lib/core/contract/zebra_contract.py +68 -0
- web3_wizzard_lib/core/contract/zerolend_contract.py +34 -0
- web3_wizzard_lib/core/contract/zerolend_liq_contract.py +20 -0
- web3_wizzard_lib/core/contract/zkdx_contract.py +40 -0
- web3_wizzard_lib/core/contract/zkdx_data.py +14 -0
- web3_wizzard_lib/core/contract/zks.py +24 -0
- web3_wizzard_lib/core/modules/__init__.py +0 -0
- web3_wizzard_lib/core/modules/ads_import_proxy.py +52 -0
- web3_wizzard_lib/core/modules/airdrop_printer.py +80 -0
- web3_wizzard_lib/core/modules/bank/__init__.py +0 -0
- web3_wizzard_lib/core/modules/bank/aave.py +25 -0
- web3_wizzard_lib/core/modules/bank/bank.py +15 -0
- web3_wizzard_lib/core/modules/bank/bank_module.py +99 -0
- web3_wizzard_lib/core/modules/bank/basilisk.py +25 -0
- web3_wizzard_lib/core/modules/bank/eralend.py +25 -0
- web3_wizzard_lib/core/modules/bank/layerbank.py +116 -0
- web3_wizzard_lib/core/modules/bank/mendi_finance.py +57 -0
- web3_wizzard_lib/core/modules/bank/reactorfusion.py +25 -0
- web3_wizzard_lib/core/modules/bank/zerolend.py +36 -0
- web3_wizzard_lib/core/modules/bridge/__init__.py +0 -0
- web3_wizzard_lib/core/modules/bridge/bridge.py +8 -0
- web3_wizzard_lib/core/modules/bridge/coredao_bridge_sub.py +47 -0
- web3_wizzard_lib/core/modules/bridge/orbiter_sub.py +112 -0
- web3_wizzard_lib/core/modules/bridge/scroll_bridge_sub.py +42 -0
- web3_wizzard_lib/core/modules/bridge/stargate_v2_sub.py +74 -0
- web3_wizzard_lib/core/modules/bridge_module.py +47 -0
- web3_wizzard_lib/core/modules/bungee.py +109 -0
- web3_wizzard_lib/core/modules/cex_sender.py +60 -0
- web3_wizzard_lib/core/modules/cex_subaccount_transfer.py +34 -0
- web3_wizzard_lib/core/modules/cex_withdraw.py +91 -0
- web3_wizzard_lib/core/modules/claimer.py +45 -0
- web3_wizzard_lib/core/modules/claims/__init__.py +0 -0
- web3_wizzard_lib/core/modules/claims/layerzero_claimer.py +64 -0
- web3_wizzard_lib/core/modules/claims/rabby_claimer.py +81 -0
- web3_wizzard_lib/core/modules/concrete_swap.py +97 -0
- web3_wizzard_lib/core/modules/coredao_bridge.py +32 -0
- web3_wizzard_lib/core/modules/coredao_bridge_auto.py +39 -0
- web3_wizzard_lib/core/modules/debank_checker.py +90 -0
- web3_wizzard_lib/core/modules/dmail.py +54 -0
- web3_wizzard_lib/core/modules/erc20_balance.py +42 -0
- web3_wizzard_lib/core/modules/intract/__init__.py +0 -0
- web3_wizzard_lib/core/modules/intract/intract_api.py +212 -0
- web3_wizzard_lib/core/modules/intract/utils.py +81 -0
- web3_wizzard_lib/core/modules/intract_claim.py +104 -0
- web3_wizzard_lib/core/modules/layer_2_20.py +65 -0
- web3_wizzard_lib/core/modules/lending_module.py +134 -0
- web3_wizzard_lib/core/modules/linea_appeal.py +70 -0
- web3_wizzard_lib/core/modules/linea_poh_lxp.py +64 -0
- web3_wizzard_lib/core/modules/liquidity/__init__.py +0 -0
- web3_wizzard_lib/core/modules/liquidity/nile_pool.py +64 -0
- web3_wizzard_lib/core/modules/liquidity/pool.py +16 -0
- web3_wizzard_lib/core/modules/liquidity/syncswap_pool.py +61 -0
- web3_wizzard_lib/core/modules/liquidity/velocore_pool.py +55 -0
- web3_wizzard_lib/core/modules/liquidity/zerolend_liquidity.py +26 -0
- web3_wizzard_lib/core/modules/liquidity_pool.py +60 -0
- web3_wizzard_lib/core/modules/merkly_refuel.py +87 -0
- web3_wizzard_lib/core/modules/modules.py +27 -0
- web3_wizzard_lib/core/modules/nft/__init__.py +0 -0
- web3_wizzard_lib/core/modules/nft/abbys_world.py +22 -0
- web3_wizzard_lib/core/modules/nft/acg_worlds.py +25 -0
- web3_wizzard_lib/core/modules/nft/alienswap_linea.py +22 -0
- web3_wizzard_lib/core/modules/nft/arena_games.py +22 -0
- web3_wizzard_lib/core/modules/nft/asmatch.py +22 -0
- web3_wizzard_lib/core/modules/nft/battlemon.py +25 -0
- web3_wizzard_lib/core/modules/nft/bilinear.py +22 -0
- web3_wizzard_lib/core/modules/nft/bitavatar.py +25 -0
- web3_wizzard_lib/core/modules/nft/culture_satoshi_universe.py +24 -0
- web3_wizzard_lib/core/modules/nft/efrogs.py +26 -0
- web3_wizzard_lib/core/modules/nft/empty_nft.py +22 -0
- web3_wizzard_lib/core/modules/nft/era_domain.py +42 -0
- web3_wizzard_lib/core/modules/nft/frog_war.py +22 -0
- web3_wizzard_lib/core/modules/nft/frog_war_bonus.py +22 -0
- web3_wizzard_lib/core/modules/nft/gamerboom.py +25 -0
- web3_wizzard_lib/core/modules/nft/gamerboom_bonus.py +26 -0
- web3_wizzard_lib/core/modules/nft/imagine.py +32 -0
- web3_wizzard_lib/core/modules/nft/kreatorland_module.py +35 -0
- web3_wizzard_lib/core/modules/nft/l2_telegraph_module.py +22 -0
- web3_wizzard_lib/core/modules/nft/layer3_meta.py +25 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_2_2_linus.py +24 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_2_3_yooldo.py +24 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_2_4_frogwar.py +24 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_2_5_acg.py +25 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_2_6_ascend_the_end.py +25 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_3_1_ascend_the_end.py +25 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_3_2_sending_me.py +25 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_3_3_townstory.py +25 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_3_4_daniele.py +25 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_3_5_demmortal.py +25 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_3_6_foxy.py +25 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_4_1_coop_records.py +60 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_4_2_borja_moskv.py +65 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_4_2_borja_moskv_approve.py +27 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_4_3_fruit.py +66 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_4_4_fruit_crux.py +67 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_4_5_forbidden_fruit.py +67 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_4_6_laurent.py +67 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_day2.py +20 -0
- web3_wizzard_lib/core/modules/nft/linea_culture_day3.py +20 -0
- web3_wizzard_lib/core/modules/nft/linea_ens_names.py +107 -0
- web3_wizzard_lib/core/modules/nft/lucky_cat.py +25 -0
- web3_wizzard_lib/core/modules/nft/merkly_minter_module.py +22 -0
- web3_wizzard_lib/core/modules/nft/micro3.py +23 -0
- web3_wizzard_lib/core/modules/nft/mint_2048.py +28 -0
- web3_wizzard_lib/core/modules/nft/nft_submodule.py +16 -0
- web3_wizzard_lib/core/modules/nft/nidum.py +87 -0
- web3_wizzard_lib/core/modules/nft/nidum_bonus.py +23 -0
- web3_wizzard_lib/core/modules/nft/nomis.py +64 -0
- web3_wizzard_lib/core/modules/nft/nomis_attest.py +66 -0
- web3_wizzard_lib/core/modules/nft/nouns.py +27 -0
- web3_wizzard_lib/core/modules/nft/octomos.py +32 -0
- web3_wizzard_lib/core/modules/nft/omnisea.py +33 -0
- web3_wizzard_lib/core/modules/nft/omnizone.py +25 -0
- web3_wizzard_lib/core/modules/nft/orbiter_claim.py +87 -0
- web3_wizzard_lib/core/modules/nft/readon.py +30 -0
- web3_wizzard_lib/core/modules/nft/rubyscore.py +45 -0
- web3_wizzard_lib/core/modules/nft/sarubol.py +22 -0
- web3_wizzard_lib/core/modules/nft/satoshi_universe.py +22 -0
- web3_wizzard_lib/core/modules/nft/scroll_canvas_attest_year_badge.py +35 -0
- web3_wizzard_lib/core/modules/nft/scroll_canvas_mint.py +51 -0
- web3_wizzard_lib/core/modules/nft/sign.py +32 -0
- web3_wizzard_lib/core/modules/nft/snap.py +25 -0
- web3_wizzard_lib/core/modules/nft/snap_bonus.py +31 -0
- web3_wizzard_lib/core/modules/nft/social_scan.py +22 -0
- web3_wizzard_lib/core/modules/nft/sub_module.py +8 -0
- web3_wizzard_lib/core/modules/nft/tavaera.py +30 -0
- web3_wizzard_lib/core/modules/nft/townstory.py +75 -0
- web3_wizzard_lib/core/modules/nft/townstory_bonus.py +45 -0
- web3_wizzard_lib/core/modules/nft/trusta_reputation.py +48 -0
- web3_wizzard_lib/core/modules/nft/trustaa_poh.py +49 -0
- web3_wizzard_lib/core/modules/nft/uber_poh.py +24 -0
- web3_wizzard_lib/core/modules/nft/wizards_of_linea.py +26 -0
- web3_wizzard_lib/core/modules/nft/yoddlo.py +22 -0
- web3_wizzard_lib/core/modules/nft/yuliverse.py +22 -0
- web3_wizzard_lib/core/modules/nft/zace.py +25 -0
- web3_wizzard_lib/core/modules/nft/zks_domain.py +41 -0
- web3_wizzard_lib/core/modules/nft_minter.py +107 -0
- web3_wizzard_lib/core/modules/orbiter.py +39 -0
- web3_wizzard_lib/core/modules/orbiter_checker.py +26 -0
- web3_wizzard_lib/core/modules/rage.py +54 -0
- web3_wizzard_lib/core/modules/scroll_bridge.py +45 -0
- web3_wizzard_lib/core/modules/sell_all.py +51 -0
- web3_wizzard_lib/core/modules/sleep_module.py +25 -0
- web3_wizzard_lib/core/modules/smart_contract_deployment.py +37 -0
- web3_wizzard_lib/core/modules/stargate/__init__.py +0 -0
- web3_wizzard_lib/core/modules/stargate/auto_bridge.py +91 -0
- web3_wizzard_lib/core/modules/stargate/bridge.py +38 -0
- web3_wizzard_lib/core/modules/stargate/bridge_eth.py +59 -0
- web3_wizzard_lib/core/modules/stargate/bridge_tokens.py +48 -0
- web3_wizzard_lib/core/modules/stargate/classic_bridge.py +34 -0
- web3_wizzard_lib/core/modules/stargate/farming.py +163 -0
- web3_wizzard_lib/core/modules/stargate/l0_data.py +10 -0
- web3_wizzard_lib/core/modules/stargate/pool.py +74 -0
- web3_wizzard_lib/core/modules/stargate/stargate_balance_utils.py +25 -0
- web3_wizzard_lib/core/modules/stargate/stargate_gas_checker.py +68 -0
- web3_wizzard_lib/core/modules/swap/__init__.py +1 -0
- web3_wizzard_lib/core/modules/swap/horizondex.py +38 -0
- web3_wizzard_lib/core/modules/swap/izumi.py +41 -0
- web3_wizzard_lib/core/modules/swap/lineaswap.py +34 -0
- web3_wizzard_lib/core/modules/swap/maverick.py +66 -0
- web3_wizzard_lib/core/modules/swap/mute.py +39 -0
- web3_wizzard_lib/core/modules/swap/odos.py +58 -0
- web3_wizzard_lib/core/modules/swap/one_inch.py +58 -0
- web3_wizzard_lib/core/modules/swap/pancake.py +41 -0
- web3_wizzard_lib/core/modules/swap/swap_facade.py +10 -0
- web3_wizzard_lib/core/modules/swap/swap_list.py +10 -0
- web3_wizzard_lib/core/modules/swap/syncswap.py +62 -0
- web3_wizzard_lib/core/modules/swap/velocore.py +40 -0
- web3_wizzard_lib/core/modules/swap/woofi.py +38 -0
- web3_wizzard_lib/core/modules/swap/xy_finance.py +43 -0
- web3_wizzard_lib/core/modules/swap/zebra.py +32 -0
- web3_wizzard_lib/core/modules/warm_up.py +98 -0
- web3_wizzard_lib/core/modules/wrapping.py +74 -0
- web3_wizzard_lib/core/modules/zkdx.py +63 -0
- web3_wizzard_lib/core/utils/__init__.py +0 -0
- web3_wizzard_lib/core/utils/sub_module.py +8 -0
- web3_wizzard_lib/launcher.py +39 -0
- web3_wizzard_lib-0.0.2.data/data/requirements.txt +1 -0
- web3_wizzard_lib-0.0.2.dist-info/METADATA +10 -0
- web3_wizzard_lib-0.0.2.dist-info/RECORD +547 -0
- web3_wizzard_lib-0.0.2.dist-info/WHEEL +5 -0
- web3_wizzard_lib-0.0.2.dist-info/top_level.txt +3 -0
@@ -0,0 +1,108 @@
|
|
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}")
|
@@ -0,0 +1,78 @@
|
|
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
|
+
|
@@ -0,0 +1,68 @@
|
|
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
|
+
)
|
File without changes
|
@@ -0,0 +1,91 @@
|
|
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
ADDED
@@ -0,0 +1,19 @@
|
|
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}")
|
@@ -0,0 +1,34 @@
|
|
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
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
|
File without changes
|
@@ -0,0 +1,36 @@
|
|
1
|
+
from sybil_engine.contract.contract import Contract
|
2
|
+
from sybil_engine.contract.transaction_executor import evm_transaction
|
3
|
+
|
4
|
+
from sybil_engine.utils.file_loader import load_abi
|
5
|
+
|
6
|
+
abi = load_abi("resources/abi/aave.json")
|
7
|
+
|
8
|
+
|
9
|
+
class AaveContract(Contract):
|
10
|
+
def __init__(self, contract_address, web3):
|
11
|
+
super().__init__(contract_address, web3, abi)
|
12
|
+
|
13
|
+
@evm_transaction
|
14
|
+
def depositETH(self, account, amount: int):
|
15
|
+
sender = account.address
|
16
|
+
txn_params = self.build_generic_data(sender, set_contract_address=False)
|
17
|
+
|
18
|
+
txn_params['value'] = amount
|
19
|
+
|
20
|
+
return self.contract.functions.depositETH(
|
21
|
+
'0x11fCfe756c05AD438e312a7fd934381537D3cFfe',
|
22
|
+
account.address,
|
23
|
+
0
|
24
|
+
).build_transaction(txn_params)
|
25
|
+
|
26
|
+
@evm_transaction
|
27
|
+
def withdrawETH(self, account, amount: int):
|
28
|
+
sender = account.address
|
29
|
+
|
30
|
+
txn_params = self.build_generic_data(sender, False)
|
31
|
+
|
32
|
+
return self.contract.functions.withdrawETH(
|
33
|
+
'0x11fCfe756c05AD438e312a7fd934381537D3cFfe',
|
34
|
+
amount,
|
35
|
+
account.address
|
36
|
+
).build_transaction(txn_params)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
from sybil_engine.contract.contract import Contract
|
2
|
+
from sybil_engine.contract.transaction_executor import evm_transaction
|
3
|
+
from sybil_engine.utils.file_loader import load_abi
|
4
|
+
|
5
|
+
abi = load_abi("resources/abi/abbysworld.json")
|
6
|
+
|
7
|
+
|
8
|
+
class AlienSwapContract(Contract):
|
9
|
+
def __init__(self, contract_address, web3):
|
10
|
+
super().__init__(contract_address, web3, abi)
|
11
|
+
|
12
|
+
@evm_transaction
|
13
|
+
def purchase(self, account, amount):
|
14
|
+
txn_params = self.build_generic_data(account.address, True)
|
15
|
+
|
16
|
+
txn_params['value'] = 100000000000000
|
17
|
+
|
18
|
+
txn_params['data'] = '0xefef39a10000000000000000000000000000000000000000000000000000000000000001'
|
19
|
+
txn_params['gasPrice'] = self.web3.eth.gas_price
|
20
|
+
|
21
|
+
return txn_params
|
@@ -0,0 +1,16 @@
|
|
1
|
+
from sybil_engine.contract.contract import Contract
|
2
|
+
from sybil_engine.contract.transaction_executor import evm_transaction
|
3
|
+
from sybil_engine.utils.file_loader import load_abi
|
4
|
+
|
5
|
+
abi = load_abi("resources/abi/arena_games.json")
|
6
|
+
|
7
|
+
|
8
|
+
class ArenaGamesContract(Contract):
|
9
|
+
def __init__(self, contract_address, web3):
|
10
|
+
super().__init__(contract_address, web3, abi)
|
11
|
+
|
12
|
+
@evm_transaction
|
13
|
+
def safe_mint(self, account):
|
14
|
+
txn_params = self.build_generic_data(account.address, False)
|
15
|
+
|
16
|
+
return self.contract.functions.safeMint(account.address).build_transaction(txn_params)
|
@@ -0,0 +1,58 @@
|
|
1
|
+
from sybil_engine.contract.contract import Contract
|
2
|
+
from sybil_engine.contract.transaction_executor import evm_transaction
|
3
|
+
from sybil_engine.utils.file_loader import load_abi
|
4
|
+
|
5
|
+
abi = load_abi("resources/abi/basiliks.json")
|
6
|
+
|
7
|
+
|
8
|
+
class BasiliskContract(Contract):
|
9
|
+
|
10
|
+
def __init__(self, contract_address, web3):
|
11
|
+
super().__init__(contract_address, web3, abi)
|
12
|
+
|
13
|
+
def get_deposit_amount(self, account):
|
14
|
+
return self.contract.functions.balanceOfUnderlying(account.address).call()
|
15
|
+
|
16
|
+
@evm_transaction
|
17
|
+
def mint(self, account, amount_wei):
|
18
|
+
tx_data = self.build_generic_data(account.address)
|
19
|
+
|
20
|
+
tx_data['data'] = self.contract.encode_abi('mint', args=())
|
21
|
+
tx_data['gas'] = int(self.web3.eth.estimate_gas(tx_data) * 1.1)
|
22
|
+
|
23
|
+
tx_data.update({"value": amount_wei})
|
24
|
+
|
25
|
+
return tx_data
|
26
|
+
|
27
|
+
@evm_transaction
|
28
|
+
def redeem_underlying(self, account, amount):
|
29
|
+
tx_data = self.build_generic_data(account.address, False)
|
30
|
+
|
31
|
+
return self.contract.functions.redeemUnderlying(amount).build_transaction(tx_data)
|
32
|
+
|
33
|
+
# @evm_transaction
|
34
|
+
# def enable_collateral(self):
|
35
|
+
# logger.info(f"[{self.account_id}][{self.address}] Enable collateral on basilisk.py")
|
36
|
+
#
|
37
|
+
# contract = self.get_contract(BASILISK_CONTRACTS["collateral"], BASILISK_ABI)
|
38
|
+
#
|
39
|
+
# tx_data = await self.get_tx_data()
|
40
|
+
#
|
41
|
+
# transaction = await contract.functions.enterMarkets(
|
42
|
+
# [Web3.to_checksum_address(BASILISK_CONTRACTS["landing"])]
|
43
|
+
# ).build_transaction(tx_data)
|
44
|
+
#
|
45
|
+
# return transaction
|
46
|
+
#
|
47
|
+
# @evm_transaction
|
48
|
+
# def disable_collateral(self):
|
49
|
+
# logger.info(f"[{self.account_id}][{self.address}] Disable collateral on basilisk.py")
|
50
|
+
#
|
51
|
+
# contract = self.get_contract(BASILISK_CONTRACTS["collateral"], BASILISK_ABI)
|
52
|
+
#
|
53
|
+
# tx_data = await self.get_tx_data()
|
54
|
+
# transaction = await contract.functions.exitMarket(
|
55
|
+
# Web3.to_checksum_address(BASILISK_CONTRACTS["landing"])
|
56
|
+
# ).build_transaction(tx_data)
|
57
|
+
#
|
58
|
+
# return transaction
|
@@ -0,0 +1,22 @@
|
|
1
|
+
from sybil_engine.contract.contract import Contract
|
2
|
+
from sybil_engine.contract.transaction_executor import evm_transaction
|
3
|
+
from sybil_engine.utils.file_loader import load_abi
|
4
|
+
|
5
|
+
abi = load_abi("resources/abi/bilinear.json")
|
6
|
+
|
7
|
+
|
8
|
+
class BilinearContract(Contract):
|
9
|
+
def __init__(self, contract_address, web3):
|
10
|
+
super().__init__(contract_address, web3, abi)
|
11
|
+
|
12
|
+
@evm_transaction
|
13
|
+
def claim(self, account):
|
14
|
+
txn_params = self.build_generic_data(account.address, False)
|
15
|
+
|
16
|
+
return self.contract.functions.claim(
|
17
|
+
[],
|
18
|
+
([], [1]),
|
19
|
+
([], [], []),
|
20
|
+
0,
|
21
|
+
'0x307b8d76e3a3ca16066982ae42768878ec07a1b9af2679f2f9b8a3c3db25e7d5'
|
22
|
+
).build_transaction(txn_params)
|
@@ -0,0 +1,33 @@
|
|
1
|
+
from sybil_engine.contract.contract import Contract
|
2
|
+
from sybil_engine.contract.transaction_executor import evm_transaction
|
3
|
+
from sybil_engine.utils.file_loader import load_abi
|
4
|
+
|
5
|
+
abi = load_abi("resources/abi/bungee.json")
|
6
|
+
|
7
|
+
bungee_chain_ids = {
|
8
|
+
"BSC": 56,
|
9
|
+
"OPTIMISM": 10,
|
10
|
+
"POLYGON": 137,
|
11
|
+
"BASE": 8453,
|
12
|
+
"ARBITRUM": 42161,
|
13
|
+
"AVALANCHE": 43114,
|
14
|
+
"ZK_EVM": 1101,
|
15
|
+
"ZKSYNC": 324
|
16
|
+
}
|
17
|
+
|
18
|
+
|
19
|
+
class Bungee(Contract):
|
20
|
+
def __init__(self, contract_address, web3):
|
21
|
+
super().__init__(contract_address, web3, abi)
|
22
|
+
|
23
|
+
@evm_transaction
|
24
|
+
def refuel(self, account, to_chain, amount):
|
25
|
+
sender = account.address
|
26
|
+
|
27
|
+
txn_params = self.build_generic_data(sender, False)
|
28
|
+
txn_params['value'] = amount
|
29
|
+
|
30
|
+
return self.contract.functions.depositNativeToken(
|
31
|
+
bungee_chain_ids[to_chain],
|
32
|
+
sender
|
33
|
+
).build_transaction(txn_params)
|
@@ -0,0 +1,35 @@
|
|
1
|
+
from sybil_engine.contract.contract import Contract
|
2
|
+
from sybil_engine.contract.transaction_executor import l0_evm_transaction
|
3
|
+
|
4
|
+
with open("resources/abi/coredao.json") as f:
|
5
|
+
abi = f.read()
|
6
|
+
|
7
|
+
|
8
|
+
class CoreDaoContract(Contract):
|
9
|
+
def __init__(self, contract_address, web3):
|
10
|
+
super().__init__(contract_address, web3, abi)
|
11
|
+
|
12
|
+
@l0_evm_transaction
|
13
|
+
def bridge(self, account, amount, token, fee, to_chain):
|
14
|
+
txn_params = self.build_generic_data(account.address, False)
|
15
|
+
|
16
|
+
txn_params['value'] = fee
|
17
|
+
|
18
|
+
contract_txn = self.contract.functions.bridge(
|
19
|
+
token,
|
20
|
+
amount.wei,
|
21
|
+
account.address,
|
22
|
+
(
|
23
|
+
account.address,
|
24
|
+
'0x0000000000000000000000000000000000000000'
|
25
|
+
),
|
26
|
+
b''
|
27
|
+
).build_transaction(txn_params)
|
28
|
+
|
29
|
+
return contract_txn
|
30
|
+
|
31
|
+
def estimate_bridge_fee(self):
|
32
|
+
return self.contract.functions.estimateBridgeFee(
|
33
|
+
False,
|
34
|
+
b''
|
35
|
+
).call()[0]
|