diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 7b7a096..fdffb9e 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -16,7 +16,7 @@ jobs: if: "${{ !startsWith(github.event.head_commit.message, 'GitBook: [#') }}" env: - TEST_LOCAL_CODEGEN: "true" + INTEGRATION_TESTS_IN_DOCKER: "true" RUN_INTEGRATION_TESTS: "true" CI: "true" CODEGEN_MAINNET_API_KEY: ${{ secrets.CODEGEN_MAINNET_API_KEY }} @@ -57,4 +57,4 @@ jobs: run: go test -v ./... - name: Build - run: go build ./... \ No newline at end of file + run: go build ./... diff --git a/.gitignore b/.gitignore index beaad02..9986126 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,13 @@ .idea *.logmytest /*.log + +# Added by substreams init# substreams auth file +.substreams.env +# Compiled source files +target/ +# Sink data when running any sinker +sink-data/ +# The spkg packed by the subtreams cli +*.spkg +replay.log diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..bd54b6b --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,2344 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "version_check", +] + +[[package]] +name = "ahash" +version = "0.8.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +dependencies = [ + "cfg-if", + "once_cell", + "version_check", + "zerocopy", +] + +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + +[[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", + "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", + "bs58 0.5.1", + "proc-macro2", + "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", + "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", + "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", + "proc-macro2", + "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", + "anyhow", + "bs58 0.5.1", + "heck 0.3.3", + "proc-macro2", + "quote", + "serde_json", + "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", + "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", + "borsh-derive-internal 0.10.4", + "proc-macro2", + "quote", + "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.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" +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", + "arrayref", + "base64 0.21.7", + "bincode", + "borsh 0.10.4", + "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", + "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-syn" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" +dependencies = [ + "anyhow", + "bs58 0.5.1", + "heck 0.3.3", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "anyhow" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" + +[[package]] +name = "ark-bn254" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" +dependencies = [ + "ark-ec", + "ark-ff", + "ark-std", +] + +[[package]] +name = "ark-ec" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff", + "ark-poly", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", + "itertools", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" +dependencies = [ + "ark-ff-asm", + "ark-ff-macros", + "ark-serialize", + "ark-std", + "derivative", + "digest 0.10.7", + "itertools", + "num-bigint", + "num-traits", + "paste", + "rustc_version", + "zeroize", +] + +[[package]] +name = "ark-ff-asm" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" +dependencies = [ + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-ff-macros" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" +dependencies = [ + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-poly" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" +dependencies = [ + "ark-ff", + "ark-serialize", + "ark-std", + "derivative", + "hashbrown 0.13.2", +] + +[[package]] +name = "ark-serialize" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-serialize-derive", + "ark-std", + "digest 0.10.7", + "num-bigint", +] + +[[package]] +name = "ark-serialize-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "ark-std" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] + +[[package]] +name = "arrayref" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" + +[[package]] +name = "arrayvec" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "base64" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" + +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bigdecimal" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6773ddc0eafc0e509fb60e48dff7f450f8e674a0686ae8605e8d9901bd5eefa" +dependencies = [ + "num-bigint", + "num-integer", + "num-traits", +] + +[[package]] +name = "bincode" +version = "1.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" +dependencies = [ + "serde", +] + +[[package]] +name = "bitflags" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] + +[[package]] +name = "bitmaps" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" +dependencies = [ + "typenum", +] + +[[package]] +name = "blake3" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", + "digest 0.10.7", +] + +[[package]] +name = "block-buffer" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "borsh" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" +dependencies = [ + "borsh-derive 0.9.3", + "hashbrown 0.11.2", +] + +[[package]] +name = "borsh" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" +dependencies = [ + "borsh-derive 0.10.4", + "hashbrown 0.13.2", +] + +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "borsh-derive 1.5.1", + "cfg_aliases", +] + +[[package]] +name = "borsh-derive" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" +dependencies = [ + "borsh-derive-internal 0.9.3", + "borsh-schema-derive-internal 0.9.3", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" +dependencies = [ + "borsh-derive-internal 0.10.4", + "borsh-schema-derive-internal 0.10.4", + "proc-macro-crate 0.1.5", + "proc-macro2", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +dependencies = [ + "once_cell", + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.87", + "syn_derive", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "borsh-schema-derive-internal" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "bs58" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" + +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bv" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" +dependencies = [ + "feature-probe", + "serde", +] + +[[package]] +name = "bytemuck" +version = "1.18.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94bbb0ad554ad961ddc5da507a12a29b14e4ae5bda06b19f575a3e6079d2e2ae" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "bytes" +version = "1.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" + +[[package]] +name = "cc" +version = "1.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e80e3b6a3ab07840e1cae9b0666a63970dc28e8ed5ffbcdacbfc760c281bfc1" +dependencies = [ + "jobserver", + "libc", + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + +[[package]] +name = "console_error_panic_hook" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" +dependencies = [ + "cfg-if", + "wasm-bindgen", +] + +[[package]] +name = "console_log" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" +dependencies = [ + "log", + "web-sys", +] + +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "cpufeatures" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +dependencies = [ + "libc", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +dependencies = [ + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" + +[[package]] +name = "crunchy" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "crypto-mac" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" +dependencies = [ + "generic-array", + "subtle", +] + +[[package]] +name = "curve25519-dalek" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "serde", + "subtle", + "zeroize", +] + +[[package]] +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" +dependencies = [ + "generic-array", +] + +[[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer 0.10.4", + "crypto-common", + "subtle", +] + +[[package]] +name = "either" +version = "1.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "fastrand" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + +[[package]] +name = "feature-probe" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" + +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" +dependencies = [ + "serde", + "typenum", + "version_check", +] + +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] + +[[package]] +name = "hashbrown" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +dependencies = [ + "ahash 0.7.8", +] + +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +dependencies = [ + "ahash 0.8.11", +] + +[[package]] +name = "hashbrown" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" + +[[package]] +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +dependencies = [ + "unicode-segmentation", +] + +[[package]] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" + +[[package]] +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-literal" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" + +[[package]] +name = "hmac" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +dependencies = [ + "crypto-mac", + "digest 0.9.0", +] + +[[package]] +name = "hmac-drbg" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +dependencies = [ + "digest 0.9.0", + "generic-array", + "hmac", +] + +[[package]] +name = "im" +version = "15.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +dependencies = [ + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "indexmap" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" +dependencies = [ + "equivalent", + "hashbrown 0.15.0", +] + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" + +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +dependencies = [ + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" +version = "0.2.159" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" + +[[package]] +name = "libsecp256k1" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +dependencies = [ + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", +] + +[[package]] +name = "libsecp256k1-core" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +dependencies = [ + "crunchy", + "digest 0.9.0", + "subtle", +] + +[[package]] +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "libsecp256k1-gen-genmult" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] + +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254", + "ark-ff", + "num-bigint", + "thiserror", +] + +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + +[[package]] +name = "lock_api" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" +dependencies = [ + "autocfg", + "scopeguard", +] + +[[package]] +name = "log" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "memmap2" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" +dependencies = [ + "libc", +] + +[[package]] +name = "memoffset" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" +dependencies = [ + "autocfg", +] + +[[package]] +name = "multimap" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" + +[[package]] +name = "my_project" +version = "0.0.1" +dependencies = [ + "anchor-lang", + "anyhow", + "base64 0.22.1", + "getrandom 0.2.15", + "hex-literal", + "num-bigint", + "num-traits", + "prost", + "prost-types", + "regex", + "sologger_log_context", + "substreams", + "substreams-database-change", + "substreams-entity-change", + "substreams-solana", + "substreams-solana-program-instructions", +] + +[[package]] +name = "num-bigint" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "num-integer" +version = "0.1.46" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" +dependencies = [ + "num-traits", +] + +[[package]] +name = "num-traits" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_enum" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" +dependencies = [ + "num_enum_derive", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" +dependencies = [ + "proc-macro-crate 3.2.0", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "opaque-debug" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" + +[[package]] +name = "pad" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2ad9b889f1b12e0b9ee24db044b5129150d5eada288edc800f789928dc8c0e3" +dependencies = [ + "unicode-width", +] + +[[package]] +name = "parking_lot" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets", +] + +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pest" +version = "2.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +dependencies = [ + "memchr", + "thiserror", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "pest_meta" +version = "2.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" +dependencies = [ + "once_cell", + "pest", + "sha2 0.10.8", +] + +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap", +] + +[[package]] +name = "ppv-lite86" +version = "0.2.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "prettyplease" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" +dependencies = [ + "proc-macro2", + "syn 2.0.87", +] + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml", +] + +[[package]] +name = "proc-macro-crate" +version = "3.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +dependencies = [ + "toml_edit", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3e4daa0dcf6feba26f985457cdf104d4b4256fc5a09547140f3631bb076b19a" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "prost" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b0487d90e047de87f984913713b85c601c05609aad5b0df4b4573fbf69aa13f" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c1318b19085f08681016926435853bbf7858f9c082d0999b80550ff5d9abe15" +dependencies = [ + "bytes", + "heck 0.4.1", + "itertools", + "log", + "multimap", + "once_cell", + "petgraph", + "prettyplease", + "prost", + "prost-types", + "regex", + "syn 2.0.87", + "tempfile", +] + +[[package]] +name = "prost-derive" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9552f850d5f0964a4e4d0bf306459ac29323ddfbae05e35a7c0d35cb0803cc5" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "prost-types" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4759aa0d3a6232fb8dbdb97b61de2c20047c68aca932c7ed76da9d788508d670" +dependencies = [ + "prost", +] + +[[package]] +name = "quote" +version = "1.0.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "redox_syscall" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +dependencies = [ + "bitflags", +] + +[[package]] +name = "regex" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "368758f23274712b504848e9d5a6f010445cc8b87a7cdb4d7cbee666c1288da3" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + +[[package]] +name = "rustix" +version = "0.38.37" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustversion" +version = "1.0.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "scopeguard" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" + +[[package]] +name = "semver" +version = "1.0.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" + +[[package]] +name = "serde" +version = "1.0.210" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.210" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "serde_json" +version = "1.0.128" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "solana-frozen-abi" +version = "1.18.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45478bad85abd8cc291775463e15bc1031fdbf973d48e2568e8defee3d842a3a" +dependencies = [ + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.18.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5cb05f9051446226cd26ea17f6fbe5e28e922ad6a846166db7fb17865090fcb" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.87", +] + +[[package]] +name = "solana-program" +version = "1.18.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a52f4c424433a18b57ae88a35b677c548879a9c4ca1e27e108d1597ff12b95ac" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.21.7", + "bincode", + "bitflags", + "blake3", + "borsh 0.10.4", + "borsh 0.9.3", + "borsh 1.5.1", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.15", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "light-poseidon", + "log", + "memoffset", + "num-bigint", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.18.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed90de8086a0e114ab63454a9d066e0f08eb2c9c8aea149ff60e8a492f165fc" +dependencies = [ + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.87", +] + +[[package]] +name = "sologger_log_context" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3eb55b37957035ebf21ead3470d6aeb39810acbbdbbdcccf4432174f35558171" +dependencies = [ + "bs58 0.5.1", + "lazy_static", + "log", + "regex", + "serde", + "serde_derive", + "serde_json", +] + +[[package]] +name = "substreams" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bb63116b90d4c174114fb237a8916dd995c939874f7576333990a44d78b642a" +dependencies = [ + "anyhow", + "bigdecimal", + "hex", + "hex-literal", + "num-bigint", + "num-integer", + "num-traits", + "pad", + "pest", + "pest_derive", + "prost", + "prost-build", + "prost-types", + "substreams-macro", + "thiserror", +] + +[[package]] +name = "substreams-database-change" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06fe88d25f4c3d56fc2a92583708dc34822ea99fb3f96609f9d684f717974b27" +dependencies = [ + "prost", + "prost-types", + "substreams", +] + +[[package]] +name = "substreams-entity-change" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0587b8d5dd7bffb0415d544c31e742c4cabdb81bbe9a3abfffff125185e4e9e8" +dependencies = [ + "base64 0.13.1", + "prost", + "prost-types", + "substreams", +] + +[[package]] +name = "substreams-macro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36f36e9da94db29f49daf3ab6b47b529b57c43fc5d58bc35b160aaad1a7233f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "thiserror", +] + +[[package]] +name = "substreams-solana" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bc14193c089465f3318be2215a90803e0bf2f16477557142648dbbe451ad6bc" +dependencies = [ + "anyhow", + "num_enum", + "substreams", + "substreams-solana-core", + "substreams-solana-macro", +] + +[[package]] +name = "substreams-solana-core" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d858d6d9568136744ee82cf0bd01a3f610a4a929b801b40b1934b6199c723520" +dependencies = [ + "bs58 0.4.0", + "prost", + "prost-build", + "prost-types", +] + +[[package]] +name = "substreams-solana-macro" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d28bba84dc05f4644ef9d1505162c4628f8fce2436bb15c047d0df3911dad142" +dependencies = [ + "bs58 0.4.0", +] + +[[package]] +name = "substreams-solana-program-instructions" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0c565ef42584f4468df9b5146fb460ef46ec3d777642451ccff83c5032b390e" +dependencies = [ + "anyhow", + "num_enum", + "substreams", +] + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.87" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "tempfile" +version = "3.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" +dependencies = [ + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "thiserror" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +dependencies = [ + "thiserror-impl", +] + +[[package]] +name = "thiserror-impl" +version = "1.0.64" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "tiny-bip39" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" +dependencies = [ + "anyhow", + "hmac", + "once_cell", + "pbkdf2", + "rand 0.7.3", + "rustc-hash", + "sha2 0.9.9", + "thiserror", + "unicode-normalization", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "tinyvec" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + +[[package]] +name = "toml" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" + +[[package]] +name = "toml_edit" +version = "0.22.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +dependencies = [ + "indexmap", + "toml_datetime", + "winnow", +] + +[[package]] +name = "typenum" +version = "1.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" + +[[package]] +name = "ucd-trie" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971" + +[[package]] +name = "unicode-ident" +version = "1.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" + +[[package]] +name = "unicode-normalization" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +dependencies = [ + "tinyvec", +] + +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "version_check" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +dependencies = [ + "cfg-if", + "once_cell", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn 2.0.87", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" + +[[package]] +name = "web-sys" +version = "0.3.70" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] + +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] + +[[package]] +name = "zeroize" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" +dependencies = [ + "zeroize_derive", +] + +[[package]] +name = "zeroize_derive" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.87", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..0c95075 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,36 @@ +[package] +name = "my_project" +version = "0.0.1" +edition = "2021" + +[lib] +name = "substreams" +crate-type = ["cdylib"] + +[dependencies] +hex-literal = "0.3.4" +num-bigint = "0.4" +num-traits = "0.2.15" +prost = "0.13" +prost-types = "0.13" +substreams = "0.6" +substreams-solana = "0.14" +substreams-solana-program-instructions = "0.2" +substreams-database-change = "2" +substreams-entity-change = "2" +anchor-lang = ">=0.30.1" +sologger_log_context = "0.1.2" +base64 = "0.22.1" + +# Required so that ethabi > ethereum-types build correctly under wasm32-unknown-unknown +[target.wasm32-unknown-unknown.dependencies] +getrandom = { version = "0.2", features = ["custom"] } + +[build-dependencies] +anyhow = "1" +regex = "1.8" + +[profile.release] +lto = true +opt-level = 's' +strip = "debuginfo" diff --git a/README.md b/README.md index fd7b901..1279a1c 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,16 @@ ## Usage -Use the codegen.substreams.dev and codegen-staging.substreams.dev endpoints. +Using the local codegen for substreams init: ```bash -substreams init --codegen-endpoint https://localhost:9000 +SUBSTREAMS_CODEGEN_ENDPOINT=http://localhost:9000 substreams init ``` ## Develop ```bash -DEBUG=.* go run ./cmd/substreams-codegen api --http-listen-addr "*:9000" +DEBUG=.* go run ./cmd/substreams-codegen ``` ## Principles diff --git a/sol-anchor/convo.go b/sol-anchor/convo.go index 6476c7c..520a94a 100644 --- a/sol-anchor/convo.go +++ b/sol-anchor/convo.go @@ -4,6 +4,7 @@ import ( "encoding/json" "fmt" "strconv" + "strings" "github.com/mr-tron/base58" codegen "github.com/streamingfast/substreams-codegen" @@ -133,7 +134,58 @@ func (c *Convo) Update(msg loop.Msg) loop.Cmd { } c.State.idl = idl c.State.IdlString = msg.Value - return c.NextStep() + + descString := "# Instructions\n\n" + for _, inst := range idl.Instructions { + descString += fmt.Sprintf("## %s (%s)\n", inst.Name, arrayToHex(inst.Discriminator)) + if len(inst.Args) != 0 { + argNames := make([]string, len(inst.Args)) + for i, field := range inst.Args { + argNames[i] = field.Name + } + descString += fmt.Sprintf("* Args: (%s)\n", strings.Join(argNames, ", ")) + } + if len(inst.Accounts) != 0 { + accNames := make([]string, len(inst.Accounts)) + for i, field := range inst.Accounts { + accNames[i] = field.Name + if field.Address != "" { + accNames[i] = "_" + field.Name + "_" + } + } + descString += fmt.Sprintf("* Accounts: (%s)\n", strings.Join(accNames, ", ")) + } + descString += "\n" + } + + if len(idl.Events) != 0 { + descString += fmt.Sprintf("# %s\n", "Events") + for _, evt := range idl.Events { + fieldNames := make([]string, len(evt.Fields)) + for i, field := range evt.Fields { + fieldNames[i] = field.Name + } + descString += fmt.Sprintf("* %s (%s)\n", evt.Name, strings.Join(fieldNames, ", ")) + descString += "\n" + } + } + + peekIDL := c.Msg().Message(descString).Cmd() + return loop.Seq(peekIDL, cmd(AskConfirmIDL{})) + + case AskConfirmIDL: + return c.Action(InputConfirmIDL{}). + Confirm("Do you want to proceed with this IDL?", "Yes", "No"). + DefaultAccept(). + Cmd() + + case InputConfirmIDL: + if msg.Affirmative { + return c.NextStep() + } + c.State.idl = nil + c.State.IdlString = "" + return loop.Seq(c.Msg().Message("Modify your JSON IDL and try again...").Cmd(), cmd(AskIdl{})) case AskProgramID: return c.Action(InputProgramID{}). @@ -158,15 +210,6 @@ func (c *Convo) Update(msg loop.Msg) loop.Cmd { return c.NextStep() case codegen.RunGenerate: - str := "" - for _, event := range c.State.idl.Events { - for _, field := range event.Fields { - fmt.Println("-----------------------------") - fmt.Println(field.Name) - - str += field.Type.Simple - } - } return c.CmdGenerate(c.State.Generate) case codegen.ReturnGenerate: @@ -175,3 +218,14 @@ func (c *Convo) Update(msg loop.Msg) loop.Cmd { return loop.Quit(fmt.Errorf("invalid loop message: %T", msg)) } + +func arrayToHex(arr []uint8) (out string) { + for i, v := range arr { + if i == 0 { + out = fmt.Sprintf("%02x", v) + continue + } + out = fmt.Sprintf("%s %02x", out, v) + } + return out +} diff --git a/sol-anchor/idl_accounts.go b/sol-anchor/idl_accounts.go new file mode 100644 index 0000000..74c6ad4 --- /dev/null +++ b/sol-anchor/idl_accounts.go @@ -0,0 +1,12 @@ +package solanchor + +type Account struct { + Name string `json:"name"` + Writable bool `json:"writable"` + Signer bool `json:"signer"` + Address string `json:"address"` +} + +func (a *Account) SnakeCaseName() string { + return toSnakeCase(a.Name, true) +} diff --git a/sol-anchor/idl_instructions.go b/sol-anchor/idl_instructions.go index 77da12d..ce9cb7e 100644 --- a/sol-anchor/idl_instructions.go +++ b/sol-anchor/idl_instructions.go @@ -6,8 +6,10 @@ import ( // --- INSTRUCTIONS type Instruction struct { - Name string `json:"name"` - Args []Field `json:"args"` + Name string `json:"name"` + Args []Field `json:"args"` + Accounts []Account `json:"accounts"` + Discriminator []uint8 `json:"discriminator"` } func (i *Instruction) PascalCaseName() string { @@ -16,4 +18,4 @@ func (i *Instruction) PascalCaseName() string { func (i *Instruction) SnakeCaseName() string { return toSnakeCase(i.Name, true) -} \ No newline at end of file +} diff --git a/sol-anchor/idl_test.go b/sol-anchor/idl_test.go index a8e05d0..ee0e917 100644 --- a/sol-anchor/idl_test.go +++ b/sol-anchor/idl_test.go @@ -60,7 +60,7 @@ func TestJupiterV4Swap(t *testing.T) { } func readFromFile(idlName string) []byte { - data, err := os.ReadFile("tests/" + idlName + ".json") + data, err := os.ReadFile("idls/" + idlName + ".json") if err != nil { fmt.Println("Error reading file:", err) return make([]byte, 0) diff --git a/sol-anchor/idls/jupiter_v4_swap.json b/sol-anchor/idls/jupiter_v4_swap.json new file mode 100644 index 0000000..bd6e17e --- /dev/null +++ b/sol-anchor/idls/jupiter_v4_swap.json @@ -0,0 +1,2806 @@ +{ + "version": "0.1.0", + "name": "jupiter", + "metadata": { + "address": "JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB" + }, + "instructions": [ + { + "name": "route", + "accounts": [ + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "userTransferAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "destinationTokenAccount", + "isMut": false, + "isSigner": false + } + ], + "args": [ + { + "name": "swapLeg", + "type": { + "defined": "SwapLeg" + } + }, + { + "name": "inAmount", + "type": "u64" + }, + { + "name": "quotedOutAmount", + "type": "u64" + }, + { + "name": "slippageBps", + "type": "u16" + }, + { + "name": "platformFeeBps", + "type": "u8" + } + ] + }, + { + "name": "whirlpoolSwapExactOutput", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "whirlpool", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenOwnerAccountA", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenVaultA", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenOwnerAccountB", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenVaultB", + "isMut": true, + "isSigner": false + }, + { + "name": "tickArray0", + "isMut": true, + "isSigner": false + }, + { + "name": "tickArray1", + "isMut": true, + "isSigner": false + }, + { + "name": "tickArray2", + "isMut": true, + "isSigner": false + }, + { + "name": "oracle", + "isMut": false, + "isSigner": false, + "docs": [ + "Oracle is currently unused and will be enabled on subsequent updates" + ] + } + ], + "args": [ + { + "name": "outAmount", + "type": "u64" + }, + { + "name": "inAmountWithSlippage", + "type": { + "defined": "AmountWithSlippage" + } + }, + { + "name": "aToB", + "type": "bool" + }, + { + "name": "platformFeeBps", + "type": "u8" + } + ] + }, + { + "name": "raydiumSwapExactOutput", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "ammId", + "isMut": true, + "isSigner": false + }, + { + "name": "ammAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "ammOpenOrders", + "isMut": true, + "isSigner": false + }, + { + "name": "poolCoinTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "poolPcTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "serumProgramId", + "isMut": false, + "isSigner": false + }, + { + "name": "serumMarket", + "isMut": true, + "isSigner": false + }, + { + "name": "serumBids", + "isMut": true, + "isSigner": false + }, + { + "name": "serumAsks", + "isMut": true, + "isSigner": false + }, + { + "name": "serumEventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "serumCoinVaultAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "serumPcVaultAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "serumVaultSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "userSourceTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "userDestinationTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "userSourceOwner", + "isMut": false, + "isSigner": true + } + ], + "args": [ + { + "name": "outAmount", + "type": "u64" + }, + { + "name": "inAmountWithSlippage", + "type": { + "defined": "AmountWithSlippage" + } + }, + { + "name": "platformFeeBps", + "type": "u8" + } + ] + }, + { + "name": "raydiumClmmSwapExactOutput", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "payer", + "isMut": false, + "isSigner": true + }, + { + "name": "ammConfig", + "isMut": false, + "isSigner": false + }, + { + "name": "poolState", + "isMut": true, + "isSigner": false + }, + { + "name": "inputTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "outputTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "inputVault", + "isMut": true, + "isSigner": false + }, + { + "name": "outputVault", + "isMut": true, + "isSigner": false + }, + { + "name": "observationState", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tickArray", + "isMut": true, + "isSigner": false + } + ], + "args": [ + { + "name": "outAmount", + "type": "u64" + }, + { + "name": "inAmountWithSlippage", + "type": { + "defined": "AmountWithSlippage" + } + }, + { + "name": "platformFeeBps", + "type": "u8" + } + ] + }, + { + "name": "createOpenOrders", + "accounts": [ + { + "name": "openOrders", + "isMut": true, + "isSigner": false + }, + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "dexProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + }, + { + "name": "market", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "createOpenOrderV2", + "accounts": [ + { + "name": "openOrders", + "isMut": true, + "isSigner": false + }, + { + "name": "payer", + "isMut": true, + "isSigner": true + }, + { + "name": "dexProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + }, + { + "name": "market", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "mercurialSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "swapState", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "poolAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "userTransferAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "sourceTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "destinationTokenAccount", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "cykuraSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "signer", + "isMut": false, + "isSigner": true + }, + { + "name": "factoryState", + "isMut": false, + "isSigner": false + }, + { + "name": "poolState", + "isMut": true, + "isSigner": false + }, + { + "name": "inputTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "outputTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "inputVault", + "isMut": true, + "isSigner": false + }, + { + "name": "outputVault", + "isMut": true, + "isSigner": false + }, + { + "name": "lastObservationState", + "isMut": true, + "isSigner": false + }, + { + "name": "coreProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "serumSwap", + "accounts": [ + { + "name": "market", + "accounts": [ + { + "name": "market", + "isMut": true, + "isSigner": false + }, + { + "name": "openOrders", + "isMut": true, + "isSigner": false + }, + { + "name": "requestQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "bids", + "isMut": true, + "isSigner": false + }, + { + "name": "asks", + "isMut": true, + "isSigner": false + }, + { + "name": "coinVault", + "isMut": true, + "isSigner": false + }, + { + "name": "pcVault", + "isMut": true, + "isSigner": false + }, + { + "name": "vaultSigner", + "isMut": false, + "isSigner": false + } + ] + }, + { + "name": "authority", + "isMut": false, + "isSigner": true + }, + { + "name": "orderPayerTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "coinWallet", + "isMut": true, + "isSigner": false + }, + { + "name": "pcWallet", + "isMut": true, + "isSigner": false + }, + { + "name": "dexProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "saberSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "swap", + "isMut": false, + "isSigner": false + }, + { + "name": "swapAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "userAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "inputUserAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "inputTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "outputUserAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "outputTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "feesTokenAccount", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "saberAddDecimals", + "accounts": [ + { + "name": "addDecimalsProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "wrapper", + "isMut": false, + "isSigner": false + }, + { + "name": "wrapperMint", + "isMut": true, + "isSigner": false + }, + { + "name": "wrapperUnderlyingTokens", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": true + }, + { + "name": "userUnderlyingTokens", + "isMut": true, + "isSigner": false + }, + { + "name": "userWrappedTokens", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "tokenSwap", + "accounts": [ + { + "name": "tokenSwapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "swap", + "isMut": false, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "userTransferAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "source", + "isMut": true, + "isSigner": false + }, + { + "name": "swapSource", + "isMut": true, + "isSigner": false + }, + { + "name": "swapDestination", + "isMut": true, + "isSigner": false + }, + { + "name": "destination", + "isMut": true, + "isSigner": false + }, + { + "name": "poolMint", + "isMut": true, + "isSigner": false + }, + { + "name": "poolFee", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "senchaSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "swap", + "isMut": true, + "isSigner": false + }, + { + "name": "userAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "inputUserAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "inputTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "inputFeesAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "outputUserAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "outputTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "outputFeesAccount", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "stepSwap", + "accounts": [ + { + "name": "tokenSwapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "swap", + "isMut": false, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "userTransferAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "source", + "isMut": true, + "isSigner": false + }, + { + "name": "swapSource", + "isMut": true, + "isSigner": false + }, + { + "name": "swapDestination", + "isMut": true, + "isSigner": false + }, + { + "name": "destination", + "isMut": true, + "isSigner": false + }, + { + "name": "poolMint", + "isMut": true, + "isSigner": false + }, + { + "name": "poolFee", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "cropperSwap", + "accounts": [ + { + "name": "tokenSwapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "swap", + "isMut": false, + "isSigner": false + }, + { + "name": "swapState", + "isMut": false, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "userTransferAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "source", + "isMut": true, + "isSigner": false + }, + { + "name": "swapSource", + "isMut": true, + "isSigner": false + }, + { + "name": "swapDestination", + "isMut": true, + "isSigner": false + }, + { + "name": "destination", + "isMut": true, + "isSigner": false + }, + { + "name": "poolMint", + "isMut": true, + "isSigner": false + }, + { + "name": "poolFee", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "raydiumSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "ammId", + "isMut": true, + "isSigner": false + }, + { + "name": "ammAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "ammOpenOrders", + "isMut": true, + "isSigner": false + }, + { + "name": "poolCoinTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "poolPcTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "serumProgramId", + "isMut": false, + "isSigner": false + }, + { + "name": "serumMarket", + "isMut": true, + "isSigner": false + }, + { + "name": "serumBids", + "isMut": true, + "isSigner": false + }, + { + "name": "serumAsks", + "isMut": true, + "isSigner": false + }, + { + "name": "serumEventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "serumCoinVaultAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "serumPcVaultAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "serumVaultSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "userSourceTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "userDestinationTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "userSourceOwner", + "isMut": false, + "isSigner": true + } + ], + "args": [] + }, + { + "name": "cremaSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "clmmConfig", + "isMut": false, + "isSigner": false + }, + { + "name": "clmmpool", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenA", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenB", + "isMut": false, + "isSigner": false + }, + { + "name": "accountA", + "isMut": true, + "isSigner": false + }, + { + "name": "accountB", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenAVault", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenBVault", + "isMut": true, + "isSigner": false + }, + { + "name": "tickArrayMap", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": true + }, + { + "name": "partner", + "isMut": false, + "isSigner": false + }, + { + "name": "partnerAtaA", + "isMut": true, + "isSigner": false + }, + { + "name": "partnerAtaB", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "lifinitySwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "amm", + "isMut": false, + "isSigner": false + }, + { + "name": "userTransferAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "sourceInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "destinationInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "swapSource", + "isMut": true, + "isSigner": false + }, + { + "name": "swapDestination", + "isMut": true, + "isSigner": false + }, + { + "name": "poolMint", + "isMut": true, + "isSigner": false + }, + { + "name": "feeAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "pythAccount", + "isMut": false, + "isSigner": false + }, + { + "name": "pythPcAccount", + "isMut": false, + "isSigner": false + }, + { + "name": "configAccount", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "marinadeDeposit", + "accounts": [ + { + "name": "marinadeFinanceProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "state", + "isMut": true, + "isSigner": false + }, + { + "name": "msolMint", + "isMut": true, + "isSigner": false + }, + { + "name": "liqPoolSolLegPda", + "isMut": true, + "isSigner": false + }, + { + "name": "liqPoolMsolLeg", + "isMut": true, + "isSigner": false + }, + { + "name": "liqPoolMsolLegAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "reservePda", + "isMut": true, + "isSigner": false + }, + { + "name": "transferFrom", + "isMut": true, + "isSigner": false + }, + { + "name": "mintTo", + "isMut": true, + "isSigner": false + }, + { + "name": "msolMintAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "userWsolTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tempWsolTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "userTransferAuthority", + "isMut": true, + "isSigner": true + }, + { + "name": "wsolMint", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "marinadeUnstake", + "accounts": [ + { + "name": "marinadeFinanceProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "state", + "isMut": true, + "isSigner": false + }, + { + "name": "msolMint", + "isMut": true, + "isSigner": false + }, + { + "name": "liqPoolSolLegPda", + "isMut": true, + "isSigner": false + }, + { + "name": "liqPoolMsolLeg", + "isMut": true, + "isSigner": false + }, + { + "name": "treasuryMsolAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "getMsolFrom", + "isMut": true, + "isSigner": false + }, + { + "name": "getMsolFromAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "transferSolTo", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "userWsolTokenAccount", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "aldrinSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "pool", + "isMut": false, + "isSigner": false + }, + { + "name": "poolSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "poolMint", + "isMut": true, + "isSigner": false + }, + { + "name": "baseTokenVault", + "isMut": true, + "isSigner": false + }, + { + "name": "quoteTokenVault", + "isMut": true, + "isSigner": false + }, + { + "name": "feePoolTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "walletAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "userBaseTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "userQuoteTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "aldrinV2Swap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "pool", + "isMut": false, + "isSigner": false + }, + { + "name": "poolSigner", + "isMut": false, + "isSigner": false + }, + { + "name": "poolMint", + "isMut": true, + "isSigner": false + }, + { + "name": "baseTokenVault", + "isMut": true, + "isSigner": false + }, + { + "name": "quoteTokenVault", + "isMut": true, + "isSigner": false + }, + { + "name": "feePoolTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "walletAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "userBaseTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "userQuoteTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "curve", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "whirlpoolSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "whirlpool", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenOwnerAccountA", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenVaultA", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenOwnerAccountB", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenVaultB", + "isMut": true, + "isSigner": false + }, + { + "name": "tickArray0", + "isMut": true, + "isSigner": false + }, + { + "name": "tickArray1", + "isMut": true, + "isSigner": false + }, + { + "name": "tickArray2", + "isMut": true, + "isSigner": false + }, + { + "name": "oracle", + "isMut": false, + "isSigner": false, + "docs": [ + "Oracle is currently unused and will be enabled on subsequent updates" + ] + } + ], + "args": [] + }, + { + "name": "invariantSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "state", + "isMut": false, + "isSigner": false + }, + { + "name": "pool", + "isMut": true, + "isSigner": false + }, + { + "name": "tickmap", + "isMut": true, + "isSigner": false + }, + { + "name": "accountX", + "isMut": true, + "isSigner": false + }, + { + "name": "accountY", + "isMut": true, + "isSigner": false + }, + { + "name": "reserveX", + "isMut": true, + "isSigner": false + }, + { + "name": "reserveY", + "isMut": true, + "isSigner": false + }, + { + "name": "owner", + "isMut": false, + "isSigner": true + }, + { + "name": "programAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "meteoraSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "pool", + "isMut": true, + "isSigner": false + }, + { + "name": "userSourceToken", + "isMut": true, + "isSigner": false + }, + { + "name": "userDestinationToken", + "isMut": true, + "isSigner": false + }, + { + "name": "aVault", + "isMut": true, + "isSigner": false + }, + { + "name": "bVault", + "isMut": true, + "isSigner": false + }, + { + "name": "aTokenVault", + "isMut": true, + "isSigner": false + }, + { + "name": "bTokenVault", + "isMut": true, + "isSigner": false + }, + { + "name": "aVaultLpMint", + "isMut": true, + "isSigner": false + }, + { + "name": "bVaultLpMint", + "isMut": true, + "isSigner": false + }, + { + "name": "aVaultLp", + "isMut": true, + "isSigner": false + }, + { + "name": "bVaultLp", + "isMut": true, + "isSigner": false + }, + { + "name": "adminTokenFee", + "isMut": true, + "isSigner": false + }, + { + "name": "user", + "isMut": false, + "isSigner": true + }, + { + "name": "vaultProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "goosefxSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "controller", + "isMut": false, + "isSigner": false + }, + { + "name": "pair", + "isMut": true, + "isSigner": false + }, + { + "name": "sslIn", + "isMut": true, + "isSigner": false + }, + { + "name": "sslOut", + "isMut": true, + "isSigner": false + }, + { + "name": "liabilityVaultIn", + "isMut": true, + "isSigner": false + }, + { + "name": "swappedLiabilityVaultIn", + "isMut": true, + "isSigner": false + }, + { + "name": "liabilityVaultOut", + "isMut": true, + "isSigner": false + }, + { + "name": "swappedLiabilityVaultOut", + "isMut": true, + "isSigner": false + }, + { + "name": "userInAta", + "isMut": true, + "isSigner": false + }, + { + "name": "userOutAta", + "isMut": true, + "isSigner": false + }, + { + "name": "feeCollectorAta", + "isMut": true, + "isSigner": false + }, + { + "name": "userWallet", + "isMut": false, + "isSigner": true + }, + { + "name": "feeCollector", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "deltafiSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "marketConfig", + "isMut": false, + "isSigner": false + }, + { + "name": "swapInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "userSourceToken", + "isMut": true, + "isSigner": false + }, + { + "name": "userDestinationToken", + "isMut": true, + "isSigner": false + }, + { + "name": "swapSourceToken", + "isMut": true, + "isSigner": false + }, + { + "name": "swapDestinationToken", + "isMut": true, + "isSigner": false + }, + { + "name": "deltafiUser", + "isMut": true, + "isSigner": false + }, + { + "name": "adminDestinationToken", + "isMut": true, + "isSigner": false + }, + { + "name": "pythPriceBase", + "isMut": false, + "isSigner": false + }, + { + "name": "pythPriceQuote", + "isMut": false, + "isSigner": false + }, + { + "name": "userAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "balansolSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "authority", + "isMut": true, + "isSigner": true + }, + { + "name": "pool", + "isMut": true, + "isSigner": false + }, + { + "name": "taxMan", + "isMut": true, + "isSigner": false + }, + { + "name": "bidMint", + "isMut": false, + "isSigner": false + }, + { + "name": "treasurer", + "isMut": false, + "isSigner": false + }, + { + "name": "srcTreasury", + "isMut": true, + "isSigner": false + }, + { + "name": "srcAssociatedTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "askMint", + "isMut": false, + "isSigner": false + }, + { + "name": "dstTreasury", + "isMut": true, + "isSigner": false + }, + { + "name": "dstAssociatedTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "dstTokenAccountTaxman", + "isMut": true, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "marcoPoloSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "state", + "isMut": false, + "isSigner": false + }, + { + "name": "pool", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenX", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenY", + "isMut": false, + "isSigner": false + }, + { + "name": "poolXAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "poolYAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "swapperXAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "swapperYAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "swapper", + "isMut": true, + "isSigner": true + }, + { + "name": "referrerXAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "referrerYAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "referrer", + "isMut": true, + "isSigner": false + }, + { + "name": "programAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "associatedTokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "rent", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "dradexSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "pair", + "isMut": true, + "isSigner": false + }, + { + "name": "market", + "isMut": true, + "isSigner": false + }, + { + "name": "eventQueue", + "isMut": true, + "isSigner": false + }, + { + "name": "dexUser", + "isMut": false, + "isSigner": false + }, + { + "name": "marketUser", + "isMut": true, + "isSigner": false + }, + { + "name": "bids", + "isMut": true, + "isSigner": false + }, + { + "name": "asks", + "isMut": true, + "isSigner": false + }, + { + "name": "t0Vault", + "isMut": true, + "isSigner": false + }, + { + "name": "t1Vault", + "isMut": true, + "isSigner": false + }, + { + "name": "t0User", + "isMut": true, + "isSigner": false + }, + { + "name": "t1User", + "isMut": true, + "isSigner": false + }, + { + "name": "master", + "isMut": false, + "isSigner": false + }, + { + "name": "signer", + "isMut": true, + "isSigner": true + }, + { + "name": "systemProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "logger", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "lifinityV2Swap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "authority", + "isMut": false, + "isSigner": false + }, + { + "name": "amm", + "isMut": true, + "isSigner": false + }, + { + "name": "userTransferAuthority", + "isMut": false, + "isSigner": true + }, + { + "name": "sourceInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "destinationInfo", + "isMut": true, + "isSigner": false + }, + { + "name": "swapSource", + "isMut": true, + "isSigner": false + }, + { + "name": "swapDestination", + "isMut": true, + "isSigner": false + }, + { + "name": "poolMint", + "isMut": true, + "isSigner": false + }, + { + "name": "feeAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "oracleMainAccount", + "isMut": false, + "isSigner": false + }, + { + "name": "oracleSubAccount", + "isMut": false, + "isSigner": false + }, + { + "name": "oraclePcAccount", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "raydiumClmmSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "payer", + "isMut": false, + "isSigner": true + }, + { + "name": "ammConfig", + "isMut": false, + "isSigner": false + }, + { + "name": "poolState", + "isMut": true, + "isSigner": false + }, + { + "name": "inputTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "outputTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "inputVault", + "isMut": true, + "isSigner": false + }, + { + "name": "outputVault", + "isMut": true, + "isSigner": false + }, + { + "name": "observationState", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "tickArray", + "isMut": true, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "phoenixSwap", + "accounts": [ + { + "name": "swapProgram", + "isMut": false, + "isSigner": false + }, + { + "name": "logAuthority", + "isMut": false, + "isSigner": false + }, + { + "name": "market", + "isMut": true, + "isSigner": false + }, + { + "name": "trader", + "isMut": false, + "isSigner": true + }, + { + "name": "baseAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "quoteAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "baseVault", + "isMut": true, + "isSigner": false + }, + { + "name": "quoteVault", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + }, + { + "name": "claimBonk", + "accounts": [ + { + "name": "openOrders", + "isMut": false, + "isSigner": false + }, + { + "name": "bonkMint", + "isMut": false, + "isSigner": false + }, + { + "name": "openOrdersBonkTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "market", + "isMut": false, + "isSigner": false + }, + { + "name": "openOrdersOwner", + "isMut": true, + "isSigner": false + }, + { + "name": "claimerTokenAccount", + "isMut": true, + "isSigner": false + }, + { + "name": "tokenProgram", + "isMut": false, + "isSigner": false + } + ], + "args": [] + } + ], + "types": [ + { + "name": "AmountWithSlippage", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "slippageBps", + "type": "u16" + } + ] + } + }, + { + "name": "SplitLegDeeper", + "type": { + "kind": "struct", + "fields": [ + { + "name": "percent", + "type": "u8" + }, + { + "name": "swapLeg", + "type": { + "defined": "SwapLegSwap" + } + } + ] + } + }, + { + "name": "SplitLeg", + "type": { + "kind": "struct", + "fields": [ + { + "name": "percent", + "type": "u8" + }, + { + "name": "swapLeg", + "type": { + "defined": "SwapLegDeeper" + } + } + ] + } + }, + { + "name": "Side", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Bid" + }, + { + "name": "Ask" + } + ] + } + }, + { + "name": "SwapLegSwap", + "type": { + "kind": "enum", + "variants": [ + { + "name": "PlaceholderOne" + }, + { + "name": "PlaceholderTwo" + }, + { + "name": "Swap", + "fields": [ + { + "name": "swap", + "type": { + "defined": "Swap" + } + } + ] + } + ] + } + }, + { + "name": "SwapLegDeeper", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Chain", + "fields": [ + { + "name": "swap_legs", + "type": { + "vec": { + "defined": "SwapLegSwap" + } + } + } + ] + }, + { + "name": "Split", + "fields": [ + { + "name": "split_legs", + "type": { + "vec": { + "defined": "SplitLegDeeper" + } + } + } + ] + }, + { + "name": "Swap", + "fields": [ + { + "name": "swap", + "type": { + "defined": "Swap" + } + } + ] + } + ] + } + }, + { + "name": "SwapLeg", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Chain", + "fields": [ + { + "name": "swap_legs", + "type": { + "vec": { + "defined": "SwapLegDeeper" + } + } + } + ] + }, + { + "name": "Split", + "fields": [ + { + "name": "split_legs", + "type": { + "vec": { + "defined": "SplitLeg" + } + } + } + ] + }, + { + "name": "Swap", + "fields": [ + { + "name": "swap", + "type": { + "defined": "Swap" + } + } + ] + } + ] + } + }, + { + "name": "Swap", + "type": { + "kind": "enum", + "variants": [ + { + "name": "Saber" + }, + { + "name": "SaberAddDecimalsDeposit" + }, + { + "name": "SaberAddDecimalsWithdraw" + }, + { + "name": "TokenSwap" + }, + { + "name": "Sencha" + }, + { + "name": "Step" + }, + { + "name": "Cropper" + }, + { + "name": "Raydium" + }, + { + "name": "Crema", + "fields": [ + { + "name": "a_to_b", + "type": "bool" + } + ] + }, + { + "name": "Lifinity" + }, + { + "name": "Mercurial" + }, + { + "name": "Cykura" + }, + { + "name": "Serum", + "fields": [ + { + "name": "side", + "type": { + "defined": "Side" + } + } + ] + }, + { + "name": "MarinadeDeposit" + }, + { + "name": "MarinadeUnstake" + }, + { + "name": "Aldrin", + "fields": [ + { + "name": "side", + "type": { + "defined": "Side" + } + } + ] + }, + { + "name": "AldrinV2", + "fields": [ + { + "name": "side", + "type": { + "defined": "Side" + } + } + ] + }, + { + "name": "Whirlpool", + "fields": [ + { + "name": "a_to_b", + "type": "bool" + } + ] + }, + { + "name": "Invariant", + "fields": [ + { + "name": "x_to_y", + "type": "bool" + } + ] + }, + { + "name": "Meteora" + }, + { + "name": "GooseFX" + }, + { + "name": "DeltaFi", + "fields": [ + { + "name": "stable", + "type": "bool" + } + ] + }, + { + "name": "Balansol" + }, + { + "name": "MarcoPolo", + "fields": [ + { + "name": "x_to_y", + "type": "bool" + } + ] + }, + { + "name": "Dradex", + "fields": [ + { + "name": "side", + "type": { + "defined": "Side" + } + } + ] + }, + { + "name": "LifinityV2" + }, + { + "name": "RaydiumClmm" + }, + { + "name": "Openbook", + "fields": [ + { + "name": "side", + "type": { + "defined": "Side" + } + } + ] + }, + { + "name": "Phoenix", + "fields": [ + { + "name": "side", + "type": { + "defined": "Side" + } + } + ] + } + ] + } + } + ], + "events": [ + { + "name": "Swap", + "fields": [ + { + "name": "amm", + "type": "publicKey", + "index": false + }, + { + "name": "inputMint", + "type": "publicKey", + "index": false + }, + { + "name": "inputAmount", + "type": "u64", + "index": false + }, + { + "name": "outputMint", + "type": "publicKey", + "index": false + }, + { + "name": "outputAmount", + "type": "u64", + "index": false + } + ] + }, + { + "name": "Fee", + "fields": [ + { + "name": "account", + "type": "publicKey", + "index": false + }, + { + "name": "mint", + "type": "publicKey", + "index": false + }, + { + "name": "amount", + "type": "u64", + "index": false + } + ] + } + ], + "errors": [ + { + "code": 6000, + "name": "EmptyRoute", + "msg": "Empty route" + }, + { + "code": 6001, + "name": "SlippageToleranceExceeded", + "msg": "Slippage tolerance exceeded" + }, + { + "code": 6002, + "name": "InvalidCalculation", + "msg": "Invalid calculation" + }, + { + "code": 6003, + "name": "MissingPlatformFeeAccount", + "msg": "Missing platform fee account" + }, + { + "code": 6004, + "name": "InvalidSlippage", + "msg": "Invalid slippage" + }, + { + "code": 6005, + "name": "NotEnoughPercent", + "msg": "Not enough percent to 100" + }, + { + "code": 6006, + "name": "InAmountsStackIsEmpty", + "msg": "In amounts stack is empty" + }, + { + "code": 6007, + "name": "OutAmountsStackIsEmpty", + "msg": "Out amounts stack is empty" + }, + { + "code": 6008, + "name": "NotEnoughAccountKeys", + "msg": "Not Enough Account keys" + }, + { + "code": 6009, + "name": "NonZeroMinimumOutAmountNotSupported", + "msg": "Non zero minimum out amount not supported" + } + ] +} \ No newline at end of file diff --git a/sol-anchor/tests/meteora.json b/sol-anchor/idls/meteora.json similarity index 100% rename from sol-anchor/tests/meteora.json rename to sol-anchor/idls/meteora.json diff --git a/sol-anchor/tests/orca.json b/sol-anchor/idls/orca.json similarity index 100% rename from sol-anchor/tests/orca.json rename to sol-anchor/idls/orca.json diff --git a/sol-anchor/tests/pumpfun.json b/sol-anchor/idls/pumpfun.json similarity index 100% rename from sol-anchor/tests/pumpfun.json rename to sol-anchor/idls/pumpfun.json diff --git a/sol-anchor/templates/proto/program.proto.gotmpl b/sol-anchor/templates/proto/program.proto.gotmpl index d4ea8bd..52fe36a 100644 --- a/sol-anchor/templates/proto/program.proto.gotmpl +++ b/sol-anchor/templates/proto/program.proto.gotmpl @@ -3,7 +3,6 @@ syntax = "proto3"; package substreams.v1.program; message Data { - {{- $counter := 0 }} {{- range $i, $event := .Idl.Events }} {{- $counter = add $counter 1 }} @@ -11,49 +10,51 @@ message Data { {{- end}} {{- range $i, $instruction := .Idl.Instructions -}} - {{ if $instruction.Args }} {{- $counter = add $counter 1 }} repeated {{ $instruction.PascalCaseName }} {{ $instruction.SnakeCaseName }}_list = {{ $counter }}; {{- end }} - {{- end }} } - -{{- range $i, $event := .Idl.Events }} +{{ range $i, $event := .Idl.Events -}} message {{$event.Name}} { - {{- $counter := 0 }} + string trx_hash = 1; + {{- $counter := 1 }} {{- range $i, $field := $event.Fields }} {{- $counter = add $counter 1 }} {{ if or $field.Type.IsArray $field.Type.IsVec }} repeated {{ end }} {{ if $field.Type.IsOption }} optional {{ end }} {{$field.Type.ResolveProtobufType}}{{ if $.Idl.IsTypeEnum $field.Type.ResolveProtobufType }}Enum{{end}} {{$field.SnakeCaseName}} = {{ $counter }}; {{- end}} } {{- end}} - -{{- range $i, $instruction := .Idl.Instructions }} -{{ if $instruction.Args }} +{{ range $i, $instruction := .Idl.Instructions }} message {{$instruction.PascalCaseName}} { - {{- $counter := 0 }} + string trx_hash = 1; + {{- $counter := 1 }} {{- range $i, $arg := $instruction.Args }} {{- $counter = add $counter 1 }} - {{ if or $arg.Type.IsArray $arg.Type.IsVec }} repeated {{ end }} {{ if $arg.Type.IsOption }} optional {{ end }} {{$arg.Type.ResolveProtobufType}}{{ if $.Idl.IsTypeEnum $arg.Type.ResolveProtobufType }}Enum{{end}} {{$arg.SnakeCaseName}} = {{ $counter }}; + {{ if or $arg.Type.IsArray $arg.Type.IsVec }}repeated {{ end }}{{ if $arg.Type.IsOption }}optional {{ end }}{{$arg.Type.ResolveProtobufType}}{{ if $.Idl.IsTypeEnum $arg.Type.ResolveProtobufType }}Enum{{end}} {{$arg.SnakeCaseName}} = {{ $counter }}; + {{- end}} + {{- range $i, $acc := $instruction.Accounts }} + {{- if not $acc.Address }} + {{- $counter = add $counter 1 }} + string acct_{{$acc.SnakeCaseName}} = {{ $counter }}; + {{- end }} {{- end}} } {{- end}} -{{- end}} -{{- range $i, $type := .Idl.Types }} - {{- if $type.Type.IsStruct }} - message {{$type.Name}} { - {{- $counter := 0 }} - {{- range $i, $field := $type.Type.Struct.Fields }} - {{- $counter = add $counter 1 }} - {{ if or $field.Type.IsArray $field.Type.IsVec }} repeated {{ end }} {{ if $field.Type.IsOption }} optional {{ end }} {{$field.Type.ResolveProtobufType}}{{ if $.Idl.IsTypeEnum $field.Type.ResolveProtobufType }}Enum{{end}} {{$field.SnakeCaseName}} = {{ $counter }}; - {{- end}} - } - {{- else }} - enum {{$type.Name}}Enum { - {{- range $i, $variant := $type.Type.Enum.Variants }} - {{ $type.SnakeCaseNameUpperCase }}_{{ $variant.SnakeCaseName }} = {{ $i }}; - {{- end}} - } - {{- end }} +{{ range $i, $type := .Idl.Types }} +{{- if $type.Type.IsStruct }} +message {{$type.Name}} { + {{- $counter := 0 }} + {{- range $i, $field := $type.Type.Struct.Fields }} + {{- $counter = add $counter 1 }} + {{ if or $field.Type.IsArray $field.Type.IsVec }} repeated {{ end }} {{ if $field.Type.IsOption }} optional {{ end }} {{$field.Type.ResolveProtobufType}}{{ if $.Idl.IsTypeEnum $field.Type.ResolveProtobufType }}Enum{{end}} {{$field.SnakeCaseName}} = {{ $counter }}; + {{- end}} +} +{{- else }} +enum {{$type.Name}}Enum { + {{- range $i, $variant := $type.Type.Enum.Variants }} + {{ $type.SnakeCaseNameUpperCase }}_{{ $variant.SnakeCaseName }} = {{ $i }}; + {{- end}} +} +{{- end }} {{- end}} \ No newline at end of file diff --git a/sol-anchor/templates/src/lib.rs.gotmpl b/sol-anchor/templates/src/lib.rs.gotmpl index e8ed1ee..f905826 100644 --- a/sol-anchor/templates/src/lib.rs.gotmpl +++ b/sol-anchor/templates/src/lib.rs.gotmpl @@ -11,9 +11,7 @@ use pb::substreams::v1::program::{{$event.Name}}; {{- end}} {{- range $i, $instruction := .Idl.Instructions }} -{{- if $instruction.Args }} use pb::substreams::v1::program::{{$instruction.PascalCaseName}}; -{{- end }} {{- end}} {{- range $i, $type := .Idl.Types }} @@ -38,17 +36,15 @@ fn map_program_data(blk: Block) -> Data { {{- end}} {{- range $i, $instruction := .Idl.Instructions }} - {{- if $instruction.Args }} let mut {{ $instruction.SnakeCaseName }}_list: Vec<{{$instruction.PascalCaseName}}> = Vec::new(); {{- end}} - {{- end}} blk.transactions().for_each(|transaction| { - let meta_wrapped = &transaction.meta; - let meta = meta_wrapped.as_ref().unwrap(); {{ if .Idl.Events -}} // ------------- EVENTS ------------- + let meta_wrapped = &transaction.meta; + let meta = meta_wrapped.as_ref().unwrap(); let programs_selector: ProgramsSelector = ProgramsSelector::new(&["*".to_string()]); let log_contexts = LogContext::parse_logs_basic(&meta.log_messages, &programs_selector); @@ -71,6 +67,7 @@ fn map_program_data(blk: Block) -> Data { ) { {{ $event.SnakeCaseName }}_list.push({{ $event.Name }} { + trx_hash: transaction.id(), {{- range $i, $arg := $event.Fields }} {{ $arg.Type.Print $arg.Name "event" $.Idl.Types }} {{- end}} @@ -95,20 +92,25 @@ fn map_program_data(blk: Block) -> Data { let slice_u8: &[u8] = &inst.data()[..]; {{- range $i, $instruction := .Idl.Instructions -}} - {{- if $instruction.Args -}} if slice_u8[0..8] == idl::idl::program::client::args::{{ $instruction.PascalCaseName }}::DISCRIMINATOR { if let Ok(instruction) = idl::idl::program::client::args::{{ $instruction.PascalCaseName }}::deserialize(&mut &slice_u8[8..]) { + let accts = inst.accounts(); {{ $instruction.SnakeCaseName }}_list.push({{ $instruction.PascalCaseName }} { + trx_hash: transaction.id(), {{- range $i, $arg := $instruction.Args }} {{ $arg.Type.Print $arg.Name "instruction" $.Idl.Types }} - {{- end}} + {{- end }} + {{- range $i, $acc := $instruction.Accounts }} + {{- if not $acc.Address }} + acct_{{ $acc.SnakeCaseName }}: accts[{{ $i }}].to_string(), + {{- end }} + {{- end }} }); } } {{- end }} - {{- end }} }); {{- end }} }); @@ -120,9 +122,7 @@ fn map_program_data(blk: Block) -> Data { {{- end }} {{- range $i, $instruction := .Idl.Instructions }} - {{- if $instruction.Args }} {{ $instruction.SnakeCaseName }}_list, - {{- end -}} {{- end }} } } diff --git a/sol-anchor/tests/integration/integration_test.go b/sol-anchor/tests/integration/integration_test.go deleted file mode 100644 index 274ab8e..0000000 --- a/sol-anchor/tests/integration/integration_test.go +++ /dev/null @@ -1,77 +0,0 @@ -package solanchor - -import ( - "fmt" - "os" - "os/exec" - "testing" -) - -func TestIntegrationPumpFun(t *testing.T) { - err := runTest("pump-fun") - if err != nil { - t.Fail() - } -} - -func TestIntegrationMeteora(t *testing.T) { - err := runTest("meteora") - if err != nil { - t.Fail() - } -} - -func TestIntegrationOrca(t *testing.T) { - err := runTest("orca") - if err != nil { - t.Fail() - } -} - -func runTest(generatorName string) error { - tempDir, err := os.MkdirTemp("", "temp") - if err != nil { - fmt.Printf("Error creating temporary directory: %v\n", err) - return err - } - fmt.Printf("Temporary directory created: %s\n", tempDir) - - defer os.RemoveAll(tempDir) - - // Move generator to temp directory - cpCmd := exec.Command("cp", fmt.Sprintf("generators/%s.json", generatorName), fmt.Sprintf("%s/%s.json", tempDir, generatorName)) - output, err := cpCmd.CombinedOutput() - if err != nil { - fmt.Printf("Error moving files: %v\n", err) - return err - } - fmt.Printf("Output %s\n", output) - - // Set the command to execute - cmd := exec.Command("substreams", "init", "--state-file", fmt.Sprintf("%s.json", generatorName)) - cmd.Env = append(os.Environ(), "SUBSTREAMS_CODEGEN_ENDPOINT=http://localhost:9000") - cmd.Dir = tempDir - - // Run the command and capture the output - output, err = cmd.CombinedOutput() - if err != nil { - fmt.Printf("Error running command: %v\n", err) - return err - } - - fmt.Printf("Command output:\n%s\n", output) - - // Execute build - cmd1 := exec.Command("substreams", "build") - cmd1.Dir = tempDir - - output1, err := cmd1.CombinedOutput() - if err != nil { - fmt.Printf("Error running command: %v\n", err) - return err - } - - fmt.Printf("Command output:\n%s\n", output1) - - return nil -} diff --git a/sol-anchor/types.go b/sol-anchor/types.go index a967fa5..e20cacb 100644 --- a/sol-anchor/types.go +++ b/sol-anchor/types.go @@ -6,3 +6,5 @@ type AskIdl struct{} type InputIdl struct{ pbconvo.UserInput_TextInput } type AskProgramID struct{} type InputProgramID struct{ pbconvo.UserInput_TextInput } +type AskConfirmIDL struct{} +type InputConfirmIDL struct{ pbconvo.UserInput_Confirmation } diff --git a/tests/Dockerfile b/tests/Dockerfile index baf2b52..8fb8dab 100644 --- a/tests/Dockerfile +++ b/tests/Dockerfile @@ -15,10 +15,3 @@ RUN chmod +x /usr/local/bin/substreams && \ chmod +x /app/entrypoint.sh CMD ["/app/entrypoint.sh"] - - - - - - - diff --git a/tests/entrypoint.sh b/tests/entrypoint.sh index c2d1ec0..2bd14ad 100755 --- a/tests/entrypoint.sh +++ b/tests/entrypoint.sh @@ -1,21 +1,9 @@ #!/usr/bin/env bash set -euxo pipefail -listen_address= -if [[ ${TEST_LOCAL_CODEGEN:-false} == "true" ]]; then - if [[ -z ${CI} ]]; then - listen_address="http://host.docker.internal:9000" - else - # Codegen address when running test - listen_address="http://172.17.0.1:9000" - fi -else - listen_address="https://codegen-staging.substreams.dev" -fi - -substreams init --state-file /app/generator.json --force-download-cwd --codegen-endpoint $listen_address +substreams init --state-file /app/generator.json --force-download-cwd substreams build ## To validate the manifest -substreams info \ No newline at end of file +substreams info diff --git a/tests/integration_test.go b/tests/integration_test.go index 6fcc53e..d7e248b 100644 --- a/tests/integration_test.go +++ b/tests/integration_test.go @@ -1,29 +1,34 @@ package tests import ( + "context" "fmt" + "io" "os" "os/exec" - "regexp" + "path/filepath" "testing" "time" "github.com/stretchr/testify/require" + "go.uber.org/zap" "github.com/streamingfast/logging" "github.com/streamingfast/dstore" "github.com/streamingfast/substreams-codegen/server" - - "golang.org/x/net/context" ) func TestIntegration(t *testing.T) { - if os.Getenv("RUN_INTEGRATION_TESTS") != "true" { - t.Skip() + runIntegrationTests := os.Getenv("RUN_INTEGRATION_TESTS") == "true" + if !runIntegrationTests { + t.Skip("RUN_INTEGRATION_TESTS is not set to 'true'") } + integrationTestsInDocker := os.Getenv("INTEGRATION_TESTS_IN_DOCKER") == "true" + integrationTestsAgainstLocal := os.Getenv("INTEGRATION_TESTS_AGAINST_STAGING") != "true" + cases := []struct { name string stateFile string @@ -64,43 +69,100 @@ func TestIntegration(t *testing.T) { name: "starknet-events", stateFile: "./starknet-events/generator.json", }, + { + name: "sol-anchor-meteora", + stateFile: "./sol-anchor/meteora.json", + }, + { + name: "sol-anchor-orca", + stateFile: "./sol-anchor/orca.json", + }, + { + name: "sol-anchor-pump-fun", + stateFile: "./sol-anchor/pump-fun.json", + }, } - ctx := context.Background() + var zlog, _ = logging.RootLogger("test", "test") + endpoint := "https://codegen-staging.substreams.dev" + if integrationTestsAgainstLocal { + launchLocalServer(t, ":51012", zlog) + + switch { + case integrationTestsInDocker && os.Getenv("CI") == "": + endpoint = "http://host.docker.internal:51012" + case integrationTestsInDocker: + endpoint = "http://172.17.0.1:51012" + default: + endpoint = "http://127.0.0.1:51012" + } + } - buildArgs := []string{ - "build", - "-t", - "test-image", - ".", - "--platform", - "linux/amd64", + if integrationTestsInDocker { + runTestsInDocker(t, cases, endpoint) + return + } + + validateBinary(t, "substreams") + validateBinary(t, "cargo") + validateBinary(t, "buf") + + parallel := true + hasSSCache := hasBinary("sscache") + if !hasSSCache { + zlog.Info("sscache not found, tests will not run in parallel (run `cargo install sscache` to enable parallelism)") + parallel = false + } else { + os.Setenv("RUSTC_WRAPPER", "sccache") + os.Setenv("SSCACHE_DIR", filepath.Join(os.TempDir(), "sscachedir")) } - if os.Getenv("TEST_LOCAL_CODEGEN") == "true" { - go func() { - var cors *regexp.Regexp - hostRegex, err := regexp.Compile("^localhost") - require.NoError(t, err) - cors = hostRegex + for _, c := range cases { + c := c + t.Run(c.name, func(t *testing.T) { + if parallel { + t.Parallel() + } + runTestLocally(t, c.stateFile) + }) + } +} - sessionStore, err := dstore.NewStore("", "", "", false) - require.NoError(t, err) +func launchLocalServer(t *testing.T, listenAddr string, zlog *zap.Logger) { + go func() { + sessionStore := dstore.NewMockStore(func(base string, f io.Reader) (err error) { return nil }) + server := server.New( + listenAddr, + nil, + sessionStore, + zlog) + server.OnTerminating(func(e error) { + require.NoError(t, e) + }) + server.Run() + }() - var zlog, _ = logging.RootLogger("test", "test") + //Make sure server is running before, `substreams init` + time.Sleep(2 * time.Second) +} - server := server.New( - ":9000", - cors, - sessionStore, - zlog) - server.Run() - }() +func runTestsInDocker(t *testing.T, cases []struct { + name string + stateFile string + explorerApiKeyEnvName string + apiKeyNeeded bool +}, endpoint string) { - //Make sure server is running before, `substreams init` - time.Sleep(2 * time.Second) + buildArgs := []string{ + "build", + "-t", + "substreams-test-image", + ".", + "--platform", + "linux/amd64", } + ctx := context.Background() buildCmd := exec.CommandContext(ctx, "docker", buildArgs...) buildCmd.Dir = "./" @@ -114,13 +176,6 @@ func TestIntegration(t *testing.T) { t.Run(c.name, func(t *testing.T) { t.Parallel() - if os.Getenv("TEST_LOCAL_CODEGEN") == "true" { - explorerApiKey := os.Getenv(c.explorerApiKeyEnvName) - if explorerApiKey == "" && c.apiKeyNeeded { - fmt.Printf("NO %s has been provided, please make sure to provide it to enable code generation...", c.explorerApiKeyEnvName) - } - } - runArgs := []string{ "run", "--rm", @@ -131,10 +186,8 @@ func TestIntegration(t *testing.T) { "-v", fmt.Sprintf("%s:/app/generator.json", c.stateFile), "-e", - fmt.Sprintf("TEST_LOCAL_CODEGEN=%s", os.Getenv("TEST_LOCAL_CODEGEN")), - "-e", - fmt.Sprintf("CI=%s", os.Getenv("CI")), - "test-image", + "SUBSTREAMS_CODEGEN_ENDPOINT=" + endpoint, + "substreams-test-image", } runCmd := exec.CommandContext(ctx, "docker", runArgs...) @@ -146,3 +199,31 @@ func TestIntegration(t *testing.T) { }) } } + +func runTestLocally(t *testing.T, generatorPath string) { + tempDir, err := os.MkdirTemp("", "temp") + require.NoError(t, err) + //defer os.RemoveAll(tempDir) + + runCommand(t, "", "cp", generatorPath, fmt.Sprintf("%s/state.json", tempDir)) + runCommand(t, tempDir, "substreams", "init", "--state-file", "state.json") + runCommand(t, tempDir, "substreams", "build") +} + +func hasBinary(bin string) bool { + cmd := exec.Command("which", bin) + _, err := cmd.CombinedOutput() + return cmd.ProcessState.ExitCode() == 0 && err == nil +} + +func validateBinary(t *testing.T, bin string) { + require.True(t, hasBinary(bin), "cannot find binary %q in PATH", bin) +} + +func runCommand(t *testing.T, dir string, bin string, args ...string) { + cmd := exec.Command(bin, args...) + cmd.Dir = dir + cmd.Env = append(os.Environ(), "SUBSTREAMS_CODEGEN_ENDPOINT=http://127.0.0.1:51012") + output, err := cmd.CombinedOutput() + require.NoError(t, err, "error while running %s %v. Output: %s", bin, args, output) +} diff --git a/sol-anchor/tests/integration/generators/meteora.json b/tests/sol-anchor/meteora.json similarity index 100% rename from sol-anchor/tests/integration/generators/meteora.json rename to tests/sol-anchor/meteora.json diff --git a/sol-anchor/tests/integration/generators/orca.json b/tests/sol-anchor/orca.json similarity index 100% rename from sol-anchor/tests/integration/generators/orca.json rename to tests/sol-anchor/orca.json diff --git a/sol-anchor/tests/integration/generators/pump-fun.json b/tests/sol-anchor/pump-fun.json similarity index 100% rename from sol-anchor/tests/integration/generators/pump-fun.json rename to tests/sol-anchor/pump-fun.json