AbdelStark / token-vesting-contracts

ERC20 token vesting smart contracts 💰⏳
Apache License 2.0
193 stars 135 forks source link

Function/Mapping not updated #5

Closed JOHNFFFEE closed 2 years ago

JOHNFFFEE commented 2 years ago

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

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

AbdelStark commented 2 years ago

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 commented 2 years ago

Hi, thank you for answering so fast. This could be an option to save gas, the contract is already complicated BTW well done for the audit 😊


From: Abdelhamid Bakhta @.> Sent: Thursday, January 13, 2022 3:58:18 PM To: abdelhamidbakhta/token-vesting-contracts @.> Cc: JOHNFFFEE @.>; Author @.> Subject: Re: [abdelhamidbakhta/token-vesting-contracts] Function/Mapping not updated (Issue #5)

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.

— Reply to this email directly, view it on GitHubhttps://github.com/abdelhamidbakhta/token-vesting-contracts/issues/5#issuecomment-1012160726, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGDT4OXFGQJP3FEFAMYMXNTUV3K7VANCNFSM5L34H7LQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub. You are receiving this because you authored the thread.Message ID: @.***>