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.
Files changed (547) hide show
  1. core/__init__.py +1 -0
  2. core/contract/__init__.py +0 -0
  3. core/contract/aavecontract.py +36 -0
  4. core/contract/alienswap_contract.py +21 -0
  5. core/contract/arena_games_contract.py +16 -0
  6. core/contract/basiliskcontract.py +58 -0
  7. core/contract/bilinear_contract.py +22 -0
  8. core/contract/bungee.py +33 -0
  9. core/contract/coredao_contract.py +35 -0
  10. core/contract/coredao_from_contract.py +40 -0
  11. core/contract/dmail_send_mail.py +18 -0
  12. core/contract/empty_nft.py +18 -0
  13. core/contract/era_name.py +23 -0
  14. core/contract/eralendcontract.py +34 -0
  15. core/contract/eth_scroll_bridge_contract.py +25 -0
  16. core/contract/frog_war_contract.py +48 -0
  17. core/contract/horizondex_quoter.py +14 -0
  18. core/contract/horizondex_router.py +91 -0
  19. core/contract/imagine_contract.py +18 -0
  20. core/contract/izumi.py +63 -0
  21. core/contract/kreatorland_contract.py +21 -0
  22. core/contract/l0_claim.py +254 -0
  23. core/contract/l2_telegraph.py +21 -0
  24. core/contract/layerbank_price.py +18 -0
  25. core/contract/layerbank_token.py +29 -0
  26. core/contract/layerbankcontract.py +59 -0
  27. core/contract/linea_day_2_contract.py +19 -0
  28. core/contract/linea_day_3_contract.py +55 -0
  29. core/contract/linea_ens_names_contract.py +55 -0
  30. core/contract/lineaswaprouter.py +52 -0
  31. core/contract/maverick_multicall.py +52 -0
  32. core/contract/mendi_finance_contract.py +11 -0
  33. core/contract/mendi_token.py +25 -0
  34. core/contract/merkly_minter.py +47 -0
  35. core/contract/micro3_contract.py +18 -0
  36. core/contract/mute_router.py +93 -0
  37. core/contract/nidum_contract.py +44 -0
  38. core/contract/nile_contract.py +60 -0
  39. core/contract/nomis_attest_contract.py +40 -0
  40. core/contract/nomis_contract.py +40 -0
  41. core/contract/octomos.py +31 -0
  42. core/contract/odos.py +104 -0
  43. core/contract/omnisea.py +29 -0
  44. core/contract/orbiter_starknet.py +30 -0
  45. core/contract/pancake_pool.py +19 -0
  46. core/contract/pancake_quoter.py +20 -0
  47. core/contract/pancake_router.py +72 -0
  48. core/contract/rage_claim.py +24 -0
  49. core/contract/reactor_fusion_contract.py +78 -0
  50. core/contract/readon_contract.py +19 -0
  51. core/contract/rubyscore_contract.py +31 -0
  52. core/contract/satoshi_universe_contract.py +29 -0
  53. core/contract/scroll_bridge_contract.py +24 -0
  54. core/contract/scroll_canvas_mint_contract.py +26 -0
  55. core/contract/scroll_oracle.py +11 -0
  56. core/contract/snap_contract.py +16 -0
  57. core/contract/social_scan_contract.py +20 -0
  58. core/contract/stargate_farming.py +37 -0
  59. core/contract/stargate_router.py +84 -0
  60. core/contract/stargate_router_eth.py +41 -0
  61. core/contract/stargate_token_pool.py +46 -0
  62. core/contract/stargate_v2_contract.py +36 -0
  63. core/contract/syncswap_classic_pool.py +15 -0
  64. core/contract/syncswap_classic_pool_factory.py +15 -0
  65. core/contract/syncswap_pool.py +25 -0
  66. core/contract/syncswap_router.py +123 -0
  67. core/contract/tavaera_id.py +18 -0
  68. core/contract/tavaera_mint.py +17 -0
  69. core/contract/townstory_bonus_contract.py +19 -0
  70. core/contract/townstory_contract.py +21 -0
  71. core/contract/velocore_lens.py +44 -0
  72. core/contract/velocore_pool.py +198 -0
  73. core/contract/velocore_router.py +80 -0
  74. core/contract/woofi_swap.py +29 -0
  75. core/contract/xy_finance_contract.py +87 -0
  76. core/contract/yoddlo_contract.py +19 -0
  77. core/contract/yuliverse_contract.py +36 -0
  78. core/contract/zebra_contract.py +68 -0
  79. core/contract/zerolend_contract.py +34 -0
  80. core/contract/zerolend_liq_contract.py +20 -0
  81. core/contract/zkdx_contract.py +40 -0
  82. core/contract/zkdx_data.py +14 -0
  83. core/contract/zks.py +24 -0
  84. core/modules/__init__.py +0 -0
  85. core/modules/ads_import_proxy.py +52 -0
  86. core/modules/airdrop_printer.py +80 -0
  87. core/modules/bank/__init__.py +0 -0
  88. core/modules/bank/aave.py +25 -0
  89. core/modules/bank/bank.py +15 -0
  90. core/modules/bank/bank_module.py +99 -0
  91. core/modules/bank/basilisk.py +25 -0
  92. core/modules/bank/eralend.py +25 -0
  93. core/modules/bank/layerbank.py +116 -0
  94. core/modules/bank/mendi_finance.py +57 -0
  95. core/modules/bank/reactorfusion.py +25 -0
  96. core/modules/bank/zerolend.py +36 -0
  97. core/modules/bridge/__init__.py +0 -0
  98. core/modules/bridge/bridge.py +8 -0
  99. core/modules/bridge/coredao_bridge_sub.py +47 -0
  100. core/modules/bridge/orbiter_sub.py +112 -0
  101. core/modules/bridge/scroll_bridge_sub.py +42 -0
  102. core/modules/bridge/stargate_v2_sub.py +74 -0
  103. core/modules/bridge_module.py +47 -0
  104. core/modules/bungee.py +109 -0
  105. core/modules/cex_sender.py +60 -0
  106. core/modules/cex_subaccount_transfer.py +34 -0
  107. core/modules/cex_withdraw.py +91 -0
  108. core/modules/claimer.py +45 -0
  109. core/modules/claims/__init__.py +0 -0
  110. core/modules/claims/layerzero_claimer.py +64 -0
  111. core/modules/claims/rabby_claimer.py +81 -0
  112. core/modules/concrete_swap.py +97 -0
  113. core/modules/coredao_bridge.py +32 -0
  114. core/modules/coredao_bridge_auto.py +39 -0
  115. core/modules/debank_checker.py +90 -0
  116. core/modules/dmail.py +54 -0
  117. core/modules/erc20_balance.py +42 -0
  118. core/modules/intract/__init__.py +0 -0
  119. core/modules/intract/intract_api.py +212 -0
  120. core/modules/intract/utils.py +81 -0
  121. core/modules/intract_claim.py +104 -0
  122. core/modules/layer_2_20.py +65 -0
  123. core/modules/lending_module.py +134 -0
  124. core/modules/linea_appeal.py +70 -0
  125. core/modules/linea_poh_lxp.py +64 -0
  126. core/modules/liquidity/__init__.py +0 -0
  127. core/modules/liquidity/nile_pool.py +64 -0
  128. core/modules/liquidity/pool.py +16 -0
  129. core/modules/liquidity/syncswap_pool.py +61 -0
  130. core/modules/liquidity/velocore_pool.py +55 -0
  131. core/modules/liquidity/zerolend_liquidity.py +26 -0
  132. core/modules/liquidity_pool.py +60 -0
  133. core/modules/merkly_refuel.py +87 -0
  134. core/modules/modules.py +4 -0
  135. core/modules/nft/__init__.py +0 -0
  136. core/modules/nft/abbys_world.py +22 -0
  137. core/modules/nft/acg_worlds.py +25 -0
  138. core/modules/nft/alienswap_linea.py +22 -0
  139. core/modules/nft/arena_games.py +22 -0
  140. core/modules/nft/asmatch.py +22 -0
  141. core/modules/nft/battlemon.py +25 -0
  142. core/modules/nft/bilinear.py +22 -0
  143. core/modules/nft/bitavatar.py +25 -0
  144. core/modules/nft/culture_satoshi_universe.py +24 -0
  145. core/modules/nft/efrogs.py +26 -0
  146. core/modules/nft/empty_nft.py +22 -0
  147. core/modules/nft/era_domain.py +42 -0
  148. core/modules/nft/frog_war.py +22 -0
  149. core/modules/nft/frog_war_bonus.py +22 -0
  150. core/modules/nft/gamerboom.py +25 -0
  151. core/modules/nft/gamerboom_bonus.py +26 -0
  152. core/modules/nft/imagine.py +32 -0
  153. core/modules/nft/kreatorland_module.py +35 -0
  154. core/modules/nft/l2_telegraph_module.py +22 -0
  155. core/modules/nft/layer3_meta.py +25 -0
  156. core/modules/nft/linea_culture_2_2_linus.py +24 -0
  157. core/modules/nft/linea_culture_2_3_yooldo.py +24 -0
  158. core/modules/nft/linea_culture_2_4_frogwar.py +24 -0
  159. core/modules/nft/linea_culture_2_5_acg.py +25 -0
  160. core/modules/nft/linea_culture_2_6_ascend_the_end.py +25 -0
  161. core/modules/nft/linea_culture_3_1_ascend_the_end.py +25 -0
  162. core/modules/nft/linea_culture_3_2_sending_me.py +25 -0
  163. core/modules/nft/linea_culture_3_3_townstory.py +25 -0
  164. core/modules/nft/linea_culture_3_4_daniele.py +25 -0
  165. core/modules/nft/linea_culture_3_5_demmortal.py +25 -0
  166. core/modules/nft/linea_culture_3_6_foxy.py +25 -0
  167. core/modules/nft/linea_culture_4_1_coop_records.py +60 -0
  168. core/modules/nft/linea_culture_4_2_borja_moskv.py +65 -0
  169. core/modules/nft/linea_culture_4_2_borja_moskv_approve.py +27 -0
  170. core/modules/nft/linea_culture_4_3_fruit.py +66 -0
  171. core/modules/nft/linea_culture_4_4_fruit_crux.py +67 -0
  172. core/modules/nft/linea_culture_4_5_forbidden_fruit.py +67 -0
  173. core/modules/nft/linea_culture_4_6_laurent.py +67 -0
  174. core/modules/nft/linea_culture_day2.py +20 -0
  175. core/modules/nft/linea_culture_day3.py +20 -0
  176. core/modules/nft/linea_ens_names.py +107 -0
  177. core/modules/nft/lucky_cat.py +25 -0
  178. core/modules/nft/merkly_minter_module.py +22 -0
  179. core/modules/nft/micro3.py +23 -0
  180. core/modules/nft/mint_2048.py +28 -0
  181. core/modules/nft/nft_submodule.py +16 -0
  182. core/modules/nft/nidum.py +87 -0
  183. core/modules/nft/nidum_bonus.py +23 -0
  184. core/modules/nft/nomis.py +64 -0
  185. core/modules/nft/nomis_attest.py +66 -0
  186. core/modules/nft/nouns.py +27 -0
  187. core/modules/nft/octomos.py +32 -0
  188. core/modules/nft/omnisea.py +33 -0
  189. core/modules/nft/omnizone.py +25 -0
  190. core/modules/nft/orbiter_claim.py +87 -0
  191. core/modules/nft/readon.py +30 -0
  192. core/modules/nft/rubyscore.py +45 -0
  193. core/modules/nft/sarubol.py +22 -0
  194. core/modules/nft/satoshi_universe.py +22 -0
  195. core/modules/nft/scroll_canvas_attest_year_badge.py +35 -0
  196. core/modules/nft/scroll_canvas_mint.py +51 -0
  197. core/modules/nft/sign.py +32 -0
  198. core/modules/nft/snap.py +25 -0
  199. core/modules/nft/snap_bonus.py +31 -0
  200. core/modules/nft/social_scan.py +22 -0
  201. core/modules/nft/sub_module.py +8 -0
  202. core/modules/nft/tavaera.py +30 -0
  203. core/modules/nft/townstory.py +75 -0
  204. core/modules/nft/townstory_bonus.py +45 -0
  205. core/modules/nft/trusta_reputation.py +48 -0
  206. core/modules/nft/trustaa_poh.py +49 -0
  207. core/modules/nft/uber_poh.py +24 -0
  208. core/modules/nft/wizards_of_linea.py +26 -0
  209. core/modules/nft/yoddlo.py +22 -0
  210. core/modules/nft/yuliverse.py +22 -0
  211. core/modules/nft/zace.py +25 -0
  212. core/modules/nft/zks_domain.py +41 -0
  213. core/modules/nft_minter.py +107 -0
  214. core/modules/orbiter.py +39 -0
  215. core/modules/orbiter_checker.py +26 -0
  216. core/modules/rage.py +54 -0
  217. core/modules/scroll_bridge.py +45 -0
  218. core/modules/sell_all.py +51 -0
  219. core/modules/sleep_module.py +25 -0
  220. core/modules/smart_contract_deployment.py +37 -0
  221. core/modules/stargate/__init__.py +0 -0
  222. core/modules/stargate/auto_bridge.py +91 -0
  223. core/modules/stargate/bridge.py +38 -0
  224. core/modules/stargate/bridge_eth.py +59 -0
  225. core/modules/stargate/bridge_tokens.py +48 -0
  226. core/modules/stargate/classic_bridge.py +34 -0
  227. core/modules/stargate/farming.py +163 -0
  228. core/modules/stargate/l0_data.py +10 -0
  229. core/modules/stargate/pool.py +74 -0
  230. core/modules/stargate/stargate_balance_utils.py +25 -0
  231. core/modules/stargate/stargate_gas_checker.py +68 -0
  232. core/modules/swap/__init__.py +1 -0
  233. core/modules/swap/horizondex.py +38 -0
  234. core/modules/swap/izumi.py +41 -0
  235. core/modules/swap/lineaswap.py +34 -0
  236. core/modules/swap/maverick.py +66 -0
  237. core/modules/swap/mute.py +39 -0
  238. core/modules/swap/odos.py +58 -0
  239. core/modules/swap/one_inch.py +58 -0
  240. core/modules/swap/pancake.py +41 -0
  241. core/modules/swap/swap_facade.py +10 -0
  242. core/modules/swap/syncswap.py +62 -0
  243. core/modules/swap/velocore.py +40 -0
  244. core/modules/swap/woofi.py +38 -0
  245. core/modules/swap/xy_finance.py +43 -0
  246. core/modules/swap/zebra.py +32 -0
  247. core/modules/warm_up.py +98 -0
  248. core/modules/wrapping.py +74 -0
  249. core/modules/zkdx.py +63 -0
  250. data/__init__.py +0 -0
  251. data/config_default.py +52 -0
  252. data/module_config_default.py +209 -0
  253. tests/__init__.py +0 -0
  254. tests/core/__init__.py +0 -0
  255. tests/core/contracts/__init__.py +0 -0
  256. tests/core/contracts/test_horizondex_quoter.py +37 -0
  257. tests/core/contracts/test_uniswap_quoter.py +35 -0
  258. tests/core/contracts/test_velocore_lens.py +67 -0
  259. tests/core/contracts/test_velocore_pool.py +57 -0
  260. tests/core/modules/__init__.py +67 -0
  261. tests/core/modules/swap/__init__.py +0 -0
  262. tests/core/modules/swap/test_horizondex.py +37 -0
  263. tests/core/modules/swap/test_lineaswap.py +28 -0
  264. tests/core/modules/swap/test_maverick.py +31 -0
  265. tests/core/modules/swap/test_mute.py +29 -0
  266. tests/core/modules/swap/test_odos.py +36 -0
  267. tests/core/modules/swap/test_pancake.py +54 -0
  268. tests/core/modules/swap/test_syncswap.py +59 -0
  269. tests/core/modules/swap/test_velocore.py +33 -0
  270. tests/core/modules/swap/test_woofi.py +22 -0
  271. tests/core/modules/test_bungee.py +27 -0
  272. tests/core/modules/test_concrete_swap.py +62 -0
  273. tests/core/modules/test_dmail.py +41 -0
  274. tests/core/modules/test_lending.py +122 -0
  275. tests/core/modules/test_nft.py +32 -0
  276. tests/core/modules/test_nft_minter.py +30 -0
  277. tests/core/modules/test_orbiter.py +28 -0
  278. tests/core/modules/test_sellall.py +27 -0
  279. tests/core/modules/test_send_to_cex.py +27 -0
  280. tests/core/modules/test_stargate_auto_bridge.py +32 -0
  281. tests/core/modules/test_stargate_bridge.py +25 -0
  282. tests/core/modules/test_stargate_farming.py +108 -0
  283. tests/core/modules/test_warmup.py +78 -0
  284. tests/core/modules/test_wrapping.py +68 -0
  285. tests/core/scenario/__init__.py +0 -0
  286. tests/core/scenario/module_0_test_config.py +91 -0
  287. tests/core/test_app.py +19 -0
  288. tests/core/test_config.py +34 -0
  289. web3_wizzard_lib/__init__.py +0 -0
  290. web3_wizzard_lib/core/__init__.py +1 -0
  291. web3_wizzard_lib/core/contract/__init__.py +0 -0
  292. web3_wizzard_lib/core/contract/aavecontract.py +36 -0
  293. web3_wizzard_lib/core/contract/alienswap_contract.py +21 -0
  294. web3_wizzard_lib/core/contract/arena_games_contract.py +16 -0
  295. web3_wizzard_lib/core/contract/basiliskcontract.py +58 -0
  296. web3_wizzard_lib/core/contract/bilinear_contract.py +22 -0
  297. web3_wizzard_lib/core/contract/bungee.py +33 -0
  298. web3_wizzard_lib/core/contract/coredao_contract.py +35 -0
  299. web3_wizzard_lib/core/contract/coredao_from_contract.py +40 -0
  300. web3_wizzard_lib/core/contract/dmail_send_mail.py +18 -0
  301. web3_wizzard_lib/core/contract/empty_nft.py +18 -0
  302. web3_wizzard_lib/core/contract/era_name.py +23 -0
  303. web3_wizzard_lib/core/contract/eralendcontract.py +34 -0
  304. web3_wizzard_lib/core/contract/eth_scroll_bridge_contract.py +25 -0
  305. web3_wizzard_lib/core/contract/frog_war_contract.py +48 -0
  306. web3_wizzard_lib/core/contract/horizondex_quoter.py +14 -0
  307. web3_wizzard_lib/core/contract/horizondex_router.py +91 -0
  308. web3_wizzard_lib/core/contract/imagine_contract.py +18 -0
  309. web3_wizzard_lib/core/contract/izumi.py +63 -0
  310. web3_wizzard_lib/core/contract/kreatorland_contract.py +21 -0
  311. web3_wizzard_lib/core/contract/l0_claim.py +254 -0
  312. web3_wizzard_lib/core/contract/l2_telegraph.py +21 -0
  313. web3_wizzard_lib/core/contract/layerbank_price.py +18 -0
  314. web3_wizzard_lib/core/contract/layerbank_token.py +29 -0
  315. web3_wizzard_lib/core/contract/layerbankcontract.py +59 -0
  316. web3_wizzard_lib/core/contract/linea_day_2_contract.py +19 -0
  317. web3_wizzard_lib/core/contract/linea_day_3_contract.py +55 -0
  318. web3_wizzard_lib/core/contract/linea_ens_names_contract.py +55 -0
  319. web3_wizzard_lib/core/contract/lineaswaprouter.py +52 -0
  320. web3_wizzard_lib/core/contract/maverick_multicall.py +52 -0
  321. web3_wizzard_lib/core/contract/mendi_finance_contract.py +11 -0
  322. web3_wizzard_lib/core/contract/mendi_token.py +25 -0
  323. web3_wizzard_lib/core/contract/merkly_minter.py +47 -0
  324. web3_wizzard_lib/core/contract/micro3_contract.py +18 -0
  325. web3_wizzard_lib/core/contract/mute_router.py +93 -0
  326. web3_wizzard_lib/core/contract/nidum_contract.py +44 -0
  327. web3_wizzard_lib/core/contract/nile_contract.py +60 -0
  328. web3_wizzard_lib/core/contract/nomis_attest_contract.py +40 -0
  329. web3_wizzard_lib/core/contract/nomis_contract.py +40 -0
  330. web3_wizzard_lib/core/contract/octomos.py +31 -0
  331. web3_wizzard_lib/core/contract/odos.py +104 -0
  332. web3_wizzard_lib/core/contract/omnisea.py +29 -0
  333. web3_wizzard_lib/core/contract/orbiter_starknet.py +30 -0
  334. web3_wizzard_lib/core/contract/pancake_pool.py +19 -0
  335. web3_wizzard_lib/core/contract/pancake_quoter.py +20 -0
  336. web3_wizzard_lib/core/contract/pancake_router.py +72 -0
  337. web3_wizzard_lib/core/contract/rage_claim.py +24 -0
  338. web3_wizzard_lib/core/contract/reactor_fusion_contract.py +78 -0
  339. web3_wizzard_lib/core/contract/readon_contract.py +19 -0
  340. web3_wizzard_lib/core/contract/rubyscore_contract.py +31 -0
  341. web3_wizzard_lib/core/contract/satoshi_universe_contract.py +29 -0
  342. web3_wizzard_lib/core/contract/scroll_bridge_contract.py +24 -0
  343. web3_wizzard_lib/core/contract/scroll_canvas_mint_contract.py +26 -0
  344. web3_wizzard_lib/core/contract/scroll_oracle.py +11 -0
  345. web3_wizzard_lib/core/contract/snap_contract.py +16 -0
  346. web3_wizzard_lib/core/contract/social_scan_contract.py +20 -0
  347. web3_wizzard_lib/core/contract/stargate_farming.py +37 -0
  348. web3_wizzard_lib/core/contract/stargate_router.py +84 -0
  349. web3_wizzard_lib/core/contract/stargate_router_eth.py +41 -0
  350. web3_wizzard_lib/core/contract/stargate_token_pool.py +46 -0
  351. web3_wizzard_lib/core/contract/stargate_v2_contract.py +36 -0
  352. web3_wizzard_lib/core/contract/syncswap_classic_pool.py +15 -0
  353. web3_wizzard_lib/core/contract/syncswap_classic_pool_factory.py +15 -0
  354. web3_wizzard_lib/core/contract/syncswap_pool.py +25 -0
  355. web3_wizzard_lib/core/contract/syncswap_router.py +123 -0
  356. web3_wizzard_lib/core/contract/tavaera_id.py +18 -0
  357. web3_wizzard_lib/core/contract/tavaera_mint.py +17 -0
  358. web3_wizzard_lib/core/contract/townstory_bonus_contract.py +19 -0
  359. web3_wizzard_lib/core/contract/townstory_contract.py +21 -0
  360. web3_wizzard_lib/core/contract/velocore_lens.py +44 -0
  361. web3_wizzard_lib/core/contract/velocore_pool.py +198 -0
  362. web3_wizzard_lib/core/contract/velocore_router.py +80 -0
  363. web3_wizzard_lib/core/contract/woofi_swap.py +29 -0
  364. web3_wizzard_lib/core/contract/xy_finance_contract.py +87 -0
  365. web3_wizzard_lib/core/contract/yoddlo_contract.py +19 -0
  366. web3_wizzard_lib/core/contract/yuliverse_contract.py +36 -0
  367. web3_wizzard_lib/core/contract/zebra_contract.py +68 -0
  368. web3_wizzard_lib/core/contract/zerolend_contract.py +34 -0
  369. web3_wizzard_lib/core/contract/zerolend_liq_contract.py +20 -0
  370. web3_wizzard_lib/core/contract/zkdx_contract.py +40 -0
  371. web3_wizzard_lib/core/contract/zkdx_data.py +14 -0
  372. web3_wizzard_lib/core/contract/zks.py +24 -0
  373. web3_wizzard_lib/core/modules/__init__.py +0 -0
  374. web3_wizzard_lib/core/modules/ads_import_proxy.py +52 -0
  375. web3_wizzard_lib/core/modules/airdrop_printer.py +80 -0
  376. web3_wizzard_lib/core/modules/bank/__init__.py +0 -0
  377. web3_wizzard_lib/core/modules/bank/aave.py +25 -0
  378. web3_wizzard_lib/core/modules/bank/bank.py +15 -0
  379. web3_wizzard_lib/core/modules/bank/bank_module.py +99 -0
  380. web3_wizzard_lib/core/modules/bank/basilisk.py +25 -0
  381. web3_wizzard_lib/core/modules/bank/eralend.py +25 -0
  382. web3_wizzard_lib/core/modules/bank/layerbank.py +116 -0
  383. web3_wizzard_lib/core/modules/bank/mendi_finance.py +57 -0
  384. web3_wizzard_lib/core/modules/bank/reactorfusion.py +25 -0
  385. web3_wizzard_lib/core/modules/bank/zerolend.py +36 -0
  386. web3_wizzard_lib/core/modules/bridge/__init__.py +0 -0
  387. web3_wizzard_lib/core/modules/bridge/bridge.py +8 -0
  388. web3_wizzard_lib/core/modules/bridge/coredao_bridge_sub.py +47 -0
  389. web3_wizzard_lib/core/modules/bridge/orbiter_sub.py +112 -0
  390. web3_wizzard_lib/core/modules/bridge/scroll_bridge_sub.py +42 -0
  391. web3_wizzard_lib/core/modules/bridge/stargate_v2_sub.py +74 -0
  392. web3_wizzard_lib/core/modules/bridge_module.py +47 -0
  393. web3_wizzard_lib/core/modules/bungee.py +109 -0
  394. web3_wizzard_lib/core/modules/cex_sender.py +60 -0
  395. web3_wizzard_lib/core/modules/cex_subaccount_transfer.py +34 -0
  396. web3_wizzard_lib/core/modules/cex_withdraw.py +91 -0
  397. web3_wizzard_lib/core/modules/claimer.py +45 -0
  398. web3_wizzard_lib/core/modules/claims/__init__.py +0 -0
  399. web3_wizzard_lib/core/modules/claims/layerzero_claimer.py +64 -0
  400. web3_wizzard_lib/core/modules/claims/rabby_claimer.py +81 -0
  401. web3_wizzard_lib/core/modules/concrete_swap.py +97 -0
  402. web3_wizzard_lib/core/modules/coredao_bridge.py +32 -0
  403. web3_wizzard_lib/core/modules/coredao_bridge_auto.py +39 -0
  404. web3_wizzard_lib/core/modules/debank_checker.py +90 -0
  405. web3_wizzard_lib/core/modules/dmail.py +54 -0
  406. web3_wizzard_lib/core/modules/erc20_balance.py +42 -0
  407. web3_wizzard_lib/core/modules/intract/__init__.py +0 -0
  408. web3_wizzard_lib/core/modules/intract/intract_api.py +212 -0
  409. web3_wizzard_lib/core/modules/intract/utils.py +81 -0
  410. web3_wizzard_lib/core/modules/intract_claim.py +104 -0
  411. web3_wizzard_lib/core/modules/layer_2_20.py +65 -0
  412. web3_wizzard_lib/core/modules/lending_module.py +134 -0
  413. web3_wizzard_lib/core/modules/linea_appeal.py +70 -0
  414. web3_wizzard_lib/core/modules/linea_poh_lxp.py +64 -0
  415. web3_wizzard_lib/core/modules/liquidity/__init__.py +0 -0
  416. web3_wizzard_lib/core/modules/liquidity/nile_pool.py +64 -0
  417. web3_wizzard_lib/core/modules/liquidity/pool.py +16 -0
  418. web3_wizzard_lib/core/modules/liquidity/syncswap_pool.py +61 -0
  419. web3_wizzard_lib/core/modules/liquidity/velocore_pool.py +55 -0
  420. web3_wizzard_lib/core/modules/liquidity/zerolend_liquidity.py +26 -0
  421. web3_wizzard_lib/core/modules/liquidity_pool.py +60 -0
  422. web3_wizzard_lib/core/modules/merkly_refuel.py +87 -0
  423. web3_wizzard_lib/core/modules/modules.py +27 -0
  424. web3_wizzard_lib/core/modules/nft/__init__.py +0 -0
  425. web3_wizzard_lib/core/modules/nft/abbys_world.py +22 -0
  426. web3_wizzard_lib/core/modules/nft/acg_worlds.py +25 -0
  427. web3_wizzard_lib/core/modules/nft/alienswap_linea.py +22 -0
  428. web3_wizzard_lib/core/modules/nft/arena_games.py +22 -0
  429. web3_wizzard_lib/core/modules/nft/asmatch.py +22 -0
  430. web3_wizzard_lib/core/modules/nft/battlemon.py +25 -0
  431. web3_wizzard_lib/core/modules/nft/bilinear.py +22 -0
  432. web3_wizzard_lib/core/modules/nft/bitavatar.py +25 -0
  433. web3_wizzard_lib/core/modules/nft/culture_satoshi_universe.py +24 -0
  434. web3_wizzard_lib/core/modules/nft/efrogs.py +26 -0
  435. web3_wizzard_lib/core/modules/nft/empty_nft.py +22 -0
  436. web3_wizzard_lib/core/modules/nft/era_domain.py +42 -0
  437. web3_wizzard_lib/core/modules/nft/frog_war.py +22 -0
  438. web3_wizzard_lib/core/modules/nft/frog_war_bonus.py +22 -0
  439. web3_wizzard_lib/core/modules/nft/gamerboom.py +25 -0
  440. web3_wizzard_lib/core/modules/nft/gamerboom_bonus.py +26 -0
  441. web3_wizzard_lib/core/modules/nft/imagine.py +32 -0
  442. web3_wizzard_lib/core/modules/nft/kreatorland_module.py +35 -0
  443. web3_wizzard_lib/core/modules/nft/l2_telegraph_module.py +22 -0
  444. web3_wizzard_lib/core/modules/nft/layer3_meta.py +25 -0
  445. web3_wizzard_lib/core/modules/nft/linea_culture_2_2_linus.py +24 -0
  446. web3_wizzard_lib/core/modules/nft/linea_culture_2_3_yooldo.py +24 -0
  447. web3_wizzard_lib/core/modules/nft/linea_culture_2_4_frogwar.py +24 -0
  448. web3_wizzard_lib/core/modules/nft/linea_culture_2_5_acg.py +25 -0
  449. web3_wizzard_lib/core/modules/nft/linea_culture_2_6_ascend_the_end.py +25 -0
  450. web3_wizzard_lib/core/modules/nft/linea_culture_3_1_ascend_the_end.py +25 -0
  451. web3_wizzard_lib/core/modules/nft/linea_culture_3_2_sending_me.py +25 -0
  452. web3_wizzard_lib/core/modules/nft/linea_culture_3_3_townstory.py +25 -0
  453. web3_wizzard_lib/core/modules/nft/linea_culture_3_4_daniele.py +25 -0
  454. web3_wizzard_lib/core/modules/nft/linea_culture_3_5_demmortal.py +25 -0
  455. web3_wizzard_lib/core/modules/nft/linea_culture_3_6_foxy.py +25 -0
  456. web3_wizzard_lib/core/modules/nft/linea_culture_4_1_coop_records.py +60 -0
  457. web3_wizzard_lib/core/modules/nft/linea_culture_4_2_borja_moskv.py +65 -0
  458. web3_wizzard_lib/core/modules/nft/linea_culture_4_2_borja_moskv_approve.py +27 -0
  459. web3_wizzard_lib/core/modules/nft/linea_culture_4_3_fruit.py +66 -0
  460. web3_wizzard_lib/core/modules/nft/linea_culture_4_4_fruit_crux.py +67 -0
  461. web3_wizzard_lib/core/modules/nft/linea_culture_4_5_forbidden_fruit.py +67 -0
  462. web3_wizzard_lib/core/modules/nft/linea_culture_4_6_laurent.py +67 -0
  463. web3_wizzard_lib/core/modules/nft/linea_culture_day2.py +20 -0
  464. web3_wizzard_lib/core/modules/nft/linea_culture_day3.py +20 -0
  465. web3_wizzard_lib/core/modules/nft/linea_ens_names.py +107 -0
  466. web3_wizzard_lib/core/modules/nft/lucky_cat.py +25 -0
  467. web3_wizzard_lib/core/modules/nft/merkly_minter_module.py +22 -0
  468. web3_wizzard_lib/core/modules/nft/micro3.py +23 -0
  469. web3_wizzard_lib/core/modules/nft/mint_2048.py +28 -0
  470. web3_wizzard_lib/core/modules/nft/nft_submodule.py +16 -0
  471. web3_wizzard_lib/core/modules/nft/nidum.py +87 -0
  472. web3_wizzard_lib/core/modules/nft/nidum_bonus.py +23 -0
  473. web3_wizzard_lib/core/modules/nft/nomis.py +64 -0
  474. web3_wizzard_lib/core/modules/nft/nomis_attest.py +66 -0
  475. web3_wizzard_lib/core/modules/nft/nouns.py +27 -0
  476. web3_wizzard_lib/core/modules/nft/octomos.py +32 -0
  477. web3_wizzard_lib/core/modules/nft/omnisea.py +33 -0
  478. web3_wizzard_lib/core/modules/nft/omnizone.py +25 -0
  479. web3_wizzard_lib/core/modules/nft/orbiter_claim.py +87 -0
  480. web3_wizzard_lib/core/modules/nft/readon.py +30 -0
  481. web3_wizzard_lib/core/modules/nft/rubyscore.py +45 -0
  482. web3_wizzard_lib/core/modules/nft/sarubol.py +22 -0
  483. web3_wizzard_lib/core/modules/nft/satoshi_universe.py +22 -0
  484. web3_wizzard_lib/core/modules/nft/scroll_canvas_attest_year_badge.py +35 -0
  485. web3_wizzard_lib/core/modules/nft/scroll_canvas_mint.py +51 -0
  486. web3_wizzard_lib/core/modules/nft/sign.py +32 -0
  487. web3_wizzard_lib/core/modules/nft/snap.py +25 -0
  488. web3_wizzard_lib/core/modules/nft/snap_bonus.py +31 -0
  489. web3_wizzard_lib/core/modules/nft/social_scan.py +22 -0
  490. web3_wizzard_lib/core/modules/nft/sub_module.py +8 -0
  491. web3_wizzard_lib/core/modules/nft/tavaera.py +30 -0
  492. web3_wizzard_lib/core/modules/nft/townstory.py +75 -0
  493. web3_wizzard_lib/core/modules/nft/townstory_bonus.py +45 -0
  494. web3_wizzard_lib/core/modules/nft/trusta_reputation.py +48 -0
  495. web3_wizzard_lib/core/modules/nft/trustaa_poh.py +49 -0
  496. web3_wizzard_lib/core/modules/nft/uber_poh.py +24 -0
  497. web3_wizzard_lib/core/modules/nft/wizards_of_linea.py +26 -0
  498. web3_wizzard_lib/core/modules/nft/yoddlo.py +22 -0
  499. web3_wizzard_lib/core/modules/nft/yuliverse.py +22 -0
  500. web3_wizzard_lib/core/modules/nft/zace.py +25 -0
  501. web3_wizzard_lib/core/modules/nft/zks_domain.py +41 -0
  502. web3_wizzard_lib/core/modules/nft_minter.py +107 -0
  503. web3_wizzard_lib/core/modules/orbiter.py +39 -0
  504. web3_wizzard_lib/core/modules/orbiter_checker.py +26 -0
  505. web3_wizzard_lib/core/modules/rage.py +54 -0
  506. web3_wizzard_lib/core/modules/scroll_bridge.py +45 -0
  507. web3_wizzard_lib/core/modules/sell_all.py +51 -0
  508. web3_wizzard_lib/core/modules/sleep_module.py +25 -0
  509. web3_wizzard_lib/core/modules/smart_contract_deployment.py +37 -0
  510. web3_wizzard_lib/core/modules/stargate/__init__.py +0 -0
  511. web3_wizzard_lib/core/modules/stargate/auto_bridge.py +91 -0
  512. web3_wizzard_lib/core/modules/stargate/bridge.py +38 -0
  513. web3_wizzard_lib/core/modules/stargate/bridge_eth.py +59 -0
  514. web3_wizzard_lib/core/modules/stargate/bridge_tokens.py +48 -0
  515. web3_wizzard_lib/core/modules/stargate/classic_bridge.py +34 -0
  516. web3_wizzard_lib/core/modules/stargate/farming.py +163 -0
  517. web3_wizzard_lib/core/modules/stargate/l0_data.py +10 -0
  518. web3_wizzard_lib/core/modules/stargate/pool.py +74 -0
  519. web3_wizzard_lib/core/modules/stargate/stargate_balance_utils.py +25 -0
  520. web3_wizzard_lib/core/modules/stargate/stargate_gas_checker.py +68 -0
  521. web3_wizzard_lib/core/modules/swap/__init__.py +1 -0
  522. web3_wizzard_lib/core/modules/swap/horizondex.py +38 -0
  523. web3_wizzard_lib/core/modules/swap/izumi.py +41 -0
  524. web3_wizzard_lib/core/modules/swap/lineaswap.py +34 -0
  525. web3_wizzard_lib/core/modules/swap/maverick.py +66 -0
  526. web3_wizzard_lib/core/modules/swap/mute.py +39 -0
  527. web3_wizzard_lib/core/modules/swap/odos.py +58 -0
  528. web3_wizzard_lib/core/modules/swap/one_inch.py +58 -0
  529. web3_wizzard_lib/core/modules/swap/pancake.py +41 -0
  530. web3_wizzard_lib/core/modules/swap/swap_facade.py +10 -0
  531. web3_wizzard_lib/core/modules/swap/swap_list.py +10 -0
  532. web3_wizzard_lib/core/modules/swap/syncswap.py +62 -0
  533. web3_wizzard_lib/core/modules/swap/velocore.py +40 -0
  534. web3_wizzard_lib/core/modules/swap/woofi.py +38 -0
  535. web3_wizzard_lib/core/modules/swap/xy_finance.py +43 -0
  536. web3_wizzard_lib/core/modules/swap/zebra.py +32 -0
  537. web3_wizzard_lib/core/modules/warm_up.py +98 -0
  538. web3_wizzard_lib/core/modules/wrapping.py +74 -0
  539. web3_wizzard_lib/core/modules/zkdx.py +63 -0
  540. web3_wizzard_lib/core/utils/__init__.py +0 -0
  541. web3_wizzard_lib/core/utils/sub_module.py +8 -0
  542. web3_wizzard_lib/launcher.py +39 -0
  543. web3_wizzard_lib-0.0.2.data/data/requirements.txt +1 -0
  544. web3_wizzard_lib-0.0.2.dist-info/METADATA +10 -0
  545. web3_wizzard_lib-0.0.2.dist-info/RECORD +547 -0
  546. web3_wizzard_lib-0.0.2.dist-info/WHEEL +5 -0
  547. web3_wizzard_lib-0.0.2.dist-info/top_level.txt +3 -0
