-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/founders tokens #87
Conversation
implemented ERC5484 with custom modifier
added some tests
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
Good work. I checked only logic for now. Tests will check when the logic will be completed. Ask questions if you have
|
||
contract VaultFounderTokenMock is VaultFounderToken { | ||
constructor() initializer { | ||
__VaultFounderToken_init(3, 120, 200); |
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.
Make sure it works correctly also with 0
initial price. Better use fuzz testing to set each of this variables
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.
Could you elaborate how should it work with zero prices, please?
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.
Done
8516f4e
to
39c0d81
Compare
function _priceOf(uint256 tokenId) internal view returns (uint256) { | ||
uint256 price = _initialTokenPrice; | ||
for (uint256 i = 0; i < tokenId; i++) { | ||
price = (price * _nextTokenPriceMultiplier) / 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.
can we have a test to check for an overflow?
added role based access to ESBT added mint ESBT to Vault fixed some lint warnings
fixed tests
# Conflicts: # packages/contracts/src/Vault.sol # packages/contracts/test/unit/mocks/VaultMock.sol
merged the latest changes from main branch added code coverage report generation
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.
All this changes are critical
/// @dev set vault | ||
/// @notice that is mandatory to be set before reward can be claimed | ||
function setVault(Vault vault_) external onlyRole(DEFAULT_ADMIN_ROLE) { | ||
vault = vault_; |
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.
VFT cannot do it, but caller can. Just try add _setupRole(BALANCE_UPDATER_ROLE, vault_);
it will work.
/// @dev set vault | ||
/// @notice that is mandatory to be set before reward can be claimed | ||
function setVault(Vault vault_) external onlyRole(DEFAULT_ADMIN_ROLE) { | ||
vault = vault_; |
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.
Also add there _setupRole(MINTER_ROLE, vault_);
revisited security initialization procedure revisited calculate a next token price logic
No top level dependency changes detected. Learn more about Socket for GitHub ↗︎ |
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
calc reward logic changed
🐛 fix(RewardHolder.sol): remove redundant initialization code 🐛 fix(VaultFounderToken.sol): remove redundant initialization code and fix logic error in safeMint function ✨ feat(VaultFounderToken.sol): add event to emit founder details when a new token is minted and token price is updated The redundant initialization code in ERC5484Upgradeable.sol and RewardHolder.sol has been removed to improve code readability and reduce redundancy. In VaultFounderToken.sol, the logic error in the safeMint function has been fixed to correctly check if the total supply of tokens has reached the maximum count before minting a new token. Additionally, an event has been added to emit founder details when a new token is minted and the token price is updated. This event will be used to record the price of the current holder token in The Graph.
Fix initialization and optimize code
No description provided.