You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently validators can only be subscribed one by one. Meaning that someone with 50, would need to send 50 different txs, which implies: click Subscribe button, sign tx, wait, repeat. Not the best UX.
Feture:
Add new button with Subscribe All that allows to subscribe all validators that are in notsubscribed or untracked state.
Tasks:
Update the abi to the latest. Latest can be found here. Its important to have this latest abi because it adds the subscribeValidators function.
Create new button named Subscribe All. No opinion where it should be placed.
When Subscribe All button is clicked, get all validators belonging to the connected wallet /memory/validators/0x_wallet (note that this is already being done) and filter all validators so that we get the ones in notsubscribed or untracked state. This is very important as it wouldn't make sense to subscribe an already subscribed validator. Then, get their validator_index eg: validator_index(es)=5, 10, 40, 60.
Call the function subscribeValidators with said indexes and payable amount equal to collateral_in_wei * length(indexes). As a reminder collateral_in_wei is already used by the contract and can be fetched from :7300/config
Note: subscribeValidators function is very similar to subscribeValidator with the only difference that it takes an array of validators, and that the collateral amount has to be x times the amount of validators, where x is the amount of validators one wants to subscribe.
The text was updated successfully, but these errors were encountered:
Would it be crazy to also be able to choose validators with a checkbox next to every validator pubkey? I'm thinking about the use case that someone has 3 validators for themselves and 2 validators that they run for other people that want to keep their fee recipient. Multiply numbers by 10 if you want.
Context:
Feture:
Subscribe All
that allows to subscribe all validators that are innotsubscribed
oruntracked
state.Tasks:
subscribeValidators
function.Subscribe All
. No opinion where it should be placed.Subscribe All
button is clicked, get all validators belonging to the connected wallet/memory/validators/0x_wallet
(note that this is already being done) and filter all validators so that we get the ones innotsubscribed
oruntracked
state. This is very important as it wouldn't make sense to subscribe an already subscribed validator. Then, get theirvalidator_index
eg:validator_index(es)=5, 10, 40, 60
.subscribeValidators
with said indexes and payable amount equal tocollateral_in_wei
*length(indexes)
. As a remindercollateral_in_wei
is already used by the contract and can be fetched from:7300/config
Note:
subscribeValidators
function is very similar tosubscribeValidator
with the only difference that it takes an array of validators, and that the collateral amount has to be x times the amount of validators, where x is the amount of validators one wants to subscribe.The text was updated successfully, but these errors were encountered: