Open
Conversation
jaeboklee-modo
suggested changes
Apr 15, 2022
test/utils/testEnv.ts
Outdated
| return stakingPool; | ||
| }; | ||
|
|
||
| const migrateSetStakingPool = async ( |
Contributor
There was a problem hiding this comment.
I think setMigrageStaking would be the better choice for a unified name convention.
test/utils/testEnv.ts
Outdated
| return migrateTestEnv; | ||
| } | ||
|
|
||
| // export const setMigrateTestEnv = async (): Promise<MigrateTestEnv> => { |
Contributor
There was a problem hiding this comment.
Are those codes depreciated?
test/utils/helpers.ts
Outdated
| return poolData; | ||
| }; | ||
|
|
||
| export const newGetUserData = async ( |
Contributor
There was a problem hiding this comment.
The new keyword is not clear. Can't this function be merged with above getPoolData and getUserData? What is the difference? I think they are same.
contracts/token/StakedElyfiToken.sol
Outdated
|
|
||
| /// @dev Allow a user to migrate underlying tokens to next new contract | ||
| /// @notice This function is based on the openzeppelin ERC20Wrapper | ||
| function _migrateTo(address toContractAddr, uint256 amount) internal virtual returns (bool) { |
Contributor
There was a problem hiding this comment.
I think _migrate is enough for the name of this function.
contracts/StakingPoolV2.sol
Outdated
| // Migrate next contract of user, total principal | ||
| nextContract.setPreviousPoolData(msg.sender, amount); | ||
|
|
||
| emit Migrate(msg.sender); |
Contributor
There was a problem hiding this comment.
For making this event to be more practical, I'd recommend adding other parameters to the Migrate event
|
|
||
| interface MigrateTestEnv extends TestEnv { | ||
| newStakingPool: StakingPoolV3; | ||
| isNew: boolean; |
Contributor
There was a problem hiding this comment.
What is this field for?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User Can migrate staking token