-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
refactor: AGNT redemption unleash
refactor: oracle
V0.0.1 internal audit
contracts/MemeBase.sol
Outdated
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)); |
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.
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)); |
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.
The original AGNT has 1bn supply. Then 500m got purged (as no-one could collect).
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.
Ah right, I'm getting lost in those zero-s.
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.
Let's get all the values from the old contract itself.
contracts/MemeBase.sol
Outdated
|
||
/// @dev AGNT token redemption unleash. | ||
function _redemption() private { | ||
uint256 amountForLP = (MIN_TOTAL_SUPPLY * LP_PERCENTAGE) / 100; |
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.
Take from vars on struct, not hard coded
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.
How about we just view it from the original contract? I think this is the most trustless way to do it.
contracts/MemeBase.sol
Outdated
uint256 heartersAmount = MIN_TOTAL_SUPPLY - amountForLP; | ||
|
||
// Create Uniswap pair with LP allocation | ||
(address pool, uint256 liquidity) = _createUniswapPair(redemptionAddress, REDEMPTION_AMOUNT, amountForLP); |
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.
again take from vars, not hard coded. Just introduces potential for error
contracts/MemeBase.sol
Outdated
// Record the actual meme unleash time | ||
memeSummon.unleashTime = block.timestamp; | ||
// Record the hearters distribution amount for this meme | ||
memeSummon.heartersAmount = heartersAmount; |
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.
tbchecked
Test oracle
chore: deployment scripts
No description provided.