web3-wizzard-lib 1.6.10__py3-none-any.whl → 1.6.12__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/resources/abi/aave.json +282 -0
- web3_wizzard_lib/resources/abi/abbysworld.json +1113 -0
- web3_wizzard_lib/resources/abi/arena_games.json +15 -0
- web3_wizzard_lib/resources/abi/asmatch.json +1113 -0
- web3_wizzard_lib/resources/abi/basiliks.json +1467 -0
- web3_wizzard_lib/resources/abi/bilinear.json +1375 -0
- web3_wizzard_lib/resources/abi/bungee.json +525 -0
- web3_wizzard_lib/resources/abi/coredao.json +1068 -0
- web3_wizzard_lib/resources/abi/coredao_bridge.json +1012 -0
- web3_wizzard_lib/resources/abi/dmail.json +964 -0
- web3_wizzard_lib/resources/abi/empty_nft.json +1131 -0
- web3_wizzard_lib/resources/abi/era_ns.json +878 -0
- web3_wizzard_lib/resources/abi/eralend.json +1221 -0
- web3_wizzard_lib/resources/abi/erc20.json +801 -0
- web3_wizzard_lib/resources/abi/erc20_test.json +337 -0
- web3_wizzard_lib/resources/abi/eth_scroll_bridge.json +675 -0
- web3_wizzard_lib/resources/abi/frog_war_contract.json +1943 -0
- web3_wizzard_lib/resources/abi/gmx_reward_router.json +749 -0
- web3_wizzard_lib/resources/abi/horizondex.json +413 -0
- web3_wizzard_lib/resources/abi/horizondex_quoter.json +273 -0
- web3_wizzard_lib/resources/abi/imagine.json +457 -0
- web3_wizzard_lib/resources/abi/izumi.json +532 -0
- web3_wizzard_lib/resources/abi/kreatorland.json +500 -0
- web3_wizzard_lib/resources/abi/layerbank.json +1240 -0
- web3_wizzard_lib/resources/abi/layerbank_price.json +354 -0
- web3_wizzard_lib/resources/abi/layerbank_token.json +1124 -0
- web3_wizzard_lib/resources/abi/linea_day_2.json +933 -0
- web3_wizzard_lib/resources/abi/linea_day_3.json +1804 -0
- web3_wizzard_lib/resources/abi/linea_ens_names.json +1000 -0
- web3_wizzard_lib/resources/abi/lineaswap_router.json +973 -0
- web3_wizzard_lib/resources/abi/maverick_ipool.json +942 -0
- web3_wizzard_lib/resources/abi/maverick_multicall.json +1082 -0
- web3_wizzard_lib/resources/abi/mendi_token.json +1690 -0
- web3_wizzard_lib/resources/abi/merkly.json +787 -0
- web3_wizzard_lib/resources/abi/micro3.json +1054 -0
- web3_wizzard_lib/resources/abi/mute_router.json +856 -0
- web3_wizzard_lib/resources/abi/new_rage_abi.json +1944 -0
- web3_wizzard_lib/resources/abi/nidus.json +1017 -0
- web3_wizzard_lib/resources/abi/nile_pool.json +1313 -0
- web3_wizzard_lib/resources/abi/nomis.json +1601 -0
- web3_wizzard_lib/resources/abi/nomis_attest.json +710 -0
- web3_wizzard_lib/resources/abi/octomos.json +408 -0
- web3_wizzard_lib/resources/abi/omnisea.json +175 -0
- web3_wizzard_lib/resources/abi/orbiter_starknet.json +48 -0
- web3_wizzard_lib/resources/abi/pancake/factory.json +450 -0
- web3_wizzard_lib/resources/abi/pancake/pool.json +713 -0
- web3_wizzard_lib/resources/abi/pancake/quoter.json +285 -0
- web3_wizzard_lib/resources/abi/pancake/router.json +1271 -0
- web3_wizzard_lib/resources/abi/rage_claim.json +218 -0
- web3_wizzard_lib/resources/abi/reactor_fusion.json +1479 -0
- web3_wizzard_lib/resources/abi/readon.json +71 -0
- web3_wizzard_lib/resources/abi/rubyscore.json +698 -0
- web3_wizzard_lib/resources/abi/satoshi_universe.json +301 -0
- web3_wizzard_lib/resources/abi/scroll_bridge.json +666 -0
- web3_wizzard_lib/resources/abi/scroll_canvas_mint.json +602 -0
- web3_wizzard_lib/resources/abi/scroll_oracle.json +714 -0
- web3_wizzard_lib/resources/abi/snap.json +622 -0
- web3_wizzard_lib/resources/abi/socialscan.json +884 -0
- web3_wizzard_lib/resources/abi/stargate_farming.json +494 -0
- web3_wizzard_lib/resources/abi/stargate_router.json +1341 -0
- web3_wizzard_lib/resources/abi/stargate_swapETH_abi.json +106 -0
- web3_wizzard_lib/resources/abi/stargate_token_pool.json +1940 -0
- web3_wizzard_lib/resources/abi/stargate_v2.json +1936 -0
- web3_wizzard_lib/resources/abi/syncswap_classic_pool.json +151 -0
- web3_wizzard_lib/resources/abi/syncswap_classic_pool_factory.json +151 -0
- web3_wizzard_lib/resources/abi/syncswap_pool.json +924 -0
- web3_wizzard_lib/resources/abi/syncswap_router.json +1178 -0
- web3_wizzard_lib/resources/abi/syncswap_stable_pool.json +950 -0
- web3_wizzard_lib/resources/abi/tavaera.json +586 -0
- web3_wizzard_lib/resources/abi/tavaera_id.json +724 -0
- web3_wizzard_lib/resources/abi/townstory.json +391 -0
- web3_wizzard_lib/resources/abi/townstory_bonus.json +279 -0
- web3_wizzard_lib/resources/abi/uniswap_abi.json +193 -0
- web3_wizzard_lib/resources/abi/velocore.json +1008 -0
- web3_wizzard_lib/resources/abi/velocore_lens.json +1030 -0
- web3_wizzard_lib/resources/abi/velocore_pool.json +490 -0
- web3_wizzard_lib/resources/abi/velocore_vault.json +1272 -0
- web3_wizzard_lib/resources/abi/weth.json +279 -0
- web3_wizzard_lib/resources/abi/woofi.json +400 -0
- web3_wizzard_lib/resources/abi/yoddlo.json +67 -0
- web3_wizzard_lib/resources/abi/zebra.json +1075 -0
- web3_wizzard_lib/resources/abi/zerolend.json +282 -0
- web3_wizzard_lib/resources/abi/zerolend_liquidity.json +1038 -0
- web3_wizzard_lib/resources/abi/zkdx_data.json +436 -0
- web3_wizzard_lib/resources/abi/zks.json +671 -0
- web3_wizzard_lib/resources/banner.txt +7 -0
- web3_wizzard_lib/resources/goerli/contracts.json +48 -0
- web3_wizzard_lib/resources/goerli/networks.json +139 -0
- web3_wizzard_lib/resources/goerli/pairs.json +113 -0
- web3_wizzard_lib/resources/goerli/tokens.json +40 -0
- web3_wizzard_lib/resources/local/contracts.json +150 -0
- web3_wizzard_lib/resources/local/networks.json +119 -0
- web3_wizzard_lib/resources/local/pairs.json +451 -0
- web3_wizzard_lib/resources/local/tokens.json +88 -0
- web3_wizzard_lib/resources/main/contracts.json +231 -0
- web3_wizzard_lib/resources/main/networks.json +272 -0
- web3_wizzard_lib/resources/main/pairs.json +516 -0
- web3_wizzard_lib/resources/main/tokens.json +119 -0
- web3_wizzard_lib/resources/verify_data.json +1243 -0
- web3_wizzard_lib-1.6.12.dist-info/METADATA +10 -0
- web3_wizzard_lib-1.6.12.dist-info/RECORD +107 -0
- web3_wizzard_lib-1.6.12.dist-info/top_level.txt +1 -0
- web3_wizzard_lib/core/__init__.py +0 -1
- web3_wizzard_lib/core/contract/__init__.py +0 -0
- web3_wizzard_lib/core/contract/aavecontract.py +0 -36
- web3_wizzard_lib/core/contract/alienswap_contract.py +0 -21
- web3_wizzard_lib/core/contract/arena_games_contract.py +0 -16
- web3_wizzard_lib/core/contract/basiliskcontract.py +0 -58
- web3_wizzard_lib/core/contract/bilinear_contract.py +0 -22
- web3_wizzard_lib/core/contract/bungee.py +0 -33
- web3_wizzard_lib/core/contract/coredao_contract.py +0 -34
- web3_wizzard_lib/core/contract/coredao_from_contract.py +0 -40
- web3_wizzard_lib/core/contract/dmail_send_mail.py +0 -18
- web3_wizzard_lib/core/contract/empty_nft.py +0 -18
- web3_wizzard_lib/core/contract/era_name.py +0 -23
- web3_wizzard_lib/core/contract/eralendcontract.py +0 -34
- web3_wizzard_lib/core/contract/eth_scroll_bridge_contract.py +0 -25
- web3_wizzard_lib/core/contract/frog_war_contract.py +0 -48
- web3_wizzard_lib/core/contract/gmx_reward_router.py +0 -22
- web3_wizzard_lib/core/contract/horizondex_quoter.py +0 -14
- web3_wizzard_lib/core/contract/horizondex_router.py +0 -91
- web3_wizzard_lib/core/contract/imagine_contract.py +0 -18
- web3_wizzard_lib/core/contract/izumi.py +0 -63
- web3_wizzard_lib/core/contract/kreatorland_contract.py +0 -21
- web3_wizzard_lib/core/contract/l0_claim.py +0 -254
- web3_wizzard_lib/core/contract/l2_telegraph.py +0 -21
- web3_wizzard_lib/core/contract/layerbank_price.py +0 -18
- web3_wizzard_lib/core/contract/layerbank_token.py +0 -29
- web3_wizzard_lib/core/contract/layerbankcontract.py +0 -59
- web3_wizzard_lib/core/contract/linea_day_2_contract.py +0 -19
- web3_wizzard_lib/core/contract/linea_day_3_contract.py +0 -55
- web3_wizzard_lib/core/contract/linea_ens_names_contract.py +0 -55
- web3_wizzard_lib/core/contract/lineaswaprouter.py +0 -52
- web3_wizzard_lib/core/contract/maverick_multicall.py +0 -52
- web3_wizzard_lib/core/contract/mendi_finance_contract.py +0 -11
- web3_wizzard_lib/core/contract/mendi_token.py +0 -25
- web3_wizzard_lib/core/contract/merkly_minter.py +0 -47
- web3_wizzard_lib/core/contract/micro3_contract.py +0 -18
- web3_wizzard_lib/core/contract/mute_router.py +0 -93
- web3_wizzard_lib/core/contract/new_rage_contract.py +0 -31
- web3_wizzard_lib/core/contract/nidum_contract.py +0 -44
- web3_wizzard_lib/core/contract/nile_contract.py +0 -60
- web3_wizzard_lib/core/contract/nomis_attest_contract.py +0 -40
- web3_wizzard_lib/core/contract/nomis_contract.py +0 -40
- web3_wizzard_lib/core/contract/octomos.py +0 -31
- web3_wizzard_lib/core/contract/odos.py +0 -104
- web3_wizzard_lib/core/contract/omnisea.py +0 -29
- web3_wizzard_lib/core/contract/orbiter_starknet.py +0 -30
- web3_wizzard_lib/core/contract/pancake_pool.py +0 -19
- web3_wizzard_lib/core/contract/pancake_quoter.py +0 -20
- web3_wizzard_lib/core/contract/pancake_router.py +0 -72
- web3_wizzard_lib/core/contract/rage_claim.py +0 -24
- web3_wizzard_lib/core/contract/reactor_fusion_contract.py +0 -78
- web3_wizzard_lib/core/contract/readon_contract.py +0 -19
- web3_wizzard_lib/core/contract/rubyscore_contract.py +0 -31
- web3_wizzard_lib/core/contract/satoshi_universe_contract.py +0 -29
- web3_wizzard_lib/core/contract/scroll_bridge_contract.py +0 -24
- web3_wizzard_lib/core/contract/scroll_canvas_mint_contract.py +0 -26
- web3_wizzard_lib/core/contract/scroll_oracle.py +0 -11
- web3_wizzard_lib/core/contract/snap_contract.py +0 -16
- web3_wizzard_lib/core/contract/social_scan_contract.py +0 -20
- web3_wizzard_lib/core/contract/stargate_farming.py +0 -37
- web3_wizzard_lib/core/contract/stargate_router.py +0 -84
- web3_wizzard_lib/core/contract/stargate_router_eth.py +0 -41
- web3_wizzard_lib/core/contract/stargate_token_pool.py +0 -45
- web3_wizzard_lib/core/contract/stargate_v2_contract.py +0 -36
- web3_wizzard_lib/core/contract/syncswap_classic_pool.py +0 -15
- web3_wizzard_lib/core/contract/syncswap_classic_pool_factory.py +0 -15
- web3_wizzard_lib/core/contract/syncswap_pool.py +0 -25
- web3_wizzard_lib/core/contract/syncswap_router.py +0 -123
- web3_wizzard_lib/core/contract/tavaera_id.py +0 -18
- web3_wizzard_lib/core/contract/tavaera_mint.py +0 -17
- web3_wizzard_lib/core/contract/townstory_bonus_contract.py +0 -19
- web3_wizzard_lib/core/contract/townstory_contract.py +0 -21
- web3_wizzard_lib/core/contract/velocore_lens.py +0 -44
- web3_wizzard_lib/core/contract/velocore_pool.py +0 -198
- web3_wizzard_lib/core/contract/velocore_router.py +0 -80
- web3_wizzard_lib/core/contract/woofi_swap.py +0 -29
- web3_wizzard_lib/core/contract/xy_finance_contract.py +0 -87
- web3_wizzard_lib/core/contract/yoddlo_contract.py +0 -19
- web3_wizzard_lib/core/contract/yuliverse_contract.py +0 -36
- web3_wizzard_lib/core/contract/zebra_contract.py +0 -68
- web3_wizzard_lib/core/contract/zerolend_contract.py +0 -34
- web3_wizzard_lib/core/contract/zerolend_liq_contract.py +0 -20
- web3_wizzard_lib/core/contract/zkdx_contract.py +0 -40
- web3_wizzard_lib/core/contract/zkdx_data.py +0 -14
- web3_wizzard_lib/core/contract/zks.py +0 -24
- web3_wizzard_lib/core/modules/__init__.py +0 -0
- web3_wizzard_lib/core/modules/ads_import_proxy.py +0 -52
- web3_wizzard_lib/core/modules/airdrop_printer.py +0 -81
- web3_wizzard_lib/core/modules/bank/__init__.py +0 -0
- web3_wizzard_lib/core/modules/bank/aave.py +0 -25
- web3_wizzard_lib/core/modules/bank/bank.py +0 -15
- web3_wizzard_lib/core/modules/bank/basilisk.py +0 -25
- web3_wizzard_lib/core/modules/bank/eralend.py +0 -25
- web3_wizzard_lib/core/modules/bank/layerbank.py +0 -116
- web3_wizzard_lib/core/modules/bank/mendi_finance.py +0 -57
- web3_wizzard_lib/core/modules/bank/reactorfusion.py +0 -25
- web3_wizzard_lib/core/modules/bank/zerolend.py +0 -36
- web3_wizzard_lib/core/modules/bank_module.py +0 -99
- web3_wizzard_lib/core/modules/bridge/__init__.py +0 -0
- web3_wizzard_lib/core/modules/bridge/bridge.py +0 -8
- web3_wizzard_lib/core/modules/bridge/coredao_bridge_sub.py +0 -47
- web3_wizzard_lib/core/modules/bridge/orbiter_sub.py +0 -112
- web3_wizzard_lib/core/modules/bridge/scroll_bridge_sub.py +0 -42
- web3_wizzard_lib/core/modules/bridge/stargate_v2_sub.py +0 -74
- web3_wizzard_lib/core/modules/bridge_module.py +0 -47
- web3_wizzard_lib/core/modules/bungee.py +0 -109
- web3_wizzard_lib/core/modules/cex_sender.py +0 -60
- web3_wizzard_lib/core/modules/cex_subaccount_transfer.py +0 -34
- web3_wizzard_lib/core/modules/cex_withdraw.py +0 -91
- web3_wizzard_lib/core/modules/claimer.py +0 -45
- web3_wizzard_lib/core/modules/claims/__init__.py +0 -0
- web3_wizzard_lib/core/modules/claims/layerzero_claimer.py +0 -64
- web3_wizzard_lib/core/modules/claims/rabby_claimer.py +0 -81
- web3_wizzard_lib/core/modules/concrete_swap.py +0 -108
- web3_wizzard_lib/core/modules/coredao_bridge.py +0 -32
- web3_wizzard_lib/core/modules/coredao_bridge_auto.py +0 -39
- web3_wizzard_lib/core/modules/debank_checker.py +0 -78
- web3_wizzard_lib/core/modules/dmail.py +0 -54
- web3_wizzard_lib/core/modules/erc20_balance.py +0 -42
- web3_wizzard_lib/core/modules/gmx_reward.py +0 -25
- web3_wizzard_lib/core/modules/intract/__init__.py +0 -0
- web3_wizzard_lib/core/modules/intract/intract_api.py +0 -212
- web3_wizzard_lib/core/modules/intract/utils.py +0 -81
- web3_wizzard_lib/core/modules/intract_claim.py +0 -101
- web3_wizzard_lib/core/modules/layer_2_20.py +0 -65
- web3_wizzard_lib/core/modules/lending_module.py +0 -134
- web3_wizzard_lib/core/modules/linea_appeal.py +0 -98
- web3_wizzard_lib/core/modules/linea_poh_lxp.py +0 -65
- web3_wizzard_lib/core/modules/liquidity/__init__.py +0 -0
- web3_wizzard_lib/core/modules/liquidity/nile_pool.py +0 -64
- web3_wizzard_lib/core/modules/liquidity/pool.py +0 -16
- web3_wizzard_lib/core/modules/liquidity/syncswap_pool.py +0 -61
- web3_wizzard_lib/core/modules/liquidity/velocore_pool.py +0 -55
- web3_wizzard_lib/core/modules/liquidity/zerolend_liquidity.py +0 -26
- web3_wizzard_lib/core/modules/liquidity_pool.py +0 -60
- web3_wizzard_lib/core/modules/merkly_refuel.py +0 -87
- web3_wizzard_lib/core/modules/new_rage_withdraw.py +0 -41
- web3_wizzard_lib/core/modules/nft/__init__.py +0 -0
- web3_wizzard_lib/core/modules/nft/abbys_world.py +0 -22
- web3_wizzard_lib/core/modules/nft/acg_worlds.py +0 -25
- web3_wizzard_lib/core/modules/nft/alienswap_linea.py +0 -22
- web3_wizzard_lib/core/modules/nft/arena_games.py +0 -22
- web3_wizzard_lib/core/modules/nft/asmatch.py +0 -22
- web3_wizzard_lib/core/modules/nft/battlemon.py +0 -25
- web3_wizzard_lib/core/modules/nft/bilinear.py +0 -22
- web3_wizzard_lib/core/modules/nft/bitavatar.py +0 -25
- web3_wizzard_lib/core/modules/nft/culture_satoshi_universe.py +0 -24
- web3_wizzard_lib/core/modules/nft/efrogs.py +0 -26
- web3_wizzard_lib/core/modules/nft/empty_nft.py +0 -22
- web3_wizzard_lib/core/modules/nft/era_domain.py +0 -42
- web3_wizzard_lib/core/modules/nft/frog_war.py +0 -22
- web3_wizzard_lib/core/modules/nft/frog_war_bonus.py +0 -22
- web3_wizzard_lib/core/modules/nft/gamerboom.py +0 -25
- web3_wizzard_lib/core/modules/nft/gamerboom_bonus.py +0 -26
- web3_wizzard_lib/core/modules/nft/imagine.py +0 -32
- web3_wizzard_lib/core/modules/nft/kreatorland_module.py +0 -35
- web3_wizzard_lib/core/modules/nft/l2_telegraph_module.py +0 -22
- web3_wizzard_lib/core/modules/nft/layer3_meta.py +0 -25
- web3_wizzard_lib/core/modules/nft/linea_culture_2_2_linus.py +0 -24
- web3_wizzard_lib/core/modules/nft/linea_culture_2_3_yooldo.py +0 -24
- web3_wizzard_lib/core/modules/nft/linea_culture_2_4_frogwar.py +0 -24
- web3_wizzard_lib/core/modules/nft/linea_culture_2_5_acg.py +0 -25
- web3_wizzard_lib/core/modules/nft/linea_culture_2_6_ascend_the_end.py +0 -25
- web3_wizzard_lib/core/modules/nft/linea_culture_3_1_ascend_the_end.py +0 -25
- web3_wizzard_lib/core/modules/nft/linea_culture_3_2_sending_me.py +0 -25
- web3_wizzard_lib/core/modules/nft/linea_culture_3_3_townstory.py +0 -25
- web3_wizzard_lib/core/modules/nft/linea_culture_3_4_daniele.py +0 -25
- web3_wizzard_lib/core/modules/nft/linea_culture_3_5_demmortal.py +0 -25
- web3_wizzard_lib/core/modules/nft/linea_culture_3_6_foxy.py +0 -25
- web3_wizzard_lib/core/modules/nft/linea_culture_4_1_coop_records.py +0 -60
- web3_wizzard_lib/core/modules/nft/linea_culture_4_2_borja_moskv.py +0 -65
- web3_wizzard_lib/core/modules/nft/linea_culture_4_2_borja_moskv_approve.py +0 -27
- web3_wizzard_lib/core/modules/nft/linea_culture_4_3_fruit.py +0 -66
- web3_wizzard_lib/core/modules/nft/linea_culture_4_4_fruit_crux.py +0 -67
- web3_wizzard_lib/core/modules/nft/linea_culture_4_5_forbidden_fruit.py +0 -67
- web3_wizzard_lib/core/modules/nft/linea_culture_4_6_laurent.py +0 -67
- web3_wizzard_lib/core/modules/nft/linea_culture_day2.py +0 -20
- web3_wizzard_lib/core/modules/nft/linea_culture_day3.py +0 -20
- web3_wizzard_lib/core/modules/nft/linea_ens_names.py +0 -107
- web3_wizzard_lib/core/modules/nft/lucky_cat.py +0 -25
- web3_wizzard_lib/core/modules/nft/merkly_minter_module.py +0 -22
- web3_wizzard_lib/core/modules/nft/micro3.py +0 -23
- web3_wizzard_lib/core/modules/nft/mint_2048.py +0 -28
- web3_wizzard_lib/core/modules/nft/nft_submodule.py +0 -16
- web3_wizzard_lib/core/modules/nft/nidum.py +0 -87
- web3_wizzard_lib/core/modules/nft/nidum_bonus.py +0 -23
- web3_wizzard_lib/core/modules/nft/nomis.py +0 -64
- web3_wizzard_lib/core/modules/nft/nomis_attest.py +0 -66
- web3_wizzard_lib/core/modules/nft/nouns.py +0 -27
- web3_wizzard_lib/core/modules/nft/octomos.py +0 -32
- web3_wizzard_lib/core/modules/nft/omnisea.py +0 -33
- web3_wizzard_lib/core/modules/nft/omnizone.py +0 -25
- web3_wizzard_lib/core/modules/nft/orbiter_claim.py +0 -87
- web3_wizzard_lib/core/modules/nft/readon.py +0 -30
- web3_wizzard_lib/core/modules/nft/rubyscore.py +0 -45
- web3_wizzard_lib/core/modules/nft/sarubol.py +0 -22
- web3_wizzard_lib/core/modules/nft/satoshi_universe.py +0 -22
- web3_wizzard_lib/core/modules/nft/scroll_canvas_attest_year_badge.py +0 -35
- web3_wizzard_lib/core/modules/nft/scroll_canvas_mint.py +0 -51
- web3_wizzard_lib/core/modules/nft/sign.py +0 -32
- web3_wizzard_lib/core/modules/nft/snap.py +0 -25
- web3_wizzard_lib/core/modules/nft/snap_bonus.py +0 -31
- web3_wizzard_lib/core/modules/nft/social_scan.py +0 -22
- web3_wizzard_lib/core/modules/nft/tavaera.py +0 -30
- web3_wizzard_lib/core/modules/nft/townstory.py +0 -75
- web3_wizzard_lib/core/modules/nft/townstory_bonus.py +0 -45
- web3_wizzard_lib/core/modules/nft/trusta_reputation.py +0 -48
- web3_wizzard_lib/core/modules/nft/trustaa_poh.py +0 -49
- web3_wizzard_lib/core/modules/nft/uber_poh.py +0 -24
- web3_wizzard_lib/core/modules/nft/wizards_of_linea.py +0 -26
- web3_wizzard_lib/core/modules/nft/yoddlo.py +0 -22
- web3_wizzard_lib/core/modules/nft/yuliverse.py +0 -22
- web3_wizzard_lib/core/modules/nft/zace.py +0 -25
- web3_wizzard_lib/core/modules/nft/zks_domain.py +0 -41
- web3_wizzard_lib/core/modules/nft_minter.py +0 -107
- web3_wizzard_lib/core/modules/orbiter.py +0 -39
- web3_wizzard_lib/core/modules/orbiter_checker.py +0 -26
- web3_wizzard_lib/core/modules/rage.py +0 -54
- web3_wizzard_lib/core/modules/scroll_bridge.py +0 -45
- web3_wizzard_lib/core/modules/sell_all.py +0 -51
- web3_wizzard_lib/core/modules/sleep_module.py +0 -25
- web3_wizzard_lib/core/modules/smart_contract_deployment.py +0 -37
- web3_wizzard_lib/core/modules/stargate/__init__.py +0 -0
- web3_wizzard_lib/core/modules/stargate/auto_bridge.py +0 -91
- web3_wizzard_lib/core/modules/stargate/bridge.py +0 -38
- web3_wizzard_lib/core/modules/stargate/bridge_eth.py +0 -59
- web3_wizzard_lib/core/modules/stargate/bridge_tokens.py +0 -48
- web3_wizzard_lib/core/modules/stargate/classic_bridge.py +0 -34
- web3_wizzard_lib/core/modules/stargate/farming.py +0 -163
- web3_wizzard_lib/core/modules/stargate/l0_data.py +0 -10
- web3_wizzard_lib/core/modules/stargate/pool.py +0 -74
- web3_wizzard_lib/core/modules/stargate/stargate_balance_utils.py +0 -25
- web3_wizzard_lib/core/modules/stargate/stargate_gas_checker.py +0 -68
- web3_wizzard_lib/core/modules/swap/__init__.py +0 -1
- web3_wizzard_lib/core/modules/swap/horizondex.py +0 -38
- web3_wizzard_lib/core/modules/swap/izumi.py +0 -41
- web3_wizzard_lib/core/modules/swap/lineaswap.py +0 -34
- web3_wizzard_lib/core/modules/swap/maverick.py +0 -66
- web3_wizzard_lib/core/modules/swap/mute.py +0 -39
- web3_wizzard_lib/core/modules/swap/odos.py +0 -58
- web3_wizzard_lib/core/modules/swap/one_inch.py +0 -58
- web3_wizzard_lib/core/modules/swap/pancake.py +0 -41
- web3_wizzard_lib/core/modules/swap/swap_list.py +0 -11
- web3_wizzard_lib/core/modules/swap/syncswap.py +0 -62
- web3_wizzard_lib/core/modules/swap/velocore.py +0 -40
- web3_wizzard_lib/core/modules/swap/woofi.py +0 -38
- web3_wizzard_lib/core/modules/swap/xy_finance.py +0 -43
- web3_wizzard_lib/core/modules/swap/zebra.py +0 -32
- web3_wizzard_lib/core/modules/warm_up.py +0 -98
- web3_wizzard_lib/core/modules/wrapping.py +0 -74
- web3_wizzard_lib/core/modules/zkdx.py +0 -63
- web3_wizzard_lib/core/utils/__init__.py +0 -0
- web3_wizzard_lib/core/utils/ai_utils.py +0 -45
- web3_wizzard_lib/core/utils/benchmark_utils.py +0 -12
- web3_wizzard_lib/core/utils/module_memory.py +0 -28
- web3_wizzard_lib/core/utils/statistic_utils.py +0 -150
- web3_wizzard_lib/core/utils/sub_module.py +0 -8
- web3_wizzard_lib/data/__init__.py +0 -0
- web3_wizzard_lib/data/config_default.py +0 -52
- web3_wizzard_lib/data/module_config_default.py +0 -209
- web3_wizzard_lib/utils/__init__.py +0 -0
- web3_wizzard_lib/utils/debank_utils.py +0 -19
- web3_wizzard_lib-1.6.10.data/data/requirements.txt +0 -1
- web3_wizzard_lib-1.6.10.dist-info/METADATA +0 -15
- web3_wizzard_lib-1.6.10.dist-info/RECORD +0 -271
- web3_wizzard_lib-1.6.10.dist-info/top_level.txt +0 -3
- /tests/__init__.py → /web3_wizzard_lib/resources/linea_appeal.txt +0 -0
- {web3_wizzard_lib-1.6.10.dist-info → web3_wizzard_lib-1.6.12.dist-info}/WHEEL +0 -0
@@ -1,58 +0,0 @@
|
|
1
|
-
import requests
|
2
|
-
from sybil_engine.contract.transaction_executor import evm_transaction
|
3
|
-
from sybil_engine.domain.dex import Dex
|
4
|
-
from sybil_engine.utils.gas_utils import l1_gas_price
|
5
|
-
from sybil_engine.utils.utils import randomized_sleeping, SwapException
|
6
|
-
from web3 import Web3
|
7
|
-
|
8
|
-
|
9
|
-
class OneInch(Dex):
|
10
|
-
dex_name = '1inch'
|
11
|
-
swap_contract = '1INCH'
|
12
|
-
supported_chains = ['BASE', 'ZKSYNC', 'OPTIMISM', 'ARBITRUM']
|
13
|
-
|
14
|
-
def __init__(self, chain_instance, web3):
|
15
|
-
super().__init__(chain_instance, web3)
|
16
|
-
self.weth_address = self.tokens['WETH']
|
17
|
-
self.base_url = 'https://api.1inch.dev/swap'
|
18
|
-
self.inch_version = 5.2
|
19
|
-
|
20
|
-
@l1_gas_price
|
21
|
-
def swap(self, amount_to_swap, from_token, to_token, slippage, account):
|
22
|
-
if amount_to_swap.wei == 0:
|
23
|
-
raise SwapException(f"Can't swap 0 of {amount_to_swap.token}")
|
24
|
-
|
25
|
-
self.get_txn(account, amount_to_swap, from_token, to_token)
|
26
|
-
|
27
|
-
def get_api_call_data(self, url):
|
28
|
-
response = requests.get(url, headers={'Authorization': "DuagMR3vHpYc9JBNqM0Wx9mSWA7VzwuH"})
|
29
|
-
|
30
|
-
return response.json()
|
31
|
-
|
32
|
-
@evm_transaction
|
33
|
-
def get_txn(self, account, amount_to_swap, from_token, to_token):
|
34
|
-
spender_json = self.get_api_call_data(
|
35
|
-
f'{self.base_url}/v{self.inch_version}/{self.web3.eth.chain_id}/approve/spender')
|
36
|
-
spender = Web3.to_checksum_address(spender_json['address'])
|
37
|
-
|
38
|
-
if from_token.symbol() != 'ETH' and from_token.allowance(account, spender) < amount_to_swap.wei:
|
39
|
-
from_token.approve(account, spender)
|
40
|
-
|
41
|
-
randomized_sleeping({'from': 1, 'to': 5})
|
42
|
-
|
43
|
-
_1inchurl = f"{self.base_url}/v{self.inch_version}/{self.web3.eth.chain_id}/swap?fromTokenAddress={from_token.address()}&toTokenAddress={to_token.address()}&amount={amount_to_swap.wei}&fromAddress={account.address}&slippage=5"
|
44
|
-
json_data = self.get_api_call_data(_1inchurl)
|
45
|
-
|
46
|
-
if json_data is False:
|
47
|
-
raise Exception(json_data['description'])
|
48
|
-
|
49
|
-
contract_txn = json_data['tx']
|
50
|
-
contract_txn['from'] = Web3.to_checksum_address(contract_txn['from'])
|
51
|
-
contract_txn['chainId'] = self.web3.eth.chain_id
|
52
|
-
contract_txn['nonce'] = self.web3.eth.get_transaction_count(account.address)
|
53
|
-
contract_txn['to'] = Web3.to_checksum_address(contract_txn['to'])
|
54
|
-
contract_txn['gasPrice'] = int(contract_txn['gasPrice'])
|
55
|
-
contract_txn['gas'] = int(contract_txn['gas'])
|
56
|
-
contract_txn['value'] = int(contract_txn['value'])
|
57
|
-
|
58
|
-
return contract_txn
|
@@ -1,41 +0,0 @@
|
|
1
|
-
from sybil_engine.domain.dex import Dex
|
2
|
-
|
3
|
-
from web3_wizzard_lib.core.contract.pancake_quoter import PancakeQuoter
|
4
|
-
from web3_wizzard_lib.core.contract.pancake_router import PancakeRouter
|
5
|
-
|
6
|
-
|
7
|
-
class Pancake(Dex):
|
8
|
-
dex_name = 'pancake'
|
9
|
-
swap_contract = "PANCAKE_ROUTER"
|
10
|
-
supported_chains = ['ZKSYNC', 'BASE', 'LINEA', 'ARBITRUM']
|
11
|
-
|
12
|
-
def __init__(self, chain_instance, web3):
|
13
|
-
super().__init__(chain_instance, web3)
|
14
|
-
self.weth_address = self.tokens['WETH']
|
15
|
-
self.pancake_router_contract = self.chain_contracts[self.swap_contract]
|
16
|
-
self.pancake_router = PancakeRouter(self.pancake_router_contract, self.web3)
|
17
|
-
|
18
|
-
def swap_native_for_token(self, account, amount_to_swap, slippage, to_token_address):
|
19
|
-
|
20
|
-
amount_out_min = int(self.get_amount_out_min(amount_to_swap, self.weth_address, to_token_address) * slippage)
|
21
|
-
args = [account, amount_to_swap, self.weth_address, to_token_address, amount_out_min]
|
22
|
-
func = self.pancake_router.swap_to_token
|
23
|
-
|
24
|
-
return args, func
|
25
|
-
|
26
|
-
def swap_token_for_native(self, account, amount_to_swap, from_token_address, slippage):
|
27
|
-
amount_out_min = int(
|
28
|
-
self.get_amount_out_min(amount_to_swap, from_token_address, self.weth_address) * slippage)
|
29
|
-
|
30
|
-
args = [account, amount_to_swap, from_token_address, self.weth_address, amount_out_min]
|
31
|
-
func = self.pancake_router.swap_to_eth
|
32
|
-
return args, func
|
33
|
-
|
34
|
-
def swap_token_for_token(self, account, amount_to_swap, slippage, from_token_address, to_token_address):
|
35
|
-
raise Exception('Not supported')
|
36
|
-
|
37
|
-
def get_amount_out_min(self, amount_to_swap, from_token_address, to_token_address):
|
38
|
-
pancake_quoter_contract = self.chain_contracts["PANCAKE_QUOTER"]
|
39
|
-
pancake_quoter = PancakeQuoter(pancake_quoter_contract, self.web3)
|
40
|
-
|
41
|
-
return pancake_quoter.quote_exact_input_single(from_token_address, to_token_address, amount_to_swap.wei)
|
@@ -1,11 +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
|
-
import web3_wizzard_lib.core.modules.swap
|
6
|
-
|
7
|
-
def get_swap_classes():
|
8
|
-
import_all_modules_in_directory("web3_wizzard_lib.core.modules.swap")
|
9
|
-
return get_all_subclasses(Dex)
|
10
|
-
|
11
|
-
swap_facade = SwapFacade(get_swap_classes())
|
@@ -1,62 +0,0 @@
|
|
1
|
-
from sybil_engine.domain.dex import Dex
|
2
|
-
|
3
|
-
from web3_wizzard_lib.core.contract.syncswap_classic_pool_factory import SyncSwapClassicPoolFactory
|
4
|
-
from web3_wizzard_lib.core.contract.syncswap_pool import SyncSwapPoolContract
|
5
|
-
from web3_wizzard_lib.core.contract.syncswap_router import SyncSwapRouter
|
6
|
-
|
7
|
-
|
8
|
-
class Syncswap(Dex):
|
9
|
-
dex_name = 'syncswap'
|
10
|
-
swap_contract = 'SYNCSWAP'
|
11
|
-
supported_chains = ['ZKSYNC', 'LINEA', 'SCROLL']
|
12
|
-
|
13
|
-
def __init__(self, chain_instance, web3):
|
14
|
-
super().__init__(chain_instance, web3)
|
15
|
-
self.weth_address = self.tokens['WETH']
|
16
|
-
self.pool_classic_pool_factory_address = self.chain_contracts['SYNCSWAP_CLASSIC_POOL_FACTORY']
|
17
|
-
self.syncswap_contract_address = self.chain_contracts[self.swap_contract]
|
18
|
-
self.syncswap_router = SyncSwapRouter(self.syncswap_contract_address, self.web3)
|
19
|
-
|
20
|
-
def swap_native_for_token(self, account, amount_to_swap, slippage, to_token_address):
|
21
|
-
token_in_data_address = self.weth_address
|
22
|
-
token_in_address = self.tokens['ZERO_ADDRESS']
|
23
|
-
|
24
|
-
amount_out_min = int(
|
25
|
-
self.get_amount_out_min(account, amount_to_swap, token_in_data_address, to_token_address) * slippage
|
26
|
-
)
|
27
|
-
|
28
|
-
args = [
|
29
|
-
account,
|
30
|
-
amount_to_swap,
|
31
|
-
self.weth_address,
|
32
|
-
token_in_address,
|
33
|
-
self.get_pool_address(token_in_data_address, to_token_address),
|
34
|
-
amount_out_min
|
35
|
-
]
|
36
|
-
|
37
|
-
return args, self.syncswap_router.swap
|
38
|
-
|
39
|
-
def swap_token_for_native(self, account, amount_to_swap, from_token_address, slippage):
|
40
|
-
token_in_data_address = self.tokens[amount_to_swap.token]
|
41
|
-
token_in_address = self.tokens[amount_to_swap.token]
|
42
|
-
|
43
|
-
amount_out_min = int(
|
44
|
-
self.get_amount_out_min(account, amount_to_swap, token_in_data_address, self.weth_address) * slippage)
|
45
|
-
|
46
|
-
args = [account, amount_to_swap, token_in_address, token_in_data_address, self.get_pool_address(token_in_data_address, self.weth_address), amount_out_min]
|
47
|
-
|
48
|
-
return args, self.syncswap_router.swap
|
49
|
-
|
50
|
-
def get_amount_out_min(self, account, amount_to_swap, token_in_data_address, to_token_address):
|
51
|
-
pool_address = self.get_pool_address(token_in_data_address, to_token_address)
|
52
|
-
|
53
|
-
if isinstance(pool_address, str):
|
54
|
-
syncswap_pool = SyncSwapPoolContract(pool_address, self.web3)
|
55
|
-
else:
|
56
|
-
syncswap_pool = SyncSwapPoolContract(list(pool_address.items())[0][1], self.web3)
|
57
|
-
|
58
|
-
return syncswap_pool.get_amount_out(account, amount_to_swap, token_in_data_address)
|
59
|
-
|
60
|
-
def get_pool_address(self, token_in_data_address, to_token_address):
|
61
|
-
pool_factory = SyncSwapClassicPoolFactory(self.pool_classic_pool_factory_address, self.web3)
|
62
|
-
return pool_factory.get_pool(token_in_data_address, to_token_address)
|
@@ -1,40 +0,0 @@
|
|
1
|
-
from sybil_engine.domain.dex import Dex
|
2
|
-
|
3
|
-
from web3_wizzard_lib.core.contract.velocore_router import VelocoreRouter
|
4
|
-
|
5
|
-
|
6
|
-
class Velocore(Dex):
|
7
|
-
dex_name = 'velocore'
|
8
|
-
swap_contract = "VELOCORE_ROUTER"
|
9
|
-
supported_chains = ['ZKSYNC']
|
10
|
-
|
11
|
-
def __init__(self, chain_instance, web3):
|
12
|
-
super().__init__(chain_instance, web3)
|
13
|
-
self.weth_address = self.tokens['WETH']
|
14
|
-
self.velocore_router = VelocoreRouter(self.chain_contracts[self.swap_contract], self.web3)
|
15
|
-
|
16
|
-
def swap_native_for_token(self, account, amount_to_swap, slippage, to_token_address):
|
17
|
-
amount_out_min = int(self.get_amount_out_min(amount_to_swap, self.weth_address, to_token_address) * slippage)
|
18
|
-
|
19
|
-
args = [account, amount_to_swap, self.weth_address, to_token_address, amount_out_min]
|
20
|
-
func = self.velocore_router.swap_exact_eth_for_tokens
|
21
|
-
|
22
|
-
return args, func
|
23
|
-
|
24
|
-
def get_amount_out_min(self, amount_to_swap, from_token_address, to_token_address):
|
25
|
-
return self.velocore_router.get_amount_out(amount_to_swap, from_token_address, to_token_address)
|
26
|
-
|
27
|
-
def swap_token_for_native(self, account, amount_to_swap, from_token_address, slippage):
|
28
|
-
amount_out_min = int(self.get_amount_out_min(amount_to_swap, from_token_address, self.weth_address) * slippage)
|
29
|
-
|
30
|
-
args = [account, amount_to_swap, from_token_address, self.weth_address, amount_out_min]
|
31
|
-
func = self.velocore_router.swap_exact_tokens_for_eth
|
32
|
-
return args, func
|
33
|
-
|
34
|
-
def swap_token_for_token(self, account, amount_to_swap, slippage, from_token_address, to_token_address):
|
35
|
-
amount_out_min = int(self.get_amount_out_min(amount_to_swap, from_token_address, to_token_address) * slippage)
|
36
|
-
|
37
|
-
args = [account, amount_to_swap, from_token_address, to_token_address, amount_out_min]
|
38
|
-
func = self.velocore_router.swap_exact_tokens_for_tokens
|
39
|
-
|
40
|
-
return args, func
|
@@ -1,38 +0,0 @@
|
|
1
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
2
|
-
from sybil_engine.domain.dex import Dex
|
3
|
-
from sybil_engine.utils.gas_utils import l1_gas_price
|
4
|
-
from sybil_engine.utils.utils import AccountException
|
5
|
-
|
6
|
-
from web3_wizzard_lib.core.contract.woofi_swap import WoofiSwap
|
7
|
-
|
8
|
-
|
9
|
-
class Woofi(Dex):
|
10
|
-
dex_name = 'woofi'
|
11
|
-
swap_contract = 'WOOFI'
|
12
|
-
supported_chains = ['ZKSYNC', 'BASE', 'LINEA', 'ARBITRUM']
|
13
|
-
|
14
|
-
def __init__(self, chain_instance, web3):
|
15
|
-
super().__init__(chain_instance, web3)
|
16
|
-
self.contract_address = self.chain_contracts[self.swap_contract]
|
17
|
-
self.woofi_swap = WoofiSwap(self.contract_address, self.web3)
|
18
|
-
|
19
|
-
@l1_gas_price
|
20
|
-
def swap(self, amount_to_swap, from_token, to_token, slippage, account):
|
21
|
-
if amount_to_swap.wei == 0:
|
22
|
-
raise AccountException(f"{amount_to_swap.token} balance is 0")
|
23
|
-
|
24
|
-
token_in_address = self.tokens[amount_to_swap.token]
|
25
|
-
token_out_address = self.tokens[to_token.token]
|
26
|
-
|
27
|
-
erc20_from_token = Erc20Token(self.chain_instance['chain'], amount_to_swap.token, self.web3)
|
28
|
-
|
29
|
-
if amount_to_swap.token != 'ETH':
|
30
|
-
if erc20_from_token.allowance(account, self.contract_address) < amount_to_swap.wei:
|
31
|
-
erc20_from_token.approve(account, self.contract_address)
|
32
|
-
|
33
|
-
amount_out_min = int(self.get_amount_out_min(amount_to_swap, token_in_address, token_out_address) * slippage)
|
34
|
-
|
35
|
-
self.woofi_swap.swap(account, amount_to_swap, token_in_address, token_out_address, amount_out_min)
|
36
|
-
|
37
|
-
def get_amount_out_min(self, amount_to_swap, token_in_address, token_out_address):
|
38
|
-
return self.woofi_swap.query_swap(token_in_address, token_out_address, amount_to_swap)
|
@@ -1,43 +0,0 @@
|
|
1
|
-
from loguru import logger
|
2
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
3
|
-
from sybil_engine.domain.dex import Dex
|
4
|
-
from sybil_engine.utils.gas_utils import l1_gas_price
|
5
|
-
from sybil_engine.utils.utils import AccountException
|
6
|
-
|
7
|
-
from web3_wizzard_lib.core.contract.xy_finance_contract import XYSwapContract
|
8
|
-
|
9
|
-
|
10
|
-
class XyFinance(Dex):
|
11
|
-
dex_name = 'xy.finance'
|
12
|
-
swap_contract = 'XY_FINANCE'
|
13
|
-
supported_chains = ['SCROLL']
|
14
|
-
|
15
|
-
def __init__(self, chain_instance, web3):
|
16
|
-
super().__init__(chain_instance, web3)
|
17
|
-
self.contract_address = self.chain_contracts[self.swap_contract]
|
18
|
-
self.xy_swap_contract = XYSwapContract(self.contract_address, self.web3)
|
19
|
-
|
20
|
-
@l1_gas_price
|
21
|
-
def swap(self, amount_to_swap, from_token, to_token, slippage, account):
|
22
|
-
if amount_to_swap.wei == 0:
|
23
|
-
raise AccountException(f"{amount_to_swap.token} balance is 0")
|
24
|
-
|
25
|
-
token_in_address = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" if from_token == "ETH" else self.tokens[from_token]
|
26
|
-
token_out_address = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" if to_token == "ETH" else self.tokens[to_token]
|
27
|
-
|
28
|
-
logger.info(f"Swap {amount_to_swap.log_line()}->{to_token} in {self.dex_name} ({self.chain_instance['chain']})")
|
29
|
-
|
30
|
-
erc20_from_token = Erc20Token(self.chain_instance['chain'], amount_to_swap.token, self.web3)
|
31
|
-
|
32
|
-
if amount_to_swap.token != 'ETH':
|
33
|
-
if erc20_from_token.allowance(account, self.contract_address) < amount_to_swap.wei:
|
34
|
-
erc20_from_token.approve(account, self.contract_address)
|
35
|
-
|
36
|
-
slippage = int((1 - slippage) * 100)
|
37
|
-
|
38
|
-
amount_out_min = self.get_amount_out_min(amount_to_swap, token_in_address, token_out_address, slippage)
|
39
|
-
|
40
|
-
self.xy_swap_contract.swap(account, amount_to_swap, token_in_address, token_out_address, amount_out_min, slippage)
|
41
|
-
|
42
|
-
def get_amount_out_min(self, amount_to_swap, token_in_address, token_out_address, slippage):
|
43
|
-
return self.xy_swap_contract.get_quote(token_in_address, token_out_address, amount_to_swap, slippage)
|
@@ -1,32 +0,0 @@
|
|
1
|
-
from sybil_engine.domain.dex import Dex
|
2
|
-
|
3
|
-
from web3_wizzard_lib.core.contract.zebra_contract import ZebraContract
|
4
|
-
|
5
|
-
|
6
|
-
class Zebra(Dex):
|
7
|
-
dex_name = 'zebra'
|
8
|
-
swap_contract = "ZEBRA"
|
9
|
-
supported_chains = ['SCROLL']
|
10
|
-
|
11
|
-
def __init__(self, chain_instance, web3):
|
12
|
-
super().__init__(chain_instance, web3)
|
13
|
-
self.weth_address = self.tokens['WETH']
|
14
|
-
zebra_contract = self.chain_contracts[self.swap_contract]
|
15
|
-
self.zebra = ZebraContract(zebra_contract, self.web3)
|
16
|
-
|
17
|
-
def swap_native_for_token(self, account, amount_to_swap, slippage, to_token_address):
|
18
|
-
amount_out_min = int(self.get_amount_out_min(amount_to_swap, self.tokens['ETH'], to_token_address) * slippage)
|
19
|
-
|
20
|
-
args = [account, amount_to_swap, self.tokens['ETH'], to_token_address, amount_out_min]
|
21
|
-
func = self.zebra.swap_to_token
|
22
|
-
return args, func
|
23
|
-
|
24
|
-
def swap_token_for_native(self, account, amount_to_swap, from_token_address, slippage):
|
25
|
-
amount_out_min = int(self.get_amount_out_min(amount_to_swap, from_token_address, self.weth_address) * slippage)
|
26
|
-
|
27
|
-
args = [account, amount_to_swap, from_token_address, self.tokens['ETH'], amount_out_min]
|
28
|
-
func = self.zebra.swap_to_eth
|
29
|
-
return args, func
|
30
|
-
|
31
|
-
def get_amount_out_min(self, amount_to_swap, from_token_address, to_token_address):
|
32
|
-
return self.zebra.get_min_amount_out(amount_to_swap, from_token_address, to_token_address)
|
@@ -1,98 +0,0 @@
|
|
1
|
-
import random
|
2
|
-
|
3
|
-
from loguru import logger
|
4
|
-
from sybil_engine.data.networks import get_chain_instance
|
5
|
-
from sybil_engine.data.pairs import Pairs
|
6
|
-
from sybil_engine.domain.balance.balance_utils import verify_balance, amount_to_swap_from_interval
|
7
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
8
|
-
from sybil_engine.module.module import Order, RepeatableModule
|
9
|
-
from sybil_engine.utils.utils import interval_to_int, randomized_sleeping, SwapException
|
10
|
-
from sybil_engine.utils.validation_utils import validate_amount_interval_possible_empty, validate_token, \
|
11
|
-
validate_interval, validate_dex_list
|
12
|
-
from sybil_engine.utils.web3_utils import init_web3
|
13
|
-
|
14
|
-
from web3_wizzard_lib.core.modules.swap.swap_list import swap_facade
|
15
|
-
|
16
|
-
|
17
|
-
class WarmUp(RepeatableModule):
|
18
|
-
module_name = 'WARMUP'
|
19
|
-
module_config = 'warmup_config'
|
20
|
-
allowed_chains = ['ZKSYNC', 'LINEA', 'BASE', 'SCROLL', 'ARBITRUM']
|
21
|
-
random_order = Order.RANDOM
|
22
|
-
repeat_conf = 'amount_of_warmups'
|
23
|
-
|
24
|
-
@RepeatableModule.repeatable_log
|
25
|
-
def execute(self, chain, swap_amount_interval, warm_token, amount_of_warmups, allowed_dex, pair_names: list,
|
26
|
-
sell_tokens, sleep_interval, account):
|
27
|
-
chain_instance = get_chain_instance(chain)
|
28
|
-
web3 = init_web3(chain_instance, account.proxy)
|
29
|
-
|
30
|
-
swap_amount = interval_to_int(amount_of_warmups)
|
31
|
-
|
32
|
-
if len(pair_names) > 0:
|
33
|
-
logger.info(f"Warmup pairs {pair_names}")
|
34
|
-
|
35
|
-
pair = Pairs(swap_facade)
|
36
|
-
|
37
|
-
pair_swaps = pair.get_warmup_pair_swaps(allowed_dex, chain, pair_names, swap_amount, warm_token)
|
38
|
-
random.shuffle(pair_swaps)
|
39
|
-
self._warm_up(chain_instance, pair_swaps, sell_tokens, sleep_interval, swap_amount_interval, account, web3)
|
40
|
-
|
41
|
-
def _warm_up(self, chain_instance, pair_swaps, sell_tokens, sleep_interval, swap_amount_interval, account, web3):
|
42
|
-
pair, swaps = random.choice(pair_swaps)
|
43
|
-
random.shuffle(swaps)
|
44
|
-
|
45
|
-
native_balance = verify_balance(self.min_native_balance, chain_instance, account, web3)
|
46
|
-
buy_dex, sell_dex = swaps[0], swaps[-1]
|
47
|
-
|
48
|
-
self._warm_up_pair(buy_dex, sell_dex, native_balance, swap_amount_interval, chain_instance, pair, sell_tokens,
|
49
|
-
sleep_interval, account, web3)
|
50
|
-
|
51
|
-
randomized_sleeping(sleep_interval)
|
52
|
-
|
53
|
-
def _warm_up_pair(self, buy_dex, sell_dex, native_balance, swap_amount_interval, chain_instance, pair, sell_tokens,
|
54
|
-
sleep_interval, account, web3):
|
55
|
-
warm_up_token = pair['tokens'][0]
|
56
|
-
token = pair['tokens'][1]
|
57
|
-
|
58
|
-
amount_to_swap = amount_to_swap_from_interval(account, chain_instance['chain'], self.min_native_balance,
|
59
|
-
native_balance, swap_amount_interval, warm_up_token, web3)
|
60
|
-
swap_facade.swap(account, amount_to_swap, chain_instance, pair, buy_dex, warm_up_token, token, web3)
|
61
|
-
randomized_sleeping(sleep_interval)
|
62
|
-
|
63
|
-
if sell_tokens:
|
64
|
-
try:
|
65
|
-
self.execute_sell(chain_instance, pair, sell_dex, account, web3)
|
66
|
-
except SwapException as e:
|
67
|
-
logger.error(e)
|
68
|
-
self.execute_sell(chain_instance, pair, buy_dex, account, web3)
|
69
|
-
|
70
|
-
def execute_sell(self, chain_instance, pair, sell_dex, account, web3):
|
71
|
-
amount_to_swap = Erc20Token(chain_instance['chain'], pair['tokens'][1], web3).balance(account)
|
72
|
-
swap_facade.swap(account, amount_to_swap, chain_instance, pair, sell_dex, amount_to_swap.token,
|
73
|
-
pair['tokens'][0], web3)
|
74
|
-
|
75
|
-
def parse_params(self, module_params):
|
76
|
-
self.validate_supported_chain(module_params['chain'])
|
77
|
-
validate_amount_interval_possible_empty(module_params["swap_amount_interval"])
|
78
|
-
validate_token(module_params["token"])
|
79
|
-
validate_interval(module_params["amount_of_warmups"])
|
80
|
-
validate_dex_list(module_params["allowed_dex"])
|
81
|
-
validate_interval(module_params["pair_sleep_interval"])
|
82
|
-
|
83
|
-
return (
|
84
|
-
module_params["chain"],
|
85
|
-
module_params["swap_amount_interval"],
|
86
|
-
module_params["token"],
|
87
|
-
module_params["amount_of_warmups"],
|
88
|
-
module_params["allowed_dex"],
|
89
|
-
module_params["warmup_pairs"],
|
90
|
-
module_params["sell_tokens"],
|
91
|
-
module_params["pair_sleep_interval"]
|
92
|
-
)
|
93
|
-
|
94
|
-
def log(self):
|
95
|
-
return "WARM UP"
|
96
|
-
|
97
|
-
def sleep_after(self):
|
98
|
-
return False
|
@@ -1,74 +0,0 @@
|
|
1
|
-
from loguru import logger
|
2
|
-
from sybil_engine.contract.weth import WETH
|
3
|
-
from sybil_engine.data.networks import get_chain_instance
|
4
|
-
from sybil_engine.data.tokens import get_tokens_for_chain
|
5
|
-
from sybil_engine.domain.balance.balance import NotEnoughNativeBalance
|
6
|
-
from sybil_engine.domain.balance.balance_utils import interval_to_eth_balance, verify_balance, interval_to_weth_balance
|
7
|
-
from sybil_engine.module.module import Module
|
8
|
-
from sybil_engine.utils.utils import ConfigurationException
|
9
|
-
from sybil_engine.utils.validation_utils import validate_amount_interval
|
10
|
-
from sybil_engine.utils.web3_utils import init_web3
|
11
|
-
|
12
|
-
|
13
|
-
class Wrapping(Module):
|
14
|
-
module_name = 'WRAPPING'
|
15
|
-
module_config = 'wrap_config'
|
16
|
-
allowed_chains = ['ZKSYNC', 'LINEA', 'BASE', 'SCROLL', 'ARBITRUM']
|
17
|
-
sleep_after_var = True
|
18
|
-
|
19
|
-
def execute(self, wrapping_chain, swap_amount_interval, action, account):
|
20
|
-
self.sleep_after_var = True
|
21
|
-
chain_instance = get_chain_instance(wrapping_chain)
|
22
|
-
web3 = init_web3(chain_instance, account.proxy)
|
23
|
-
|
24
|
-
weth_contract = get_tokens_for_chain(chain_instance['chain'])['WETH']
|
25
|
-
weth = WETH(weth_contract, web3)
|
26
|
-
|
27
|
-
if action == 'WRAP':
|
28
|
-
amount_to_wrap = interval_to_eth_balance(swap_amount_interval, account, chain_instance['chain'], web3)
|
29
|
-
|
30
|
-
logger.info(f"{action} {str(amount_to_wrap)}")
|
31
|
-
|
32
|
-
native_balance = verify_balance(self.min_native_balance, chain_instance, account, web3)
|
33
|
-
|
34
|
-
if swap_amount_interval == 'all_balance':
|
35
|
-
amount_to_wrap = amount_to_wrap.minus(self.min_native_balance)
|
36
|
-
|
37
|
-
if amount_to_wrap.wei > native_balance.wei:
|
38
|
-
raise NotEnoughNativeBalance(
|
39
|
-
f"Account balance {native_balance} < {amount_to_wrap} amount to wrap.")
|
40
|
-
|
41
|
-
weth.deposit(account, amount_to_wrap)
|
42
|
-
elif action == 'UNWRAP':
|
43
|
-
if swap_amount_interval == '':
|
44
|
-
swap_amount_interval = 'all_balance'
|
45
|
-
|
46
|
-
amount_to_unwrap = interval_to_weth_balance(
|
47
|
-
swap_amount_interval,
|
48
|
-
account,
|
49
|
-
chain_instance['chain'],
|
50
|
-
web3
|
51
|
-
)
|
52
|
-
|
53
|
-
if amount_to_unwrap.wei < 1000:
|
54
|
-
logger.info(f"WETH balance is {amount_to_unwrap}, skip unwrapping")
|
55
|
-
self.sleep_after_var = False
|
56
|
-
return
|
57
|
-
|
58
|
-
logger.info(f"{action} {amount_to_unwrap}")
|
59
|
-
|
60
|
-
weth.withdraw(account, amount_to_unwrap)
|
61
|
-
else:
|
62
|
-
raise ConfigurationException(f'Wrong Action {action}')
|
63
|
-
|
64
|
-
def parse_params(self, module_params):
|
65
|
-
self.validate_supported_chain(module_params['chain'])
|
66
|
-
validate_amount_interval(module_params['amount_interval'])
|
67
|
-
|
68
|
-
return module_params['chain'], module_params['amount_interval'], module_params['action']
|
69
|
-
|
70
|
-
def log(self):
|
71
|
-
return "WRAPPING"
|
72
|
-
|
73
|
-
def sleep_after(self):
|
74
|
-
return self.sleep_after_var
|
@@ -1,63 +0,0 @@
|
|
1
|
-
from loguru import logger
|
2
|
-
from sybil_engine.data.contracts import get_contracts_for_chain
|
3
|
-
from sybil_engine.data.networks import get_chain_instance
|
4
|
-
from sybil_engine.domain.balance.balance_utils import interval_to_erc20_balance
|
5
|
-
from sybil_engine.domain.balance.tokens import Erc20Token
|
6
|
-
from sybil_engine.module.module import Module
|
7
|
-
from sybil_engine.utils.app_account_utils import AppAccount
|
8
|
-
from sybil_engine.utils.utils import AccountException
|
9
|
-
from sybil_engine.utils.web3_utils import init_web3
|
10
|
-
|
11
|
-
from web3_wizzard_lib.core.contract.zkdx_contract import ZKDXContract
|
12
|
-
from web3_wizzard_lib.core.contract.zkdx_data import ZKDXDataContract
|
13
|
-
|
14
|
-
|
15
|
-
class ZKDX(Module):
|
16
|
-
module_name = 'ZKDX'
|
17
|
-
module_config = 'zkdx_config'
|
18
|
-
|
19
|
-
def execute(self, action, amount_interval, account: AppAccount, chain='LINEA'):
|
20
|
-
chain_instance = get_chain_instance(chain)
|
21
|
-
web3 = init_web3(chain_instance, account.proxy)
|
22
|
-
|
23
|
-
zkdx_contract = get_contracts_for_chain(chain)['ZKDX']
|
24
|
-
zkdx_data_contract = get_contracts_for_chain(chain)['ZKDX_DATA']
|
25
|
-
|
26
|
-
zkdx = ZKDXContract(zkdx_contract, web3)
|
27
|
-
|
28
|
-
if action == 'DEPOSIT':
|
29
|
-
amount = interval_to_erc20_balance(amount_interval, account, 'USDC', chain, web3)
|
30
|
-
|
31
|
-
erc20 = Erc20Token(chain, 'USDC', web3)
|
32
|
-
|
33
|
-
if erc20.allowance(account, zkdx_contract) < erc20.balance(account).wei:
|
34
|
-
erc20.approve(account, zkdx_contract)
|
35
|
-
|
36
|
-
logger.info(f"Deposit {amount} to ZKDX")
|
37
|
-
zkdx.swap_to_zkdx(account, amount)
|
38
|
-
if action == 'WITHDRAW':
|
39
|
-
zkdx_data = ZKDXDataContract(zkdx_data_contract, web3)
|
40
|
-
balance = zkdx_data.get_balance(account)[0]
|
41
|
-
|
42
|
-
if balance == 0:
|
43
|
-
raise AccountException("ZKDX Balance is 0, skip")
|
44
|
-
|
45
|
-
logger.info(f"WITHDRAW {balance / 10 ** 18} ZUSD to ZKDX")
|
46
|
-
zkdx.swap_from_zkdx(account, balance)
|
47
|
-
else:
|
48
|
-
raise Exception(f"{action} action not supported")
|
49
|
-
|
50
|
-
def log(self):
|
51
|
-
return "ZKDX"
|
52
|
-
|
53
|
-
def parse_params(self, module_params):
|
54
|
-
return [
|
55
|
-
module_params['action'],
|
56
|
-
module_params['amount_interval']
|
57
|
-
]
|
58
|
-
|
59
|
-
|
60
|
-
class EmptyDepositException(Exception):
|
61
|
-
def __init__(self, message):
|
62
|
-
self.message = message
|
63
|
-
super().__init__(self.message)
|
File without changes
|
@@ -1,45 +0,0 @@
|
|
1
|
-
import requests
|
2
|
-
|
3
|
-
from web3_wizzard_lib.core.utils.benchmark_utils import benchmark
|
4
|
-
|
5
|
-
|
6
|
-
class AIChat:
|
7
|
-
def ask(self, question):
|
8
|
-
pass
|
9
|
-
|
10
|
-
|
11
|
-
class ChatGPT:
|
12
|
-
def __init__(self, token):
|
13
|
-
self.token = token
|
14
|
-
|
15
|
-
@benchmark
|
16
|
-
def ask(self, question):
|
17
|
-
url = "https://api.openai.com/v1/chat/completions"
|
18
|
-
headers = {
|
19
|
-
"Content-Type": "application/json",
|
20
|
-
"Authorization": f"Bearer {self.token}"
|
21
|
-
}
|
22
|
-
data = {
|
23
|
-
"model": "gpt-4o",
|
24
|
-
"messages": [{"role": "user", "content": question}],
|
25
|
-
"temperature": 0.7
|
26
|
-
}
|
27
|
-
|
28
|
-
response = requests.post(url, headers=headers, json=data)
|
29
|
-
|
30
|
-
return response.json()['choices'][0]['message']['content']
|
31
|
-
|
32
|
-
|
33
|
-
class MockAIChat:
|
34
|
-
def __init__(self, token):
|
35
|
-
self.token = token
|
36
|
-
|
37
|
-
def ask(self, question):
|
38
|
-
return f"ANSWER {question}"
|
39
|
-
|
40
|
-
|
41
|
-
def get_ai_chat(ai_config, token):
|
42
|
-
if ai_config == 'CHAT_GPT':
|
43
|
-
return ChatGPT(token)
|
44
|
-
else:
|
45
|
-
return MockAIChat(token)
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import time
|
2
|
-
|
3
|
-
|
4
|
-
def benchmark(func):
|
5
|
-
def wrap(*args, **kwargs):
|
6
|
-
start = time.perf_counter()
|
7
|
-
result = func(*args, **kwargs)
|
8
|
-
end = time.perf_counter()
|
9
|
-
print(f"{func.__name__} executed in {end - start:.4f} seconds")
|
10
|
-
return result
|
11
|
-
|
12
|
-
return wrap
|
@@ -1,28 +0,0 @@
|
|
1
|
-
memory = {
|
2
|
-
|
3
|
-
}
|
4
|
-
|
5
|
-
def add_value(key, value):
|
6
|
-
memory[key] = value
|
7
|
-
|
8
|
-
def add_memory_list(key, value):
|
9
|
-
memory[key] = value
|
10
|
-
|
11
|
-
|
12
|
-
def accumulate_by_key(key, value):
|
13
|
-
if key not in memory:
|
14
|
-
memory[key] = []
|
15
|
-
|
16
|
-
memory[key].append(value)
|
17
|
-
# if isinstance(value, map):
|
18
|
-
# (list(value))
|
19
|
-
# else:
|
20
|
-
# memory[key] += value
|
21
|
-
|
22
|
-
|
23
|
-
def remove_key(key):
|
24
|
-
del memory[key]
|
25
|
-
|
26
|
-
|
27
|
-
def get_by_key(key):
|
28
|
-
return memory.get(key)
|