web3-wizzard-lib 1.6.12__py3-none-any.whl → 1.6.14__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- web3_wizzard_lib/core/__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 +34 -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/gmx_reward_router.py +22 -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/new_rage_contract.py +31 -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 +45 -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 +81 -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/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/bank_module.py +99 -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 +108 -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 +78 -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/gmx_reward.py +25 -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 +101 -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 +98 -0
- web3_wizzard_lib/core/modules/linea_poh_lxp.py +65 -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/new_rage_withdraw.py +41 -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/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_list.py +11 -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/ai_utils.py +45 -0
- web3_wizzard_lib/core/utils/benchmark_utils.py +12 -0
- web3_wizzard_lib/core/utils/module_memory.py +28 -0
- web3_wizzard_lib/core/utils/statistic_utils.py +150 -0
- web3_wizzard_lib/core/utils/sub_module.py +8 -0
- web3_wizzard_lib/data/__init__.py +0 -0
- web3_wizzard_lib/data/config_default.py +52 -0
- web3_wizzard_lib/data/module_config_default.py +209 -0
- web3_wizzard_lib/utils/__init__.py +0 -0
- web3_wizzard_lib/utils/debank_utils.py +19 -0
- {web3_wizzard_lib-1.6.12.dist-info → web3_wizzard_lib-1.6.14.dist-info}/METADATA +1 -1
- web3_wizzard_lib-1.6.14.dist-info/RECORD +369 -0
- web3_wizzard_lib-1.6.12.dist-info/RECORD +0 -107
- {web3_wizzard_lib-1.6.12.dist-info → web3_wizzard_lib-1.6.14.dist-info}/WHEEL +0 -0
- {web3_wizzard_lib-1.6.12.dist-info → web3_wizzard_lib-1.6.14.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,150 @@
|
|
1
|
+
import csv
|
2
|
+
import datetime
|
3
|
+
import os
|
4
|
+
from googleapiclient.discovery import build
|
5
|
+
from loguru import logger
|
6
|
+
from sybil_engine.utils.google_utils import get_google_credentials
|
7
|
+
|
8
|
+
from sybil_engine.utils.telegram import get_config
|
9
|
+
|
10
|
+
statistic_date_string = datetime.datetime.now().strftime("%Y-%m-%d_%H-%M-%S")
|
11
|
+
|
12
|
+
|
13
|
+
class StatisticsWriter:
|
14
|
+
def init_if_required(self, job_name, header):
|
15
|
+
pass
|
16
|
+
|
17
|
+
def write_row(self, job_name, row):
|
18
|
+
pass
|
19
|
+
|
20
|
+
|
21
|
+
class CsvStatisticsWriter(StatisticsWriter):
|
22
|
+
def init_if_required(self, job_name, header):
|
23
|
+
output_file = self._get_file_name(job_name)
|
24
|
+
file_exists = os.path.isfile(output_file)
|
25
|
+
|
26
|
+
rows_to_write = []
|
27
|
+
|
28
|
+
if not file_exists or os.path.getsize(output_file) == 0:
|
29
|
+
rows_to_write.append(header)
|
30
|
+
|
31
|
+
with open(output_file, mode='a', newline='') as file:
|
32
|
+
writer = csv.writer(file)
|
33
|
+
writer.writerows(rows_to_write)
|
34
|
+
|
35
|
+
def write_row(self, job_name, row):
|
36
|
+
rows_to_write = []
|
37
|
+
output_file = self._get_file_name(job_name)
|
38
|
+
|
39
|
+
rows_to_write.append(row)
|
40
|
+
|
41
|
+
with open(output_file, mode='a', newline='') as file:
|
42
|
+
writer = csv.writer(file)
|
43
|
+
writer.writerows(rows_to_write)
|
44
|
+
|
45
|
+
def _get_file_name(self, job_name):
|
46
|
+
return f'data/csv/{job_name}.csv'
|
47
|
+
|
48
|
+
|
49
|
+
class GoogleStatisticsWriter(StatisticsWriter):
|
50
|
+
def __init__(self, sheet):
|
51
|
+
self.SCOPES = ['https://www.googleapis.com/auth/spreadsheets']
|
52
|
+
self.credentials = get_google_credentials()
|
53
|
+
self.service = build('sheets', 'v4', credentials=self.credentials)
|
54
|
+
|
55
|
+
self.sheet = sheet
|
56
|
+
|
57
|
+
def copy_sheet(self, source_sheet_name, destination_sheet_name):
|
58
|
+
# Retrieve the spreadsheet data to locate the source sheet
|
59
|
+
spreadsheet = self.service.spreadsheets().get(spreadsheetId=self.sheet).execute()
|
60
|
+
source_sheet_info = next(
|
61
|
+
(sheet for sheet in spreadsheet['sheets'] if sheet['properties']['title'] == source_sheet_name),
|
62
|
+
None
|
63
|
+
)
|
64
|
+
if source_sheet_info is None:
|
65
|
+
raise ValueError(f"Sheet '{source_sheet_name}' not found.")
|
66
|
+
source_sheet_id = source_sheet_info['properties']['sheetId']
|
67
|
+
|
68
|
+
# Copy the sheet to the same spreadsheet (appended as the rightmost tab)
|
69
|
+
request_body = {
|
70
|
+
'destinationSpreadsheetId': self.sheet
|
71
|
+
}
|
72
|
+
result = self.service.spreadsheets().sheets().copyTo(
|
73
|
+
spreadsheetId=self.sheet,
|
74
|
+
sheetId=source_sheet_id,
|
75
|
+
body=request_body
|
76
|
+
).execute()
|
77
|
+
new_sheet_id = result['sheetId']
|
78
|
+
|
79
|
+
# Update the new sheet's properties: rename it and set its index to 0 (leftmost)
|
80
|
+
body = {
|
81
|
+
'requests': [
|
82
|
+
{
|
83
|
+
'updateSheetProperties': {
|
84
|
+
'properties': {
|
85
|
+
'sheetId': new_sheet_id,
|
86
|
+
'title': destination_sheet_name,
|
87
|
+
'index': 0
|
88
|
+
},
|
89
|
+
'fields': 'title,index'
|
90
|
+
}
|
91
|
+
}
|
92
|
+
]
|
93
|
+
}
|
94
|
+
self.service.spreadsheets().batchUpdate(spreadsheetId=self.sheet, body=body).execute()
|
95
|
+
|
96
|
+
logger.info(f"Sheet copied. New sheet '{destination_sheet_name}' placed at the leftmost position.")
|
97
|
+
|
98
|
+
def init_if_required(self, sheet_name, header):
|
99
|
+
if not self._sheet_exists(sheet_name):
|
100
|
+
self._create_new_sheet(sheet_name)
|
101
|
+
self.write_row(sheet_name, header)
|
102
|
+
|
103
|
+
def _sheet_exists(self, sheet_name):
|
104
|
+
try:
|
105
|
+
self.service.spreadsheets().values().get(spreadsheetId=self.sheet, range=sheet_name).execute()
|
106
|
+
logger.info('Sheet exists.')
|
107
|
+
return True
|
108
|
+
except Exception:
|
109
|
+
return False
|
110
|
+
|
111
|
+
def _create_new_sheet(self, sheet_name):
|
112
|
+
body = {'requests': [{'addSheet': {'properties': {'title': sheet_name}}}]}
|
113
|
+
self.service.spreadsheets().batchUpdate(spreadsheetId=self.sheet, body=body).execute()
|
114
|
+
logger.info(f'Sheet "{sheet_name}" created.')
|
115
|
+
|
116
|
+
def write_cell(self, sheet_name, cell_reference, value):
|
117
|
+
range_ = f"{sheet_name}!{cell_reference}"
|
118
|
+
body = {'values': [[value]]}
|
119
|
+
self.service.spreadsheets().values().update(
|
120
|
+
spreadsheetId=self.sheet, range=range_, valueInputOption='USER_ENTERED', body=body
|
121
|
+
).execute()
|
122
|
+
logger.info(f"Value written to cell {cell_reference} in sheet {sheet_name}: {value}")
|
123
|
+
|
124
|
+
def write_row(self, job_name, row):
|
125
|
+
range_ = f"{job_name}!A1"
|
126
|
+
rows_read = self.service.spreadsheets().values().get(spreadsheetId=self.sheet, range=range_).execute().get(
|
127
|
+
'values', [])
|
128
|
+
body = {'values': [row]}
|
129
|
+
range_to_write = f"{job_name}!A{len(rows_read) + 1}"
|
130
|
+
self.service.spreadsheets().values().append(
|
131
|
+
spreadsheetId=self.sheet, range=range_to_write, valueInputOption='USER_ENTERED', body=body
|
132
|
+
).execute()
|
133
|
+
logger.info(f'Row written: {row}')
|
134
|
+
|
135
|
+
def get_leftmost_sheet(self):
|
136
|
+
"""
|
137
|
+
Returns the name of the leftmost sheet in the spreadsheet.
|
138
|
+
The leftmost sheet is the first sheet in the sheets collection.
|
139
|
+
"""
|
140
|
+
spreadsheet = self.service.spreadsheets().get(spreadsheetId=self.sheet).execute()
|
141
|
+
if 'sheets' in spreadsheet and len(spreadsheet['sheets']) > 0:
|
142
|
+
return spreadsheet['sheets'][0]['properties']['title']
|
143
|
+
return None
|
144
|
+
|
145
|
+
|
146
|
+
def get_statistic_writer():
|
147
|
+
if get_config("STATISTICS_MODE") == "CSV":
|
148
|
+
return CsvStatisticsWriter()
|
149
|
+
else:
|
150
|
+
return GoogleStatisticsWriter(get_config("SPREADSHEET_ID"))
|
File without changes
|
@@ -0,0 +1,52 @@
|
|
1
|
+
encryption = True # Вкл/выкл шифрования приватных ключей
|
2
|
+
password = 'test' # Если encryption = False, то пароль не используется
|
3
|
+
|
4
|
+
proxy_mode = 'RANDOM' # [RANDOM, STRICT]
|
5
|
+
account_create_mode = 'CSV' # [CSV, TXT] Режим чтения аккаунтов
|
6
|
+
shell_mode = 'interactive' # ['classic', 'interactive']
|
7
|
+
# classic - задавать модуль в module_config_default
|
8
|
+
# interactive - задавать модуль в консоли во время запуска
|
9
|
+
interactive_confirmation = True # Если True - при запуске уточняется правильная ли конфигурация запускается
|
10
|
+
|
11
|
+
statistic_config = {
|
12
|
+
"mode": "GOOGLE", # CSV/GOOGLE
|
13
|
+
"spreadsheet_id": "", # required for GOOGLE
|
14
|
+
}
|
15
|
+
|
16
|
+
# Максимальные цены на газ Gwei для каждой сети
|
17
|
+
gas_prices = {
|
18
|
+
'ETH_MAINNET': 50,
|
19
|
+
'ZKSYNC': 0.26,
|
20
|
+
'BASE': 0.5,
|
21
|
+
'LINEA': 2,
|
22
|
+
'ARBITRUM': 2,
|
23
|
+
'ARBITRUM_NOVA': 2,
|
24
|
+
'AVALANCHE': 26,
|
25
|
+
'BSC': 5,
|
26
|
+
'FANTOM': 750,
|
27
|
+
'OPTIMISM': 0.5,
|
28
|
+
'POLYGON': 150,
|
29
|
+
'SCROLL': 2,
|
30
|
+
'ZKFAIR': 10001,
|
31
|
+
'COREDAO': 10,
|
32
|
+
'MANTA': 0.3,
|
33
|
+
'ZORA': 1,
|
34
|
+
'POLYGON_ZK': 3,
|
35
|
+
'X_LAYER': 10
|
36
|
+
}
|
37
|
+
|
38
|
+
# CEX configuration
|
39
|
+
cex_data = {
|
40
|
+
'okx': '',
|
41
|
+
'binance': ''
|
42
|
+
}
|
43
|
+
# CEX Withdraw [ZKSYNC, LINEA, BASE, ARBITRUM]
|
44
|
+
auto_withdrawal = False
|
45
|
+
withdraw_interval = {'from': 0.01, 'to': 0.015}
|
46
|
+
min_auto_withdraw_interval = {'from': 0.1, 'to': 0.2}
|
47
|
+
|
48
|
+
# Настройки телеграм.
|
49
|
+
telegram_enabled = False
|
50
|
+
telegram_api_key = ''
|
51
|
+
telegram_api_chat_id = 1
|
52
|
+
telegram_log_level = 'ERROR' # ['INFO', 'ERROR', 'DEBUG']
|
@@ -0,0 +1,209 @@
|
|
1
|
+
sleep_interval = {'from': 60 * 5 * 1, 'to': 60 * 10 * 1} # Sleep interval between accounts
|
2
|
+
swap_retry_sleep_interval = {'from': 60 * 5 * 1, 'to': 60 * 10 * 1} # Sleep interval between retries
|
3
|
+
|
4
|
+
min_native_interval = {'from': 0.5, 'to': 0.5}
|
5
|
+
|
6
|
+
module = "STARGATE_AUTO_BRIDGE" # [Название модуля или сценария]
|
7
|
+
# Modules: [WARMUP, SELL_ALL, CONCRETE_SWAP, WRAPPING, DMAIL, SEND_TO_CEX, ORBITER,
|
8
|
+
# BUNGEE, STARGATE_CLASSIC_BRIDGE, STARGATE_AUTO_BRIDGE, STARGATE_FARMING, LENDING, RAGE_WITHDRAW,
|
9
|
+
# LayerBank, LIQUIDITY_POOL, ZKDX, CEX_SUB_ACCOUNT_TRANSFER, SLEEP_MODULE, MERKLY_REFUEL
|
10
|
+
|
11
|
+
|
12
|
+
# Module [WARMUP, 1]
|
13
|
+
warmup_config = {
|
14
|
+
'auto_withdrawal': False,
|
15
|
+
'chain': 'ZKSYNC',
|
16
|
+
'swap_amount_interval': '',
|
17
|
+
'token': 'ETH',
|
18
|
+
'amount_of_warmups': {'from': 3, 'to': 6},
|
19
|
+
# 'allowed_dex': ['syncswap','woofi','lineaswap','horizondex''pancake'], #LINEA
|
20
|
+
# 'allowed_dex': ['syncswap','mute','woofi','maverick','velocore','pancake','odos'] #ZKSYNC
|
21
|
+
# 'allowed dex': ['woofi', 'maverick', 'horizondex', 'pancake', 'odos'] #BASE
|
22
|
+
'allowed_dex': ['syncswap', 'mute', 'woofi', 'maverick', 'velocore', 'lineaswap', 'horizondex', 'pancake', 'odos'],
|
23
|
+
'warmup_pairs': ['ETH>USDC'], # specify for warming up by concrete pair
|
24
|
+
# 'warmup_pairs': ['ETH>USDC', 'ETH>USDT'],
|
25
|
+
'sell_tokens': True,
|
26
|
+
'pair_sleep_interval': {'from': 60 * 15, 'to': 60 * 30} # Interval between different tokens warm up of 1 account
|
27
|
+
}
|
28
|
+
|
29
|
+
# Module [BUNGEE, 11] Bungee [ZKSYNC, ARBITRUM, BSC, BASE, AVALANCHE, POLYGON, OPTIMISM]
|
30
|
+
bungee_config = {
|
31
|
+
'from_chain': 'BASE',
|
32
|
+
'to_chain': 'ZKSYNC',
|
33
|
+
'refuel_amount_interval': 'max'
|
34
|
+
# ['{'from': 0.001, 'to': 0.002}', '', 'max']
|
35
|
+
}
|
36
|
+
|
37
|
+
# Module [STARGATE_AUTO_BRIDGE, 13] Stargate auto bridge
|
38
|
+
stargate_auto_bridge_config = {
|
39
|
+
'bridge_amount_interval': 'all_balance',
|
40
|
+
'bridge_token': 'ETH',
|
41
|
+
'end_network': '', # name of network where all tokens will be collected
|
42
|
+
'retry_interval': {'from': 60 * 15, 'to': 60 * 30},
|
43
|
+
'sleep_interval': {'from': 60 * 30, 'to': 60 * 60},
|
44
|
+
'only_end_network_bridge': False, # if True, then only bridge will be to END NETWORK
|
45
|
+
'original_chain_sequence': ['ARBITRUM', 'LINEA', 'BASE']
|
46
|
+
}
|
47
|
+
|
48
|
+
# Module [STARGATE_FARMING, 14] Stargate farming
|
49
|
+
stargate_farming_config = {
|
50
|
+
'chain': 'BASE', # ['BASE, 'LINEA']
|
51
|
+
'bridge_amount_interval': 'all_balance',
|
52
|
+
'all_balance_mode': 0,
|
53
|
+
# 0 - all_balance игнорирует 'chain' и стекает ETH в чейне с максимально большим балансом
|
54
|
+
# 1 - all_balance стекает весь баланс указанного 'chain'
|
55
|
+
'operation': {'ADD_TO_POOL', 'DEPOSIT'},
|
56
|
+
'token': 'ETH',
|
57
|
+
'operation_sleep_interval': {'from': 60 * 2, 'to': 60 * 10}
|
58
|
+
# 'operation': {'WITHDRAW', 'REDEEM_FROM_POOL'}
|
59
|
+
}
|
60
|
+
|
61
|
+
# Module [SELL_ALL, 2] This module sells all to ETH or USDC
|
62
|
+
sell_all_config = {
|
63
|
+
'chain': 'ZKSYNC',
|
64
|
+
'receive_token': 'ETH', # [USDC, ETH]
|
65
|
+
'sleep_interval': {'from': 60 * 30 * 1, 'to': 60 * 60 * 1} # Interval between selling different tokens of 1 account
|
66
|
+
}
|
67
|
+
|
68
|
+
# Module [CONCRETE_SWAP, 3] Swap concrete pair in concrete DEX
|
69
|
+
swap_config = {
|
70
|
+
'chain': 'LINEA',
|
71
|
+
'app': 'syncswap',
|
72
|
+
'from_token': 'ETH',
|
73
|
+
'to_token': 'USDT',
|
74
|
+
'amount_interval': {'from': 0.001, 'to': 0.001}
|
75
|
+
}
|
76
|
+
|
77
|
+
# Module [WRAPPING, 4] [Wrap/Unwrap WETH]
|
78
|
+
wrap_config = {
|
79
|
+
'chain': 'ZKSYNC',
|
80
|
+
'action': 'UNWRAP', # [WRAP, UNWRAP]
|
81
|
+
'amount_interval': 'all_balance'
|
82
|
+
}
|
83
|
+
|
84
|
+
# Module [SEND_TO_CEX, 6] Config
|
85
|
+
send_to_cex_config = {
|
86
|
+
'chain': 'ZKSYNC',
|
87
|
+
'amount': {'from': 1, 'to': 1},
|
88
|
+
'token': 'NATIVE' # [NATIVE, USDC]
|
89
|
+
}
|
90
|
+
|
91
|
+
# Module [DMAIL, 5] Config
|
92
|
+
send_dmail_config = {
|
93
|
+
'chain': 'ZKSYNC', # ['ZKSYNC', 'LINEA', 'SCROLL']
|
94
|
+
'email_amount': {'from': 3, 'to': 6}
|
95
|
+
}
|
96
|
+
|
97
|
+
# Module [NFT_MINTER, 15] Все NFT пока работают только для ZKSYNC ["TAVAERA", "ZKS_DOMAIN", "ERA_DOMAIN",
|
98
|
+
# "EMPTY_NFT", "OMNI_SEA", "MERKLY_MINTER", "L2_TELEGRAPH_MINTER", "KREATOR_LAND", "ABBYSWORLD"]
|
99
|
+
nft_minter = {
|
100
|
+
'nft_amount_interval': {'from': 1, 'to': 1},
|
101
|
+
'nft_modules': ["SATOSHI_UNIVERSE"],
|
102
|
+
'unique_nft': True # Currently only works for linea
|
103
|
+
}
|
104
|
+
|
105
|
+
# Module [LAYERBANK, 23]
|
106
|
+
layerbank = {
|
107
|
+
'action': 'DEPOSIT',
|
108
|
+
'sleep_interval': {'from': 60 * 15, 'to': 60 * 45},
|
109
|
+
}
|
110
|
+
|
111
|
+
# Module [LIQUIDITY_POOL, 24]
|
112
|
+
liquidity_pool = {
|
113
|
+
'action': 'DEPOSIT+WITHDRAW',
|
114
|
+
'amount': 'all_balance',
|
115
|
+
'token': 'ETH',
|
116
|
+
'sleep_interval': {'from': 60 * 2, 'to': 60 * 5},
|
117
|
+
'dex': 'velocore',
|
118
|
+
'chain': 'LINEA'
|
119
|
+
}
|
120
|
+
|
121
|
+
# Module [ZKDX, 25]
|
122
|
+
zkdx_config = {
|
123
|
+
'amount_interval': 'all_balance', # USDC amount
|
124
|
+
'action': 'DEPOSIT'
|
125
|
+
}
|
126
|
+
|
127
|
+
# Module [CEX_SUB_ACCOUNT_TRANSFER, 26]
|
128
|
+
cex_account_transfer_config = {
|
129
|
+
|
130
|
+
}
|
131
|
+
|
132
|
+
# Module [MERKLY_REFUEL, 28] Bungee [ZKSYNC, ARBITRUM, ARBITRUM NOVA, BASE, LINEA, OPTIMISM, SCROLL]
|
133
|
+
merkly_refuel_config = {
|
134
|
+
'start_chain': 'ZKSYNC', # Если '', первый чейн будет RANDOM
|
135
|
+
'end_chain': 'ZKSYNC', # Если '', то последний чейн будет RANDOM
|
136
|
+
'chains': ['ZKSYNC', 'ARBITRUM', 'BASE'], # Список всех чейнов для которых делать Refuel.
|
137
|
+
# Должен вмещать в себя start_chain и end_chain
|
138
|
+
'refuel_amount_interval': {'from': 0.00005, 'to': 0.00009},
|
139
|
+
'sleeping_interval': {'from': 60 * 5, 'to': 60 * 10}
|
140
|
+
}
|
141
|
+
|
142
|
+
# Module [CEX_WITHDRAW, 29] [ZKSYNC, LINEA, BASE, ARBITRUM, COREDAO, POLYGON, X_LAYER]
|
143
|
+
cex_withdraw = {
|
144
|
+
'chain': 'ZKSYNC',
|
145
|
+
'withdraw_interval': {'from': 0.01, 'to': 0.015},
|
146
|
+
'min_auto_withdraw_interval': {'from': 0.1, 'to': 0.2},
|
147
|
+
'token': 'NATIVE', # [NATIVE, USDC, USDT]
|
148
|
+
'cex': 'okx'
|
149
|
+
}
|
150
|
+
|
151
|
+
# Module [COREDAO_BRIDGE_AUTO, 31
|
152
|
+
coredao_bridge_auto_config = {
|
153
|
+
'from_chain': 'COREDAO',
|
154
|
+
'to_chain': 'POLYGON',
|
155
|
+
'repeats': {'from': 2, 'to': 4},
|
156
|
+
'bridge_amount_interval': 'all_balance',
|
157
|
+
'sleep_interval': {'from': 60 * 25, 'to': 60 * 40}, # Интервал from_chain -> to_chain и to_chain -> from_chain
|
158
|
+
'token': 'USDT' # [USDC, USDT]
|
159
|
+
}
|
160
|
+
|
161
|
+
# Module [LAYER2_20, 32]
|
162
|
+
layer_2_20_config = {
|
163
|
+
'chain': 'ZKSYNC',
|
164
|
+
'to_chains': ['OPTIMISM', 'BASE', 'LINEA', 'ARBITRUM', 'SCROLL'],
|
165
|
+
'repeats': {'from': 2, 'to': 4},
|
166
|
+
}
|
167
|
+
|
168
|
+
# Module [BANKING, 34]
|
169
|
+
banking_config = {
|
170
|
+
'bank': 'MENDI_FINANCE',
|
171
|
+
'actions': 'SUPPLY', # ['SUPPLY', 'BORROW', 'REPAY', 'REDEEM']
|
172
|
+
'supply_token': 'WETH',
|
173
|
+
'borrow_token': 'WETH',
|
174
|
+
'sleep_interval': {'from': 1 * 5, 'to': 1 * 10},
|
175
|
+
'chain': 'LINEA'
|
176
|
+
}
|
177
|
+
|
178
|
+
# Module [CLAIMER, 35]
|
179
|
+
claimer_config = {
|
180
|
+
'chain': 'ARBITRUM',
|
181
|
+
'token': 'NATIVE', # NATIVE or USDT or USDC
|
182
|
+
'project': 'RABBY'
|
183
|
+
}
|
184
|
+
|
185
|
+
sleep_module_config = {}
|
186
|
+
|
187
|
+
# Module [ADS_IMPORT_PROXY, 36]
|
188
|
+
ads_import_config = {
|
189
|
+
'ads_url': 'http://local.adspower.net:50325/api/v1/user'
|
190
|
+
}
|
191
|
+
|
192
|
+
# Module [BRIDGE, 37]
|
193
|
+
bridge_module = {
|
194
|
+
'bridge': 'ORBITER',
|
195
|
+
'bridge_amount_interval': 'all_balance',
|
196
|
+
'from_chain': 'POLYGON',
|
197
|
+
'to_chain': 'ZKSYNC',
|
198
|
+
'token': 'USDT'
|
199
|
+
}
|
200
|
+
|
201
|
+
# Module [SMART_CONTRACT_DEPLOYMENT, 38]
|
202
|
+
smart_contract_deployment = {
|
203
|
+
'chain': 'BASE'
|
204
|
+
}
|
205
|
+
|
206
|
+
erc20_balance = {
|
207
|
+
'token_address': '0xd83af4fbD77f3AB65C3B1Dc4B38D7e67AEcf599A',
|
208
|
+
'chain': 'LINEA'
|
209
|
+
}
|
File without changes
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import requests
|
2
|
+
|
3
|
+
|
4
|
+
def debank_request(address):
|
5
|
+
url = "https://pro-openapi.debank.com/v1/user/total_balance"
|
6
|
+
params = {
|
7
|
+
'id': address
|
8
|
+
}
|
9
|
+
headers = {
|
10
|
+
'accept': 'application/json',
|
11
|
+
'AccessKey': '6cd56a970242386fa2a57e380c39f00f10b31778'
|
12
|
+
}
|
13
|
+
response = requests.get(url, headers=headers, params=params)
|
14
|
+
data = response.json()
|
15
|
+
return data
|
16
|
+
|
17
|
+
|
18
|
+
def debank_total_balance(address):
|
19
|
+
return debank_request(address).get('total_usd_value', 0)
|