-
Notifications
You must be signed in to change notification settings - Fork 1
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
Round based Launchpad #92
Conversation
Coverage SummaryTotals
FilesExpand
|
#[endpoint(refundUserTickets)] | ||
fn refund_user_tickets(&self, users_list: MultiValueEncoded<ManagedAddress>) { | ||
let users_vec = users_list.to_vec(); | ||
self.add_users_to_blacklist(&users_vec); | ||
self.clear_users_with_guaranteed_ticket_after_blacklist(&users_vec); | ||
} |
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.
Either simply call add_users_to_blacklist_endpoint
, or, if the event is that important, make a common function blacklist_users
where you do the common logic and just fire the event in add_users_to_blacklist_endpoint
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.
We need the function to be without an event, like the blacklist method. I understand that it could be easier and more logical from the coding point of view to make a common function, but in this case, I think it is ok to actually have these lines separately, without what is out of scope.
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.
+1
@@ -5,11 +5,11 @@ use launchpad_common::{config, launch_stage}; | |||
|
|||
pub const MAX_PERCENTAGE: u64 = 10_000; | |||
pub const MAX_UNLOCK_MILESTONES_ENTRIES: usize = 60; | |||
pub const MAX_RELEASE_EPOCH_DIFF: u64 = 1800; | |||
pub const MAX_RELEASE_DIFF: u64 = 60 * 60 * 24 * 365 * 5; |
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.
As a code reader, I have to think that this means... 5 years? Add a comment.
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.
Not really. It was 5 years when we used timestamps. Now, If we get to a 0.6s round duration, it will be less that 5 years. But at the same time, I don't want to specify the constant's value based on what we assume will be the block duration. Maybe make the multiply and put the value directly?
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.
+1
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.
Added a new, fixed value.
Updates all the Launchpad SCs to use rounds across the board. From setup to vesting.
Includes the refund user tickets functionality.