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

chore: pre-release candidate v0.0.1 #10

Merged
merged 8 commits into from
Oct 1, 2024
Merged

chore: pre-release candidate v0.0.1 #10

merged 8 commits into from
Oct 1, 2024

Conversation

wei3erHase
Copy link
Member

No description provided.

- deprecates the CLI, not needed and adds maintenance efforts
- deprecates the changing of ownership of a vest / lockup (not needed
and causes edge-cases)
- also erases related JS codebase to call it
The original codebase corresponds to a Vesting Contract between A and B,
in which A gives tokens to B in a scheduled way. The intended behaviour
of this proposal is for A to lock tokens, that only A can withdraw.

Following that intended behaviour, we deprecate the concept of
"destination" from every call (as it will be same as the source).
The original codebase https://github.com/Bonfida/token-vesting supports
an array of Dates to define a Vesting Contract. In that way, it can say:
"unlock 10 at May 10, 10 at May 20, ..." and so on.

The intended behaviour is to have only 1 Date per vesting / lockup, this
PR replaces the Schedules<> array for a single Schedule, and deprecates
the variable `number_of_schedules`
The underlying codebase requires the user to decide at lockup the Date
of withdrawal.
The intended behaviour, is that the user can decide to lock the tokens
in an "unlocked with withdrawal period" mode, in which it would require
the user to first "initiate the withdrawal", to be able to actually
withdraw the tokens (e.g.) 7 days later.

This is achieved by:
- reverting on withdrawal when locking Date is 0
- adding a new method, identical in arguments to "unlock", that would
revert if Date != 0
- when user calls this method, the locking Date should be `now() + 7
days`
Only a set of possible time-deltas should be allowed (e.g.) 0 (for
unlocked with withdrawal period), 1 month, 3 months, and so on... The
locking method should revert if the user tries to lock for a different
amount of time.

This PR replaces the concept of Dates when creating a lockup, since the
user will be inputting a TimeDelta, and internally we should calculate
the Date, to keep the same infra as it was.
@wei3erHase wei3erHase changed the title chore: changes since fork chore: release candidate v0.0.1 Sep 29, 2024
@wei3erHase wei3erHase marked this pull request as ready for review October 1, 2024 17:04
@wei3erHase wei3erHase changed the title chore: release candidate v0.0.1 chore: pre-release candidate v0.0.1 Oct 1, 2024
@wei3erHase wei3erHase merged commit 8ce5489 into main Oct 1, 2024
1 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants