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
During our work on indexer, we've been trying to reach information about claimed and unclaimed portions of bounty and fee.
This information is available in smart contracts but it's not accessible from external context because the structures are private. It would be great to either have access to that, or have a getter functions to get those values.
Fees
getEarnedFeeAmountOf link is returning current unclaimed fees. And calculating it from _feePaid. _feePaid is updated only on link so it should be consistent to get the value after emit BountyWasPaid(validatorId, amount);.
Bounties
There is no such function as getEarnedBountyAmountOf. the closest to that is getAndUpdateEarnedBountyAmountOflink but this one is not a read only operation. It would be great to have similar one to the fee for getting the amount.
Now, for the updates it is based on few values.
_bountyPaid is only updated on BountyWasPaid so we can call it on this.
_effectiveDelegatedToValidator (DelegationController.sol) , that updates of that are implicit, we cannot no from events when it got changed
_effectiveDelegatedByHolderToValidator (DelegationController.sol) this updates, similarly to the above that are also implicit.
If there isn't any other place to get this information it would be great to have that in sol and have events on updates of those values to increase observability.
It might be solved in different way, but our need is to have that information, so that we would be able to get claimed and unclaimed fees/bounties for given point in time. And also have ability to track it's time by some events when it's added and deducted.
Hello!
During our work on indexer, we've been trying to reach information about claimed and unclaimed portions of bounty and fee.
This information is available in smart contracts but it's not accessible from external context because the structures are private. It would be great to either have access to that, or have a getter functions to get those values.
Fees
getEarnedFeeAmountOf link is returning current unclaimed fees. And calculating it from _feePaid. _feePaid is updated only on link so it should be consistent to get the value after
emit BountyWasPaid(validatorId, amount);
.Bounties
There is no such function as
getEarnedBountyAmountOf
. the closest to that isgetAndUpdateEarnedBountyAmountOf
link but this one is not a read only operation. It would be great to have similar one to the fee for getting the amount.Now, for the updates it is based on few values.
_bountyPaid
is only updated onBountyWasPaid
so we can call it on this._effectiveDelegatedToValidator
(DelegationController.sol) , that updates of that are implicit, we cannot no from events when it got changed_effectiveDelegatedByHolderToValidator
(DelegationController.sol) this updates, similarly to the above that are also implicit.If there isn't any other place to get this information it would be great to have that in sol and have events on updates of those values to increase observability.
It might be solved in different way, but our need is to have that information, so that we would be able to get claimed and unclaimed fees/bounties for given point in time. And also have ability to track it's time by some events when it's added and deducted.
┆Issue is synchronized with this Jira Task
The text was updated successfully, but these errors were encountered: