-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add circulating supply endpoint #26
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, only left one comment which is just a suggestion 👍🏼
} else { | ||
console.error("Invalid network"); | ||
} | ||
// Supply to ignore is the sum of the free - frozen of the accounts to substract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please rephrase this comment a bit so that's easier to understand? More like explaining why we do this first, then explaining how we do it. It's just a suggestion though, I don't mind leaving it like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rephrased. Please let me know if it still not so clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's better, I left one more suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the logic is good overall 👍
Co-authored-by: Marcel Ebert <[email protected]>
Original task #242
As discussed in the issue, we will define the circulating supply to be equal to the total transferable amount subtracted by the total transferable of the multi-sig accounts.
Implementation
We have already defined the total transferable to be the
free - frozen
balance. In this PR we just mantain a new variable calledsupplyToIgnore
and during account iteration, we count the transferable amount contribution of the accounts we want to ignore, so the total circulation will end up beingtotalTransferable - supplyToIgnore
.