Remove token_program.rs
This commit is contained in:
@ -16,5 +16,5 @@ solana-sdk = { path = "../../../sdk", version = "0.11.0" }
|
||||
|
||||
[lib]
|
||||
name = "solana_erc20"
|
||||
crate-type = ["cdylib"]
|
||||
crate-type = ["lib", "cdylib"]
|
||||
|
||||
|
@ -10,12 +10,33 @@ extern crate serde_derive;
|
||||
#[macro_use]
|
||||
extern crate solana_sdk;
|
||||
|
||||
use solana_sdk::account::KeyedAccount;
|
||||
use solana_sdk::account::{Account, KeyedAccount};
|
||||
use solana_sdk::native_loader;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
use std::sync::{Once, ONCE_INIT};
|
||||
|
||||
mod token_program;
|
||||
|
||||
const ERC20_NAME: &str = "solana_erc20";
|
||||
const ERC20_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(&ERC20_PROGRAM_ID)
|
||||
}
|
||||
|
||||
pub fn account() -> Account {
|
||||
Account {
|
||||
tokens: 1,
|
||||
owner: id(),
|
||||
userdata: ERC20_NAME.as_bytes().to_vec(),
|
||||
executable: true,
|
||||
loader: native_loader::id(),
|
||||
}
|
||||
}
|
||||
|
||||
solana_entrypoint!(entrypoint);
|
||||
fn entrypoint(
|
||||
program_id: &Pubkey,
|
||||
|
Reference in New Issue
Block a user