Skip to content

Commit

Permalink
move to program folder
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Oct 18, 2023
1 parent da5bd23 commit 514bc34
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 12 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ members = [
"examples/rust/sysvar",
"examples/rust/transfer-lamports",
"examples/rust/transfer-tokens",
"feature-gate",
"feature-gate/program",
"feature-proposal/program",
"feature-proposal/cli",
"governance/addin-mock/program",
Expand Down
3 changes: 1 addition & 2 deletions feature-gate/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

This program serves to manage new features on Solana.

It serves two main purposes: activating new features and revoking features that
are pending activation.
It serves one purpose: revoking features that are pending activation.

More information & documentation will follow as this program matures, but you
can follow the discussions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ test-sbf = []
[dependencies]
num_enum = "0.7.0"
solana-program = "1.16.16"
spl-program-error = { version = "0.3.0", path = "../libraries/program-error" }
spl-program-error = { version = "0.3.0", path = "../../libraries/program-error" }

[dev-dependencies]
solana-program-test = "1.16.16"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub enum FeatureGateError {
/// Operation overflowed
#[error("Operation overflowed")]
Overflow,
/// Feature not inactive
#[error("Feature not inactive")]
/// Feature already activated
#[error("Feature already activated")]
FeatureAlreadyActivated,
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ pub enum FeatureGateInstruction {
///
/// Accounts expected by this instruction:
///
/// 0. `[w+s]` Feature account
/// 1. `[w]` Destination (for rent lamports)
/// 0. `[w+s]` Feature account
/// 1. `[w]` Destination (for rent lamports)
RevokePendingActivation,
}
impl FeatureGateInstruction {
Expand All @@ -45,9 +45,9 @@ impl FeatureGateInstruction {
}

/// Creates a 'RevokePendingActivation' instruction.
pub fn revoke_pending_activation(feature: &Pubkey, destination: &Pubkey) -> Instruction {
pub fn revoke_pending_activation(feature_id: &Pubkey, destination: &Pubkey) -> Instruction {
let accounts = vec![
AccountMeta::new(*feature, true),
AccountMeta::new(*feature_id, true),
AccountMeta::new(*destination, false),
];

Expand All @@ -71,7 +71,7 @@ mod test {
}

#[test]
fn test_pack_unpack_revoke() {
fn test_pack_unpack_revoke_pending_activation() {
test_pack_unpack(&FeatureGateInstruction::RevokePendingActivation);
}
}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// #![cfg(feature = "test-sbf")]
#![cfg(feature = "test-sbf")]

use {
solana_program::instruction::InstructionError,
Expand Down

0 comments on commit 514bc34

Please sign in to comment.