From 820157d11b8d265a68dfabdf0d71f9b9b2cf5753 Mon Sep 17 00:00:00 2001 From: Reinis Martinsons <77973553+Reinis-FRP@users.noreply.github.com> Date: Thu, 23 Jan 2025 18:58:34 +0200 Subject: [PATCH] fix(svm): add security-txt (#791) * fix: add security-txt Signed-off-by: Reinis Martinsons * fix: localnet program id Signed-off-by: Reinis Martinsons * fix: store external idls Signed-off-by: Reinis Martinsons * fix: add security.txt to multicall-handler Signed-off-by: Reinis Martinsons * fix: update auditors Signed-off-by: Reinis Martinsons * fix: optimize handler address Signed-off-by: Reinis Martinsons --------- Signed-off-by: Reinis Martinsons --- .gitignore | 1 - Anchor.toml | 8 +- Cargo.lock | 404 +++-- idls/message_transmitter.json | 1675 ++++++++++++++++++++ idls/token_messenger_minter.json | 2049 +++++++++++++++++++++++++ programs/multicall-handler/Cargo.toml | 1 + programs/multicall-handler/src/lib.rs | 16 +- programs/svm-spoke/Cargo.toml | 3 +- programs/svm-spoke/src/lib.rs | 16 +- 9 files changed, 3940 insertions(+), 233 deletions(-) create mode 100644 idls/message_transmitter.json create mode 100644 idls/token_messenger_minter.json diff --git a/.gitignore b/.gitignore index 99c25217f..2184c4a58 100644 --- a/.gitignore +++ b/.gitignore @@ -31,5 +31,4 @@ storage-layouts/proposed* target **/*.rs.bk test-ledger -idls src/svm/assets diff --git a/Anchor.toml b/Anchor.toml index 25511eb11..99bde6ef4 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -5,13 +5,13 @@ resolution = true skip-lint = false [programs.localnet] -multicall_handler = "6kqWTz3A3ZYMV2FMU24ke8rHzT82SaBz7GkBKTd7Z9BH" -svm_spoke = "DnLjPzpMCW2CF99URhGF3jDYnVRcCJMjUWsbPb4xVoBn" +multicall_handler = "27dua7HMuaZrAc6PRfxmvshHChypFLzZVSpKKaDAPjsq" +svm_spoke = "D1WcTLKRyN4TuqnfMBGPvc16nACHfNhFPbgWNExb1aur" test = "8tsEfDSiE4WUMf97oyyyasLAvWwjeRZb2GByh4w7HckA" [programs.devnet] -multicall_handler = "6kqWTz3A3ZYMV2FMU24ke8rHzT82SaBz7GkBKTd7Z9BH" -svm_spoke = "DnLjPzpMCW2CF99URhGF3jDYnVRcCJMjUWsbPb4xVoBn" +multicall_handler = "27dua7HMuaZrAc6PRfxmvshHChypFLzZVSpKKaDAPjsq" +svm_spoke = "D1WcTLKRyN4TuqnfMBGPvc16nACHfNhFPbgWNExb1aur" [registry] url = "https://api.apr.dev" diff --git a/Cargo.lock b/Cargo.lock index e28df57d5..c2b542f11 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -164,7 +164,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" dependencies = [ "anchor-syn", - "borsh-derive-internal 0.10.3", + "borsh-derive-internal 0.10.4", "proc-macro2", "quote", "syn 1.0.109", @@ -200,10 +200,10 @@ dependencies = [ "arrayref", "base64 0.21.7", "bincode", - "borsh 0.10.3", + "borsh 0.10.4", "bytemuck", "getrandom 0.2.15", - "solana-program 1.18.22", + "solana-program 1.18.26", "thiserror", ] @@ -268,9 +268,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.86" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" +checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" [[package]] name = "ark-bn254" @@ -391,15 +391,15 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" +checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "assert_matches" @@ -420,9 +420,9 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" [[package]] name = "base64" @@ -471,9 +471,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.1" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" +checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" dependencies = [ "arrayref", "arrayvec", @@ -520,21 +520,21 @@ dependencies = [ [[package]] name = "borsh" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" +checksum = "115e54d64eb62cdebad391c19efc9dce4981c690c85a33a12199d99bb9546fee" dependencies = [ - "borsh-derive 0.10.3", + "borsh-derive 0.10.4", "hashbrown 0.13.2", ] [[package]] name = "borsh" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +checksum = "2506947f73ad44e344215ccd6403ac2ae18cd8e046e581a441bf8d199f257f03" dependencies = [ - "borsh-derive 1.5.1", + "borsh-derive 1.5.3", "cfg_aliases", ] @@ -553,12 +553,12 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" +checksum = "831213f80d9423998dd696e2c5345aba6be7a0bd8cd19e31c5243e13df1cef89" dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", + "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", @@ -566,16 +566,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.1" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +checksum = "c2593a3b8b938bd68373196c9832f516be11fa487ef4ae745eb282e6a56a7244" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.74", - "syn_derive", + "syn 2.0.90", ] [[package]] @@ -591,9 +590,9 @@ dependencies = [ [[package]] name = "borsh-derive-internal" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" +checksum = "65d6ba50644c98714aa2a70d13d7df3cd75cd2b523a2b452bf010443800976b3" dependencies = [ "proc-macro2", "quote", @@ -613,9 +612,9 @@ dependencies = [ [[package]] name = "borsh-schema-derive-internal" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" +checksum = "276691d96f063427be83e6692b86148e488ebba9f48f77788724ca027ba3b6d4" dependencies = [ "proc-macro2", "quote", @@ -655,22 +654,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.16.3" +version = "1.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" +checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -691,12 +690,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.10" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9e8aabfac534be767c909e0690571677d49f41bd8465ae876fe043d52ba5292" +checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -751,15 +751,15 @@ dependencies = [ [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "cpufeatures" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" +checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" dependencies = [ "libc", ] @@ -859,7 +859,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -870,7 +870,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1039,9 +1039,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.5" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "heck" @@ -1121,12 +1121,12 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.3.0" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" dependencies = [ "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.2", ] [[package]] @@ -1140,9 +1140,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "jobserver" @@ -1155,10 +1155,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1179,9 +1180,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.167" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" [[package]] name = "libsecp256k1" @@ -1300,6 +1301,7 @@ name = "multicall-handler" version = "0.1.0" dependencies = [ "anchor-lang", + "solana-security-txt", ] [[package]] @@ -1320,7 +1322,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1356,17 +1358,17 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] name = "once_cell" -version = "1.19.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "opaque-debug" @@ -1459,41 +1461,18 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", -] - -[[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", + "toml_edit", ] [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -1515,14 +1494,14 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -1629,18 +1608,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.3" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" +checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ "bitflags", ] [[package]] name = "regex" -version = "1.10.6" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -1650,9 +1629,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -1661,9 +1640,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "rustc-hash" @@ -1673,18 +1652,18 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] [[package]] name = "rustversion" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" +checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248" [[package]] name = "ryu" @@ -1706,9 +1685,9 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.207" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5665e14a49a4ea1b91029ba7d3bca9f299e1f7cfa194388ccc20f14743e784f2" +checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" dependencies = [ "serde_derive", ] @@ -1724,20 +1703,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.207" +version = "1.0.215" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6aea2634c86b0e8ef2cfdc0c340baede54ec27b1e46febd7f80dffb2aa44a00e" +checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] name = "serde_json" -version = "1.0.124" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -1747,9 +1726,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.7" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" dependencies = [ "serde", ] @@ -1773,7 +1752,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -1822,6 +1801,12 @@ dependencies = [ "keccak", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signature" version = "1.6.4" @@ -1852,9 +1837,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "solana-frozen-abi" -version = "1.18.22" +version = "1.18.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20a6ef2db80dceb124b7bf81cca3300804bf427d2711973fc3df450ed7dfb26d" +checksum = "03ab2c30c15311b511c0d1151e4ab6bc9a3e080a37e7c6e7c2d96f5784cf9434" dependencies = [ "block-buffer 0.10.4", "bs58 0.4.0", @@ -1877,21 +1862,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.22" +version = "1.18.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70088de7d4067d19a7455609e2b393e6086bd847bb39c4d2bf234fc14827ef9e" +checksum = "c142f779c3633ac83c84d04ff06c70e1f558c876f13358bed77ba629c7417932" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] name = "solana-logger" -version = "1.18.22" +version = "1.18.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b129da15193f26db62d62ae6bb9f72361f361bcdc36054be3ab8bc04cc7a4f31" +checksum = "121d36ffb3c6b958763312cbc697fbccba46ee837d3a0aa4fc0e90fcb3b884f3" dependencies = [ "env_logger", "lazy_static", @@ -1900,9 +1885,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.22" +version = "1.18.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2b2c8babfae4cace1a25b6efa00418f3acd852cf55d7cecc0360d3c5050479" +checksum = "c10f4588cefd716b24a1a40dd32c278e43a560ab8ce4de6b5805c9d113afdfa1" dependencies = [ "ark-bn254", "ark-ec", @@ -1912,9 +1897,9 @@ dependencies = [ "bincode", "bitflags", "blake3", - "borsh 0.10.3", + "borsh 0.10.4", "borsh 0.9.3", - "borsh 1.5.1", + "borsh 1.5.3", "bs58 0.4.0", "bv", "bytemuck", @@ -1946,7 +1931,7 @@ dependencies = [ "sha3 0.10.8", "solana-frozen-abi", "solana-frozen-abi-macro", - "solana-sdk-macro 1.18.22", + "solana-sdk-macro 1.18.26", "thiserror", "tiny-bip39", "wasm-bindgen", @@ -1967,8 +1952,8 @@ dependencies = [ "bincode", "bitflags", "blake3", - "borsh 0.10.3", - "borsh 1.5.1", + "borsh 0.10.4", + "borsh 1.5.3", "bs58 0.5.1", "bv", "bytemuck", @@ -2001,15 +1986,15 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.22" +version = "1.18.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e0f0def5c5af07f53d321cea7b104487b522cfff77c3cae3da361bfe956e9e" +checksum = "580ad66c2f7a4c3cb3244fe21440546bd500f5ecb955ad9826e92a78dded8009" dependencies = [ "assert_matches", "base64 0.21.7", "bincode", "bitflags", - "borsh 1.5.1", + "borsh 1.5.3", "bs58 0.4.0", "bytemuck", "byteorder", @@ -2047,8 +2032,8 @@ dependencies = [ "solana-frozen-abi", "solana-frozen-abi-macro", "solana-logger", - "solana-program 1.18.22", - "solana-sdk-macro 1.18.22", + "solana-program 1.18.26", + "solana-sdk-macro 1.18.26", "thiserror", "uriparse", "wasm-bindgen", @@ -2056,15 +2041,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.22" +version = "1.18.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55c196c8050834c391a34b58e3c9fd86b15452ef1feeeafa1dbeb9d2291dfec" +checksum = "1b75d0f193a27719257af19144fdaebec0415d1c9e9226ae4bd29b791be5e9bd" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2077,7 +2062,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2088,9 +2073,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-zk-token-sdk" -version = "1.18.22" +version = "1.18.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57ee07fa523b4cfcff68de774db7aa87d2da2c4357155a90bacd9a0a0af70a99" +checksum = "7cbdf4249b6dfcbba7d84e2b53313698043f60f8e22ce48286e6fbe8a17c8d16" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -2108,7 +2093,7 @@ dependencies = [ "serde", "serde_json", "sha3 0.9.1", - "solana-program 1.18.22", + "solana-program 1.18.26", "solana-sdk", "subtle", "thiserror", @@ -2122,10 +2107,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "143109d789171379e6143ef23191786dfaac54289ad6e7917cfb26b36c432b10" dependencies = [ "assert_matches", - "borsh 1.5.1", + "borsh 1.5.3", "num-derive", "num-traits", - "solana-program 1.18.22", + "solana-program 1.18.26", "spl-token", "spl-token-2022", "thiserror", @@ -2138,7 +2123,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "210101376962bb22bb13be6daea34656ea1cbc248fce2164b146e39203b55e03" dependencies = [ "bytemuck", - "solana-program 1.18.22", + "solana-program 1.18.26", "spl-discriminator-derive", ] @@ -2150,7 +2135,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2162,7 +2147,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.74", + "syn 2.0.90", "thiserror", ] @@ -2172,7 +2157,7 @@ version = "4.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a49f49f95f2d02111ded31696ab38a081fab623d4c76bd4cb074286db4560836" dependencies = [ - "solana-program 1.18.22", + "solana-program 1.18.26", ] [[package]] @@ -2181,9 +2166,9 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c52d84c55efeef8edcc226743dc089d7e3888b8e3474569aa3eff152b37b9996" dependencies = [ - "borsh 1.5.1", + "borsh 1.5.3", "bytemuck", - "solana-program 1.18.22", + "solana-program 1.18.26", "solana-zk-token-sdk", "spl-program-error", ] @@ -2196,7 +2181,7 @@ checksum = "e45a49acb925db68aa501b926096b2164adbdcade7a0c24152af9f0742d0a602" dependencies = [ "num-derive", "num-traits", - "solana-program 1.18.22", + "solana-program 1.18.26", "spl-program-error-derive", "thiserror", ] @@ -2210,7 +2195,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2220,7 +2205,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fab8edfd37be5fa17c9e42c1bff86abbbaf0494b031b37957f2728ad2ff842ba" dependencies = [ "bytemuck", - "solana-program 1.18.22", + "solana-program 1.18.26", "spl-discriminator", "spl-pod", "spl-program-error", @@ -2238,7 +2223,7 @@ dependencies = [ "num-derive", "num-traits", "num_enum", - "solana-program 1.18.22", + "solana-program 1.18.26", "thiserror", ] @@ -2253,7 +2238,7 @@ dependencies = [ "num-derive", "num-traits", "num_enum", - "solana-program 1.18.22", + "solana-program 1.18.26", "solana-security-txt", "solana-zk-token-sdk", "spl-memo", @@ -2273,7 +2258,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "014817d6324b1e20c4bbc883e8ee30a5faa13e59d91d1b2b95df98b920150c17" dependencies = [ "bytemuck", - "solana-program 1.18.22", + "solana-program 1.18.26", "spl-discriminator", "spl-pod", "spl-program-error", @@ -2285,8 +2270,8 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3da00495b602ebcf5d8ba8b3ecff1ee454ce4c125c9077747be49c2d62335ba" dependencies = [ - "borsh 1.5.1", - "solana-program 1.18.22", + "borsh 1.5.3", + "solana-program 1.18.26", "spl-discriminator", "spl-pod", "spl-program-error", @@ -2301,7 +2286,7 @@ checksum = "a9b5c08a89838e5a2931f79b17f611857f281a14a2100968a3ccef352cb7414b" dependencies = [ "arrayref", "bytemuck", - "solana-program 1.18.22", + "solana-program 1.18.26", "spl-discriminator", "spl-pod", "spl-program-error", @@ -2316,7 +2301,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c872f93d0600e743116501eba2d53460e73a12c9a496875a42a7d70e034fe06d" dependencies = [ "bytemuck", - "solana-program 1.18.22", + "solana-program 1.18.26", "spl-discriminator", "spl-pod", "spl-program-error", @@ -2342,6 +2327,7 @@ dependencies = [ "anchor-spl", "multicall-handler", "solana-program 2.0.3", + "solana-security-txt", ] [[package]] @@ -2357,27 +2343,15 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.74" +version = "2.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fceb41e3d546d0bd83421d3409b1460cc7444cd389341a4c880fe7a042cb3d7" +checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" 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.74", -] - [[package]] name = "termcolor" version = "1.4.1" @@ -2398,22 +2372,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2468,7 +2442,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.20", + "toml_edit", ] [[package]] @@ -2482,26 +2456,15 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap", - "toml_datetime", - "winnow 0.5.40", -] - -[[package]] -name = "toml_edit" -version = "0.22.20" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.6.18", + "winnow", ] [[package]] @@ -2512,24 +2475,24 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" -version = "1.0.12" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "unicode-normalization" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" +checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "universal-hash" @@ -2571,9 +2534,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" dependencies = [ "cfg-if", "once_cell", @@ -2582,24 +2545,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2607,28 +2570,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" [[package]] name = "web-sys" -version = "0.3.70" +version = "0.3.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" +checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" dependencies = [ "js-sys", "wasm-bindgen", @@ -2740,18 +2703,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winnow" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" dependencies = [ "memchr", ] @@ -2774,7 +2728,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] [[package]] @@ -2794,5 +2748,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.74", + "syn 2.0.90", ] diff --git a/idls/message_transmitter.json b/idls/message_transmitter.json new file mode 100644 index 000000000..27504df15 --- /dev/null +++ b/idls/message_transmitter.json @@ -0,0 +1,1675 @@ +{ + "address": "CCTPmbSD7gX1bxKPAmg77w8oFzNFpaQiQUWD43TKaecd", + "metadata": { + "name": "message_transmitter", + "version": "0.1.0", + "spec": "0.1.0" + }, + "instructions": [ + { + "name": "initialize", + "discriminator": [ + 175, + 175, + 109, + 31, + 13, + 152, + 155, + 237 + ], + "accounts": [ + { + "name": "payer", + "writable": true, + "signer": true + }, + { + "name": "upgrade_authority", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "message_transmitter_program_data" + }, + { + "name": "message_transmitter_program" + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "InitializeParams" + } + } + } + ] + }, + { + "name": "transfer_ownership", + "discriminator": [ + 65, + 177, + 215, + 73, + 53, + 45, + 99, + 47 + ], + "accounts": [ + { + "name": "owner", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "TransferOwnershipParams" + } + } + } + ] + }, + { + "name": "accept_ownership", + "discriminator": [ + 172, + 23, + 43, + 13, + 238, + 213, + 85, + 150 + ], + "accounts": [ + { + "name": "pending_owner", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "AcceptOwnershipParams" + } + } + } + ] + }, + { + "name": "update_pauser", + "discriminator": [ + 140, + 171, + 211, + 132, + 57, + 201, + 16, + 254 + ], + "accounts": [ + { + "name": "owner", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdatePauserParams" + } + } + } + ] + }, + { + "name": "update_attester_manager", + "discriminator": [ + 175, + 245, + 178, + 104, + 85, + 179, + 71, + 16 + ], + "accounts": [ + { + "name": "owner", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdateAttesterManagerParams" + } + } + } + ] + }, + { + "name": "pause", + "discriminator": [ + 211, + 22, + 221, + 251, + 74, + 121, + 193, + 47 + ], + "accounts": [ + { + "name": "pauser", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "PauseParams" + } + } + } + ] + }, + { + "name": "unpause", + "discriminator": [ + 169, + 144, + 4, + 38, + 10, + 141, + 188, + 255 + ], + "accounts": [ + { + "name": "pauser", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UnpauseParams" + } + } + } + ] + }, + { + "name": "set_max_message_body_size", + "discriminator": [ + 168, + 178, + 8, + 117, + 217, + 167, + 219, + 31 + ], + "accounts": [ + { + "name": "owner", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "SetMaxMessageBodySizeParams" + } + } + } + ] + }, + { + "name": "enable_attester", + "discriminator": [ + 2, + 11, + 193, + 115, + 5, + 148, + 4, + 198 + ], + "accounts": [ + { + "name": "payer", + "writable": true, + "signer": true + }, + { + "name": "attester_manager", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "EnableAttesterParams" + } + } + } + ] + }, + { + "name": "disable_attester", + "discriminator": [ + 61, + 171, + 131, + 95, + 172, + 15, + 227, + 229 + ], + "accounts": [ + { + "name": "payer", + "writable": true, + "signer": true + }, + { + "name": "attester_manager", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "DisableAttesterParams" + } + } + } + ] + }, + { + "name": "set_signature_threshold", + "discriminator": [ + 163, + 19, + 154, + 168, + 82, + 209, + 214, + 219 + ], + "accounts": [ + { + "name": "attester_manager", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "SetSignatureThresholdParams" + } + } + } + ] + }, + { + "name": "send_message", + "discriminator": [ + 57, + 40, + 34, + 178, + 189, + 10, + 65, + 26 + ], + "accounts": [ + { + "name": "event_rent_payer", + "writable": true, + "signer": true + }, + { + "name": "sender_authority_pda", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "message_sent_event_data", + "writable": true, + "signer": true + }, + { + "name": "sender_program" + }, + { + "name": "system_program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "SendMessageParams" + } + } + } + ], + "returns": "u64" + }, + { + "name": "send_message_with_caller", + "discriminator": [ + 212, + 47, + 34, + 52, + 91, + 32, + 176, + 204 + ], + "accounts": [ + { + "name": "event_rent_payer", + "writable": true, + "signer": true + }, + { + "name": "sender_authority_pda", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "message_sent_event_data", + "writable": true, + "signer": true + }, + { + "name": "sender_program" + }, + { + "name": "system_program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "SendMessageWithCallerParams" + } + } + } + ], + "returns": "u64" + }, + { + "name": "replace_message", + "discriminator": [ + 189, + 189, + 210, + 163, + 149, + 205, + 69, + 229 + ], + "accounts": [ + { + "name": "event_rent_payer", + "writable": true, + "signer": true + }, + { + "name": "sender_authority_pda", + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "message_sent_event_data", + "writable": true, + "signer": true + }, + { + "name": "sender_program" + }, + { + "name": "system_program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "ReplaceMessageParams" + } + } + } + ], + "returns": "u64" + }, + { + "name": "receive_message", + "discriminator": [ + 38, + 144, + 127, + 225, + 31, + 225, + 238, + 25 + ], + "accounts": [ + { + "name": "payer", + "writable": true, + "signer": true + }, + { + "name": "caller", + "signer": true + }, + { + "name": "authority_pda" + }, + { + "name": "message_transmitter" + }, + { + "name": "used_nonces", + "writable": true + }, + { + "name": "receiver" + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "ReceiveMessageParams" + } + } + } + ] + }, + { + "name": "reclaim_event_account", + "discriminator": [ + 94, + 198, + 180, + 159, + 131, + 236, + 15, + 174 + ], + "accounts": [ + { + "name": "payee", + "docs": [ + "rent SOL receiver, should match original rent payer" + ], + "writable": true, + "signer": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "message_sent_event_data", + "writable": true + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "ReclaimEventAccountParams" + } + } + } + ] + }, + { + "name": "get_nonce_pda", + "discriminator": [ + 114, + 70, + 229, + 212, + 223, + 50, + 33, + 39 + ], + "accounts": [ + { + "name": "message_transmitter" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "GetNoncePDAParams" + } + } + } + ], + "returns": "pubkey" + }, + { + "name": "is_nonce_used", + "discriminator": [ + 144, + 72, + 107, + 148, + 35, + 218, + 31, + 187 + ], + "accounts": [ + { + "name": "used_nonces", + "docs": [ + "Account will be explicitly loaded to avoid error when it's not initialized" + ] + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "IsNonceUsedParams" + } + } + } + ], + "returns": "bool" + } + ], + "accounts": [ + { + "name": "MessageSent", + "discriminator": [ + 131, + 100, + 133, + 56, + 166, + 225, + 151, + 60 + ] + }, + { + "name": "MessageTransmitter", + "discriminator": [ + 71, + 40, + 180, + 142, + 19, + 203, + 35, + 252 + ] + }, + { + "name": "UsedNonces", + "discriminator": [ + 60, + 112, + 18, + 72, + 138, + 181, + 100, + 138 + ] + } + ], + "events": [ + { + "name": "OwnershipTransferStarted", + "discriminator": [ + 183, + 253, + 239, + 246, + 140, + 179, + 133, + 105 + ] + }, + { + "name": "OwnershipTransferred", + "discriminator": [ + 172, + 61, + 205, + 183, + 250, + 50, + 38, + 98 + ] + }, + { + "name": "PauserChanged", + "discriminator": [ + 142, + 157, + 158, + 87, + 127, + 8, + 119, + 55 + ] + }, + { + "name": "AttesterManagerUpdated", + "discriminator": [ + 5, + 97, + 191, + 108, + 44, + 189, + 69, + 88 + ] + }, + { + "name": "MessageReceived", + "discriminator": [ + 231, + 68, + 47, + 77, + 173, + 241, + 157, + 166 + ] + }, + { + "name": "SignatureThresholdUpdated", + "discriminator": [ + 156, + 99, + 103, + 200, + 15, + 38, + 122, + 189 + ] + }, + { + "name": "AttesterEnabled", + "discriminator": [ + 88, + 57, + 14, + 133, + 5, + 219, + 62, + 190 + ] + }, + { + "name": "AttesterDisabled", + "discriminator": [ + 186, + 136, + 186, + 14, + 229, + 2, + 121, + 211 + ] + }, + { + "name": "MaxMessageBodySizeUpdated", + "discriminator": [ + 134, + 206, + 151, + 111, + 137, + 11, + 160, + 225 + ] + }, + { + "name": "Pause", + "discriminator": [ + 194, + 251, + 232, + 196, + 118, + 95, + 111, + 219 + ] + }, + { + "name": "Unpause", + "discriminator": [ + 241, + 149, + 104, + 90, + 199, + 136, + 219, + 146 + ] + } + ], + "errors": [ + { + "code": 6000, + "name": "InvalidAuthority", + "msg": "Invalid authority" + }, + { + "code": 6001, + "name": "ProgramPaused", + "msg": "Instruction is not allowed at this time" + }, + { + "code": 6002, + "name": "InvalidMessageTransmitterState", + "msg": "Invalid message transmitter state" + }, + { + "code": 6003, + "name": "InvalidSignatureThreshold", + "msg": "Invalid signature threshold" + }, + { + "code": 6004, + "name": "SignatureThresholdAlreadySet", + "msg": "Signature threshold already set" + }, + { + "code": 6005, + "name": "InvalidOwner", + "msg": "Invalid owner" + }, + { + "code": 6006, + "name": "InvalidPauser", + "msg": "Invalid pauser" + }, + { + "code": 6007, + "name": "InvalidAttesterManager", + "msg": "Invalid attester manager" + }, + { + "code": 6008, + "name": "InvalidAttester", + "msg": "Invalid attester" + }, + { + "code": 6009, + "name": "AttesterAlreadyEnabled", + "msg": "Attester already enabled" + }, + { + "code": 6010, + "name": "TooFewEnabledAttesters", + "msg": "Too few enabled attesters" + }, + { + "code": 6011, + "name": "SignatureThresholdTooLow", + "msg": "Signature threshold is too low" + }, + { + "code": 6012, + "name": "AttesterAlreadyDisabled", + "msg": "Attester already disabled" + }, + { + "code": 6013, + "name": "MessageBodyLimitExceeded", + "msg": "Message body exceeds max size" + }, + { + "code": 6014, + "name": "InvalidDestinationCaller", + "msg": "Invalid destination caller" + }, + { + "code": 6015, + "name": "InvalidRecipient", + "msg": "Invalid message recipient" + }, + { + "code": 6016, + "name": "SenderNotPermitted", + "msg": "Sender is not permitted" + }, + { + "code": 6017, + "name": "InvalidSourceDomain", + "msg": "Invalid source domain" + }, + { + "code": 6018, + "name": "InvalidDestinationDomain", + "msg": "Invalid destination domain" + }, + { + "code": 6019, + "name": "InvalidMessageVersion", + "msg": "Invalid message version" + }, + { + "code": 6020, + "name": "InvalidUsedNoncesAccount", + "msg": "Invalid used nonces account" + }, + { + "code": 6021, + "name": "InvalidRecipientProgram", + "msg": "Invalid recipient program" + }, + { + "code": 6022, + "name": "InvalidNonce", + "msg": "Invalid nonce" + }, + { + "code": 6023, + "name": "NonceAlreadyUsed", + "msg": "Nonce already used" + }, + { + "code": 6024, + "name": "MessageTooShort", + "msg": "Message is too short" + }, + { + "code": 6025, + "name": "MalformedMessage", + "msg": "Malformed message" + }, + { + "code": 6026, + "name": "InvalidSignatureOrderOrDupe", + "msg": "Invalid signature order or dupe" + }, + { + "code": 6027, + "name": "InvalidAttesterSignature", + "msg": "Invalid attester signature" + }, + { + "code": 6028, + "name": "InvalidAttestationLength", + "msg": "Invalid attestation length" + }, + { + "code": 6029, + "name": "InvalidSignatureRecoveryId", + "msg": "Invalid signature recovery ID" + }, + { + "code": 6030, + "name": "InvalidSignatureSValue", + "msg": "Invalid signature S value" + }, + { + "code": 6031, + "name": "InvalidMessageHash", + "msg": "Invalid message hash" + } + ], + "types": [ + { + "name": "AcceptOwnershipParams", + "type": { + "kind": "struct" + } + }, + { + "name": "DisableAttesterParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "attester", + "type": "pubkey" + } + ] + } + }, + { + "name": "EnableAttesterParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_attester", + "type": "pubkey" + } + ] + } + }, + { + "name": "GetNoncePDAParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nonce", + "type": "u64" + }, + { + "name": "source_domain", + "type": "u32" + } + ] + } + }, + { + "name": "InitializeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "local_domain", + "type": "u32" + }, + { + "name": "attester", + "type": "pubkey" + }, + { + "name": "max_message_body_size", + "type": "u64" + }, + { + "name": "version", + "type": "u32" + } + ] + } + }, + { + "name": "IsNonceUsedParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nonce", + "type": "u64" + } + ] + } + }, + { + "name": "PauseParams", + "type": { + "kind": "struct" + } + }, + { + "name": "ReceiveMessageParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "message", + "type": "bytes" + }, + { + "name": "attestation", + "type": "bytes" + } + ] + } + }, + { + "name": "HandleReceiveMessageParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "remote_domain", + "type": "u32" + }, + { + "name": "sender", + "type": "pubkey" + }, + { + "name": "message_body", + "type": "bytes" + }, + { + "name": "authority_bump", + "type": "u8" + } + ] + } + }, + { + "name": "ReclaimEventAccountParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "attestation", + "type": "bytes" + } + ] + } + }, + { + "name": "ReplaceMessageParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "original_message", + "type": "bytes" + }, + { + "name": "original_attestation", + "type": "bytes" + }, + { + "name": "new_message_body", + "type": "bytes" + }, + { + "name": "new_destination_caller", + "type": "pubkey" + } + ] + } + }, + { + "name": "SendMessageWithCallerParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "destination_domain", + "type": "u32" + }, + { + "name": "recipient", + "type": "pubkey" + }, + { + "name": "message_body", + "type": "bytes" + }, + { + "name": "destination_caller", + "type": "pubkey" + } + ] + } + }, + { + "name": "SendMessageParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "destination_domain", + "type": "u32" + }, + { + "name": "recipient", + "type": "pubkey" + }, + { + "name": "message_body", + "type": "bytes" + } + ] + } + }, + { + "name": "SetMaxMessageBodySizeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_max_message_body_size", + "type": "u64" + } + ] + } + }, + { + "name": "SetSignatureThresholdParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_signature_threshold", + "type": "u32" + } + ] + } + }, + { + "name": "TransferOwnershipParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_owner", + "type": "pubkey" + } + ] + } + }, + { + "name": "UnpauseParams", + "type": { + "kind": "struct" + } + }, + { + "name": "UpdateAttesterManagerParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_attester_manager", + "type": "pubkey" + } + ] + } + }, + { + "name": "UpdatePauserParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_pauser", + "type": "pubkey" + } + ] + } + }, + { + "name": "MathError", + "type": { + "kind": "enum", + "variants": [ + { + "name": "MathOverflow" + }, + { + "name": "MathUnderflow" + }, + { + "name": "ErrorInDivision" + } + ] + } + }, + { + "name": "MessageSent", + "type": { + "kind": "struct", + "fields": [ + { + "name": "rent_payer", + "type": "pubkey" + }, + { + "name": "message", + "type": "bytes" + } + ] + } + }, + { + "name": "MessageTransmitter", + "docs": [ + "Main state of the MessageTransmitter program" + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "owner", + "type": "pubkey" + }, + { + "name": "pending_owner", + "type": "pubkey" + }, + { + "name": "attester_manager", + "type": "pubkey" + }, + { + "name": "pauser", + "type": "pubkey" + }, + { + "name": "paused", + "type": "bool" + }, + { + "name": "local_domain", + "type": "u32" + }, + { + "name": "version", + "type": "u32" + }, + { + "name": "signature_threshold", + "type": "u32" + }, + { + "name": "enabled_attesters", + "type": { + "vec": "pubkey" + } + }, + { + "name": "max_message_body_size", + "type": "u64" + }, + { + "name": "next_available_nonce", + "type": "u64" + } + ] + } + }, + { + "name": "UsedNonces", + "docs": [ + "UsedNonces account holds an array of bits that indicate which nonces were already used", + "so they can't be resused to receive new messages. Array starts with the first_nonce and", + "holds flags for UsedNonces::MAX_NONCES. Nonces are recorded separately for each remote_domain." + ], + "type": { + "kind": "struct", + "fields": [ + { + "name": "remote_domain", + "type": "u32" + }, + { + "name": "first_nonce", + "type": "u64" + }, + { + "name": "used_nonces", + "type": { + "array": [ + "u64", + 100 + ] + } + } + ] + } + }, + { + "name": "OwnershipTransferStarted", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previous_owner", + "type": "pubkey" + }, + { + "name": "new_owner", + "type": "pubkey" + } + ] + } + }, + { + "name": "OwnershipTransferred", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previous_owner", + "type": "pubkey" + }, + { + "name": "new_owner", + "type": "pubkey" + } + ] + } + }, + { + "name": "PauserChanged", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_address", + "type": "pubkey" + } + ] + } + }, + { + "name": "AttesterManagerUpdated", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previous_attester_manager", + "type": "pubkey" + }, + { + "name": "new_attester_manager", + "type": "pubkey" + } + ] + } + }, + { + "name": "MessageReceived", + "type": { + "kind": "struct", + "fields": [ + { + "name": "caller", + "type": "pubkey" + }, + { + "name": "source_domain", + "type": "u32" + }, + { + "name": "nonce", + "type": "u64" + }, + { + "name": "sender", + "type": "pubkey" + }, + { + "name": "message_body", + "type": "bytes" + } + ] + } + }, + { + "name": "SignatureThresholdUpdated", + "type": { + "kind": "struct", + "fields": [ + { + "name": "old_signature_threshold", + "type": "u32" + }, + { + "name": "new_signature_threshold", + "type": "u32" + } + ] + } + }, + { + "name": "AttesterEnabled", + "type": { + "kind": "struct", + "fields": [ + { + "name": "attester", + "type": "pubkey" + } + ] + } + }, + { + "name": "AttesterDisabled", + "type": { + "kind": "struct", + "fields": [ + { + "name": "attester", + "type": "pubkey" + } + ] + } + }, + { + "name": "MaxMessageBodySizeUpdated", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_max_message_body_size", + "type": "u64" + } + ] + } + }, + { + "name": "Pause", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "Unpause", + "type": { + "kind": "struct", + "fields": [] + } + } + ] +} \ No newline at end of file diff --git a/idls/token_messenger_minter.json b/idls/token_messenger_minter.json new file mode 100644 index 000000000..ba9a2ad93 --- /dev/null +++ b/idls/token_messenger_minter.json @@ -0,0 +1,2049 @@ +{ + "address": "CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3", + "metadata": { + "name": "token_messenger_minter", + "version": "0.1.0", + "spec": "0.1.0" + }, + "instructions": [ + { + "name": "initialize", + "discriminator": [ + 175, + 175, + 109, + 31, + 13, + 152, + 155, + 237 + ], + "accounts": [ + { + "name": "payer", + "writable": true, + "signer": true + }, + { + "name": "upgrade_authority", + "signer": true + }, + { + "name": "authority_pda" + }, + { + "name": "token_messenger", + "writable": true + }, + { + "name": "token_minter", + "writable": true + }, + { + "name": "token_messenger_minter_program_data" + }, + { + "name": "token_messenger_minter_program" + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "InitializeParams" + } + } + } + ] + }, + { + "name": "transfer_ownership", + "discriminator": [ + 65, + 177, + 215, + 73, + 53, + 45, + 99, + 47 + ], + "accounts": [ + { + "name": "owner", + "signer": true + }, + { + "name": "token_messenger", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "TransferOwnershipParams" + } + } + } + ] + }, + { + "name": "accept_ownership", + "discriminator": [ + 172, + 23, + 43, + 13, + 238, + 213, + 85, + 150 + ], + "accounts": [ + { + "name": "pending_owner", + "signer": true + }, + { + "name": "token_messenger", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "AcceptOwnershipParams" + } + } + } + ] + }, + { + "name": "add_remote_token_messenger", + "discriminator": [ + 12, + 149, + 172, + 165, + 111, + 202, + 24, + 33 + ], + "accounts": [ + { + "name": "payer", + "writable": true, + "signer": true + }, + { + "name": "owner", + "signer": true + }, + { + "name": "token_messenger" + }, + { + "name": "remote_token_messenger", + "writable": true + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "AddRemoteTokenMessengerParams" + } + } + } + ] + }, + { + "name": "remove_remote_token_messenger", + "discriminator": [ + 65, + 114, + 66, + 85, + 169, + 98, + 177, + 146 + ], + "accounts": [ + { + "name": "payee", + "writable": true, + "signer": true + }, + { + "name": "owner", + "signer": true + }, + { + "name": "token_messenger" + }, + { + "name": "remote_token_messenger", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "RemoveRemoteTokenMessengerParams" + } + } + } + ] + }, + { + "name": "deposit_for_burn", + "discriminator": [ + 215, + 60, + 61, + 46, + 114, + 55, + 128, + 176 + ], + "accounts": [ + { + "name": "owner", + "signer": true + }, + { + "name": "event_rent_payer", + "writable": true, + "signer": true + }, + { + "name": "sender_authority_pda" + }, + { + "name": "burn_token_account", + "writable": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "token_messenger" + }, + { + "name": "remote_token_messenger" + }, + { + "name": "token_minter" + }, + { + "name": "local_token", + "writable": true + }, + { + "name": "burn_token_mint", + "writable": true + }, + { + "name": "message_sent_event_data", + "writable": true, + "signer": true + }, + { + "name": "message_transmitter_program" + }, + { + "name": "token_messenger_minter_program" + }, + { + "name": "token_program" + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "DepositForBurnParams" + } + } + } + ], + "returns": "u64" + }, + { + "name": "deposit_for_burn_with_caller", + "discriminator": [ + 167, + 222, + 19, + 114, + 85, + 21, + 14, + 118 + ], + "accounts": [ + { + "name": "owner", + "signer": true + }, + { + "name": "event_rent_payer", + "writable": true, + "signer": true + }, + { + "name": "sender_authority_pda" + }, + { + "name": "burn_token_account", + "writable": true + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "token_messenger" + }, + { + "name": "remote_token_messenger" + }, + { + "name": "token_minter" + }, + { + "name": "local_token", + "writable": true + }, + { + "name": "burn_token_mint", + "writable": true + }, + { + "name": "message_sent_event_data", + "writable": true, + "signer": true + }, + { + "name": "message_transmitter_program" + }, + { + "name": "token_messenger_minter_program" + }, + { + "name": "token_program" + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "DepositForBurnWithCallerParams" + } + } + } + ], + "returns": "u64" + }, + { + "name": "replace_deposit_for_burn", + "discriminator": [ + 7, + 27, + 93, + 132, + 1, + 80, + 19, + 163 + ], + "accounts": [ + { + "name": "owner", + "signer": true + }, + { + "name": "event_rent_payer", + "writable": true, + "signer": true + }, + { + "name": "sender_authority_pda" + }, + { + "name": "message_transmitter", + "writable": true + }, + { + "name": "token_messenger" + }, + { + "name": "message_sent_event_data", + "writable": true, + "signer": true + }, + { + "name": "message_transmitter_program" + }, + { + "name": "token_messenger_minter_program" + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "ReplaceDepositForBurnParams" + } + } + } + ], + "returns": "u64" + }, + { + "name": "handle_receive_message", + "discriminator": [ + 133, + 102, + 1, + 180, + 145, + 11, + 138, + 180 + ], + "accounts": [ + { + "name": "authority_pda", + "signer": true + }, + { + "name": "token_messenger" + }, + { + "name": "remote_token_messenger" + }, + { + "name": "token_minter" + }, + { + "name": "local_token", + "writable": true + }, + { + "name": "token_pair" + }, + { + "name": "recipient_token_account", + "writable": true + }, + { + "name": "custody_token_account", + "writable": true + }, + { + "name": "token_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "HandleReceiveMessageParams" + } + } + } + ] + }, + { + "name": "set_token_controller", + "discriminator": [ + 88, + 6, + 98, + 10, + 79, + 59, + 15, + 24 + ], + "accounts": [ + { + "name": "owner", + "signer": true + }, + { + "name": "token_messenger" + }, + { + "name": "token_minter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "SetTokenControllerParams" + } + } + } + ] + }, + { + "name": "pause", + "discriminator": [ + 211, + 22, + 221, + 251, + 74, + 121, + 193, + 47 + ], + "accounts": [ + { + "name": "pauser", + "signer": true + }, + { + "name": "token_minter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "PauseParams" + } + } + } + ] + }, + { + "name": "unpause", + "discriminator": [ + 169, + 144, + 4, + 38, + 10, + 141, + 188, + 255 + ], + "accounts": [ + { + "name": "pauser", + "signer": true + }, + { + "name": "token_minter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UnpauseParams" + } + } + } + ] + }, + { + "name": "update_pauser", + "discriminator": [ + 140, + 171, + 211, + 132, + 57, + 201, + 16, + 254 + ], + "accounts": [ + { + "name": "owner", + "signer": true + }, + { + "name": "token_messenger" + }, + { + "name": "token_minter", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UpdatePauserParams" + } + } + } + ] + }, + { + "name": "set_max_burn_amount_per_message", + "discriminator": [ + 30, + 128, + 145, + 240, + 70, + 237, + 109, + 207 + ], + "accounts": [ + { + "name": "token_controller", + "signer": true + }, + { + "name": "token_minter" + }, + { + "name": "local_token", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "SetMaxBurnAmountPerMessageParams" + } + } + } + ] + }, + { + "name": "add_local_token", + "discriminator": [ + 213, + 199, + 205, + 18, + 98, + 124, + 73, + 198 + ], + "accounts": [ + { + "name": "payer", + "writable": true, + "signer": true + }, + { + "name": "token_controller", + "signer": true + }, + { + "name": "token_minter" + }, + { + "name": "local_token", + "writable": true + }, + { + "name": "custody_token_account", + "writable": true + }, + { + "name": "local_token_mint" + }, + { + "name": "token_program" + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "AddLocalTokenParams" + } + } + } + ] + }, + { + "name": "remove_local_token", + "discriminator": [ + 27, + 43, + 66, + 170, + 188, + 44, + 109, + 97 + ], + "accounts": [ + { + "name": "payee", + "writable": true, + "signer": true + }, + { + "name": "token_controller", + "signer": true + }, + { + "name": "token_minter" + }, + { + "name": "local_token", + "writable": true + }, + { + "name": "custody_token_account", + "writable": true + }, + { + "name": "token_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "RemoveLocalTokenParams" + } + } + } + ] + }, + { + "name": "link_token_pair", + "discriminator": [ + 68, + 162, + 24, + 104, + 125, + 46, + 130, + 12 + ], + "accounts": [ + { + "name": "payer", + "writable": true, + "signer": true + }, + { + "name": "token_controller", + "signer": true + }, + { + "name": "token_minter" + }, + { + "name": "token_pair", + "writable": true + }, + { + "name": "system_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "LinkTokenPairParams" + } + } + } + ] + }, + { + "name": "unlink_token_pair", + "discriminator": [ + 52, + 198, + 100, + 114, + 104, + 174, + 85, + 58 + ], + "accounts": [ + { + "name": "payee", + "writable": true, + "signer": true + }, + { + "name": "token_controller", + "signer": true + }, + { + "name": "token_minter" + }, + { + "name": "token_pair", + "writable": true + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "UninkTokenPairParams" + } + } + } + ] + }, + { + "name": "burn_token_custody", + "discriminator": [ + 233, + 136, + 180, + 175, + 112, + 41, + 62, + 71 + ], + "accounts": [ + { + "name": "payee", + "writable": true, + "signer": true + }, + { + "name": "token_controller", + "signer": true + }, + { + "name": "token_minter" + }, + { + "name": "local_token" + }, + { + "name": "custody_token_account", + "writable": true + }, + { + "name": "custody_token_mint", + "writable": true + }, + { + "name": "token_program" + }, + { + "name": "event_authority" + }, + { + "name": "program" + } + ], + "args": [ + { + "name": "params", + "type": { + "defined": { + "name": "BurnTokenCustodyParams" + } + } + } + ] + } + ], + "accounts": [ + { + "name": "TokenMessenger", + "discriminator": [ + 162, + 4, + 242, + 52, + 147, + 243, + 221, + 96 + ] + }, + { + "name": "RemoteTokenMessenger", + "discriminator": [ + 105, + 115, + 174, + 34, + 95, + 233, + 138, + 252 + ] + }, + { + "name": "TokenMinter", + "discriminator": [ + 122, + 133, + 84, + 63, + 57, + 159, + 171, + 206 + ] + }, + { + "name": "TokenPair", + "discriminator": [ + 17, + 214, + 45, + 176, + 229, + 149, + 197, + 71 + ] + }, + { + "name": "LocalToken", + "discriminator": [ + 159, + 131, + 58, + 170, + 193, + 84, + 128, + 182 + ] + } + ], + "events": [ + { + "name": "OwnershipTransferStarted", + "discriminator": [ + 183, + 253, + 239, + 246, + 140, + 179, + 133, + 105 + ] + }, + { + "name": "OwnershipTransferred", + "discriminator": [ + 172, + 61, + 205, + 183, + 250, + 50, + 38, + 98 + ] + }, + { + "name": "DepositForBurn", + "discriminator": [ + 144, + 252, + 145, + 146, + 6, + 74, + 167, + 235 + ] + }, + { + "name": "MintAndWithdraw", + "discriminator": [ + 75, + 67, + 229, + 70, + 162, + 126, + 0, + 71 + ] + }, + { + "name": "RemoteTokenMessengerAdded", + "discriminator": [ + 251, + 29, + 63, + 244, + 48, + 114, + 210, + 175 + ] + }, + { + "name": "RemoteTokenMessengerRemoved", + "discriminator": [ + 255, + 121, + 137, + 39, + 230, + 125, + 11, + 30 + ] + }, + { + "name": "SetTokenController", + "discriminator": [ + 193, + 44, + 243, + 83, + 230, + 72, + 120, + 216 + ] + }, + { + "name": "PauserChanged", + "discriminator": [ + 142, + 157, + 158, + 87, + 127, + 8, + 119, + 55 + ] + }, + { + "name": "SetBurnLimitPerMessage", + "discriminator": [ + 98, + 152, + 88, + 191, + 245, + 30, + 27, + 209 + ] + }, + { + "name": "LocalTokenAdded", + "discriminator": [ + 146, + 8, + 224, + 150, + 122, + 173, + 23, + 39 + ] + }, + { + "name": "LocalTokenRemoved", + "discriminator": [ + 181, + 204, + 1, + 95, + 2, + 50, + 66, + 210 + ] + }, + { + "name": "TokenPairLinked", + "discriminator": [ + 2, + 14, + 177, + 64, + 155, + 93, + 196, + 141 + ] + }, + { + "name": "TokenPairUnlinked", + "discriminator": [ + 78, + 232, + 230, + 208, + 180, + 212, + 246, + 72 + ] + }, + { + "name": "Pause", + "discriminator": [ + 194, + 251, + 232, + 196, + 118, + 95, + 111, + 219 + ] + }, + { + "name": "Unpause", + "discriminator": [ + 241, + 149, + 104, + 90, + 199, + 136, + 219, + 146 + ] + }, + { + "name": "TokenCustodyBurned", + "discriminator": [ + 219, + 143, + 107, + 226, + 67, + 75, + 178, + 46 + ] + } + ], + "errors": [ + { + "code": 6000, + "name": "InvalidAuthority", + "msg": "Invalid authority" + }, + { + "code": 6001, + "name": "InvalidTokenMessengerState", + "msg": "Invalid token messenger state" + }, + { + "code": 6002, + "name": "InvalidTokenMessenger", + "msg": "Invalid token messenger" + }, + { + "code": 6003, + "name": "InvalidOwner", + "msg": "Invalid owner" + }, + { + "code": 6004, + "name": "MalformedMessage", + "msg": "Malformed message" + }, + { + "code": 6005, + "name": "InvalidMessageBodyVersion", + "msg": "Invalid message body version" + }, + { + "code": 6006, + "name": "InvalidAmount", + "msg": "Invalid amount" + }, + { + "code": 6007, + "name": "InvalidDestinationDomain", + "msg": "Invalid destination domain" + }, + { + "code": 6008, + "name": "InvalidDestinationCaller", + "msg": "Invalid destination caller" + }, + { + "code": 6009, + "name": "InvalidMintRecipient", + "msg": "Invalid mint recipient" + }, + { + "code": 6010, + "name": "InvalidSender", + "msg": "Invalid sender" + }, + { + "code": 6011, + "name": "InvalidTokenPair", + "msg": "Invalid token pair" + }, + { + "code": 6012, + "name": "InvalidTokenMint", + "msg": "Invalid token mint" + } + ], + "types": [ + { + "name": "AcceptOwnershipParams", + "type": { + "kind": "struct" + } + }, + { + "name": "AddRemoteTokenMessengerParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "domain", + "type": "u32" + }, + { + "name": "token_messenger", + "type": "pubkey" + } + ] + } + }, + { + "name": "DepositForBurnWithCallerParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "destination_domain", + "type": "u32" + }, + { + "name": "mint_recipient", + "type": "pubkey" + }, + { + "name": "destination_caller", + "type": "pubkey" + } + ] + } + }, + { + "name": "DepositForBurnParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + }, + { + "name": "destination_domain", + "type": "u32" + }, + { + "name": "mint_recipient", + "type": "pubkey" + } + ] + } + }, + { + "name": "HandleReceiveMessageParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "remote_domain", + "type": "u32" + }, + { + "name": "sender", + "type": "pubkey" + }, + { + "name": "message_body", + "type": "bytes" + }, + { + "name": "authority_bump", + "type": "u8" + } + ] + } + }, + { + "name": "InitializeParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "token_controller", + "type": "pubkey" + }, + { + "name": "local_message_transmitter", + "type": "pubkey" + }, + { + "name": "message_body_version", + "type": "u32" + } + ] + } + }, + { + "name": "RemoveRemoteTokenMessengerParams", + "type": { + "kind": "struct" + } + }, + { + "name": "ReplaceDepositForBurnParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "original_message", + "type": "bytes" + }, + { + "name": "original_attestation", + "type": "bytes" + }, + { + "name": "new_destination_caller", + "type": "pubkey" + }, + { + "name": "new_mint_recipient", + "type": "pubkey" + } + ] + } + }, + { + "name": "TransferOwnershipParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_owner", + "type": "pubkey" + } + ] + } + }, + { + "name": "AddLocalTokenParams", + "type": { + "kind": "struct" + } + }, + { + "name": "BurnTokenCustodyParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "amount", + "type": "u64" + } + ] + } + }, + { + "name": "LinkTokenPairParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "local_token", + "type": "pubkey" + }, + { + "name": "remote_domain", + "type": "u32" + }, + { + "name": "remote_token", + "type": "pubkey" + } + ] + } + }, + { + "name": "PauseParams", + "type": { + "kind": "struct" + } + }, + { + "name": "RemoveLocalTokenParams", + "type": { + "kind": "struct" + } + }, + { + "name": "SetMaxBurnAmountPerMessageParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "burn_limit_per_message", + "type": "u64" + } + ] + } + }, + { + "name": "SetTokenControllerParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "token_controller", + "type": "pubkey" + } + ] + } + }, + { + "name": "UninkTokenPairParams", + "type": { + "kind": "struct" + } + }, + { + "name": "UnpauseParams", + "type": { + "kind": "struct" + } + }, + { + "name": "UpdatePauserParams", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_pauser", + "type": "pubkey" + } + ] + } + }, + { + "name": "TokenMinterError", + "type": { + "kind": "enum", + "variants": [ + { + "name": "InvalidAuthority" + }, + { + "name": "InvalidTokenMinterState" + }, + { + "name": "ProgramPaused" + }, + { + "name": "InvalidTokenPairState" + }, + { + "name": "InvalidLocalTokenState" + }, + { + "name": "InvalidPauser" + }, + { + "name": "InvalidTokenController" + }, + { + "name": "BurnAmountExceeded" + }, + { + "name": "InvalidAmount" + } + ] + } + }, + { + "name": "TokenMessenger", + "type": { + "kind": "struct", + "fields": [ + { + "name": "owner", + "type": "pubkey" + }, + { + "name": "pending_owner", + "type": "pubkey" + }, + { + "name": "local_message_transmitter", + "type": "pubkey" + }, + { + "name": "message_body_version", + "type": "u32" + }, + { + "name": "authority_bump", + "type": "u8" + } + ] + } + }, + { + "name": "RemoteTokenMessenger", + "type": { + "kind": "struct", + "fields": [ + { + "name": "domain", + "type": "u32" + }, + { + "name": "token_messenger", + "type": "pubkey" + } + ] + } + }, + { + "name": "TokenMinter", + "type": { + "kind": "struct", + "fields": [ + { + "name": "token_controller", + "type": "pubkey" + }, + { + "name": "pauser", + "type": "pubkey" + }, + { + "name": "paused", + "type": "bool" + }, + { + "name": "bump", + "type": "u8" + } + ] + } + }, + { + "name": "TokenPair", + "type": { + "kind": "struct", + "fields": [ + { + "name": "remote_domain", + "type": "u32" + }, + { + "name": "remote_token", + "type": "pubkey" + }, + { + "name": "local_token", + "type": "pubkey" + }, + { + "name": "bump", + "type": "u8" + } + ] + } + }, + { + "name": "LocalToken", + "type": { + "kind": "struct", + "fields": [ + { + "name": "custody", + "type": "pubkey" + }, + { + "name": "mint", + "type": "pubkey" + }, + { + "name": "burn_limit_per_message", + "type": "u64" + }, + { + "name": "messages_sent", + "type": "u64" + }, + { + "name": "messages_received", + "type": "u64" + }, + { + "name": "amount_sent", + "type": "u128" + }, + { + "name": "amount_received", + "type": "u128" + }, + { + "name": "bump", + "type": "u8" + }, + { + "name": "custody_bump", + "type": "u8" + } + ] + } + }, + { + "name": "OwnershipTransferStarted", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previous_owner", + "type": "pubkey" + }, + { + "name": "new_owner", + "type": "pubkey" + } + ] + } + }, + { + "name": "OwnershipTransferred", + "type": { + "kind": "struct", + "fields": [ + { + "name": "previous_owner", + "type": "pubkey" + }, + { + "name": "new_owner", + "type": "pubkey" + } + ] + } + }, + { + "name": "DepositForBurn", + "type": { + "kind": "struct", + "fields": [ + { + "name": "nonce", + "type": "u64" + }, + { + "name": "burn_token", + "type": "pubkey" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "depositor", + "type": "pubkey" + }, + { + "name": "mint_recipient", + "type": "pubkey" + }, + { + "name": "destination_domain", + "type": "u32" + }, + { + "name": "destination_token_messenger", + "type": "pubkey" + }, + { + "name": "destination_caller", + "type": "pubkey" + } + ] + } + }, + { + "name": "MintAndWithdraw", + "type": { + "kind": "struct", + "fields": [ + { + "name": "mint_recipient", + "type": "pubkey" + }, + { + "name": "amount", + "type": "u64" + }, + { + "name": "mint_token", + "type": "pubkey" + } + ] + } + }, + { + "name": "RemoteTokenMessengerAdded", + "type": { + "kind": "struct", + "fields": [ + { + "name": "domain", + "type": "u32" + }, + { + "name": "token_messenger", + "type": "pubkey" + } + ] + } + }, + { + "name": "RemoteTokenMessengerRemoved", + "type": { + "kind": "struct", + "fields": [ + { + "name": "domain", + "type": "u32" + }, + { + "name": "token_messenger", + "type": "pubkey" + } + ] + } + }, + { + "name": "SetTokenController", + "type": { + "kind": "struct", + "fields": [ + { + "name": "token_controller", + "type": "pubkey" + } + ] + } + }, + { + "name": "PauserChanged", + "type": { + "kind": "struct", + "fields": [ + { + "name": "new_address", + "type": "pubkey" + } + ] + } + }, + { + "name": "SetBurnLimitPerMessage", + "type": { + "kind": "struct", + "fields": [ + { + "name": "token", + "type": "pubkey" + }, + { + "name": "burn_limit_per_message", + "type": "u64" + } + ] + } + }, + { + "name": "LocalTokenAdded", + "type": { + "kind": "struct", + "fields": [ + { + "name": "custody", + "type": "pubkey" + }, + { + "name": "mint", + "type": "pubkey" + } + ] + } + }, + { + "name": "LocalTokenRemoved", + "type": { + "kind": "struct", + "fields": [ + { + "name": "custody", + "type": "pubkey" + }, + { + "name": "mint", + "type": "pubkey" + } + ] + } + }, + { + "name": "TokenPairLinked", + "type": { + "kind": "struct", + "fields": [ + { + "name": "local_token", + "type": "pubkey" + }, + { + "name": "remote_domain", + "type": "u32" + }, + { + "name": "remote_token", + "type": "pubkey" + } + ] + } + }, + { + "name": "TokenPairUnlinked", + "type": { + "kind": "struct", + "fields": [ + { + "name": "local_token", + "type": "pubkey" + }, + { + "name": "remote_domain", + "type": "u32" + }, + { + "name": "remote_token", + "type": "pubkey" + } + ] + } + }, + { + "name": "Pause", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "Unpause", + "type": { + "kind": "struct", + "fields": [] + } + }, + { + "name": "TokenCustodyBurned", + "type": { + "kind": "struct", + "fields": [ + { + "name": "custody_token_account", + "type": "pubkey" + }, + { + "name": "amount", + "type": "u64" + } + ] + } + } + ] +} \ No newline at end of file diff --git a/programs/multicall-handler/Cargo.toml b/programs/multicall-handler/Cargo.toml index 0fcb5283c..14701282c 100644 --- a/programs/multicall-handler/Cargo.toml +++ b/programs/multicall-handler/Cargo.toml @@ -19,3 +19,4 @@ test = [] [dependencies] anchor-lang = "0.30.1" +solana-security-txt = "1.1.1" diff --git a/programs/multicall-handler/src/lib.rs b/programs/multicall-handler/src/lib.rs index 54490e99a..81dd64d8b 100644 --- a/programs/multicall-handler/src/lib.rs +++ b/programs/multicall-handler/src/lib.rs @@ -6,9 +6,23 @@ use anchor_lang::{ }, }; +#[cfg(not(feature = "no-entrypoint"))] +use ::solana_security_txt::security_txt; + +#[cfg(not(feature = "no-entrypoint"))] +security_txt! { + name: "Across", + project_url: "https://across.to", + contacts: "email:bugs@across.to", + policy: "https://docs.across.to/resources/bug-bounty", + preferred_languages: "en", + source_code: "https://github.com/across-protocol/contracts/tree/master/programs/multicall-handler", + auditors: "OpenZeppelin" +} + // If changing the program ID, make sure to check that the resulting handler_signer PDA has the highest bump of 255 so // to minimize the compute cost when finding the PDA. -declare_id!("6kqWTz3A3ZYMV2FMU24ke8rHzT82SaBz7GkBKTd7Z9BH"); +declare_id!("27dua7HMuaZrAc6PRfxmvshHChypFLzZVSpKKaDAPjsq"); #[program] pub mod multicall_handler { diff --git a/programs/svm-spoke/Cargo.toml b/programs/svm-spoke/Cargo.toml index 8670bbcd7..de1970c0a 100644 --- a/programs/svm-spoke/Cargo.toml +++ b/programs/svm-spoke/Cargo.toml @@ -22,4 +22,5 @@ test = [] anchor-lang = { version = "0.30.1", features = ["init-if-needed","event-cpi"]} anchor-spl = "0.30.1" solana-program = "=2.0.3" -multicall-handler = { path = "../multicall-handler" } \ No newline at end of file +multicall-handler = { path = "../multicall-handler" } +solana-security-txt = "1.1.1" \ No newline at end of file diff --git a/programs/svm-spoke/src/lib.rs b/programs/svm-spoke/src/lib.rs index 71cbae6ed..003511419 100644 --- a/programs/svm-spoke/src/lib.rs +++ b/programs/svm-spoke/src/lib.rs @@ -1,6 +1,20 @@ use anchor_lang::prelude::*; -declare_id!("DnLjPzpMCW2CF99URhGF3jDYnVRcCJMjUWsbPb4xVoBn"); +#[cfg(not(feature = "no-entrypoint"))] +use ::solana_security_txt::security_txt; + +#[cfg(not(feature = "no-entrypoint"))] +security_txt! { + name: "Across", + project_url: "https://across.to", + contacts: "email:bugs@across.to", + policy: "https://docs.across.to/resources/bug-bounty", + preferred_languages: "en", + source_code: "https://github.com/across-protocol/contracts/tree/master/programs/svm-spoke", + auditors: "OpenZeppelin" +} + +declare_id!("D1WcTLKRyN4TuqnfMBGPvc16nACHfNhFPbgWNExb1aur"); // External programs from idls directory (requires anchor run generateExternalTypes). declare_program!(message_transmitter);