Boot token_program from the SDK

This commit is contained in:
Greg Fitzgerald
2019-03-04 20:28:43 -07:00
parent e4be57c3b6
commit 5e9f802d7d
7 changed files with 36 additions and 8 deletions

View File

@ -0,0 +1,19 @@
[package]
name = "solana-token-api"
version = "0.12.0"
description = "Solana Token API"
authors = ["Solana Maintainers <maintainers@solana.com>"]
repository = "https://github.com/solana-labs/solana"
license = "Apache-2.0"
homepage = "https://solana.com/"
edition = "2018"
[dependencies]
bincode = "1.1.2"
serde = "1.0.89"
serde_derive = "1.0.89"
solana-sdk = { path = "../../sdk", version = "0.12.0" }
[lib]
name = "solana_token_api"
crate-type = ["lib"]

View File

@ -0,0 +1,11 @@
//! An ERC20-like Token
use solana_sdk::pubkey::Pubkey;
const TOKEN_PROGRAM_ID: [u8; 32] = [
131, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0,
];
pub fn id() -> Pubkey {
Pubkey::new(&TOKEN_PROGRAM_ID)
}