Main sync - #67
Conversation
feat: lst hype hyper evm deployment
feat: ENG-1058 ENG-1060 add mHYPER and mAPOLLO on ethereum mainnet
feat: ENG-1066 liquidHYPE on hyperevm
There was a problem hiding this comment.
Summary of Changes
Hello @kostyamospan, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request significantly expands the Midas protocol by integrating several new tokens and their associated infrastructure. It includes the addition of new smart contracts for token functionality, vaults, and data feeds, alongside comprehensive updates to the system's configuration and deployment scripts to ensure seamless operation and future scalability.
Highlights
- New Midas Protocol Tokens: This pull request introduces four new Midas protocol tokens:
mHYPER,mAPOLLO,lstHYPE, andliquidHYPE. Each token comes with its full suite of smart contracts, including the token itself, custom aggregator feeds, data feeds, deposit vaults, and redemption vaults with swappers. - Comprehensive Configuration Updates: Extensive configuration changes have been made across the codebase to support the new tokens. This includes updating address configurations, token type enumerations, contract name prefixes, and role definitions. Dedicated deployment configuration files have been added for each new token, detailing their specific parameters for various networks.
- Integration of New Payment Tokens: New payment tokens,
wsthype,khype, andwhype, have been integrated into the system, complete with their respective data feed configurations. - Deployment and Upgrade Script Adjustments: Minor adjustments were made to
hardhat.config.tsand a specific upgrade script (upgrade_RedemptionVaultSwapper.ts) was modified to facilitate the deployment and future upgrades of these new components, specifically changing the upgrade method forliquidHYPE's redemption vault swapper.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Code Review
This pull request introduces support for four new tokens: mHYPER, mAPOLLO, lstHYPE, and liquidHYPE, along with their associated contracts, configurations, and helper scripts. The changes are extensive but consistently follow the established patterns in the codebase.
I've identified a few issues that require attention:
- A critical placeholder address that must be corrected before any production deployment.
- High-severity placeholder strings in deployment configurations that could lead to runtime failures.
- A medium-severity maintainability issue in an upgrade script due to hardcoding.
- A minor documentation typo.
Addressing these points will enhance the code's quality and prevent potential issues.
| dataFeed: '0x5A55899f324bF45DD2dA0b97E145774a4668A9E4', | ||
| }, | ||
| whype: { | ||
| token: '0x5555555555555555555555555555555555555555', |
There was a problem hiding this comment.
The token address for whype appears to be a placeholder value. Using such an address in a production environment would lead to contract failures. Please replace it with the correct address or ensure it's only used in a context where this placeholder is expected and handled (e.g., test environments).
| liquidityProvider: 'dummy', | ||
| swapperVault: 'dummy', |
There was a problem hiding this comment.
The values for liquidityProvider and swapperVault are set to the string 'dummy'. These appear to be placeholder values. If this configuration is intended for a production network, these must be replaced with valid addresses or configurations to prevent runtime errors. If this is for a testnet, consider adding a comment to clarify that these are placeholders.
| liquidityProvider: 'dummy', | ||
| swapperVault: 'dummy', |
There was a problem hiding this comment.
The values for liquidityProvider and swapperVault are set to the string 'dummy'. These appear to be placeholder values. If this configuration is intended for a production network, these must be replaced with valid addresses or configurations to prevent runtime errors. This is also present in liquidHYPE.ts.
|
|
||
| /** | ||
| * @notice upgradeable pattern contract`s initializer | ||
| * @param _accessControl address of MidasAccessControll contract |
| addresses?.liquidHYPE?.redemptionVaultSwapper ?? '', | ||
| await hre.ethers.getContractFactory( | ||
| getTokenContractNames('mBASIS').rvSwapper!, | ||
| getTokenContractNames('liquidHYPE').rvSwapper!, |
No description provided.