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: add updates #22

Merged
merged 222 commits into from
Dec 11, 2024
Merged

chore: add updates #22

merged 222 commits into from
Dec 11, 2024

Conversation

DavidMinarsch
Copy link
Collaborator

No description provided.

function _redemptionSetup(address[] memory accounts, uint256[] memory amounts) private {
require(accounts.length == amounts.length);

redemptionAddress = address(new Meme("Agent Token", "AGENT", DECIMALS, MIN_TOTAL_SUPPLY));
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Suggested change
redemptionAddress = address(new Meme("Agent Token", "AGENT", DECIMALS, MIN_TOTAL_SUPPLY));
redemptionAddress = address(new Meme("Agent Token II", "AGNT II", DECIMALS, 1_000_000_000 ether));

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The original AGNT has 1bn supply. Then 500m got purged (as no-one could collect).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ah right, I'm getting lost in those zero-s.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's get all the values from the old contract itself.


/// @dev AGNT token redemption unleash.
function _redemption() private {
uint256 amountForLP = (MIN_TOTAL_SUPPLY * LP_PERCENTAGE) / 100;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Take from vars on struct, not hard coded

Copy link
Collaborator

Choose a reason for hiding this comment

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

How about we just view it from the original contract? I think this is the most trustless way to do it.

uint256 heartersAmount = MIN_TOTAL_SUPPLY - amountForLP;

// Create Uniswap pair with LP allocation
(address pool, uint256 liquidity) = _createUniswapPair(redemptionAddress, REDEMPTION_AMOUNT, amountForLP);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

again take from vars, not hard coded. Just introduces potential for error

// Record the actual meme unleash time
memeSummon.unleashTime = block.timestamp;
// Record the hearters distribution amount for this meme
memeSummon.heartersAmount = heartersAmount;
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

tbchecked

@dvilelaf dvilelaf merged commit e29ff7b into main Dec 11, 2024
6 checks passed
@kupermind kupermind deleted the updates branch December 11, 2024 17:49
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.

4 participants