Remove old makefiles
This commit is contained in:
parent
683d8c0b62
commit
a6e7cb8f7a
File diff suppressed because it is too large
Load Diff
12
Cargo.toml
12
Cargo.toml
|
@ -6,16 +6,22 @@ repository = "https://github.com/project-serum/serum-dex"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|
||||||
derive = []
|
derive = []
|
||||||
default = []
|
default = []
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
thiserror = "1.0.20"
|
thiserror = "1.0.20"
|
||||||
solana-sdk = { version = "1.3.14", default-features = false, features = ["program"] }
|
solana-sdk = { version = "1.3.14", default-features = false, features = ["program"] }
|
||||||
serum-common = { path = "../common" }
|
|
||||||
anchor-derive = { path = "./derive" }
|
anchor-derive = { path = "./derive" }
|
||||||
anchor-attributes-program = { path = "./attributes/program" }
|
anchor-attributes-program = { path = "./attributes/program" }
|
||||||
anchor-attributes-access-control = { path = "./attributes/access-control" }
|
anchor-attributes-access-control = { path = "./attributes/access-control" }
|
||||||
borsh = { git = "https://github.com/project-serum/borsh", branch = "serum", features = ["serum-program"] }
|
borsh = { git = "https://github.com/project-serum/borsh", branch = "serum", features = ["serum-program"] }
|
||||||
solana-client-gen = { path = "../solana-client-gen" }
|
|
||||||
|
[workspace]
|
||||||
|
members = [
|
||||||
|
"cli",
|
||||||
|
"syn",
|
||||||
|
"attributes/*",
|
||||||
|
"derive",
|
||||||
|
]
|
||||||
|
exclude = ["examples/basic"]
|
|
@ -13,6 +13,8 @@ For example, one could imagine easily writing a faulty SPL token program that fo
|
||||||
An example program looks like this.
|
An example program looks like this.
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
|
use anchor::prelude::*;
|
||||||
|
|
||||||
// Program instruction handler.
|
// Program instruction handler.
|
||||||
|
|
||||||
#[program]
|
#[program]
|
||||||
|
@ -33,7 +35,7 @@ pub struct Initialize<'info> {
|
||||||
|
|
||||||
// Program owned account.
|
// Program owned account.
|
||||||
|
|
||||||
#[derive(BorshSerialize, BorshDeserialize)]
|
#[derive(AnchorSerialize, AnchorDeserialize)]
|
||||||
pub struct Root {
|
pub struct Root {
|
||||||
pub initialized: bool,
|
pub initialized: bool,
|
||||||
pub data: u64,
|
pub data: u64,
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use clap::Clap;
|
use clap::Clap;
|
||||||
use std::fs::File;
|
|
||||||
use std::io::Read;
|
|
||||||
|
|
||||||
#[derive(Debug, Clap)]
|
#[derive(Debug, Clap)]
|
||||||
pub struct Opts {
|
pub struct Opts {
|
||||||
|
|
|
@ -17,8 +17,6 @@ dependencies = [
|
||||||
"anchor-attributes-program",
|
"anchor-attributes-program",
|
||||||
"anchor-derive",
|
"anchor-derive",
|
||||||
"borsh",
|
"borsh",
|
||||||
"serum-common",
|
|
||||||
"solana-client-gen",
|
|
||||||
"solana-sdk",
|
"solana-sdk",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
@ -74,12 +72,6 @@ version = "1.0.35"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2c0df63cb2955042487fad3aefd2c6e3ae7389ac5dc1beb28921de0b69f779d4"
|
checksum = "2c0df63cb2955042487fad3aefd2c6e3ae7389ac5dc1beb28921de0b69f779d4"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "arrayref"
|
|
||||||
version = "0.3.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "atty"
|
name = "atty"
|
||||||
version = "0.2.14"
|
version = "0.2.14"
|
||||||
|
@ -105,7 +97,6 @@ dependencies = [
|
||||||
"borsh",
|
"borsh",
|
||||||
"solana-program",
|
"solana-program",
|
||||||
"solana-sdk",
|
"solana-sdk",
|
||||||
"spl-token",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -235,17 +226,6 @@ dependencies = [
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "derivative"
|
|
||||||
version = "2.1.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "digest"
|
name = "digest"
|
||||||
version = "0.8.1"
|
version = "0.8.1"
|
||||||
|
@ -426,28 +406,6 @@ dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num_enum"
|
|
||||||
version = "0.5.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "226b45a5c2ac4dd696ed30fa6b94b057ad909c7b7fc2e0d0808192bced894066"
|
|
||||||
dependencies = [
|
|
||||||
"derivative",
|
|
||||||
"num_enum_derive",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "num_enum_derive"
|
|
||||||
version = "0.5.1"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1c0fd9eba1d5db0994a239e09c1be402d35622277e35468ba891aa5e3188ce7e"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro-crate",
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "opaque-debug"
|
name = "opaque-debug"
|
||||||
version = "0.2.3"
|
version = "0.2.3"
|
||||||
|
@ -470,15 +428,6 @@ version = "0.2.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
|
checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "proc-macro-crate"
|
|
||||||
version = "0.1.5"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785"
|
|
||||||
dependencies = [
|
|
||||||
"toml",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.24"
|
version = "1.0.24"
|
||||||
|
@ -562,15 +511,6 @@ version = "0.6.21"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189"
|
checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "remove_dir_all"
|
|
||||||
version = "0.5.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "dfc5b3ce5d5ea144bb04ebd093a9e14e9765bcfec866aecda9b6dec43b3d1e24"
|
|
||||||
dependencies = [
|
|
||||||
"winapi",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustc_version"
|
name = "rustc_version"
|
||||||
version = "0.2.3"
|
version = "0.2.3"
|
||||||
|
@ -630,17 +570,6 @@ dependencies = [
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "serum-common"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"arrayref",
|
|
||||||
"borsh",
|
|
||||||
"serde",
|
|
||||||
"solana-sdk",
|
|
||||||
"spl-token",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "sha2"
|
name = "sha2"
|
||||||
version = "0.8.2"
|
version = "0.8.2"
|
||||||
|
@ -653,16 +582,6 @@ dependencies = [
|
||||||
"opaque-debug",
|
"opaque-debug",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "solana-client-gen"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"bincode",
|
|
||||||
"serum-common",
|
|
||||||
"solana-sdk",
|
|
||||||
"thiserror",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-frozen-abi"
|
name = "solana-frozen-abi"
|
||||||
version = "1.4.14"
|
version = "1.4.14"
|
||||||
|
@ -780,21 +699,6 @@ dependencies = [
|
||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "spl-token"
|
|
||||||
version = "2.0.8"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "eaa27ab75067c63b8804d9fff30bd2e8bfb5be448bea8067ed768381e70ca181"
|
|
||||||
dependencies = [
|
|
||||||
"arrayref",
|
|
||||||
"num-derive",
|
|
||||||
"num-traits",
|
|
||||||
"num_enum",
|
|
||||||
"remove_dir_all",
|
|
||||||
"solana-sdk",
|
|
||||||
"thiserror",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "subtle"
|
name = "subtle"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
|
@ -856,15 +760,6 @@ dependencies = [
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "toml"
|
|
||||||
version = "0.5.7"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "75cf45bb0bef80604d001caaec0d09da99611b3c0fd39d3080468875cdb65645"
|
|
||||||
dependencies = [
|
|
||||||
"serde",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typenum"
|
name = "typenum"
|
||||||
version = "1.12.0"
|
version = "1.12.0"
|
||||||
|
|
|
@ -1,8 +1,7 @@
|
||||||
[package]
|
[package]
|
||||||
name = "basic-program"
|
name = "basic-program"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = "Anchor example"
|
description = "Basic example"
|
||||||
repository = "https://github.com/project-serum/serum-dex"
|
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
@ -11,22 +10,12 @@ edition = "2018"
|
||||||
crate-type = ["cdylib"]
|
crate-type = ["cdylib"]
|
||||||
name = "basic_program"
|
name = "basic_program"
|
||||||
|
|
||||||
[features]
|
|
||||||
no-entry = []
|
|
||||||
program = []
|
|
||||||
client = []
|
|
||||||
default = []
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
spl-token = { version = "2.0.6", default-features = false, features = ["program", "no-entrypoint"] }
|
|
||||||
borsh = { git = "https://github.com/project-serum/borsh", branch = "serum", features = ["serum-program"] }
|
borsh = { git = "https://github.com/project-serum/borsh", branch = "serum", features = ["serum-program"] }
|
||||||
solana-program = "1.4.3"
|
solana-program = "1.4.3"
|
||||||
solana-sdk = { version = "1.3.14", default-features = false, features = ["program"] }
|
solana-sdk = { version = "1.3.14", default-features = false, features = ["program"] }
|
||||||
anchor = { path = "../../", feautres = ["derive"] }
|
anchor = { path = "../../", feautres = ["derive"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
|
||||||
# solana-client-gen = { path = "../solana-client-gen", features = ["client"] }
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = true
|
lto = true
|
||||||
|
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
include ../../../Makefile
|
|
||||||
|
|
||||||
LIB_NAME=basic_program
|
|
||||||
PROGRAM_DIRNAME=.
|
|
||||||
BPF_SDK=$(shell pwd)/../../../bin/bpf-sdk
|
|
|
@ -1,4 +1,4 @@
|
||||||
#![cfg_attr(feature = "program", feature(proc_macro_hygiene))]
|
#![feature(proc_macro_hygiene)]
|
||||||
|
|
||||||
use anchor::prelude::*;
|
use anchor::prelude::*;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue