-
Notifications
You must be signed in to change notification settings - Fork 2
Add Wormhole Solana Staking Program #78
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
Merged
Merged
Conversation
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
alexkeating
approved these changes
Sep 3, 2024
marcomariscal
pushed a commit
that referenced
this pull request
Dec 9, 2024
* Add configs and structs for StakeAccount * Add clock utils * Add ErrorCode * Add context * Add init_config function * Add basic account update functions * Add fn recover_account * Add fn create_stake_account * Add a script to create a verifiable build of the project * Add tests of configuration and staking account creation * Add Wormhole token to tests * Add Wormhole staking-wasm * Add more config files and scripts * Fix warning after build. Update wasm staking * Exclude wasm files from repository tracking * Use older versions of dependencies * Add target idl and types * Fix mock-clock * Use @pythnetwork/staking-wasm in tests (temporarily) * Fix tests * Fix configuration tests * Add basic definitions for checkpoints to stake account program * Add Wormhole Governance realm for the use of solana spl-governance * Use local staking-wasm * Add VoterWeightRecord from solana-program-library governance * Fix checkpoints tests * Fix GlobalConfig size * Rename to CHECKPOINT_DATA_SIZE * Update basic functionality of checkpoints * Fix CheckpointData and CheckpointData tests * Add fn get_at_probably_recent_timestamp * Update IDL and types * Add more tests for CheckpointData * Add fn delegate * Add getAllStakeAccountAddresses and getStakeAccounts * Add api test * Add interface for delegate * Fix Delegate context and interface * Add utils::voter_votes * Fix test_get_votes * Add WasmCheckpointData * Add getVotes interface * Add voter_votes test * Add get_past_votes and test_get_past_votes * Add getPastVotes interface * Add deploy scripts * Add delegates interface * Fix CheckpointData::LEN * Use cargo fmt * Apply prettier * Add prettier config * Fix staking account creation test * Fix interface tests * Fix Delegate context * Update .gitignore * Fix WasmCheckpointData. Update tests and interfaces * Add fn cast_vote * Add draft state for Proposal and ProposalVotersWeightCast * Update cast vote * Add castVote interface * Fix warning * Add proposal::proposal_votes * Convert the identifier to snake case * Add proposalVotes interface * Add withdrawTokens interface and test * Add safe_window and is_voting_safe function * Add events * Add add_proposal. Update idl and types * Add addProposal simple interface * Add test for addProposal * Fix test for addProposal * Add event ProposalCreated * Add test proposalVotes * Fix Delegate context. Fix all interface tests * Add test castVote * Remove transfer_epoch * Remove epochDuration * Reduce the delegate votes when withdrawal * Fix withdrawTokens. Add withdrawTokens test * Update test getVotes * Rename to proposalId * Fix is_voting_safe. Add isVotingSafe test * Remove voterWeightRecord * Remove realm * Remove spl-governance * Fix tests * Update wasm * Update StakeAccountMetadata::LEN * Update Solana CLI, Anchor, Node.js and dependencies * Refactor Checkpoint serialization methods * Update Cargo.lock * Use cargo update * Implement Anchor serialization for Checkpoints struct. Update idl * Fix warning: use snake case * Fix warning: delete unused imports and variables * Update ts tests and app after dependency update * Add check_size tests * Small but important corrections * Update spl-token functions calls * Quick small fix * Fix types mismatch * Use findProgramAddressSync * Add a script for custom devnet testing * Add a script to create a stake account in devnet * Add a script to withdraw WH tokens in devnet * Add more authority keys. Update scripts for devnet * Add script for addProposal testing in devnet * Remove dump_governance * Add script to delegate in devnet * Remove optional instruction definitions. Use accountsPartial for proposal accounts * Update interfaces * Fix delegate interface * Add script for castVote testing in devnet * Add script to proposalVotes in devnet * Fork and update solana-utils * Update devnet scripts * Fix requestWHTokenAirdrop * Fix index out of bounds error during anchor idl init execution * Fix filters field in getProgramAccounts * Update checkpoints max size and CheckpointData::LEN * Fix all tests * Apply cargo fmt * Apply prettier * Add script for get program transactions * Add script to get full transaction details * Add script to decode events from log messages * Refactor decodeEventsFromLogMessages * Add printTransactionEvents * Add multi-user interface testing * Add check before adding WH token transfer instruction * Update ts interfaces and fix tests
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.