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

feat: implement maximum holders before launch safeguard #15

Merged

Conversation

credence0x
Copy link
Contributor

@credence0x credence0x commented Dec 12, 2023

implement maximum holders before launch safeguard #4

Copy link

vercel bot commented Dec 12, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
unruggable-memecoin ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 14, 2023 2:13pm

@credence0x credence0x changed the title feat: implement maximum holders before launch safeguard #4 feat: implement maximum holders before launch safeguard Dec 12, 2023
contracts/src/unruggable_memecoin.cairo Outdated Show resolved Hide resolved
contracts/src/unruggable_memecoin.cairo Outdated Show resolved Hide resolved
contracts/src/unruggable_memecoin.cairo Outdated Show resolved Hide resolved
contracts/src/unruggable_memecoin.cairo Outdated Show resolved Hide resolved
contracts/tests/test_unruggable_memecoin.cairo Outdated Show resolved Hide resolved
contracts/tests/test_unruggable_memecoin.cairo Outdated Show resolved Hide resolved
contracts/tests/test_unruggable_memecoin.cairo Outdated Show resolved Hide resolved
contracts/tests/test_unruggable_memecoin.cairo Outdated Show resolved Hide resolved
contracts/tests/test_unruggable_memecoin.cairo Outdated Show resolved Hide resolved
contracts/src/unruggable_memecoin.cairo Outdated Show resolved Hide resolved
@@ -173,6 +195,19 @@ mod UnruggableMemecoin {
amount: u256
) -> bool {
let caller = get_caller_address();

if self.launched.read() == false {
Copy link
Contributor

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() {
Copy link
Contributor

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add rust style doc

@@ -171,12 +184,32 @@ mod UnruggableMemecoin {
//
#[generate_trait]
impl UnruggableMemecoinInternalImpl of UnruggableMemecoinInternalTrait {
#[inline(always)]
fn _check_holders_limit(ref self: ContractState) {
Copy link
Contributor

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 Show resolved Hide resolved
Copy link
Collaborator

@enitrat enitrat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@AbdelStark AbdelStark merged commit efd01f6 into keep-starknet-strange:main Dec 18, 2023
4 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.

None yet

3 participants