From 728e2b45b0f68860d32f4122ba120a93a4e101f3 Mon Sep 17 00:00:00 2001 From: ananas-block Date: Sun, 5 Jan 2025 00:51:29 +0000 Subject: [PATCH] chore: bump anchor to 0.30.1 --- Cargo.lock | 354 +++++++++++++++++------- Cargo.toml | 4 +- programs/account-compression/Cargo.toml | 2 +- programs/compressed-token/Cargo.toml | 4 +- programs/compressed-token/src/lib.rs | 12 - programs/package.json | 4 +- programs/registry/Cargo.toml | 2 +- programs/system/Cargo.toml | 3 +- programs/system/src/lib.rs | 14 - scripts/build-programs.sh | 5 + scripts/format.sh | 5 + 11 files changed, 275 insertions(+), 134 deletions(-) create mode 100755 scripts/build-programs.sh diff --git a/Cargo.lock b/Cargo.lock index 725fe02283..135c69b601 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,7 +17,7 @@ name = "account-compression" version = "1.2.0" dependencies = [ "aligned-sized", - "anchor-lang", + "anchor-lang 0.30.1", "bytemuck", "light-batched-merkle-tree", "light-bloom-filter", @@ -46,7 +46,7 @@ name = "account-compression-test" version = "1.1.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "anchor-spl", "ark-bn254", "ark-ff", @@ -207,7 +207,19 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5f619f1d04f53621925ba8a2e633ba5a6081f2ae14758cbb67f38fd823e0a3e" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" +dependencies = [ + "anchor-syn 0.30.1", "proc-macro2", "quote", "syn 1.0.109", @@ -219,7 +231,20 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f2a3e1df4685f18d12a943a9f2a7456305401af21a07c9fe076ef9ecd6e400" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "bs58 0.5.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" +dependencies = [ + "anchor-syn 0.30.1", "bs58 0.5.1", "proc-macro2", "quote", @@ -232,7 +257,18 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9423945cb55627f0b30903288e78baf6f62c6c8ab28fb344b6b25f1ffee3dca7" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" +dependencies = [ + "anchor-syn 0.30.1", "quote", "syn 1.0.109", ] @@ -243,7 +279,18 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93ed12720033cc3c3bf3cfa293349c2275cd5ab99936e33dd4bf283aaad3e241" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" +dependencies = [ + "anchor-syn 0.30.1", "quote", "syn 1.0.109", ] @@ -254,7 +301,19 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eef4dc0371eba2d8c8b54794b0b0eb786a234a559b77593d6f80825b6d2c77a2" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" +dependencies = [ + "anchor-syn 0.30.1", "proc-macro2", "quote", "syn 1.0.109", @@ -266,8 +325,25 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b18c4f191331e078d4a6a080954d1576241c29c56638783322a18d308ab27e4f" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-program" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" +dependencies = [ + "anchor-lang-idl", + "anchor-syn 0.30.1", + "anyhow", + "bs58 0.5.1", + "heck 0.3.3", + "proc-macro2", "quote", + "serde_json", "syn 1.0.109", ] @@ -277,7 +353,18 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5de10d6e9620d3bcea56c56151cad83c5992f50d5960b3a9bebc4a50390ddc3c" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" +dependencies = [ + "anchor-syn 0.30.1", "quote", "syn 1.0.109", ] @@ -288,7 +375,20 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4e2e5be518ec6053d90a2a7f26843dbee607583c779e6c8395951b9739bdfbe" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "borsh-derive-internal 0.10.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" +dependencies = [ + "anchor-syn 0.30.1", "borsh-derive-internal 0.10.3", "proc-macro2", "quote", @@ -306,22 +406,32 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "anchor-derive-space" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "anchor-lang" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35da4785497388af0553586d55ebdc08054a8b1724720ef2749d313494f2b8ad" dependencies = [ - "anchor-attribute-access-control", - "anchor-attribute-account", - "anchor-attribute-constant", - "anchor-attribute-error", - "anchor-attribute-event", - "anchor-attribute-program", - "anchor-derive-accounts", - "anchor-derive-serde", - "anchor-derive-space", - "anchor-syn", + "anchor-attribute-access-control 0.29.0", + "anchor-attribute-account 0.29.0", + "anchor-attribute-constant 0.29.0", + "anchor-attribute-error 0.29.0", + "anchor-attribute-event 0.29.0", + "anchor-attribute-program 0.29.0", + "anchor-derive-accounts 0.29.0", + "anchor-derive-serde 0.29.0", + "anchor-derive-space 0.29.0", "arrayref", "base64 0.13.1", "bincode", @@ -332,17 +442,70 @@ dependencies = [ "thiserror", ] +[[package]] +name = "anchor-lang" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" +dependencies = [ + "anchor-attribute-access-control 0.30.1", + "anchor-attribute-account 0.30.1", + "anchor-attribute-constant 0.30.1", + "anchor-attribute-error 0.30.1", + "anchor-attribute-event 0.30.1", + "anchor-attribute-program 0.30.1", + "anchor-derive-accounts 0.30.1", + "anchor-derive-serde 0.30.1", + "anchor-derive-space 0.30.1", + "anchor-lang-idl", + "arrayref", + "base64 0.21.7", + "bincode", + "borsh 0.10.3", + "bytemuck", + "getrandom 0.2.15", + "solana-program", + "thiserror", +] + +[[package]] +name = "anchor-lang-idl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" +dependencies = [ + "anchor-lang-idl-spec", + "anyhow", + "heck 0.3.3", + "regex", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", +] + [[package]] name = "anchor-spl" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c4fd6e43b2ca6220d2ef1641539e678bfc31b6cc393cf892b373b5997b6a39a" +checksum = "04bd077c34449319a1e4e0bc21cea572960c9ae0d0fefda0dd7c52fcc3c647a3" dependencies = [ - "anchor-lang", - "solana-program", - "spl-associated-token-account", + "anchor-lang 0.30.1", + "spl-associated-token-account 3.0.4", + "spl-pod 0.2.5", "spl-token", - "spl-token-2022 0.9.0", + "spl-token-2022 3.0.5", + "spl-token-group-interface 0.2.5", + "spl-token-metadata-interface 0.3.5", ] [[package]] @@ -363,6 +526,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "anchor-syn" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" +dependencies = [ + "anyhow", + "bs58 0.5.1", + "cargo_toml", + "heck 0.3.3", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -1081,6 +1263,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + [[package]] name = "cc" version = "1.1.15" @@ -1241,7 +1433,7 @@ name = "compressed-token-test" version = "1.1.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "anchor-spl", "light-compressed-token", "light-concurrent-merkle-tree", @@ -1405,7 +1597,7 @@ name = "create-address-test-program" version = "1.0.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "light-hasher", "light-system-program", "light-utils 1.1.0", @@ -1735,7 +1927,7 @@ name = "e2e-test" version = "1.1.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "anchor-spl", "light-batched-merkle-tree", "light-compressed-token", @@ -2002,7 +2194,7 @@ name = "forester" version = "1.1.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "async-trait", "bincode", "borsh 0.10.3", @@ -2051,7 +2243,7 @@ name = "forester-utils" version = "1.2.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "anchor-spl", "async-trait", "light-batched-merkle-tree", @@ -2911,7 +3103,7 @@ name = "light-batched-merkle-tree" version = "0.1.0" dependencies = [ "aligned-sized", - "anchor-lang", + "anchor-lang 0.30.1", "borsh 0.10.3", "bytemuck", "light-bloom-filter", @@ -2997,7 +3189,7 @@ version = "1.2.0" dependencies = [ "account-compression", "aligned-sized", - "anchor-lang", + "anchor-lang 0.30.1", "anchor-spl", "light-hasher", "light-heap", @@ -3065,7 +3257,7 @@ dependencies = [ name = "light-heap" version = "1.1.0" dependencies = [ - "anchor-lang", + "anchor-lang 0.30.1", ] [[package]] @@ -3106,7 +3298,7 @@ dependencies = [ name = "light-merkle-tree-metadata" version = "0.1.0" dependencies = [ - "anchor-lang", + "anchor-lang 0.30.1", "borsh 0.10.3", "bytemuck", "solana-program", @@ -3142,7 +3334,7 @@ name = "light-program-test" version = "0.1.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "async-trait", "borsh 0.10.3", "forester-utils", @@ -3204,7 +3396,7 @@ version = "1.2.0" dependencies = [ "account-compression", "aligned-sized", - "anchor-lang", + "anchor-lang 0.30.1", "light-batched-merkle-tree", "light-heap", "light-merkle-tree-metadata", @@ -3219,7 +3411,7 @@ version = "0.11.0" dependencies = [ "account-compression", "aligned-sized", - "anchor-lang", + "anchor-lang 0.30.1", "borsh 0.10.3", "bytemuck", "groth16-solana", @@ -3268,7 +3460,7 @@ version = "1.2.0" dependencies = [ "account-compression", "aligned-sized", - "anchor-lang", + "anchor-lang 0.30.1", "groth16-solana", "light-batched-merkle-tree", "light-concurrent-merkle-tree", @@ -3288,7 +3480,7 @@ name = "light-test-utils" version = "1.2.1" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "anchor-spl", "anyhow", "ark-ff", @@ -4643,7 +4835,7 @@ name = "registry-test" version = "1.1.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "anchor-spl", "forester-utils", "light-batched-merkle-tree", @@ -5025,7 +5217,7 @@ checksum = "0495e4577c672de8254beb68d01a9b62d0e8a13c099edecdbedccce3223cd29f" name = "sdk-test" version = "0.7.0" dependencies = [ - "anchor-lang", + "anchor-lang 0.30.1", "borsh 0.10.3", "light-client", "light-hasher", @@ -6360,7 +6552,7 @@ dependencies = [ "serde_json", "solana-account-decoder", "solana-sdk", - "spl-associated-token-account", + "spl-associated-token-account 2.3.0", "spl-memo", "spl-token", "spl-token-2022 1.0.0", @@ -6523,7 +6715,7 @@ version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfcf740e5242f2ad63325e600c368702f32db84608fc8b70d70633c68dd1486d" dependencies = [ - "anchor-lang", + "anchor-lang 0.29.0", "bytemuck", "solana-program", "solana-security-txt", @@ -6547,6 +6739,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spl-associated-token-account" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "143109d789171379e6143ef23191786dfaac54289ad6e7917cfb26b36c432b10" +dependencies = [ + "assert_matches", + "borsh 1.5.1", + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022 3.0.5", + "thiserror", +] + [[package]] name = "spl-concurrent-merkle-tree" version = "0.2.0" @@ -6733,20 +6941,6 @@ dependencies = [ "syn 2.0.85", ] -[[package]] -name = "spl-tlv-account-resolution" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" -dependencies = [ - "bytemuck", - "solana-program", - "spl-discriminator 0.1.0", - "spl-pod 0.1.0", - "spl-program-error 0.3.0", - "spl-type-length-value 0.3.0", -] - [[package]] name = "spl-tlv-account-resolution" version = "0.5.1" @@ -6790,28 +6984,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "spl-token-2022" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive 0.4.2", - "num-traits", - "num_enum 0.7.3", - "solana-program", - "solana-zk-token-sdk", - "spl-memo", - "spl-pod 0.1.0", - "spl-token", - "spl-token-metadata-interface 0.2.0", - "spl-transfer-hook-interface 0.3.0", - "spl-type-length-value 0.3.0", - "thiserror", -] - [[package]] name = "spl-token-2022" version = "1.0.0" @@ -6914,22 +7086,6 @@ dependencies = [ "spl-type-length-value 0.4.6", ] -[[package]] -name = "spl-transfer-hook-interface" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b" -dependencies = [ - "arrayref", - "bytemuck", - "solana-program", - "spl-discriminator 0.1.0", - "spl-pod 0.1.0", - "spl-program-error 0.3.0", - "spl-tlv-account-resolution 0.4.0", - "spl-type-length-value 0.3.0", -] - [[package]] name = "spl-transfer-hook-interface" version = "0.4.1" @@ -7138,7 +7294,7 @@ name = "system-cpi-test" version = "1.1.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "anchor-spl", "light-batched-merkle-tree", "light-compressed-token", @@ -7165,7 +7321,7 @@ name = "system-test" version = "1.1.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "anchor-spl", "light-batched-merkle-tree", "light-compressed-token", @@ -7453,7 +7609,7 @@ name = "token-escrow" version = "0.9.0" dependencies = [ "account-compression", - "anchor-lang", + "anchor-lang 0.30.1", "anchor-spl", "light-compressed-token", "light-hasher", diff --git a/Cargo.toml b/Cargo.toml index 7a58ce542a..44c698d728 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -59,8 +59,8 @@ spl-token = "=4.0.0" spl-token-2022 = {version="3.0.5", no-default-features = true, features = ["no-entrypoint"]} # Anchor -anchor-lang = "=0.29.0" -anchor-spl = "=0.29.0" +anchor-lang = "=0.30.1" +anchor-spl = "=0.30.1" # Anchor compatibility borsh = "0.10.0" diff --git a/programs/account-compression/Cargo.toml b/programs/account-compression/Cargo.toml index 0611c6afe6..ff21d296ed 100644 --- a/programs/account-compression/Cargo.toml +++ b/programs/account-compression/Cargo.toml @@ -17,7 +17,7 @@ no-log-ix-name = [] cpi = ["no-entrypoint"] custom-heap = ["light-heap"] mem-profiling = [] -default = ["custom-heap", "test"] +default = ["custom-heap", "test", "no-idl"] test-sbf = [] bench-sbf = [] test = [] diff --git a/programs/compressed-token/Cargo.toml b/programs/compressed-token/Cargo.toml index e7d4cbf94a..a7f33f4292 100644 --- a/programs/compressed-token/Cargo.toml +++ b/programs/compressed-token/Cargo.toml @@ -16,11 +16,13 @@ no-log-ix-name = [] cpi = ["no-entrypoint"] custom-heap = ["light-heap"] mem-profiling = [] -default = ["custom-heap", "idl-build"] +default = ["custom-heap", "no-idl"] test-sbf = [] bench-sbf = [] cpi-context = [] idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] +no-idl = [] + [dependencies] anchor-lang = { workspace = true } diff --git a/programs/compressed-token/src/lib.rs b/programs/compressed-token/src/lib.rs index 0c025e949f..fb4c7f1520 100644 --- a/programs/compressed-token/src/lib.rs +++ b/programs/compressed-token/src/lib.rs @@ -162,18 +162,6 @@ pub mod light_compressed_token { ) -> Result<()> { burn::process_burn(ctx, inputs) } - - /// This function is a stub to allow Anchor to include the input types in - /// the IDL. It should not be included in production builds nor be called in - /// practice. - #[cfg(feature = "idl-build")] - pub fn stub_idl_build<'info>( - _ctx: Context<'_, '_, '_, 'info, TransferInstruction<'info>>, - _inputs1: CompressedTokenInstructionDataTransfer, - _inputs2: TokenData, - ) -> Result<()> { - Err(ErrorCode::InstructionNotCallable.into()) - } } #[error_code] diff --git a/programs/package.json b/programs/package.json index dbd3c18f70..74cfad8166 100644 --- a/programs/package.json +++ b/programs/package.json @@ -3,9 +3,7 @@ "version": "0.3.0", "license": "Apache-2.0", "scripts": { - "push-idls": "../scripts/push-stateless-js-idls.sh && ../scripts/push-compressed-token-idl.sh", - "build": "anchor build", - "build-idls": "anchor build && pnpm build-system && pnpm build-compressed-token && pnpm push-idls", + "build": "../scripts/build-programs.sh", "build-system": "anchor build --program-name light_system_program -- --features idl-build custom-heap", "build-compressed-token": "anchor build --program-name light_compressed_token -- --features idl-build custom-heap", "test": "pnpm test-account-compression && pnpm test-system && pnpm test-compressed-token && pnpm test-registry", diff --git a/programs/registry/Cargo.toml b/programs/registry/Cargo.toml index 1f07d80801..71242069a5 100644 --- a/programs/registry/Cargo.toml +++ b/programs/registry/Cargo.toml @@ -17,7 +17,7 @@ no-log-ix-name = [] cpi = ["no-entrypoint"] custom-heap = ["light-heap"] mem-profiling = [] -default = ["custom-heap", "mem-profiling"] +default = ["custom-heap", "mem-profiling", "no-idl"] test-sbf = [] bench-sbf = [] sdk = [] diff --git a/programs/system/Cargo.toml b/programs/system/Cargo.toml index f63a903d3a..8f21685ff9 100644 --- a/programs/system/Cargo.toml +++ b/programs/system/Cargo.toml @@ -15,7 +15,8 @@ no-log-ix-name = [] cpi = ["no-entrypoint"] custom-heap = ["light-heap"] mem-profiling = [] -default = ["custom-heap", "idl-build"] +no-idl = [] +default = ["custom-heap", "no-idl"] test-sbf = [] bench-sbf = [] idl-build = ["anchor-lang/idl-build"] diff --git a/programs/system/src/lib.rs b/programs/system/src/lib.rs index e50ef40702..e63b4eed29 100644 --- a/programs/system/src/lib.rs +++ b/programs/system/src/lib.rs @@ -10,7 +10,6 @@ pub mod errors; pub mod sdk; pub mod utils; use errors::SystemProgramError; -use sdk::event::PublicTransactionEvent; declare_id!("SySTEM1eSU2p4BGQfQpimFEWWSC1XDFeun3Nqzz3rT7"); @@ -104,17 +103,4 @@ pub mod light_system_program { inputs.read_only_accounts, ) } - - /// This function is a stub to allow Anchor to include the input types in - /// the IDL. It should not be included in production builds nor be called in - /// practice. - #[cfg(feature = "idl-build")] - pub fn stub_idl_build<'info>( - _ctx: Context<'_, '_, '_, 'info, InvokeInstruction<'info>>, - _inputs1: InstructionDataInvoke, - _inputs2: InstructionDataInvokeCpi, - _inputs3: PublicTransactionEvent, - ) -> Result<()> { - Err(SystemProgramError::InstructionNotCallable.into()) - } } diff --git a/scripts/build-programs.sh b/scripts/build-programs.sh new file mode 100755 index 0000000000..b0af0412d9 --- /dev/null +++ b/scripts/build-programs.sh @@ -0,0 +1,5 @@ +# use with npx nx run @lightprotocol/programs:build +cd account-compression/ && cargo build-sbf && cd - +cd registry/ && cargo build-sbf && cd - +cd system/ && cargo build-sbf && cd - +cd compressed-token/ && cargo build-sbf && cd - \ No newline at end of file diff --git a/scripts/format.sh b/scripts/format.sh index 0a0d6e3c58..0e6b04746a 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -11,6 +11,11 @@ cargo clippy \ --exclude name-service \ --exclude photon-api \ --exclude name-service \ + # --exclude account-compression \ + # --exclude light-compressed-token \ + # --exclude light-system-program \ + # --exclude light-registry \ + # --exclude light-test-utils \ -- -A clippy::result_large_err \ -A clippy::empty-docs \ -A clippy::to-string-trait-impl \