@@ -0,0 +1,123 @@
1
+ from datetime import datetime
2
+
3
+ from eth_account.messages import encode_defunct
4
+ from sybil_engine.contract.contract import Contract
5
+ from sybil_engine.contract.erc20contract import MAX_ALLOWANCE
6
+ from sybil_engine.contract.transaction_executor import evm_transaction
7
+ from sybil_engine.data.tokens import get_tokens_for_chain
8
+ from sybil_engine.utils.file_loader import load_abi
9
+ from web3 import Web3
10
+
11
+ abi = load_abi("resources/abi/syncswap_router.json")
12
+
13
+
14
+ class SyncSwapRouter(Contract):
15
+ def __init__(self, contract_address, web3):
16
+ super().__init__(contract_address, web3, abi)
17
+
18
+ @evm_transaction
19
+ def swap(self, account, amount_to_swap, token_in_data_address, token_in_address, pool_address, amount_out_min,
20
+ withdraw_mode=b'\x01'):
21
+ sender = account.address
22
+
23
+ txn_params = self.build_generic_data(sender, False)
24
+ txn_params['value'] = amount_to_swap.wei if amount_to_swap.token == 'ETH' else 10000000000000
25
+
26
+ steps = self.steps(amount_to_swap, pool_address, sender, token_in_address, token_in_data_address,
27
+ withdraw_mode)
28
+
29
+ paths = [{"steps": steps, "tokenIn": token_in_address, "amountIn": amount_to_swap.wei}]
30
+ deadline = int(datetime.now().timestamp() + 60 * 60 * 3)
31
+
32
+ return self.contract.functions.swap(paths, amount_out_min, deadline).build_transaction(txn_params)
33
+
34
+ def steps(self, amount_to_swap, pool_address, sender, token_in_address, token_in_data_address, withdraw_mode):
35
+ if isinstance(pool_address, str):
36
+ data = b'\x00' * 12 + bytes.fromhex(token_in_data_address[2:]) + b'\x00' * 12 + bytes.fromhex(
37
+ sender[2:]) + b'\x00' * 31 + withdraw_mode
38
+
39
+ steps = [
40
+ {
41
+ "pool": pool_address,
42
+ "data": data,
43
+ "callback": get_tokens_for_chain(amount_to_swap.chain)['ZERO_ADDRESS'],
44
+ "callbackData": b''
45
+ }
46
+ ]
47
+ else:
48
+ usdc_address = get_tokens_for_chain(amount_to_swap.chain)['USDC']
49
+
50
+ pool_pairs = list(pool_address.items())
51
+ if amount_to_swap.token == 'USDT':
52
+ zero_pool = pool_pairs[0][1] # USDC
53
+ first_pool = pool_pairs[1][1] # USDT
54
+
55
+ data_fir_step = b'\x00' * 12 + bytes.fromhex(token_in_address[2:]) + b'\x00' * 12 + bytes.fromhex(
56
+ sender[2:]) + b'\x00' * 31 + b'\x00'
57
+
58
+ data_sec_step = b'\x00' * 12 + bytes.fromhex(usdc_address[2:]) + b'\x00' * 12 + bytes.fromhex(
59
+ sender[2:]) + b'\x00' * 31 + withdraw_mode
60
+ else:
61
+ zero_pool = pool_pairs[1][1] # USDT
62
+ first_pool = pool_pairs[0][1] # USDC
63
+
64
+ data_fir_step = b'\x00' * 12 + bytes.fromhex(
65
+ token_in_data_address[2:]) + b'\x00' * 12 + bytes.fromhex(zero_pool[2:]) + b'\x00' * 31 + b'\x00'
66
+
67
+ data_sec_step = b'\x00' * 12 + bytes.fromhex(usdc_address[2:]) + b'\x00' * 12 + bytes.fromhex(
68
+ sender[2:]) + b'\x00' * 31 + b'\x02'
69
+
70
+ steps = [
71
+ {
72
+ "pool": first_pool,
73
+ "data": data_fir_step,
74
+ "callback": get_tokens_for_chain(amount_to_swap.chain)['ZERO_ADDRESS'],
75
+ "callbackData": b''
76
+ },
77
+ {
78
+ "pool": zero_pool,
79
+ "data": data_sec_step,
80
+ "callback": get_tokens_for_chain(amount_to_swap.chain)['ZERO_ADDRESS'],
81
+ "callbackData": b''
82
+ }
83
+ ]
84
+
85
+ return steps
86
+
87
+ @evm_transaction
88
+ def add_liquidity2(self, account, amount):
89
+ sender = account.address
90
+
91
+ txn_params = self.build_generic_data(sender, False)
92
+
93
+ txn_params['value'] = amount.wei
94
+
95
+ return self.contract.functions.addLiquidity2(
96
+ '0x814A23B053FD0f102AEEda0459215C2444799C70',
97
+ [
98
+ (
99
+ '0x0000000000000000000000000000000000000000',
100
+ amount.wei
101
+ )
102
+ ],
103
+ f'0x000000000000000000000000{account.address[2:]}',
104
+ 0,
105
+ '0x0000000000000000000000000000000000000000',
106
+ b'0x'
107
+ ).build_transaction(txn_params)
108
+
109
+ @evm_transaction
110
+ def burn_liquidity(self, account, pool, amount):
111
+ sender = account.address
112
+
113
+ txn_params = self.build_generic_data(sender, False)
114
+
115
+ return self.contract.functions.burnLiquiditySingle(
116
+ pool,
117
+ amount.wei, # liqudity
118
+ Web3.to_bytes(
119
+ hexstr=f'0x0000000000000000000000005300000000000000000000000000000000000004000000000000000000000000{account.address[2:]}0000000000000000000000000000000000000000000000000000000000000001'),
120
+ amount.wei, # minAmount
121
+ Web3.to_bytes(hexstr='0x0000000000000000000000000000000000000000'),
122
+ b'0x'
123
+ ).build_transaction(txn_params)
@@ -0,0 +1,18 @@
1
+ from sybil_engine.contract.contract import Contract
2
+ from sybil_engine.utils.file_loader import load_abi
3
+ from web3 import Web3
4
+
5
+ abi = load_abi("resources/abi/tavaera_id.json")
6
+
7
+
8
+ class TavaeraID(Contract):
9
+ def __init__(self, contract_address, web3):
10
+ super().__init__(contract_address, web3, abi)
11
+
12
+ def mint_citizen_id(self, account):
13
+ txn_params = self.build_generic_data(account.address, False)
14
+ txn_params['value'] = Web3.to_wei(0.0003, "ether")
15
+
16
+ contract_txn = self.contract.functions.mintCitizenId().build_transaction(txn_params)
17
+
18
+ return contract_txn
@@ -0,0 +1,17 @@
1
+ from sybil_engine.contract.contract import Contract
2
+ from sybil_engine.utils.file_loader import load_abi
3
+
4
+
5
+ abi = load_abi("resources/abi/tavaera.json")
6
+
7
+
8
+ class Tavaera(Contract):
9
+ def __init__(self, contract_address, web3):
10
+ super().__init__(contract_address, web3, abi)
11
+
12
+ def mint(self, account):
13
+ txn_params = self.build_generic_data(account.address, False)
14
+
15
+ contract_txn = self.contract.functions.mint().build_transaction(txn_params)
16
+
17
+ return contract_txn
@@ -0,0 +1,19 @@
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
+ from web3 import Web3
5
+
6
+ abi = load_abi("resources/abi/townstory_bonus.json")
7
+
8
+
9
+ class TownstoryBonusContract(Contract):
10
+ def __init__(self, contract_address, web3):
11
+ super().__init__(contract_address, web3, abi)
12
+
13
+ @evm_transaction
14
+ def claim_linea_travelbag(self, account, signature, deadline):
15
+ txn_params = self.build_generic_data(account.address, False)
16
+
17
+ return self.contract.functions.claimLineaTravelbag(
18
+ signature, account.address, deadline
19
+ ).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
+ from web3 import Web3
5
+
6
+ abi = load_abi("resources/abi/townstory.json")
7
+
8
+
9
+ class TownstoryContract(Contract):
10
+ def __init__(self, contract_address, web3):
11
+ super().__init__(contract_address, web3, abi)
12
+
13
+ @evm_transaction
14
+ def create_account_sign(self, account, signature, deadline):
15
+ txn_params = self.build_generic_data(account.address, False)
16
+
17
+ contract_txn = self.contract.functions.createAccountSign(
18
+ signature, 0, deadline
19
+ ).build_transaction(txn_params)
20
+
21
+ return contract_txn
@@ -0,0 +1,44 @@
1
+ from sybil_engine.contract.contract import Contract
2
+ from sybil_engine.utils.file_loader import load_abi
3
+ from web3 import Web3
4
+
5
+ abi = load_abi("resources/abi/velocore_lens.json")
6
+
7
+
8
+ def to_bytes32(address):
9
+ return Web3.to_bytes(hexstr=address).rjust(32, b'\0')
10
+
11
+
12
+ class VelocoreLensContract(Contract):
13
+ def __init__(self, contract_address, web3):
14
+ super().__init__(contract_address, web3, abi)
15
+
16
+ def getPoolBalance(self):
17
+ token_identifier = '0xe2c67A9B15e9E7FF8A9Cb0dFb8feE5609923E5DB'
18
+
19
+ # 0x000000000000000000000000e2c67A9B15e9E7FF8A9Cb0dFb8feE5609923E5DB
20
+
21
+ return (self.contract.functions.getPoolBalance(
22
+ '0xe2c67A9B15e9E7FF8A9Cb0dFb8feE5609923E5DB',
23
+ Web3.to_bytes(hexstr='0x000000000000000000000000b98308D11E2B578858Fbe65b793e71C7a0CAa43e')
24
+ )
25
+ .call())
26
+
27
+ def userBalances(self):
28
+ token_identifier = '0xe2c67A9B15e9E7FF8A9Cb0dFb8feE5609923E5DB'
29
+
30
+ # 0x000000000000000000000000e2c67A9B15e9E7FF8A9Cb0dFb8feE5609923E5DB
31
+ # 0x000000000000000000000000e2c67A9B15e9E7FF8A9Cb0dFb8feE5609923E5DB
32
+
33
+ return (self.contract.functions.userBalances(
34
+ '0xe2c67A9B15e9E7FF8A9Cb0dFb8feE5609923E5DB',
35
+ [Web3.to_bytes(hexstr='0x000000000000000000000000b98308D11E2B578858Fbe65b793e71C7a0CAa43e')]
36
+ )
37
+ .call())
38
+
39
+ def query_gauge(self, pool_address, account):
40
+ return (self.contract.functions.queryGauge(
41
+ pool_address,
42
+ account.address
43
+ )
44
+ .call())
@@ -0,0 +1,198 @@
1
+ from sybil_engine.contract.contract import Contract
2
+ from sybil_engine.contract.transaction_executor import evm_transaction
3
+ from sybil_engine.data.tokens import get_tokens_for_chain
4
+
5
+ from sybil_engine.utils.file_loader import load_abi
6
+ from web3 import Web3
7
+
8
+ abi = load_abi("resources/abi/velocore_pool.json")
9
+
10
+
11
+ def to_bytes32(address):
12
+ return Web3.to_bytes(hexstr=address).rjust(32, b'\0')
13
+
14
+
15
+ class VelocorePoolContract(Contract):
16
+ ZERO = '0x0000000000000000000000000000000000000000000000000000000000000000'
17
+
18
+ def __init__(self, contract_address, web3):
19
+ self.LVC = get_tokens_for_chain('LINEA')['LVC']
20
+ self.VLP = get_tokens_for_chain('LINEA')['VLP']
21
+ super().__init__(contract_address, web3, abi)
22
+
23
+ @evm_transaction
24
+ def deposit(self, account, amount, deposit_token, pool):
25
+ sender = account.address
26
+
27
+ txn_params = self.build_generic_data(sender, set_contract_address=False)
28
+
29
+ amount_hex = '0x' + format(amount, '064x')
30
+ min_uint_256_hex = '00000000000000000000000000000000'
31
+ inverted_amount = self.invert_int(amount)
32
+ inverted_amount_hex = '0x' + min_uint_256_hex + inverted_amount
33
+
34
+ if deposit_token == 'ETH':
35
+ tokenRef = [
36
+ to_bytes32(self.VLP),
37
+ to_bytes32(self.LVC),
38
+ to_bytes32('0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee')
39
+ ]
40
+ deposit = [0, 0, 0]
41
+
42
+ txn_params['value'] = amount
43
+
44
+ ops = [
45
+ (
46
+ to_bytes32(f'0x040000000000000000000000{sender[2:]}'),
47
+ [to_bytes32('0x02000000000000000000000000000000' + format(amount, '032x'))],
48
+ to_bytes32(self.ZERO)
49
+ ),
50
+ (
51
+ to_bytes32(f'0x040000000000000000000000{sender[2:]}'),
52
+ [to_bytes32('0x02000000000000000000000000000000' + inverted_amount)],
53
+ to_bytes32(self.ZERO)
54
+ ),
55
+ (
56
+ to_bytes32(f'000000000000000000000000{pool[2:]}'),
57
+ [
58
+ to_bytes32('000100000000000000000000000000007fffffffffffffffffffffffffffffff'),
59
+ to_bytes32('020200000000000000000000000000007fffffffffffffffffffffffffffffff')
60
+ ],
61
+ to_bytes32(self.ZERO)
62
+ ),
63
+ (
64
+ to_bytes32('0500000000000000000000000000000000000000000000000000000000000000'),
65
+ [to_bytes32('00010000000000000000000000000000ffffffffffffffffffffffffff785a9c')],
66
+ to_bytes32(self.ZERO)
67
+ ),
68
+ (
69
+ to_bytes32(f'010000000000000000000000{pool[2:]}'),
70
+ [
71
+ to_bytes32('000200000000000000000000000000007fffffffffffffffffffffffffffffff'),
72
+ to_bytes32('0101000000000000000000000000000000000000000000000000000000000000')
73
+ ],
74
+ to_bytes32(self.ZERO)
75
+ )
76
+ ]
77
+ else:
78
+ wstETH = get_tokens_for_chain('LINEA')[deposit_token]
79
+ tokenRef = [
80
+ to_bytes32(wstETH),
81
+ to_bytes32(self.LVC),
82
+ to_bytes32(self.VLP),
83
+ to_bytes32('0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee')
84
+ ]
85
+ deposit = [amount, 0, 0, 0]
86
+
87
+ wstETHLP = '0x1D12E25e5516e5aD32F97fE9Edc332Bf4683f487'
88
+
89
+ ops = [
90
+ (
91
+ to_bytes32(f'0x040000000000000000000000{sender[2:]}'),
92
+ [to_bytes32(amount_hex)],
93
+ to_bytes32(self.ZERO)
94
+ ),
95
+ (
96
+ to_bytes32(f'0x040000000000000000000000{sender[2:]}'),
97
+ [to_bytes32(inverted_amount_hex)],
98
+ to_bytes32(self.ZERO)
99
+ ),
100
+ (
101
+ to_bytes32(f'000000000000000000000000{wstETHLP[2:]}'),
102
+ [
103
+ to_bytes32('000200000000000000000000000000007fffffffffffffffffffffffffffffff'),
104
+ to_bytes32('030100000000000000000000000000007fffffffffffffffffffffffffffffff')
105
+ ],
106
+ to_bytes32(self.ZERO)
107
+ ),
108
+ (
109
+ to_bytes32(f'000000000000000000000000{pool[2:]}'),
110
+ [
111
+ to_bytes32('020100000000000000000000000000007fffffffffffffffffffffffffffffff'),
112
+ to_bytes32('030200000000000000000000000000007fffffffffffffffffffffffffffffff')
113
+ ],
114
+ to_bytes32(self.ZERO)
115
+ ),
116
+ (
117
+ to_bytes32('0500000000000000000000000000000000000000000000000000000000000000'),
118
+ [to_bytes32('02010000000000000000000000000000ffffffffffffffffffffffb4ad12f9cd')],
119
+ to_bytes32(self.ZERO)
120
+ ),
121
+ (
122
+ to_bytes32(f'010000000000000000000000{pool[2:]}'),
123
+ [
124
+ to_bytes32('0101000000000000000000000000000000000000000000000000000000000000'),
125
+ to_bytes32('020200000000000000000000000000007fffffffffffffffffffffffffffffff')
126
+ ],
127
+ to_bytes32(self.ZERO)
128
+ )
129
+ ]
130
+
131
+ contract_txn = self.contract.functions.execute(tokenRef, deposit, ops).build_transaction(txn_params)
132
+
133
+ if self.web3.eth.chain_id == 59144:
134
+ contract_txn['gas'] = contract_txn['gas'] * 2
135
+
136
+ return contract_txn
137
+
138
+ @evm_transaction
139
+ def withdraw(self, account, eth_amount, eth_vlp, pool):
140
+ sender = account.address
141
+
142
+ txn_params = self.build_generic_data(sender, set_contract_address=False)
143
+
144
+ tokenRef = [
145
+ to_bytes32(self.LVC),
146
+ to_bytes32(self.VLP),
147
+ to_bytes32('0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee')
148
+ ]
149
+ deposit = [0, 0, 0]
150
+
151
+ inverted_eth_amount = self.invert_int(eth_amount)
152
+ inverted_eth_vlp = self.invert_int(eth_vlp[0])
153
+
154
+ ops = [
155
+ (
156
+ to_bytes32(f'010000000000000000000000{pool[2:]}'),
157
+ [
158
+ to_bytes32('0001000000000000000000000000000000000000000000000000000000000000'),
159
+ to_bytes32(f'01000000000000000000000000000000{inverted_eth_vlp}')
160
+ ],
161
+ to_bytes32('0x0000000000000000000000000000000000000000000000000000000000000000')
162
+ ),
163
+ (
164
+ to_bytes32(f'000000000000000000000000{pool[2:]}'),
165
+ [
166
+ to_bytes32('010200000000000000000000000000007fffffffffffffffffffffffffffffff'),
167
+ to_bytes32('020100000000000000000000000000007fffffffffffffffffffffffffffffff')
168
+ ],
169
+ to_bytes32('0x0000000000000000000000000000000000000000000000000000000000000000')
170
+ ),
171
+ (
172
+ to_bytes32('0500000000000000000000000000000000000000000000000000000000000000'),
173
+ [to_bytes32(f'02010000000000000000000000000000{inverted_eth_amount}')],
174
+ to_bytes32('0x0000000000000000000000000000000000000000000000000000000000000000')
175
+ )
176
+ ]
177
+
178
+ contract_txn = self.contract.functions.execute(tokenRef, deposit, ops).build_transaction(txn_params)
179
+
180
+ if self.web3.eth.chain_id == 59144:
181
+ contract_txn['gas'] = contract_txn['gas'] * 2
182
+
183
+ return contract_txn
184
+
185
+ def allPairs(self):
186
+ return self.contract.functions.allPairs(1).call()
187
+
188
+ def facets(self):
189
+ return self.contract.functions.facets().call()
190
+
191
+ def invert_int(self, amount):
192
+ max_uint_256_hex = 'ffffffffffffffffffffffffffffffff'
193
+ hex_2 = int(max_uint_256_hex, 16) - amount + 1
194
+ hex_string = hex(hex_2)[2:].rjust(32, '0')
195
+
196
+ return hex_string
197
+ # 5411000000000000
198
+ # 5410999999999999
@@ -0,0 +1,80 @@
1
+ from datetime import datetime
2
+
3
+ from sybil_engine.contract.contract import Contract
4
+ from sybil_engine.contract.transaction_executor import evm_transaction
5
+ from sybil_engine.data.networks import get_ids_chain
6
+ from sybil_engine.data.tokens import get_tokens_for_chain
7
+ from sybil_engine.utils.file_loader import load_abi
8
+
9
+ abi = load_abi("resources/abi/velocore.json")
10
+
11
+
12
+ class VelocoreRouter(Contract):
13
+ def __init__(self, contract_address, web3):
14
+ super().__init__(contract_address, web3, abi)
15
+
16
+ @evm_transaction
17
+ def swap_exact_eth_for_tokens(self, account, amount_to_swap, token_in_address, token_out_address, amount_out_min):
18
+ sender = account.address
19
+
20
+ deadline = int(datetime.now().timestamp() + 60 * 60 * 3)
21
+ stable = False
22
+
23
+ txn_params = self.build_generic_data(sender)
24
+
25
+ txn_params['value'] = amount_to_swap.wei
26
+ txn_params['data'] = self.contract.encode_abi('swapExactETHForTokens', args=(
27
+ amount_out_min,
28
+ [[token_in_address, token_out_address, stable]],
29
+ sender,
30
+ deadline
31
+ )
32
+ )
33
+
34
+ return txn_params
35
+
36
+ @evm_transaction
37
+ def swap_exact_tokens_for_eth(self, account, amount_to_swap, token_in_address, token_out_address, amount_out_min):
38
+ sender = account.address
39
+ txn_params = self.build_generic_data(account.address, False)
40
+
41
+ deadline = int(datetime.now().timestamp() + 60 * 60 * 3)
42
+ stable = False
43
+
44
+ return self.contract.functions.swapExactTokensForETH(
45
+ amount_to_swap.wei,
46
+ amount_out_min,
47
+ [[token_in_address, token_out_address, stable]],
48
+ sender,
49
+ deadline
50
+ ).build_transaction(txn_params)
51
+
52
+ @evm_transaction
53
+ def swap_exact_tokens_for_tokens(self, account, amount_to_swap, token_in_address, token_out_address,
54
+ amount_out_min):
55
+ sender = account.address
56
+ txn_params = self.build_generic_data(sender)
57
+
58
+ deadline = int(datetime.now().timestamp() + 60 * 60 * 3)
59
+
60
+ usdc_address = get_tokens_for_chain(get_ids_chain()[self.web3.eth.chain_id])['USDC']
61
+
62
+ if token_out_address != usdc_address:
63
+ stable = False
64
+ else:
65
+ stable = True
66
+
67
+ return self.contract.functions.swapExactTokensForTokens(
68
+ amount_to_swap.wei,
69
+ amount_out_min,
70
+ [[token_in_address, token_out_address, stable]],
71
+ sender,
72
+ deadline
73
+ ).build_transaction(txn_params)
74
+
75
+ def get_amount_out(self, amount_to_swap, token_in_address, token_out_address):
76
+ return self.contract.functions.getAmountOut(
77
+ amount_to_swap.wei,
78
+ token_in_address,
79
+ token_out_address
80
+ ).call()[0]
@@ -0,0 +1,29 @@
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/woofi.json")
6
+
7
+
8
+ class WoofiSwap(Contract):
9
+ def __init__(self, contract_address, web3):
10
+ super().__init__(contract_address, web3, abi)
11
+
12
+ @evm_transaction
13
+ def swap(self, account, amount_to_swap, token_in_address, token_out_address, amount_out_min):
14
+ sender = account.address
15
+ txn_params = self.build_generic_data(sender, False)
16
+
17
+ txn_params['value'] = amount_to_swap.wei if amount_to_swap.token == 'ETH' else 0
18
+
19
+ return self.contract.functions.swap(
20
+ token_in_address,
21
+ token_out_address,
22
+ amount_to_swap.wei,
23
+ amount_out_min,
24
+ sender,
25
+ sender
26
+ ).build_transaction(txn_params)
27
+
28
+ def query_swap(self, from_token, to_token, from_amount):
29
+ return self.contract.functions.querySwap(from_token, to_token, from_amount.wei).call()
@@ -0,0 +1,87 @@
1
+ import requests
2
+ from sybil_engine.contract.contract import Contract
3
+ from sybil_engine.contract.transaction_executor import evm_transaction
4
+ from web3 import Web3
5
+
6
+
7
+ class XYSwapContract(Contract):
8
+ def __init__(self, contract_address, web3):
9
+ super().__init__(contract_address, web3, None)
10
+
11
+ def get_quote(self, from_token: str, to_token: str, amount: int, slippage: float):
12
+ url = "https://aggregator-api.xy.finance/v1/quote"
13
+
14
+ params = {
15
+ "srcChainId": self.web3.eth.chain_id,
16
+ "srcQuoteTokenAddress": Web3.to_checksum_address(from_token),
17
+ "srcQuoteTokenAmount": amount.wei,
18
+ "dstChainId": self.web3.eth.chain_id,
19
+ "dstQuoteTokenAddress": Web3.to_checksum_address(to_token),
20
+ "slippage": slippage
21
+ }
22
+
23
+ response = requests.get(url=url, params=params)
24
+ transaction_data = response.json()
25
+
26
+ return transaction_data
27
+
28
+ @evm_transaction
29
+ def swap(
30
+ self,
31
+ account,
32
+ amount_to_swap,
33
+ from_token: str,
34
+ to_token: str,
35
+ quote: int,
36
+ slippage: int
37
+ ):
38
+ amount_wei = amount_to_swap.wei
39
+
40
+ swap_provider = quote["routes"][0]["srcSwapDescription"]["provider"]
41
+
42
+ transaction_data = self.build_transaction(
43
+ account,
44
+ from_token,
45
+ to_token,
46
+ amount_wei,
47
+ slippage,
48
+ swap_provider
49
+ )
50
+
51
+ tx_data = self.build_generic_data(account.address, True)
52
+
53
+ tx_data.update(
54
+ {
55
+ "to": self.web3.to_checksum_address(transaction_data["tx"]["to"]),
56
+ "data": transaction_data["tx"]["data"],
57
+ "value": transaction_data["tx"]["value"],
58
+ "nonce": self.web3.eth.get_transaction_count(account.address)
59
+ }
60
+ )
61
+
62
+ return tx_data
63
+
64
+ def build_transaction(self, account, from_token: str, to_token: str, amount: int, slippage: float,
65
+ swap_provider: str):
66
+ url = "https://aggregator-api.xy.finance/v1/buildTx"
67
+
68
+ params = {
69
+ "srcChainId": self.web3.eth.chain_id,
70
+ "srcQuoteTokenAddress": Web3.to_checksum_address(from_token),
71
+ "srcQuoteTokenAmount": amount,
72
+ "dstChainId": self.web3.eth.chain_id,
73
+ "dstQuoteTokenAddress": Web3.to_checksum_address(to_token),
74
+ "slippage": slippage,
75
+ "receiver": account.address,
76
+ "srcSwapProvider": swap_provider,
77
+ }
78
+
79
+ # if XYSWAP_CONTRACT["use_ref"]:
80
+ # params.update({
81
+ # "affiliate": Web3.to_checksum_address("0xb98308D11E2B578858Fbe65b793e71C7a0CAa43e"),
82
+ # "commissionRate": 10000
83
+ # })
84
+
85
+ response = requests.get(url=url, params=params)
86
+
87
+ return response.json()
@@ -0,0 +1,19 @@
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/yoddlo.json")
6
+
7
+
8
+ class YoddloContract(Contract):
9
+ def __init__(self, contract_address, web3):
10
+ super().__init__(contract_address, web3, abi)
11
+
12
+ @evm_transaction
13
+ def purchase(self, account):
14
+ txn_params = self.build_generic_data(account.address, True)
15
+
16
+ txn_params['value'] = 100000000000000
17
+ txn_params['data'] = '0xfb89f3b1'
18
+
19
+ return txn_params