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

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,11 +10,11 @@ class GmxRewardRouter(Contract):
10
10
  super().__init__(contract_address, web3, abi)
11
11
 
12
12
  @evm_transaction
13
- def unstake_and_redeem(self, account, shares):
13
+ def unstake_and_redeem(self, account, glp_amount):
14
14
  txn_params = self.build_generic_data(account.address, False)
15
15
 
16
- contract_txn = self.contract.functions.redeem(
17
- shares,
16
+ contract_txn = self.contract.functions.unstakeAndRedeemGlpETH(
17
+ glp_amount,
18
18
  0,
19
19
  account.address,
20
20
  ).build_transaction(txn_params)
@@ -1,6 +1,7 @@
1
1
  from loguru import logger
2
2
  from sybil_engine.data.contracts import get_contracts_for_chain
3
3
  from sybil_engine.data.networks import get_chain_instance
4
+ from sybil_engine.domain.balance.tokens import Erc20Token
4
5
  from sybil_engine.module.module import Module
5
6
  from sybil_engine.utils.accumulator import add_accumulator
6
7
  from sybil_engine.utils.utils import ConfigurationException
@@ -21,7 +22,8 @@ class GMXRewardRouter(Module):
21
22
  contract_address = get_contracts_for_chain(chain_instance['chain'])['GMX_REWARD_ROUTER']
22
23
  gmx_reward_router = GmxRewardRouter(contract_address, web3)
23
24
 
24
- gmx_reward_router.unstake_and_redeem(account)
25
+ token = Erc20Token(chain, '0x1aDDD80E6039594eE970E5872D247bf0414C8903', web3)
26
+ gmx_reward_router.unstake_and_redeem(account, token.balance(account).wei)
25
27
 
26
28
  def log(self):
27
29
  return "GMX REWARD WITHDRAW"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: web3_wizzard_lib
3
- Version: 1.2.0
3
+ Version: 1.2.1
4
4
  Summary: Engine for web3 smart contracts automatization.
5
5
  Home-page: https://github.com/Indeoo/web3-wizzard-lib/
6
6
  Author: Indeoo
@@ -20,7 +20,7 @@ web3_wizzard_lib/core/contract/era_name.py,sha256=SyzGmm6HDlCHML3sLE1EouQn1gVfYH
20
20
  web3_wizzard_lib/core/contract/eralendcontract.py,sha256=agn2Z9dCHCgAeMzrzMkhO_x7KS2rtEfynIUWM64pPVk,1080
21
21
  web3_wizzard_lib/core/contract/eth_scroll_bridge_contract.py,sha256=zjiJN4uwaJTyAAPuugWQIisIdqfN0xh6prCGSeOWNvY,777
22
22
  web3_wizzard_lib/core/contract/frog_war_contract.py,sha256=AmpMHVfxubbbmPbMu_3ppSm-T5ZBvmSwaL6S0N548rw,1620
23
- web3_wizzard_lib/core/contract/gmx_reward_router.py,sha256=6zPu3ltPxu8K6jsKly3-cnhrtWAss81BbCgfIyRBOFw,699
23
+ web3_wizzard_lib/core/contract/gmx_reward_router.py,sha256=xDzmbaOnudjKmCpvnZ-ntxxlkbHZ3qMO7CzTbw83IEA,723
24
24
  web3_wizzard_lib/core/contract/horizondex_quoter.py,sha256=LLXBeAISVc87Ahx85_P-UZBcAGo3bXnh1phaJWbqVRI,548
25
25
  web3_wizzard_lib/core/contract/horizondex_router.py,sha256=qDNaJrjtguFG7fWhCUPQgcJYW9zTVOSHF8ae5tavnCY,3807
26
26
  web3_wizzard_lib/core/contract/imagine_contract.py,sha256=WdkqPhrEo86Ee7g3kRo-sq6c943R0-JGTXldF124FmY,672
@@ -104,7 +104,7 @@ web3_wizzard_lib/core/modules/coredao_bridge_auto.py,sha256=lMKP07P5FuuSykN3eb3K
104
104
  web3_wizzard_lib/core/modules/debank_checker.py,sha256=XCJk8VedNoHpdAQXk36dbdpZxJamcUuWDmud3i8ycPI,2792
105
105
  web3_wizzard_lib/core/modules/dmail.py,sha256=ox5sMMQ7OqpSnLdt3VSvS0eFEhK5Qy8JZB5MsmNkp9k,1703
106
106
  web3_wizzard_lib/core/modules/erc20_balance.py,sha256=4mxd6QpOgnHHqUB0u6ya1Kh_xw3Mq7ObaILw8jgfVNk,1394
107
- web3_wizzard_lib/core/modules/gmx_reward.py,sha256=cdH3M-aCArtq56h9dDdYsvZFQrpog7_22nmDVITm4qU,1043
107
+ web3_wizzard_lib/core/modules/gmx_reward.py,sha256=tYKmDpSehpQLU7FFZALwXPnh_lY8pBDu1xq-uUjyNxA,1215
108
108
  web3_wizzard_lib/core/modules/intract_claim.py,sha256=jfXuLYCpgYsEZsf3FHxvDbfqcX1gI-ZC8QUiIIa71ZA,3753
109
109
  web3_wizzard_lib/core/modules/layer_2_20.py,sha256=1MvidKQBS5GhBzH6yAmjTf1VHnM96_Wb0sGF24TTXJo,2475
110
110
  web3_wizzard_lib/core/modules/lending_module.py,sha256=Sy0P-Ojt3e1JVMUCqpG06-DsiuTCvvHilgSj_QJPCwg,5517
@@ -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.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,,
363
+ web3_wizzard_lib-1.2.1.data/data/requirements.txt,sha256=5oZVZuID8L00sR9kJZYJg-TYMRN1WY93ktdNIhPIzX8,20
364
+ web3_wizzard_lib-1.2.1.dist-info/METADATA,sha256=onl-Ahv-u14t5j11wIB4IdPAl4-w9f5tCdA99KtxGQk,428
365
+ web3_wizzard_lib-1.2.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
366
+ web3_wizzard_lib-1.2.1.dist-info/top_level.txt,sha256=8dD8S5HQo4dKtxogttWY_sh4n3yCVy0MwiTelYp6kug,28
367
+ web3_wizzard_lib-1.2.1.dist-info/RECORD,,