web3-wizzard-lib 1.1.0__py3-none-any.whl → 1.2.0__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,3 +26,6 @@ class NewRageContract(Contract):
26
26
 
27
27
  def convert_to_shares(self, amount):
28
28
  return self.contract.functions.convertToShares(amount).call()
29
+
30
+ def max_redeem(self, account):
31
+ return self.contract.functions.maxRedeem(account.address).call()
@@ -24,16 +24,16 @@ class NewRageModule(Module):
24
24
  raise ConfigurationException("No such token supported by Rage withdraw module")
25
25
  rage = NewRageContract(contract_address, web3)
26
26
 
27
- balance = rage.balance_of(account)
28
- shares = rage.convert_to_shares(balance)
27
+ #balance = rage.balance_of(account)
28
+ shares = rage.max_redeem(account)
29
29
 
30
- if balance > 0:
31
- logger.info(f"Withdraw {balance} {token} which is {shares} shares")
30
+ if shares > 0:
31
+ logger.info(f"Withdraw {shares} shares {token}")
32
32
  rage.redeem(account, shares)
33
33
  else:
34
34
  logger.info(f"Account {account.address} has 0 balance in Rage")
35
35
 
36
- add_accumulator("Total rage withdraw", balance)
36
+ #add_accumulator("Total rage withdraw", balance)
37
37
 
38
38
  def log(self):
39
39
  return "RAGE WITHDRAW"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: web3_wizzard_lib
3
- Version: 1.1.0
3
+ Version: 1.2.0
4
4
  Summary: Engine for web3 smart contracts automatization.
5
5
  Home-page: https://github.com/Indeoo/web3-wizzard-lib/
6
6
  Author: Indeoo
@@ -41,7 +41,7 @@ web3_wizzard_lib/core/contract/mendi_token.py,sha256=hVC5fqdZ9PTdpfnOn4MDXx_Wx_B
41
41
  web3_wizzard_lib/core/contract/merkly_minter.py,sha256=UGpcobKj5X0cT4UKHXZSxwtGFobbtQ4RXaEel05PaL8,1876
42
42
  web3_wizzard_lib/core/contract/micro3_contract.py,sha256=qnzB1h5D6q_WHVAKBnSQswLrBMcXyefuP5GQ66U0k40,621
43
43
  web3_wizzard_lib/core/contract/mute_router.py,sha256=Bhu6-xRgaZbpjJvhcDfnPZGuRIBciEGh0MggGiLZ6ek,3575
44
- web3_wizzard_lib/core/contract/new_rage_contract.py,sha256=C9EOU47KIw4cCe6bz5EDK6adcW2ZK7ysKPtU33nzxRw,917
44
+ web3_wizzard_lib/core/contract/new_rage_contract.py,sha256=KLvBdeA50ZHHLUCiSpof9IRCyNSl4pOLqhtnl3onl0E,1026
45
45
  web3_wizzard_lib/core/contract/nidum_contract.py,sha256=6k8B1G5s8LJFl9K6acg2qWfgVPnoJrG9BEHegWjO8uU,1524
46
46
  web3_wizzard_lib/core/contract/nile_contract.py,sha256=F6T6Dj2h2u_VdgcpAD3QYKIFafE6e3h_dKJZYb3CD0Y,2024
47
47
  web3_wizzard_lib/core/contract/nomis_attest_contract.py,sha256=mxHzvf6-IZoOe3jUhNNTNdlzXzCvhoWeoyanfBt3cMs,1171
@@ -112,7 +112,7 @@ web3_wizzard_lib/core/modules/linea_appeal.py,sha256=ic178q1PoSN3ea6OoTrfyWLZvUA
112
112
  web3_wizzard_lib/core/modules/linea_poh_lxp.py,sha256=keipTIhT3SrOESNJdIJesHBOOM-NKVzMGqKEACEKIvQ,2320
113
113
  web3_wizzard_lib/core/modules/liquidity_pool.py,sha256=vu0vBoXomvAJFa10n9woo66v62hQbEO726M4lkiLWNE,2181
114
114
  web3_wizzard_lib/core/modules/merkly_refuel.py,sha256=whQD6CplGt-hQxFN7lg40F6SmFU5niOO529lKMj0dyA,3488
115
- web3_wizzard_lib/core/modules/new_rage_withdraw.py,sha256=Z8AY0NDFP54sw_f9A6AhJYYxdQliEkdo5sZTHqcwV1c,1558
115
+ web3_wizzard_lib/core/modules/new_rage_withdraw.py,sha256=OosuYItBZavXeqcQQDHL6FqLZv7tD-J8UZZx_0VYzG8,1534
116
116
  web3_wizzard_lib/core/modules/nft_minter.py,sha256=Z6HamxMv6NfqmXKb8zG1x4ItN5yZhGg9kvNFfPrlbNE,4150
117
117
  web3_wizzard_lib/core/modules/orbiter.py,sha256=Y_1xX7QkRdju9wXo-RKgeIoNwPJYIqrhxPK6uC5TaHU,1400
118
118
  web3_wizzard_lib/core/modules/orbiter_checker.py,sha256=Zo3r2S986sz5srcKTz2g6vpwv9i3YVOJSGkQEvE7ul8,666
@@ -360,8 +360,8 @@ web3_wizzard_lib/resources/main/contracts.json,sha256=jGeEoEiys1Itg7s5WFIeVFKis9
360
360
  web3_wizzard_lib/resources/main/networks.json,sha256=dmZLOsSaj2_CJwLqS4Deb4FgQrxPWpIQKGml6cXfKzI,6465
361
361
  web3_wizzard_lib/resources/main/pairs.json,sha256=uvIFvY46Ctiw8hjGd9e-1WE0qLf_duo3MuZncRMLqGg,8262
362
362
  web3_wizzard_lib/resources/main/tokens.json,sha256=AoZz_I6AVoZuecNdyX5L-SnGm6TREuPrsYd2i9PJr7U,5707
363
- web3_wizzard_lib-1.1.0.data/data/requirements.txt,sha256=5oZVZuID8L00sR9kJZYJg-TYMRN1WY93ktdNIhPIzX8,20
364
- web3_wizzard_lib-1.1.0.dist-info/METADATA,sha256=m1OublvwCusma1Sar0UETQG2Xd_qkBQzeha5gz2tt2c,428
365
- web3_wizzard_lib-1.1.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
366
- web3_wizzard_lib-1.1.0.dist-info/top_level.txt,sha256=8dD8S5HQo4dKtxogttWY_sh4n3yCVy0MwiTelYp6kug,28
367
- web3_wizzard_lib-1.1.0.dist-info/RECORD,,
363
+ web3_wizzard_lib-1.2.0.data/data/requirements.txt,sha256=5oZVZuID8L00sR9kJZYJg-TYMRN1WY93ktdNIhPIzX8,20
364
+ web3_wizzard_lib-1.2.0.dist-info/METADATA,sha256=DPd1Lxlmfy2ZAaF4GKEfd-NeZddDzsE6nCQQFpXBASA,428
365
+ web3_wizzard_lib-1.2.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
366
+ web3_wizzard_lib-1.2.0.dist-info/top_level.txt,sha256=8dD8S5HQo4dKtxogttWY_sh4n3yCVy0MwiTelYp6kug,28
367
+ web3_wizzard_lib-1.2.0.dist-info/RECORD,,