Skip to content
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

Function/Mapping not updated #5

Closed
JOHNFFFEE opened this issue Jan 13, 2022 · 2 comments
Closed

Function/Mapping not updated #5

JOHNFFFEE opened this issue Jan 13, 2022 · 2 comments

Comments

@JOHNFFFEE
Copy link

JOHNFFFEE commented Jan 13, 2022

Hi,
if you revoke or release a vestingScheduleId for one recipient having multiple vestings

  • getVestingSchedulesCountByBeneficiary should reduce
  • getVestingSchedulesCount should reduce

I was thinking to create a mapping of released and revoked and substract from the total count

@AbdelStark
Copy link
Owner

Hi. Well that depends on how you see things. Because those functions are used to iterated vestings from the frontend. But we could have getEffectiveVestingSchedulesCountByBeneficiary. However I think this filtering should be done by the Dapp rather than in the contract directly. Since this information can be deducted off chain from the data in the contract (use boolean flags to filter effective vestings), I don't think it would be relevant to add this extra complexity in the contract. What do you think ?
Also it would break the way I compute the vesting id which are a hash of the holder address concatenated with an auto incremented index.

@JOHNFFFEE
Copy link
Author

JOHNFFFEE commented Jan 13, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants