Initial commit from template
This commit is contained in:
28
programs/swap-program/Cargo.toml
Normal file
28
programs/swap-program/Cargo.toml
Normal file
@@ -0,0 +1,28 @@
|
||||
[package]
|
||||
name = "swap-program"
|
||||
version = "0.1.0"
|
||||
description = "Created with Anchor"
|
||||
edition = "2021"
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "lib"]
|
||||
name = "swap_program"
|
||||
|
||||
[features]
|
||||
default = []
|
||||
cpi = ["no-entrypoint"]
|
||||
no-entrypoint = []
|
||||
no-idl = []
|
||||
no-log-ix-name = []
|
||||
idl-build = ["anchor-lang/idl-build"]
|
||||
anchor-debug = []
|
||||
custom-heap = []
|
||||
custom-panic = []
|
||||
|
||||
|
||||
[dependencies]
|
||||
anchor-lang = "0.32.1"
|
||||
|
||||
|
||||
[lints.rust]
|
||||
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }
|
||||
16
programs/swap-program/src/lib.rs
Normal file
16
programs/swap-program/src/lib.rs
Normal file
@@ -0,0 +1,16 @@
|
||||
use anchor_lang::prelude::*;
|
||||
|
||||
declare_id!("G8m2Q8kMhkHf3xkVtb9nKfLeiWaSY352QBYsZGH3YfBT");
|
||||
|
||||
#[program]
|
||||
pub mod swap_program {
|
||||
use super::*;
|
||||
|
||||
pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
|
||||
msg!("Greetings from: {:?}", ctx.program_id);
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Accounts)]
|
||||
pub struct Initialize {}
|
||||
Reference in New Issue
Block a user