-
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/initial distrib constructor #64
Feat/initial distrib constructor #64
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
I still need to write specific tests to try tricky scenarios |
…na/unruggable-memecoin into feat/initial_distrib_constructor
Added tests, should be ready now |
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.
left some comments
I need to sync my work with the main branch and it will be ready for merging |
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
Issue: #60
This is a first draft.
In the proposed implementation, the dev would pass an array
initial_holders
of tuples(initial_holder_address, amount)
.The
initial_recipient
should be in the position 0 of the array. Asinitial_recipient
is aninitial_holder
, it makes sense to add him in the array. But it implies that the sum of all amounts of theinitial_holders
array should remain equal toinitial_supply
. This is verified by line 116assert(initial_minted_supply <= initial_supply, 'Unruggable: max supply reached');
.I'm also considering that the
initial_recipient
account should deposit ALL of his tokens whenlaunch_memecoin
is called.. Otherwise it is not possible to perform the "team allocation" check since the balance ofinitial_recipient
would be greater. Ifinitial_recipient
does not deposit all of his token inlaunch_memecoin
then I'm not performing the "max team allocation" check on him which bypasses the rule (does that make sense ?).Didn't write the tests yet, I wanted to have feedbacks on my implementation.