Bump all native programs up a level

Don't categorize programs by a single backend.
This commit is contained in:
Greg Fitzgerald
2019-03-02 20:31:57 -07:00
committed by Grimes
parent e1a1296b9b
commit 037fcf6b3d
51 changed files with 52 additions and 52 deletions

19
programs/noop/Cargo.toml Normal file
View File

@ -0,0 +1,19 @@
[package]
name = "solana-noop"
version = "0.12.0"
description = "Solana noop program"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
[dependencies]
solana-sdk = { path = "../../sdk", version = "0.12.0" }
solana-logger = { path = "../../logger", version = "0.12.0" }
log = "0.4.2"
[lib]
name = "noop"
crate-type = ["cdylib"]

20
programs/noop/src/lib.rs Normal file
View File

@ -0,0 +1,20 @@
use log::*;
use solana_sdk::account::KeyedAccount;
use solana_sdk::native_program::ProgramError;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::solana_entrypoint;
solana_entrypoint!(entrypoint);
fn entrypoint(
program_id: &Pubkey,
keyed_accounts: &mut [KeyedAccount],
data: &[u8],
tick_height: u64,
) -> Result<(), ProgramError> {
solana_logger::setup();
info!("noop: program_id: {:?}", program_id);
info!("noop: keyed_accounts: {:#?}", keyed_accounts);
info!("noop: data: {:?}", data);
info!("noop: tick_height: {:?}", tick_height);
Ok(())
}