From 112016acd2a8e92f42da0bb3534e163af3b2f77f Mon Sep 17 00:00:00 2001 From: Hardhat Chad Date: Tue, 11 Feb 2025 12:24:12 -0800 Subject: [PATCH] remove idl injection --- Cargo.lock | 44 -------------------------------------------- program/Cargo.toml | 4 ---- program/build.rs | 18 ------------------ program/src/lib.rs | 3 --- 4 files changed, 69 deletions(-) delete mode 100644 program/build.rs diff --git a/Cargo.lock b/Cargo.lock index a4618dc..90d0dfe 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,12 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - [[package]] name = "aead" version = "0.5.2" @@ -490,15 +484,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - [[package]] name = "crunchy" version = "0.2.2" @@ -782,16 +767,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6b31a14f5ee08ed1a40e1252b35af18bed062e3f39b69aab34decde36bc43e40" -[[package]] -name = "flate2" -version = "1.0.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1b589b4dc103969ad3cf85c950899926ec64300a1a46d76c03a6072957036f0" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - [[package]] name = "fnv" version = "1.0.7" @@ -1108,15 +1083,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "miniz_oxide" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" -dependencies = [ - "adler2", -] - [[package]] name = "mpl-token-metadata" version = "5.1.0" @@ -1317,7 +1283,6 @@ dependencies = [ "ore-api 3.1.0", "ore-boost-api", "rand 0.8.5", - "solana-include-idl", "solana-program", "spl-associated-token-account", "spl-token 4.0.2", @@ -1897,15 +1862,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "solana-include-idl" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "754cc8fce28c62e67593ef317d715567b4610abfce1fa9ffa1d94f6eed8ad701" -dependencies = [ - "flate2", -] - [[package]] name = "solana-inflation" version = "2.1.13" diff --git a/program/Cargo.toml b/program/Cargo.toml index 8343a13..9d020b0 100644 --- a/program/Cargo.toml +++ b/program/Cargo.toml @@ -9,7 +9,6 @@ documentation.workspace = true repository.workspace = true readme.workspace = true keywords.workspace = true -build = "build.rs" [lib] crate-type = ["cdylib", "lib"] @@ -20,7 +19,6 @@ default = [] [dependencies] drillx.workspace = true -solana-include-idl = "0.1" mpl-token-metadata.workspace = true ore-api.workspace = true ore-boost-api.workspace = true @@ -32,5 +30,3 @@ steel.workspace = true [dev-dependencies] rand = "0.8.5" -[build-dependencies] -solana-include-idl = { version = "0.1", features = ["shrink"] } diff --git a/program/build.rs b/program/build.rs deleted file mode 100644 index 178cece..0000000 --- a/program/build.rs +++ /dev/null @@ -1,18 +0,0 @@ -use std::env; -use std::path::PathBuf; - -use solana_include_idl::compress_idl; - -/// Build script to compress the IDL file to a zip file when building the program. -/// -/// The compressed IDL is then included in a separate ELF section on the program binary -/// when the program is built. -fn main() { - // Get the IDL path. - let idl_path = PathBuf::from("../api").join("idl.json"); - // Compress the IDL file to a zip file. - let out_dir = env::var("OUT_DIR").unwrap(); - let dest_path = PathBuf::from(out_dir).join("codama.idl.zip"); - - compress_idl(&idl_path, &dest_path); -} diff --git a/program/src/lib.rs b/program/src/lib.rs index deecad4..13984d8 100644 --- a/program/src/lib.rs +++ b/program/src/lib.rs @@ -19,11 +19,8 @@ use update::*; use upgrade::*; use ore_api::instruction::*; -// use solana_include_idl::{include_idl, parse::IdlType}; use steel::*; -// include_idl!(IdlType::Codama, concat!(env!("OUT_DIR"), "/codama.idl.zip")); - #[allow(deprecated)] pub fn process_instruction( program_id: &Pubkey,