diff --git a/Cargo.lock b/Cargo.lock index 8ee2f7557c0..335f323eb1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6553,6 +6553,17 @@ dependencies = [ "spl-token 4.0.0", ] +[[package]] +name = "spl-feature-gate" +version = "0.1.0" +dependencies = [ + "num_enum 0.7.0", + "solana-program", + "solana-program-test", + "solana-sdk", + "spl-program-error 0.3.0", +] + [[package]] name = "spl-feature-proposal" version = "1.0.0" diff --git a/Cargo.toml b/Cargo.toml index 9e0696ded77..b7e44e1768a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -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", diff --git a/feature-gate/README.md b/feature-gate/README.md index e83c14df86a..c0dbaf5787c 100644 --- a/feature-gate/README.md +++ b/feature-gate/README.md @@ -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 diff --git a/feature-gate/Cargo.toml b/feature-gate/program/Cargo.toml similarity index 87% rename from feature-gate/Cargo.toml rename to feature-gate/program/Cargo.toml index eb3c93dae6c..5cf6233d029 100644 --- a/feature-gate/Cargo.toml +++ b/feature-gate/program/Cargo.toml @@ -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" diff --git a/feature-gate/src/entrypoint.rs b/feature-gate/program/src/entrypoint.rs similarity index 100% rename from feature-gate/src/entrypoint.rs rename to feature-gate/program/src/entrypoint.rs diff --git a/feature-gate/src/error.rs b/feature-gate/program/src/error.rs similarity index 75% rename from feature-gate/src/error.rs rename to feature-gate/program/src/error.rs index 6be835f2ad2..731c61213a4 100644 --- a/feature-gate/src/error.rs +++ b/feature-gate/program/src/error.rs @@ -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, } diff --git a/feature-gate/src/instruction.rs b/feature-gate/program/src/instruction.rs similarity index 100% rename from feature-gate/src/instruction.rs rename to feature-gate/program/src/instruction.rs diff --git a/feature-gate/src/lib.rs b/feature-gate/program/src/lib.rs similarity index 100% rename from feature-gate/src/lib.rs rename to feature-gate/program/src/lib.rs diff --git a/feature-gate/src/processor.rs b/feature-gate/program/src/processor.rs similarity index 100% rename from feature-gate/src/processor.rs rename to feature-gate/program/src/processor.rs diff --git a/feature-gate/tests/functional.rs b/feature-gate/program/tests/functional.rs similarity index 100% rename from feature-gate/tests/functional.rs rename to feature-gate/program/tests/functional.rs