-
Notifications
You must be signed in to change notification settings - Fork 138
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 Vesting #425
base: master
Are you sure you want to change the base?
Add Vesting #425
Conversation
🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎ To accept the risk, merge this PR and you will not be notified again.
Next stepsWhat is a CVE?Contains a high severity Common Vulnerability and Exposure (CVE). Remove or replace dependencies that include known high severity CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies. Take a deeper look at the dependencyTake a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support [AT] socket [DOT] dev. Remove the packageIf you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency. Mark a package as acceptable riskTo ignore an alert, reply with a comment starting with
|
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.
Very nice PR, @immrsd! I left a few questions and comments
import { durationToTimestamp } from './utils/duration'; | ||
import { toUint, validateUint } from './utils/convert-strings'; | ||
|
||
export type VestingSchedule = 'linear' | 'custom'; |
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.
Since we already have the "steps" schedule implemented as a mock and as an example in "Usage", do you think it's worth adding the option here?
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.
Actually, I don't reckon it's worth it. The steps schedule is mostly for demonstration purposes, it's kinda naive and I expect it to be used almost never or very rarely
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/access#ownership_and_ownable"> | ||
Simple mechanism with a single account authorized for all privileged actions. | ||
</HelpTooltip> | ||
</label> | ||
<label class:checked={opts.schedule === "custom"}> | ||
<input type="radio" bind:group={opts.schedule} value="custom"> | ||
Custom | ||
<HelpTooltip link="https://docs.openzeppelin.com/contracts-cairo/access#role_based_accesscontrol"> | ||
Flexible mechanism with a separate role for each privileged action. A role can have many authorized accounts. | ||
</HelpTooltip> |
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.
The tooltips need to be fixed
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.
If we don't want to include the steps vesting option, I think we can at least direct users to it as an example when hovering the Custom tooltip
if (!match) { | ||
if (!match || match.length < 2) { |
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.
Are there cases where a happy match
also has match.length < 2
?
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.
No description provided.