-
Notifications
You must be signed in to change notification settings - Fork 101
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
feat: implement maximum holders before launch safeguard #15
feat: implement maximum holders before launch safeguard #15
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@@ -173,6 +195,19 @@ mod UnruggableMemecoin { | |||
amount: u256 | |||
) -> bool { | |||
let caller = get_caller_address(); | |||
|
|||
if self.launched.read() == false { |
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.
can you please try to factorise the code ? it's the same block as the one in transfer
function
|
||
|
||
#[test] | ||
fn test_transfer() { |
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.
please have more explicit names for the test functions
@@ -91,11 +97,18 @@ mod UnruggableMemecoin { | |||
// ************************************ | |||
// * UnruggableMemecoin functions | |||
// ************************************ | |||
|
|||
fn launched(self: @ContractState) -> bool { |
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.
add rust style doc
contracts/src/tokens/memecoin.cairo
Outdated
@@ -171,12 +184,32 @@ mod UnruggableMemecoin { | |||
// | |||
#[generate_trait] | |||
impl UnruggableMemecoinInternalImpl of UnruggableMemecoinInternalTrait { | |||
#[inline(always)] | |||
fn _check_holders_limit(ref self: ContractState) { |
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.
add rust style doc
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.
lgtm
implement maximum holders before launch safeguard #4