Taraxa-project / taraxa-platform

2 stars 3 forks source link

[Community Site] Add claim all functionality to staking page #566

Closed rattrap closed 1 year ago

rattrap commented 1 year ago

We need to call the claimAllRewards function in the contract - https://github.com/Taraxa-project/taraxa-evm/blob/master/taraxa/state/dpos/solidity/dpos_contract_interface.sol#L106

Need to also check the batch

Malak67 commented 1 year ago

At the moment the implementation of this method is not clear because this is a write method not a read one, but in the interface the response is boolean end, however the response is actually a transaction response. Because of this how would we know when to stop and how many times to call this method based on the no of validators. Also, there should be a limit to how many times this method can be called depending on the validators because each call will require approval to metamask. Waiting for a response from the Dpos team.