-
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
Devnet version #2
Merged
Merged
Conversation
This file contains 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
…interaction with rewards
…e mutability of input parameters for functions that are related to CPI invocatioins
&& binary fixture && integration tests accordingly to the devnet version requirements
…nto devnet-version
* feat: add multiplier (#15) * [MTG-234] calculate weighted stake * cleaning up voting mint * rename RestakeDeposit to ExtendStake * rename LockTokens to Stake * From now, funds will be withdrew from the Mining account on unlock operation instead of withdraw * stop passing redundant parameters for unlock tokens * minor fixes * remove passing redundant parameters from Stake function * add closing mining account on close voter ix * update rustfmt * hotfix * Initialize rewards-pool deposit authority signature * fixed comments and fmt * unify stake and extend_stakes operations * update tests * small fixes logic in extend_stake * fix tests * extend_stake substraction hotfix * hotfix for exnted_stake and lockup period * fixed `weighted_stake` function, added tests (#12) fixed weighted_stake function, added tests * Update governance (#11) * update spl_governance to 3.1.1 * update governance * refactor dependencies * add CPI functions && add extend deposit function * add CPI invocations (except for withdraw) * add CPI invocation for the withdraw function * cleanup * extend CPI enum && provide source with program ids * add initial invocations of rewards contract && add basic methods for interaction with rewards * add create_mint function for test utils * add RewardsCookies and extend context of Addin Context * refactor tests && enable CPI calls in test for all functions && change mutability of input parameters for functions that are related to CPI invocatioins * CPI invocations for instructions * restring votingMintConfig with the only one value * update integration tests accordingly to the newest changes in processor * add new time warp util && make test_all_deposits green * add more money for the current deposit is forbidden now * no CPI is needed when LockupKind and LockupType are None * add new error * fix integration tests * add claim fucntion * update claim function && small refactor * update tests to verify whether claim CPI is working * Update CPI invocations accordingly to the latest rewards API * Change CPI call interfaces && binary fixture && integration tests accordingly to the devnet version requirements * update program id * add check for vault field * read returned data from cpi * update contract's id * update program's idl * add initialize_pool cpi invocation on each registrar creation * update tests accordingly to adding initialize_pool function via cpi * update IDL * add more comment about passed into ixs accounts * update idl * update idl * update idl * fix for updating idl * update fixture for testing * remove mentions about fill_authority * Clarify comments regarding PDA calculations for the Rewards contract * remove redundant dependencies * update restake function accordingly to the changes in the rewards * add tests for the restake function * Fix bug with restake && add tests for restake * Add test option to the contract * merge packages back in order to produce correct idls * update ts types * experimental commit with freshly redifined deposit && lock_tokens functions * make tests green * update fixture * update idl * separate states && contract itself * fix: delegate adding on deposit entry creation * fix: now it's possible to deposit to DepositEntry that has some tokens already * Remove redundat accounts && change get_unix_time function * minor fix: remove registrar parsing from unlock_tokens() * update contract accordingly to the latest on rewards program * refactor: drop unused errors * feat: update IDL * rust fmt file with the reformatting * updated imports granularity to module * cleaning up voting mint * rename RestakeDeposit to ExtendStake * rename LockTokens to Stake * From now, funds will be withdrew from the Mining account on unlock operation instead of withdraw * stop passing redundant parameters for unlock tokens * minor fixes * remove passing redundant parameters from Stake function * add closing mining account on close voter ix * update rustfmt * hotfix * Initialize rewards-pool deposit authority signature * fixed comments and fmt * unify stake and extend_stakes operations * update tests * small fixes logic in extend_stake * fix tests * extend_stake substraction hotfix * hotfix for exnted_stake and lockup period * Update governance (#11) * update spl_governance to 3.1.1 * update governance * refactor dependencies * mtg-425: Error handling improvements (#14) improved error handling * [mtg-296] delegated staking extend staking with delegate parameter (#13) * initial delegate * add delegate initial design * update tests * update tests && fixtures * initial delegate * add delegate initial design * update fixtures * remove redundant reprs * store deposit mining on each creation of deposit entry && add additional validations for stake and extend methods * update tests * remove redundant file * mtg-425: Error handling improvements (#14) improved error handling * initial delegate * add delegate initial design * update tests * update tests && fixtures * initial delegate * add delegate initial design * update fixtures * remove redundant reprs * store deposit mining on each creation of deposit entry && add additional validations for stake and extend methods * update tests * remove redundant file * add delegate as a dedicated wallet instead of delegate_mining * Update program-states/src/state/deposit_entry.rs Co-authored-by: Stanislav Cherviakov <stchervyakov@gmail.com> * Update programs/voter-stake-registry/src/cpi_instructions.rs Co-authored-by: Stanislav Cherviakov <stchervyakov@gmail.com> * unify mining verification * simplify mining verification * [mtg-308] (#15) * added change delegate function * Fixes after rebase * fix aligment * Update program-states/src/state/deposit_entry.rs Co-authored-by: Stanislav Cherviakov <stchervyakov@gmail.com> --------- Co-authored-by: Stanislav Cherviakov <stchervyakov@gmail.com> --------- Co-authored-by: Matiukhin Vlad <87382371+rwwwx@users.noreply.github.com> Co-authored-by: Stanislav Cherviakov <stchervyakov@gmail.com> --------- Co-authored-by: Vadim <31490938+n00m4d@users.noreply.github.com> Co-authored-by: Stanislav Cherviakov <stchervyakov@gmail.com> Co-authored-by: rwwwx <vlad.matiukhin@gmail.com> Co-authored-by: Matiukhin Vlad <87382371+rwwwx@users.noreply.github.com> Co-authored-by: Kyryo Stepanov <mutexnova@kerneldemon.local> Co-authored-by: Vadim <grozinok@gmail.com>
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.
No description provided.