From a210d88ee7f73857bfbc63cb99d0cc15516eb76e Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Thu, 17 Oct 2019 10:37:08 -0700 Subject: [PATCH] Add vest program to genesis --- Cargo.lock | 14 +++++++++++++- Cargo.toml | 1 + genesis_programs/Cargo.toml | 2 ++ genesis_programs/src/lib.rs | 4 ++++ programs/vest_api/Cargo.toml | 2 +- programs/vest_program/Cargo.toml | 19 +++++++++++++++++++ programs/vest_program/src/lib.rs | 9 +++++++++ 7 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 programs/vest_program/Cargo.toml create mode 100644 programs/vest_program/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index d217a061c0b1d0..c5f17d827d4847 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3456,6 +3456,8 @@ dependencies = [ "solana-stake-program 0.20.0", "solana-storage-api 0.20.0", "solana-storage-program 0.20.0", + "solana-vest-api 0.20.0", + "solana-vest-program 0.20.0", "solana-vote-api 0.20.0", "solana-vote-program 0.20.0", ] @@ -3897,7 +3899,7 @@ dependencies = [ [[package]] name = "solana-vest-api" -version = "0.20.0-pre0" +version = "0.20.0" dependencies = [ "bincode 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "chrono 0.4.9 (registry+https://github.com/rust-lang/crates.io-index)", @@ -3911,6 +3913,16 @@ dependencies = [ "solana-sdk 0.20.0", ] +[[package]] +name = "solana-vest-program" +version = "0.20.0" +dependencies = [ + "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", + "solana-logger 0.20.0", + "solana-sdk 0.20.0", + "solana-vest-api 0.20.0", +] + [[package]] name = "solana-vote-api" version = "0.20.0" diff --git a/Cargo.toml b/Cargo.toml index cdd3d9a1959dc7..574ac3de3517b4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,6 +43,7 @@ members = [ "programs/storage_api", "programs/storage_program", "programs/vest_api", + "programs/vest_program", "programs/vote_api", "programs/vote_program", "replicator", diff --git a/genesis_programs/Cargo.toml b/genesis_programs/Cargo.toml index 723078c62e75f1..2952c037b7618d 100644 --- a/genesis_programs/Cargo.toml +++ b/genesis_programs/Cargo.toml @@ -24,6 +24,8 @@ solana-stake-api = { path = "../programs/stake_api", version = "0.20.0" } solana-stake-program = { path = "../programs/stake_program", version = "0.20.0" } solana-storage-api = { path = "../programs/storage_api", version = "0.20.0" } solana-storage-program = { path = "../programs/storage_program", version = "0.20.0" } +solana-vest-api = { path = "../programs/vest_api", version = "0.20.0" } +solana-vest-program = { path = "../programs/vest_program", version = "0.20.0" } solana-vote-api = { path = "../programs/vote_api", version = "0.20.0" } solana-vote-program = { path = "../programs/vote_program", version = "0.20.0" } diff --git a/genesis_programs/src/lib.rs b/genesis_programs/src/lib.rs index 2a53f014db3389..2af925612a1630 100644 --- a/genesis_programs/src/lib.rs +++ b/genesis_programs/src/lib.rs @@ -17,6 +17,8 @@ extern crate solana_stake_program; #[macro_use] extern crate solana_storage_program; #[macro_use] +extern crate solana_vest_program; +#[macro_use] extern crate solana_vote_program; pub fn get() -> Vec<(String, Pubkey)> { @@ -30,6 +32,7 @@ pub fn get() -> Vec<(String, Pubkey)> { solana_move_loader_program!(), solana_stake_program!(), solana_storage_program!(), + solana_vest_program!(), solana_vote_program!(), ] } @@ -52,6 +55,7 @@ mod tests { solana_sdk::system_program::id(), solana_stake_api::id(), solana_storage_api::id(), + solana_vest_api::id(), solana_vote_api::id(), ]; assert!(ids.into_iter().all(move |id| unique.insert(id))); diff --git a/programs/vest_api/Cargo.toml b/programs/vest_api/Cargo.toml index bec28bf3a4eec6..4d88eee9a12d5c 100644 --- a/programs/vest_api/Cargo.toml +++ b/programs/vest_api/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "solana-vest-api" -version = "0.20.0-pre0" +version = "0.20.0" description = "Solana Vest program API" authors = ["Solana Maintainers "] repository = "https://github.com/solana-labs/solana" diff --git a/programs/vest_program/Cargo.toml b/programs/vest_program/Cargo.toml new file mode 100644 index 00000000000000..5fa4bbb30df11b --- /dev/null +++ b/programs/vest_program/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "solana-vest-program" +version = "0.20.0" +description = "Solana Vest program" +authors = ["Solana Maintainers "] +repository = "https://github.com/solana-labs/solana" +license = "Apache-2.0" +homepage = "https://solana.com/" +edition = "2018" + +[dependencies] +log = "0.4.8" +solana-logger = { path = "../../logger", version = "0.20.0" } +solana-sdk = { path = "../../sdk", version = "0.20.0" } +solana-vest-api = { path = "../vest_api", version = "0.20.0" } + +[lib] +crate-type = ["lib", "cdylib"] +name = "solana_vest_program" diff --git a/programs/vest_program/src/lib.rs b/programs/vest_program/src/lib.rs new file mode 100644 index 00000000000000..1e70a403af7a52 --- /dev/null +++ b/programs/vest_program/src/lib.rs @@ -0,0 +1,9 @@ +#[macro_export] +macro_rules! solana_vest_program { + () => { + ("solana_vest_program".to_string(), solana_vest_api::id()) + }; +} + +use solana_vest_api::vest_processor::process_instruction; +solana_sdk::solana_entrypoint!(process_instruction);