Skip to content
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 124 commits into from
Jul 22, 2024
Merged

Devnet version #2

merged 124 commits into from
Jul 22, 2024

Conversation

kstepanovdev
Copy link
Collaborator

No description provided.

kstepanovdev and others added 30 commits May 24, 2024 18:26
…e mutability of input parameters for functions that are related to CPI invocatioins
&& binary fixture
&& integration tests accordingly to the devnet version requirements
kstepanovdev and others added 28 commits July 16, 2024 12:38
* 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>
@kstepanovdev kstepanovdev merged commit 51738bb into master Jul 22, 2024
0 of 4 checks passed
@kstepanovdev kstepanovdev deleted the devnet-version branch July 22, 2024 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants