diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ca16cd2ed..d44fc82a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -219,7 +219,7 @@ jobs: working-directory: ./rust - name: agent tests with CosmWasm - run: RUST_BACKTRACE=1 cargo test --package run-locally --bin run-locally -- cosmos::test --nocapture + run: RUST_BACKTRACE=1 cargo test --package run-locally --bin run-locally --features cosmos -- cosmos::test --nocapture working-directory: ./rust - name: agent tests excluding CosmWasm diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 3218a1fe2..b922edc5d 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -187,9 +187,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ab91ebe16eb252986481c5b62f6098f3b698a45e34b5b98200cf20dd2484a44" +checksum = "d664a92ecae85fd0a7392615844904654d1d5f5514837f471ddef4a057aba1b6" dependencies = [ "anstyle", "anstyle-parse", @@ -207,30 +207,30 @@ checksum = "7079075b41f533b8c61d2a4d073c4676e1f8b249ff94a393b0595db304e0dd87" [[package]] name = "anstyle-parse" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317b9a89c1868f5ea6ff1d9539a69f45dffc21ce321ac1fd1160dfa48c8e2140" +checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.0.0" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b" +checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "anstyle-wincon" -version = "3.0.1" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0699d10d2f4d628a98ee7b57b289abbc98ff3bad977cb3152709d4bf2330628" +checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" dependencies = [ "anstyle", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -279,7 +279,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", "synstructure", @@ -291,7 +291,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -342,9 +342,9 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -353,9 +353,9 @@ version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -380,9 +380,9 @@ dependencies = [ [[package]] name = "atomic-polyfill" -version = "0.1.11" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3ff7eb3f316534d83a8a2c3d1674ace8a5a71198eba31e2e2b597833f699b28" +checksum = "8cf2bce30dfe09ef0bfaef228b9d414faaf7e563035494d7fe092dba54b300f4" dependencies = [ "critical-section", ] @@ -405,7 +405,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7862e21c893d65a1650125d157eaeec691439379a1cee17ee49031b79236ada4" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -417,7 +417,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -504,7 +504,7 @@ checksum = "33b8de67cc41132507eeece2584804efcb15f85ba516e34c944b7667f480397a" dependencies = [ "heck 0.3.3", "proc-macro-error", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -606,12 +606,12 @@ dependencies = [ "lazycell", "peeking_take_while", "prettyplease", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "regex", "rustc-hash", "shlex", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -728,9 +728,9 @@ checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" [[package]] name = "bnum" -version = "0.8.0" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128a44527fc0d6abf05f9eda748b9027536e12dff93f5acc8449f51583309350" +checksum = "ab9008b6bb9fc80b5277f2fe481c09e828743d9151203e804583eb4c9e15b31d" [[package]] name = "borrown" @@ -750,11 +750,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf617fabf5cdbdc92f774bfe5062d870f228b80056d41180797abf48bed4056e" +checksum = "9897ef0f1bd2362169de6d7e436ea2237dc1085d7d1e4db75f4be34d86f309d1" dependencies = [ - "borsh-derive 1.2.0", + "borsh-derive 1.2.1", "cfg_aliases", ] @@ -767,21 +767,21 @@ dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", "proc-macro-crate 0.1.5", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "syn 1.0.109", ] [[package]] name = "borsh-derive" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f404657a7ea7b5249e36808dff544bc88a28f26e0ac40009f674b7a009d14be3" +checksum = "478b41ff04256c5c8330f3dfdaaae2a5cc976a8e75088bafa4625b0d0208de8c" dependencies = [ "once_cell", "proc-macro-crate 2.0.0", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", "syn_derive", ] @@ -791,7 +791,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -802,7 +802,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -888,7 +888,7 @@ version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -908,9 +908,9 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -1110,9 +1110,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.4.8" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2275f18819641850fa26c89acc84d465c1bf91ce57bc2748b28c420473352f64" +checksum = "bfaff671f6b22ca62406885ece523383b9b64022e341e53e009a62ebc47a45f2" dependencies = [ "clap_builder", "clap_derive 4.4.7", @@ -1120,9 +1120,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.4.8" +version = "4.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07cdf1b148b25c1e1f7a42225e30a0d99a615cd4637eae7365548dd4529b95bc" +checksum = "a216b506622bb1d316cd51328dce24e07bdff4a6128a47c7e7fad11878d5adbb" dependencies = [ "anstream", "anstyle", @@ -1138,7 +1138,7 @@ checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008" dependencies = [ "heck 0.4.1", "proc-macro-error", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -1150,9 +1150,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf9804afaaf59a91e75b022a30fb7229a7901f60c755489cc61c9b423b836442" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -1281,9 +1281,9 @@ dependencies = [ [[package]] name = "config" -version = "0.13.3" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d379af7f68bfc21714c6c7dea883544201741d2ce8274bb12fa54f89507f52a7" +checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" dependencies = [ "async-trait", "json5", @@ -1394,9 +1394,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ "core-foundation-sys", "libc", @@ -1404,9 +1404,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.4" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] name = "cosmos-sdk-proto" @@ -1483,7 +1483,7 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43609e92ce1b9368aa951b334dd354a2d0dd4d484931a5f83ae10e12a26c8ba9" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -1555,9 +1555,9 @@ checksum = "7059fff8937831a9ae6f0fe4d658ffabf58f2ca96aa9dec1c889f936f705f216" [[package]] name = "crossbeam-channel" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" +checksum = "14c3242926edf34aec4ac3a77108ad4854bffaa2e4ddc1824124ce59231302d5" dependencies = [ "cfg-if", "crossbeam-utils", @@ -1565,9 +1565,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ "cfg-if", "crossbeam-epoch", @@ -1576,22 +1576,21 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" dependencies = [ "autocfg", "cfg-if", "crossbeam-utils", "memoffset 0.9.0", - "scopeguard", ] [[package]] name = "crossbeam-queue" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cfb3ea8a53f37c40dea2c7bedcbd88bdfae54f5e2175d6ecaff1c988353add" +checksum = "b9bcf5bdbfdd6030fb4a1c497b5d5fc5921aa2f60d359a17e249c0e6df3de153" dependencies = [ "cfg-if", "crossbeam-utils", @@ -1599,9 +1598,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" dependencies = [ "cfg-if", ] @@ -1755,9 +1754,9 @@ dependencies = [ [[package]] name = "cw-utils" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9f351a4e4d81ef7c890e44d903f8c0bdcdc00f094fd3a181eaf70c0eec7a3a" +checksum = "1c4a657e5caacc3a0d00ee96ca8618745d050b8f757c709babafb81208d4239c" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1770,23 +1769,24 @@ dependencies = [ [[package]] name = "cw2" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9431d14f64f49e41c6ef5561ed11a5391c417d0cb16455dea8cdcb9037a8d197" +checksum = "c6c120b24fbbf5c3bedebb97f2cc85fbfa1c3287e09223428e7e597b5293c1fa" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus", "schemars", + "semver", "serde", "thiserror", ] [[package]] name = "cw20" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786e9da5e937f473cecd2463e81384c1af65d0f6398bbd851be7655487c55492" +checksum = "526e39bb20534e25a1cd0386727f0038f4da294e5e535729ba3ef54055246abd" dependencies = [ "cosmwasm-schema", "cosmwasm-std", @@ -1797,14 +1797,13 @@ dependencies = [ [[package]] name = "cw20-base" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09558f87fd3d5e4a479761051b3f98ee2fa723d9e484b5679b6058ad0eadf8f1" +checksum = "17ad79e86ea3707229bf78df94e08732e8f713207b4a77b2699755596725e7d9" dependencies = [ "cosmwasm-schema", "cosmwasm-std", "cw-storage-plus", - "cw-utils", "cw2", "cw20", "schemars", @@ -1837,7 +1836,7 @@ dependencies = [ "darling 0.13.4", "graphql-parser", "once_cell", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "strsim 0.10.0", "syn 1.0.109", @@ -1881,7 +1880,7 @@ checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "strsim 0.10.0", "syn 1.0.109", @@ -1895,7 +1894,7 @@ checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "strsim 0.10.0", "syn 1.0.109", @@ -1936,9 +1935,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.4.0" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2e66c9d817f1720209181c316d28635c050fa304f9c79e47a520882661b7308" +checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" [[package]] name = "der" @@ -1985,9 +1984,9 @@ dependencies = [ [[package]] name = "deranged" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f32d04922c60427da6f9fef14d042d9edddef64cb9d4ce0d64d0685fbeb1fd3" +checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" dependencies = [ "powerfmt", "serde", @@ -2005,7 +2004,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -2016,7 +2015,7 @@ version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -2037,7 +2036,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" dependencies = [ "darling 0.14.4", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -2059,7 +2058,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ "convert_case 0.4.0", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "rustc_version", "syn 1.0.109", @@ -2169,9 +2168,9 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2256,7 +2255,7 @@ dependencies = [ "elliptic-curve 0.13.8", "rfc6979 0.4.0", "signature 2.2.0", - "spki 0.7.2", + "spki 0.7.3", ] [[package]] @@ -2348,7 +2347,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" dependencies = [ "enum-ordinalize", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -2449,7 +2448,7 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8958699f9359f0b04e691a13850d48b7de329138023876d07cbd024c2c820598" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -2462,9 +2461,9 @@ checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ "num-bigint 0.4.4", "num-traits", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2474,9 +2473,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f33313078bb8d4d05a2733a94ac4c2d8a0df9a2b84424ebf4f33bfc224a890e" dependencies = [ "once_cell", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2513,12 +2512,12 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f258a7194e7f7c2a7837a8913aeab7fd8c383457034fa20ce4dd3dcb813e8eb8" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ "libc", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2668,7 +2667,7 @@ dependencies = [ "eyre", "getrandom 0.2.11", "hex 0.4.3", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "regex", "reqwest", @@ -2688,7 +2687,7 @@ dependencies = [ "ethers-contract-abigen", "ethers-core", "hex 0.4.3", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "serde_json", "syn 1.0.109", @@ -2711,7 +2710,7 @@ dependencies = [ "k256 0.11.6", "once_cell", "open-fastrlp", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "rand 0.8.5", "rlp", "rlp-derive", @@ -2867,9 +2866,9 @@ dependencies = [ [[package]] name = "eyre" -version = "0.6.9" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80f656be11ddf91bd709454d15d5bd896fbaf4cc3314e69349e4d1569f5b46cd" +checksum = "4c2b6b5a29c02cdc822728b7d7b8ae1bab3e3b05d44522770ddd49722eeac7eb" dependencies = [ "indenter", "once_cell", @@ -2915,14 +2914,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.22" +version = "0.2.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.3.5", - "windows-sys 0.48.0", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", ] [[package]] @@ -3006,9 +3005,9 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a62bc1cf6f830c2ec14a513a9fb124d0a213a629668a4186f329db21fe045652" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ "percent-encoding", ] @@ -3234,7 +3233,7 @@ dependencies = [ "fuel-abi-types", "itertools 0.10.5", "lazy_static", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "regex", "serde_json", @@ -3267,7 +3266,7 @@ dependencies = [ "fuels-code-gen", "itertools 0.10.5", "lazy_static", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "rand 0.8.5", "regex", @@ -3292,7 +3291,7 @@ dependencies = [ "futures", "hex 0.4.3", "itertools 0.10.5", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "rand 0.8.5", "regex", "serde", @@ -3376,7 +3375,7 @@ dependencies = [ "hex 0.4.3", "itertools 0.10.5", "lazy_static", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "regex", "serde", "serde_json", @@ -3466,9 +3465,9 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -3575,9 +3574,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" [[package]] name = "glob" @@ -3685,9 +3684,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93e7192158dbcda357bdec5fb5788eebf8bbac027f3f33e719d29135ae84156" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" dependencies = [ "ahash 0.8.6", "allocator-api2", @@ -3708,7 +3707,7 @@ version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -3737,9 +3736,9 @@ dependencies = [ [[package]] name = "heapless" -version = "0.7.16" +version = "0.7.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db04bc24a18b9ea980628ecf00e6c0264f3c1426dac36c00cb49b6fbad8b0743" +checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f" dependencies = [ "atomic-polyfill", "hash32", @@ -3806,9 +3805,9 @@ checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" [[package]] name = "hkdf" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "791a029f6b9fc27657f6f188ec6e5e43f6911f6f878e0dc5501396e09809d437" +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" dependencies = [ "hmac 0.12.1", ] @@ -3897,9 +3896,9 @@ dependencies = [ [[package]] name = "http-body" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", @@ -3994,7 +3993,7 @@ dependencies = [ "futures-util", "http", "hyper", - "rustls 0.21.9", + "rustls 0.21.10", "tokio", "tokio-rustls 0.24.1", ] @@ -4223,7 +4222,7 @@ dependencies = [ "bincode", "borsh 0.9.3", "bs58 0.5.0", - "clap 4.4.8", + "clap 4.4.11", "hex 0.4.3", "hyperlane-core", "hyperlane-sealevel-connection-client", @@ -4650,9 +4649,9 @@ dependencies = [ [[package]] name = "idna" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d20d6b07bfbc108882d88ed8e37d39636dcc260e15e30c45e6ba089610b917c" +checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" dependencies = [ "unicode-bidi", "unicode-normalization", @@ -4731,7 +4730,7 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -4765,7 +4764,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" dependencies = [ "equivalent", - "hashbrown 0.14.2", + "hashbrown 0.14.3", ] [[package]] @@ -4836,26 +4835,35 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25db6b064527c5d482d0423354fcd07a89a2dfe07b67892e62411946db7f07b0" +dependencies = [ + "either", +] + [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "jobserver" -version = "0.1.27" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54c0c35952f67de54bb584e9fd912b3023117cbafc0a77d8f3dee1fb5f572fe8" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -4936,9 +4944,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libloading" @@ -5044,9 +5052,9 @@ checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" [[package]] name = "linux-raw-sys" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829" +checksum = "c4cd1a83af159aa67994778be9070f0ae1bd732942279cabb14f86f986a21456" [[package]] name = "lock_api" @@ -5248,9 +5256,9 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.9" +version = "0.8.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0" +checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" dependencies = [ "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -5279,7 +5287,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ "cfg-if", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -5300,7 +5308,7 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -5491,7 +5499,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -5502,9 +5510,9 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -5597,7 +5605,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" dependencies = [ "proc-macro-crate 1.2.1", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -5609,9 +5617,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" dependencies = [ "proc-macro-crate 1.2.1", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -5640,9 +5648,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" @@ -5676,16 +5684,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" dependencies = [ "bytes", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] [[package]] name = "openssl" -version = "0.10.59" +version = "0.10.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a257ad03cd8fb16ad4172fedf8094451e1af1c4b70097636ef2eac9a5f0cc33" +checksum = "6b8419dc8cc6d866deb801274bba2e6f8f6108c1bb7fcc10ee5ab864931dbb45" dependencies = [ "bitflags 2.4.1", "cfg-if", @@ -5702,9 +5710,9 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -5715,9 +5723,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.95" +version = "0.9.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40a4130519a360279579c2053038317e40eff64d13fd3f004f9e1b72b8a6aaf9" +checksum = "c3eaad34cdd97d81de97964fc7f29e2d104f483840d906ef56daa1912338460b" dependencies = [ "cc", "libc", @@ -5778,7 +5786,7 @@ checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" dependencies = [ "Inflector", "proc-macro-error", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -5797,9 +5805,9 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "parity-scale-codec" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dec8a8073036902368c2cdc0387e85ff9a37054d7e7c98e592145e0c92cd4fb" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ "arrayvec", "bitvec 1.0.1", @@ -5811,12 +5819,12 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.5" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312270ee71e1cd70289dacf597cab7b207aa107d2f28191c2ae45b2ece18a260" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "proc-macro-crate 1.2.1", - "proc-macro2 1.0.69", + "proc-macro-crate 2.0.0", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -5960,7 +5968,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aa52829b8decbef693af90202711348ab001456803ba2a98eb4ec8fb70844c" dependencies = [ "peg-runtime", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", ] @@ -5981,9 +5989,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "percentage" @@ -6023,9 +6031,9 @@ checksum = "68bd1206e71118b5356dae5ddc61c8b11e28b09ef6a31acbd15ea48a28e0c227" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -6064,9 +6072,9 @@ version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -6109,7 +6117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ "der 0.7.8", - "spki 0.7.2", + "spki 0.7.3", ] [[package]] @@ -6215,8 +6223,8 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ - "proc-macro2 1.0.69", - "syn 2.0.39", + "proc-macro2 1.0.70", + "syn 2.0.41", ] [[package]] @@ -6268,7 +6276,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", "version_check", @@ -6280,7 +6288,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "version_check", ] @@ -6296,9 +6304,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" dependencies = [ "unicode-ident", ] @@ -6336,7 +6344,7 @@ checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" dependencies = [ "anyhow", "itertools 0.10.5", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -6377,7 +6385,7 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -6469,7 +6477,7 @@ version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", ] [[package]] @@ -6605,15 +6613,6 @@ dependencies = [ "bitflags 1.3.2", ] -[[package]] -name = "redox_syscall" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" -dependencies = [ - "bitflags 1.3.2", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -6749,7 +6748,7 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls 0.21.9", + "rustls 0.21.10", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -6764,7 +6763,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots 0.25.2", + "webpki-roots 0.25.3", "winreg", ] @@ -6806,9 +6805,9 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.5" +version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" +checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" dependencies = [ "cc", "getrandom 0.2.11", @@ -6850,7 +6849,7 @@ version = "0.7.42" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -6870,7 +6869,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -6918,6 +6917,7 @@ dependencies = [ "hex 0.4.3", "hpl-interface", "hyperlane-core", + "jobserver", "k256 0.13.2", "macro_rules_attribute", "maplit", @@ -7061,7 +7061,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06676aec5ccb8fc1da723cc8c0f9a46549f21ebb8753d3915c6c41db1e7f1dc4" dependencies = [ "arrayvec", - "borsh 1.2.0", + "borsh 1.2.1", "bytes", "num-traits", "rand 0.8.5", @@ -7108,15 +7108,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.25" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc99bc2d4f1fed22595588a013687477aedf3cdcfb26558c559edb67b4d9b22e" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ "bitflags 2.4.1", "errno", "libc", "linux-raw-sys", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -7146,12 +7146,12 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.9" +version = "0.21.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" +checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" dependencies = [ "log", - "ring 0.17.5", + "ring 0.17.7", "rustls-webpki", "sct 0.7.1", ] @@ -7204,7 +7204,7 @@ version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -7216,9 +7216,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "salsa20" @@ -7266,7 +7266,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" dependencies = [ "proc-macro-crate 1.2.1", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -7298,7 +7298,7 @@ version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "serde_derive_internals", "syn 1.0.109", @@ -7360,9 +7360,9 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -7407,7 +7407,7 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -7463,7 +7463,7 @@ checksum = "28936f26d62234ff0be16f80115dbdeb3237fe9c25cf18fbcd1e3b3592360f20" dependencies = [ "bae", "heck 0.3.3", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -7523,7 +7523,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63f62030c60f3a691f5fe251713b4e220b306e50a71e1d6f9cce1f24bb781978" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", "thiserror", @@ -7547,7 +7547,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56821b7076f5096b8f726e2791ad255a99c82498e08ec477a65a96c461ff1927" dependencies = [ "heck 0.3.3", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -7568,7 +7568,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69b4397b825df6ccf1e98bcdabef3bbcfc47ff5853983467850eeab878384f21" dependencies = [ "heck 0.3.3", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "rustversion", "syn 1.0.109", @@ -7685,9 +7685,9 @@ dependencies = [ [[package]] name = "serde-aux" -version = "4.2.0" +version = "4.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3dfe1b7eb6f9dcf011bd6fad169cdeaae75eda0d61b1a99a3f015b41b0cae39" +checksum = "184eba62ebddb71658697c8b08822edee89970bf318c5362189f0de27f85b498" dependencies = [ "serde", "serde_json", @@ -7717,9 +7717,9 @@ version = "1.0.193" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -7728,7 +7728,7 @@ version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -7750,9 +7750,9 @@ version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -7785,7 +7785,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" dependencies = [ "darling 0.13.4", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -8293,7 +8293,7 @@ name = "solana-frozen-abi-macro" version = "1.14.13" source = "git+https://github.com/hyperlane-xyz/solana.git?tag=hyperlane-1.14.13-2023-07-04#62a6421cab862c77b9ac7a8d93f54f8b5b223af7" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "rustc_version", "syn 1.0.109", @@ -8619,7 +8619,7 @@ version = "1.14.13" source = "git+https://github.com/hyperlane-xyz/solana.git?tag=hyperlane-1.14.13-2023-07-04#62a6421cab862c77b9ac7a8d93f54f8b5b223af7" dependencies = [ "bs58 0.4.0", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "rustversion", "syn 1.0.109", @@ -8851,9 +8851,9 @@ dependencies = [ [[package]] name = "spki" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1e996ef02c474957d681f1b05213dfb0abab947b446a62d37770b23500184a" +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", "der 0.7.8", @@ -8946,11 +8946,11 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" +checksum = "ce81b7bd7c4493975347ef60d8c7e8b742d4694f4c49f93e0a12ea263938176c" dependencies = [ - "itertools 0.11.0", + "itertools 0.12.0", "nom", "unicode_categories", ] @@ -9030,7 +9030,7 @@ dependencies = [ "either", "heck 0.4.1", "once_cell", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "serde_json", "sqlx-core", @@ -9117,7 +9117,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d06aaeeee809dbc59eb4556183dd927df67db1540de5be8d3ec0b6636358a5ec" dependencies = [ "heck 0.3.3", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -9129,7 +9129,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "rustversion", "syn 1.0.109", @@ -9142,10 +9142,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" dependencies = [ "heck 0.4.1", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "rustversion", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -9192,18 +9192,18 @@ version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "unicode-ident", ] [[package]] name = "syn" -version = "2.0.39" +version = "2.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "unicode-ident", ] @@ -9215,9 +9215,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -9232,7 +9232,7 @@ version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", "unicode-xid 0.2.4", @@ -9315,7 +9315,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", "syn 1.0.109", ] @@ -9490,9 +9490,9 @@ version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -9579,9 +9579,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.34.0" +version = "1.35.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9" +checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" dependencies = [ "backtrace", "bytes", @@ -9612,9 +9612,9 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -9655,7 +9655,7 @@ version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.9", + "rustls 0.21.10", "tokio", ] @@ -9871,9 +9871,9 @@ version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -9950,9 +9950,9 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" @@ -10030,9 +10030,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.13" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" +checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" [[package]] name = "unicode-ident" @@ -10112,9 +10112,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" [[package]] name = "ureq" -version = "2.9.0" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7830e33f6e25723d41a63f77e434159dad02919f18f55a512b5f16f3b1d77138" +checksum = "f8cdd25c339e200129fe4de81451814e5228c9b771d57378817d6117cc2b3f97" dependencies = [ "base64 0.21.5", "log", @@ -10134,12 +10134,12 @@ dependencies = [ [[package]] name = "url" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" +checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" dependencies = [ "form_urlencoded", - "idna 0.4.0", + "idna 0.5.0", "percent-encoding", ] @@ -10294,9 +10294,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7daec296f25a1bae309c0cd5c29c4b260e510e6d813c286b19eaadf409d40fce" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -10304,24 +10304,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e397f4664c0e4e428e8313a469aaa58310d302159845980fd23b0f22a847f217" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", "once_cell", - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9afec9963e3d0994cac82455b2b3502b81a7f40f9a0d32181f7528d9f4b43e02" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if", "js-sys", @@ -10331,9 +10331,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5961017b3b08ad5f3fe39f1e79877f8ee7c23c5e5fd5eb80de95abc41f1f16b2" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote 1.0.33", "wasm-bindgen-macro-support", @@ -10341,22 +10341,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5353b8dab669f5e10f5bd76df26a9360c748f054f862ff5f3f8aae0c7fb3907" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.88" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d046c5d029ba91a1ed14da14dca44b68bf2f124cfbaf741c54151fdb3e0750b" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "wasm-timer" @@ -10375,9 +10375,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db499c5f66323272151db0e666cd34f78617522fb0c1604d31a27c50c206a85" +checksum = "50c24a44ec86bb68fbecd1b3efed7e85ea5621b39b35ef2766b66cd984f8010f" dependencies = [ "js-sys", "wasm-bindgen", @@ -10399,7 +10399,7 @@ version = "0.22.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed63aea5ce73d0ff405984102c42de94fc55a6b75765d621c65262469b3c9b53" dependencies = [ - "ring 0.17.5", + "ring 0.17.7", "untrusted 0.9.0", ] @@ -10423,9 +10423,9 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "0.25.2" +version = "0.25.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14247bb57be4f377dfb94c72830b8ce8fc6beac03cf4bf7b9732eadd414123fc" +checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" [[package]] name = "which" @@ -10507,6 +10507,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -10537,6 +10546,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -10549,6 +10573,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -10561,6 +10591,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -10573,6 +10609,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -10585,6 +10627,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -10597,6 +10645,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -10609,6 +10663,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -10621,11 +10681,17 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" -version = "0.5.19" +version = "0.5.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829846f3e3db426d4cee4510841b71a8e58aa2a76b1132579487ae430ccd9c7b" +checksum = "6c830786f7720c2fd27a1a0e27a709dbd3c4d009b56d098fc742d4f4eab91fe2" dependencies = [ "memchr", ] @@ -10688,11 +10754,13 @@ dependencies = [ [[package]] name = "xattr" -version = "1.0.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4686009f71ff3e5c4dbcf1a282d0a44db3f021ba69350cd42086b3e5f1c6985" +checksum = "a7dae5072fe1f8db8f8d29059189ac175196e410e40ba42d5d4684ae2f750995" dependencies = [ "libc", + "linux-raw-sys", + "rustix", ] [[package]] @@ -10721,22 +10789,22 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.7.26" +version = "0.7.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e97e415490559a91254a2979b4829267a57d2fcd741a98eee8b722fb57289aa0" +checksum = "306dca4455518f1f31635ec308b6b3e4eb1b11758cefafc782827d0aa7acb5c7" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.26" +version = "0.7.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7e48ccf166952882ca8bd778a43502c64f33bf94c12ebe2a7f08e5a0f6689f" +checksum = "be912bf68235a88fbefd1b73415cb218405958d1655b2ece9035a19920bdf6ba" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -10754,9 +10822,9 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "proc-macro2 1.0.69", + "proc-macro2 1.0.70", "quote 1.0.33", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] diff --git a/rust/Cargo.toml b/rust/Cargo.toml index 5aaac427b..478d8e352 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -77,7 +77,7 @@ derive_builder = "0.12" derive_more = "0.99" ed25519-dalek = "~1.0" enum_dispatch = "0.3" -eyre = "0.6" +eyre = "=0.6.8" fixed-hash = "0.8.0" fuels = "0.38" fuels-code-gen = "0.38" @@ -93,6 +93,7 @@ hpl-interface = "=0.0.6-rc3" hyper = "0.14" hyper-tls = "0.5.0" itertools = "0.11.0" +jobserver = "=0.1.26" jsonrpc-core = "18.0" k256 = { version = "0.13.1", features = ["std", "ecdsa"] } log = "0.4" diff --git a/rust/agents/scraper/src/db/message.rs b/rust/agents/scraper/src/db/message.rs index ba5b33843..8dd1a8b52 100644 --- a/rust/agents/scraper/src/db/message.rs +++ b/rust/agents/scraper/src/db/message.rs @@ -79,7 +79,7 @@ impl ScraperDb { { Ok(Some(HyperlaneMessage { // We do not write version to the DB. - version: 0, + version: 3, origin: message.origin as u32, destination: message.destination as u32, nonce: message.nonce as u32, diff --git a/rust/chains/hyperlane-cosmos/Cargo.toml b/rust/chains/hyperlane-cosmos/Cargo.toml index 12b084ba9..1b3002366 100644 --- a/rust/chains/hyperlane-cosmos/Cargo.toml +++ b/rust/chains/hyperlane-cosmos/Cargo.toml @@ -1,3 +1,5 @@ +cargo-features = ["workspace-inheritance"] + [package] name = "hyperlane-cosmos" documentation = { workspace = true } diff --git a/rust/chains/hyperlane-cosmos/src/libs/address.rs b/rust/chains/hyperlane-cosmos/src/libs/address.rs index 507bd2417..11e15ff9e 100644 --- a/rust/chains/hyperlane-cosmos/src/libs/address.rs +++ b/rust/chains/hyperlane-cosmos/src/libs/address.rs @@ -22,7 +22,7 @@ pub struct CosmosAddress { impl CosmosAddress { /// Returns a Bitcoin style address: RIPEMD160(SHA256(pubkey)) - /// Source: https://github.com/cosmos/cosmos-sdk/blob/177e7f45959215b0b4e85babb7c8264eaceae052/crypto/keys/secp256k1/secp256k1.go#L154 + /// Source: `` pub fn from_pubkey(pubkey: PublicKey, prefix: &str) -> ChainResult { // Get the inner type let tendermint_pubkey = TendermintPublicKey::from(pubkey); diff --git a/rust/chains/hyperlane-cosmos/src/providers/grpc.rs b/rust/chains/hyperlane-cosmos/src/providers/grpc.rs index 2a54734b1..fd85287d0 100644 --- a/rust/chains/hyperlane-cosmos/src/providers/grpc.rs +++ b/rust/chains/hyperlane-cosmos/src/providers/grpc.rs @@ -89,7 +89,7 @@ pub struct WasmGrpcProvider { /// Signer for transactions. signer: Option, /// GRPC Channel that can be cheaply cloned. - /// See https://docs.rs/tonic/latest/tonic/transport/struct.Channel.html#multiplexing-requests + /// See `` channel: Channel, } diff --git a/rust/chains/hyperlane-ethereum/tests/signer_output.rs b/rust/chains/hyperlane-ethereum/tests/signer_output.rs index a69629114..4284dac70 100644 --- a/rust/chains/hyperlane-ethereum/tests/signer_output.rs +++ b/rust/chains/hyperlane-ethereum/tests/signer_output.rs @@ -22,7 +22,7 @@ use hyperlane_core::{ pub fn output_message() { let hyperlane_message = HyperlaneMessage { nonce: 0, - version: 0, + version: 3, origin: 1000, sender: H256::from(H160::from_str("0x1111111111111111111111111111111111111111").unwrap()), destination: 2000, diff --git a/rust/chains/hyperlane-sealevel/src/mailbox.rs b/rust/chains/hyperlane-sealevel/src/mailbox.rs index ab72e4b0f..62fb1a2f1 100644 --- a/rust/chains/hyperlane-sealevel/src/mailbox.rs +++ b/rust/chains/hyperlane-sealevel/src/mailbox.rs @@ -633,7 +633,7 @@ impl SealevelMailboxIndexer { impl SequenceIndexer for SealevelMailboxIndexer { #[instrument(err, skip(self))] async fn sequence_and_tip(&self) -> ChainResult<(Option, u32)> { - let tip = Indexer::::get_finalized_block_number(self as _).await?; + let tip = Indexer::::get_finalized_block_number(self).await?; // TODO: need to make sure the call and tip are at the same height? let count = Mailbox::count(&self.mailbox, None).await?; Ok((Some(count), tip)) diff --git a/rust/chains/hyperlane-sealevel/src/merkle_tree_hook.rs b/rust/chains/hyperlane-sealevel/src/merkle_tree_hook.rs index e721a8201..b7ed6ba1e 100644 --- a/rust/chains/hyperlane-sealevel/src/merkle_tree_hook.rs +++ b/rust/chains/hyperlane-sealevel/src/merkle_tree_hook.rs @@ -4,13 +4,14 @@ use async_trait::async_trait; use derive_new::new; use hyperlane_core::{ accumulator::incremental::IncrementalMerkle, ChainCommunicationError, ChainResult, Checkpoint, - HyperlaneChain, Indexer, LogMeta, MerkleTreeHook, MerkleTreeInsertion, SequenceIndexer, + HyperlaneChain, HyperlaneMessage, Indexer, LogMeta, MerkleTreeHook, MerkleTreeInsertion, + SequenceIndexer, }; use hyperlane_sealevel_mailbox::accounts::OutboxAccount; use solana_sdk::commitment_config::CommitmentConfig; use tracing::instrument; -use crate::SealevelMailbox; +use crate::{SealevelMailbox, SealevelMailboxIndexer}; #[async_trait] impl MerkleTreeHook for SealevelMailbox { @@ -76,26 +77,38 @@ impl MerkleTreeHook for SealevelMailbox { } /// Struct that retrieves event data for a Sealevel merkle tree hook contract +/// For now it's just a wrapper around the SealevelMailboxIndexer #[derive(Debug, new)] -pub struct SealevelMerkleTreeHookIndexer {} +pub struct SealevelMerkleTreeHookIndexer(SealevelMailboxIndexer); #[async_trait] impl Indexer for SealevelMerkleTreeHookIndexer { async fn fetch_logs( &self, - _range: RangeInclusive, + range: RangeInclusive, ) -> ChainResult> { - Ok(vec![]) + let messages = Indexer::::fetch_logs(&self.0, range).await?; + let merkle_tree_insertions = messages + .into_iter() + .map(|(m, meta)| (message_to_merkle_tree_insertion(&m), meta)) + .collect(); + Ok(merkle_tree_insertions) } async fn get_finalized_block_number(&self) -> ChainResult { - Ok(0) + Indexer::::get_finalized_block_number(&self.0).await } } #[async_trait] impl SequenceIndexer for SealevelMerkleTreeHookIndexer { async fn sequence_and_tip(&self) -> ChainResult<(Option, u32)> { - Ok((None, 0)) + SequenceIndexer::::sequence_and_tip(&self.0).await } } + +fn message_to_merkle_tree_insertion(message: &HyperlaneMessage) -> MerkleTreeInsertion { + let leaf_index = message.nonce; + let message_id = message.id(); + MerkleTreeInsertion::new(leaf_index, message_id) +} diff --git a/rust/config/test-sealevel-keys/test_deployer-account.json b/rust/config/test-sealevel-keys/test_deployer-account.json new file mode 100644 index 000000000..43e952400 --- /dev/null +++ b/rust/config/test-sealevel-keys/test_deployer-account.json @@ -0,0 +1,13 @@ +{ + "pubkey": "E9VrvAdGRvCguN2XgXsgu9PNmMM3vZsU8LSUrM68j8ty", + "account": { + "lamports": 500000000000000000, + "data": [ + "", + "base64" + ], + "owner": "11111111111111111111111111111111", + "executable": false, + "rentEpoch": 0 + } + } \ No newline at end of file diff --git a/rust/config/test-sealevel-keys/test_deployer-keypair.json b/rust/config/test-sealevel-keys/test_deployer-keypair.json new file mode 100644 index 000000000..36e1ec678 --- /dev/null +++ b/rust/config/test-sealevel-keys/test_deployer-keypair.json @@ -0,0 +1 @@ +[137,43,246,148,154,244,35,62,98,248,84,203,54,24,188,26,62,227,52,29,199,26,218,8,196,213,222,202,35,154,207,79,195,85,53,151,7,182,83,94,59,5,131,252,40,75,87,11,243,118,71,59,195,222,212,148,179,233,253,121,97,210,114,98] \ No newline at end of file diff --git a/rust/config/test_sealevel_config.json b/rust/config/test_sealevel_config.json new file mode 100644 index 000000000..af814bd46 --- /dev/null +++ b/rust/config/test_sealevel_config.json @@ -0,0 +1,48 @@ +{ + "chains": { + "sealeveltest1": { + "name": "sealeveltest1", + "chainId": 13375, + "domainId": 13375, + "mailbox": "692KZJaoe2KRcD6uhCQDLLXnLNA5ZLnfvdqjE4aX9iu1", + "interchainGasPaymaster": "DrFtxirPPsfdY4HQiNZj2A9o4Ux7JaL3gELANgAoihhp", + "validatorAnnounce": "DH43ae1LwemXAboWwSh8zc9pG8j72gKUEXNi57w8fEnn", + "protocol": "sealevel", + "blocks": { + "reorgPeriod": 0, + "confirmations": 0 + }, + "rpcUrls": [ + { + "http": "http://localhost:8899" + } + ], + "index": { + "from": 1, + "mode": "sequence" + } + }, + "sealeveltest2": { + "name": "sealeveltest2", + "chainId": 13376, + "domainId": 13376, + "mailbox": "9tCUWNjpqcf3NUSrtp7vquYVCwbEByvLjZUrhG5dgvhj", + "interchainGasPaymaster": "G5rGigZBL8NmxCaukK2CAKr9Jq4SUfAhsjzeri7GUraK", + "validatorAnnounce": "3Uo5j2Bti9aZtrDqJmAyuwiFaJFPFoNL5yxTpVCNcUhb", + "protocol": "sealevel", + "blocks": { + "reorgPeriod": 0, + "confirmations": 0 + }, + "rpcUrls": [ + { + "http": "http://localhost:8899" + } + ], + "index": { + "from": 1, + "mode": "sequence" + } + } + } +} \ No newline at end of file diff --git a/rust/hyperlane-base/src/db/rocks/test_utils.rs b/rust/hyperlane-base/src/db/rocks/test_utils.rs index 5fbeb78df..3b4639bbd 100644 --- a/rust/hyperlane-base/src/db/rocks/test_utils.rs +++ b/rust/hyperlane-base/src/db/rocks/test_utils.rs @@ -49,7 +49,7 @@ mod test { let m = HyperlaneMessage { nonce: 100, - version: 0, + version: 3, origin: 10, sender: H256::from_low_u64_be(4), destination: 12, diff --git a/rust/hyperlane-base/src/settings/chains.rs b/rust/hyperlane-base/src/settings/chains.rs index a56ad31af..46379718c 100644 --- a/rust/hyperlane-base/src/settings/chains.rs +++ b/rust/hyperlane-base/src/settings/chains.rs @@ -111,16 +111,18 @@ impl ChainConf { metrics: &CoreMetrics, ) -> Result> { let ctx = "Building provider"; + let locator = self.locator(H256::zero()); match &self.connection { ChainConnectionConf::Ethereum(conf) => { - let locator = self.locator(H256::zero()); self.build_ethereum(conf, &locator, metrics, h_eth::HyperlaneProviderBuilder {}) .await } ChainConnectionConf::Fuel(_) => todo!(), - ChainConnectionConf::Sealevel(_) => todo!(), + ChainConnectionConf::Sealevel(conf) => Ok(Box::new(h_sealevel::SealevelProvider::new( + locator.domain.clone(), + conf, + )) as Box), ChainConnectionConf::Cosmos(conf) => { - let locator = self.locator(H256::zero()); let provider = CosmosProvider::new( locator.domain.clone(), conf.clone(), @@ -385,8 +387,12 @@ impl ChainConf { .await } ChainConnectionConf::Fuel(_) => todo!(), - ChainConnectionConf::Sealevel(_) => { - let indexer = Box::new(h_sealevel::SealevelMerkleTreeHookIndexer::new()); + ChainConnectionConf::Sealevel(conf) => { + let mailbox_indexer = + Box::new(h_sealevel::SealevelMailboxIndexer::new(conf, locator)?); + let indexer = Box::new(h_sealevel::SealevelMerkleTreeHookIndexer::new( + *mailbox_indexer, + )); Ok(indexer as Box>) } ChainConnectionConf::Cosmos(conf) => { diff --git a/rust/hyperlane-base/src/settings/mod.rs b/rust/hyperlane-base/src/settings/mod.rs index b999b8a32..e80944432 100644 --- a/rust/hyperlane-base/src/settings/mod.rs +++ b/rust/hyperlane-base/src/settings/mod.rs @@ -14,8 +14,7 @@ //! each configured chain. //! //! All agents share the [`Settings`] struct in this crate, and then define any -//! additional `Settings` in their own crate. By convention this is done in -//! `settings.rs` using the [`decl_settings!`] macro. +//! additional `Settings` in their own crate. //! //! ### Configuration //! diff --git a/rust/hyperlane-core/src/metrics/agent.rs b/rust/hyperlane-core/src/metrics/agent.rs index 02c2795e5..c6c138ca3 100644 --- a/rust/hyperlane-core/src/metrics/agent.rs +++ b/rust/hyperlane-core/src/metrics/agent.rs @@ -1,6 +1,7 @@ use crate::HyperlaneDomainProtocol; use std::time::Duration; +#[cfg(feature = "float")] use crate::U256; const ETHEREUM_DECIMALS: u8 = 18; diff --git a/rust/hyperlane-core/src/types/message.rs b/rust/hyperlane-core/src/types/message.rs index 0291d33fb..badabd815 100644 --- a/rust/hyperlane-core/src/types/message.rs +++ b/rust/hyperlane-core/src/types/message.rs @@ -21,7 +21,7 @@ impl From<&HyperlaneMessage> for RawHyperlaneMessage { } /// A full Hyperlane message between chains -#[derive(Default, Clone, Eq, PartialEq)] +#[derive(Clone, Eq, PartialEq)] pub struct HyperlaneMessage { /// 1 Hyperlane version number pub version: u8, @@ -39,6 +39,21 @@ pub struct HyperlaneMessage { pub body: Vec, } +impl Default for HyperlaneMessage { + fn default() -> Self { + Self { + // Use version 3 now that Hyperlane V3 is the default + version: 3, + nonce: 0, + origin: 0, + sender: H256::zero(), + destination: 0, + recipient: H256::zero(), + body: vec![], + } + } +} + impl Sequenced for HyperlaneMessage { fn sequence(&self) -> u32 { self.nonce diff --git a/rust/hyperlane-core/src/types/mod.rs b/rust/hyperlane-core/src/types/mod.rs index c1e39e491..9ae26aa1e 100644 --- a/rust/hyperlane-core/src/types/mod.rs +++ b/rust/hyperlane-core/src/types/mod.rs @@ -230,7 +230,7 @@ pub struct TxCostEstimate { /// covering L1 costs and the L2 gas limit. /// Only present for Arbitrum Nitro chains, where the gas amount /// is used to cover L1 and L2 costs. For details: - /// https://medium.com/offchainlabs/understanding-arbitrum-2-dimensional-fees-fd1d582596c9 + /// `` pub l2_gas_limit: Option, } diff --git a/rust/sealevel/client/src/main.rs b/rust/sealevel/client/src/main.rs index bef6cc209..88e75c7f4 100644 --- a/rust/sealevel/client/src/main.rs +++ b/rust/sealevel/client/src/main.rs @@ -991,23 +991,23 @@ fn process_token_cmd(ctx: Context, cmd: TokenCmd) { // Burns the tokens from the sender's associated token account and // then dispatches a message to the remote recipient. // - // 0. [executable] The system program. - // 1. [executable] The spl_noop program. - // 2. [] The token PDA account. - // 3. [executable] The mailbox program. - // 4. [writeable] The mailbox outbox account. - // 5. [] Message dispatch authority. - // 6. [signer] The token sender and mailbox payer. - // 7. [signer] Unique message / gas payment account. - // 8. [writeable] Message storage PDA. + // 0. `[executable]` The system program. + // 1. `[executable]` The spl_noop program. + // 2. `[]` The token PDA account. + // 3. `[executable]` The mailbox program. + // 4. `[writeable]` The mailbox outbox account. + // 5. `[]` Message dispatch authority. + // 6. `[signer]` The token sender and mailbox payer. + // 7. `[signer]` Unique message / gas payment account. + // 8. `[writeable]` Message storage PDA. // ---- If using an IGP ---- - // 9. [executable] The IGP program. - // 10. [writeable] The IGP program data. - // 11. [writeable] Gas payment PDA. - // 12. [] OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. - // 13. [writeable] The IGP account. + // 9. `[executable]` The IGP program. + // 10. `[writeable]` The IGP program data. + // 11. `[writeable]` Gas payment PDA. + // 12. `[]` OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. + // 13. `[writeable]` The IGP account. // ---- End if ---- - // 14..N [??..??] Plugin-specific accounts. + // 14..N `[??..??]` Plugin-specific accounts. let mut accounts = vec![ AccountMeta::new_readonly(system_program::id(), false), AccountMeta::new_readonly(spl_noop::id(), false), @@ -1059,8 +1059,8 @@ fn process_token_cmd(ctx: Context, cmd: TokenCmd) { match xfer.token_type { TokenType::Native => { - // 5. [executable] The system program. - // 6. [writeable] The native token collateral PDA account. + // 5. `[executable]` The system program. + // 6. `[writeable]` The native token collateral PDA account. let (native_collateral_account, _native_collateral_bump) = Pubkey::find_program_address( hyperlane_token_native_collateral_pda_seeds!(), @@ -1072,9 +1072,9 @@ fn process_token_cmd(ctx: Context, cmd: TokenCmd) { ]); } TokenType::Synthetic => { - // 5. [executable] The spl_token_2022 program. - // 6. [writeable] The mint / mint authority PDA account. - // 7. [writeable] The token sender's associated token account, from which tokens will be burned. + // 5. `[executable]` The spl_token_2022 program. + // 6. `[writeable]` The mint / mint authority PDA account. + // 7. `[writeable]` The token sender's associated token account, from which tokens will be burned. let (mint_account, _mint_bump) = Pubkey::find_program_address( hyperlane_token_mint_pda_seeds!(), &xfer.program_id, @@ -1092,10 +1092,10 @@ fn process_token_cmd(ctx: Context, cmd: TokenCmd) { ]); } TokenType::Collateral => { - // 5. [executable] The SPL token program for the mint. - // 6. [writeable] The mint. - // 7. [writeable] The token sender's associated token account, from which tokens will be sent. - // 8. [writeable] The escrow PDA account. + // 5. `[executable]` The SPL token program for the mint. + // 6. `[writeable]` The mint. + // 7. `[writeable]` The token sender's associated token account, from which tokens will be sent. + // 8. `[writeable]` The escrow PDA account. let token = HyperlaneTokenAccount::::fetch( &mut &fetched_token_account.data[..], ) @@ -1266,11 +1266,11 @@ fn process_validator_announce_cmd(ctx: Context, cmd: ValidatorAnnounceCmd) { let ixn = ValidatorAnnounceInstruction::Announce(announce_instruction); // Accounts: - // 0. [signer] The payer. - // 1. [executable] The system program. - // 2. [] The ValidatorAnnounce PDA account. - // 3. [writeable] The validator-specific ValidatorStorageLocationsAccount PDA account. - // 4. [writeable] The ReplayProtection PDA account specific to the announcement being made. + // 0. `[signer]` The payer. + // 1. `[executable]` The system program. + // 2. `[]` The ValidatorAnnounce PDA account. + // 3. `[writeable]` The validator-specific ValidatorStorageLocationsAccount PDA account. + // 4. `[writeable]` The ReplayProtection PDA account specific to the announcement being made. let accounts = vec![ AccountMeta::new_readonly(ctx.payer_pubkey, true), AccountMeta::new_readonly(system_program::id(), false), diff --git a/rust/sealevel/client/src/serde.rs b/rust/sealevel/client/src/serde.rs index b73a25bd5..b4c412f09 100644 --- a/rust/sealevel/client/src/serde.rs +++ b/rust/sealevel/client/src/serde.rs @@ -24,7 +24,7 @@ pub(crate) mod serde_pubkey { } } -/// For serializing and deserializing Option +/// For serializing and deserializing `Option` pub(crate) mod serde_option_pubkey { use borsh::BorshDeserialize; use serde::{Deserialize, Deserializer, Serializer}; diff --git a/rust/sealevel/libraries/account-utils/src/lib.rs b/rust/sealevel/libraries/account-utils/src/lib.rs index aa7fa6974..78af42974 100644 --- a/rust/sealevel/libraries/account-utils/src/lib.rs +++ b/rust/sealevel/libraries/account-utils/src/lib.rs @@ -193,7 +193,7 @@ where /// Creates associated token account using Program Derived Address for the given seeds. /// Required to allow PDAs to be created even if they already have a lamport balance. /// -/// Borrowed from https://github.com/solana-labs/solana-program-library/blob/cf77ed0c187d1becd0db56edff4491c28f18dfc8/associated-token-account/program/src/tools/account.rs#L18 +/// Borrowed from `` pub fn create_pda_account<'a>( payer: &AccountInfo<'a>, rent: &Rent, diff --git a/rust/sealevel/libraries/hyperlane-sealevel-token/src/instruction.rs b/rust/sealevel/libraries/hyperlane-sealevel-token/src/instruction.rs index ae1276a22..2193ea355 100644 --- a/rust/sealevel/libraries/hyperlane-sealevel-token/src/instruction.rs +++ b/rust/sealevel/libraries/hyperlane-sealevel-token/src/instruction.rs @@ -89,11 +89,11 @@ pub fn init_instruction( let ixn = Instruction::Init(init); // Accounts: - // 0. [executable] The system program. - // 1. [writable] The token PDA account. - // 2. [writable] The dispatch authority PDA account. - // 3. [signer] The payer and access control owner. - // 4..N [??..??] Plugin-specific accounts. + // 0. `[executable]` The system program. + // 1. `[writable]` The token PDA account. + // 2. `[writable]` The dispatch authority PDA account. + // 3. `[signer]` The payer and access control owner. + // 4..N `[??..??]` Plugin-specific accounts. let accounts = vec![ AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new(token_key, false), @@ -123,9 +123,9 @@ pub fn enroll_remote_routers_instruction( let ixn = Instruction::EnrollRemoteRouters(configs); // Accounts: - // 0. [executable] The system program. - // 1. [writeable] The token PDA account. - // 2. [signer] The owner. + // 0. `[executable]` The system program. + // 1. `[writeable]` The token PDA account. + // 2. `[signer]` The owner. let accounts = vec![ AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new(token_key, false), @@ -154,9 +154,9 @@ pub fn set_destination_gas_configs( let ixn = Instruction::SetDestinationGasConfigs(configs); // Accounts: - // 0. [executable] The system program. - // 1. [writeable] The token PDA account. - // 2. [signer] The owner. + // 0. `[executable]` The system program. + // 1. `[writeable]` The token PDA account. + // 2. `[signer]` The owner. let accounts = vec![ AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new(token_key, false), @@ -185,8 +185,8 @@ pub fn transfer_ownership_instruction( let ixn = Instruction::TransferOwnership(new_owner); // Accounts: - // 0. [writeable] The token PDA account. - // 1. [signer] The current owner. + // 0. `[writeable]` The token PDA account. + // 1. `[signer]` The current owner. let accounts = vec![ AccountMeta::new(token_key, false), AccountMeta::new_readonly(owner_payer, true), @@ -214,8 +214,8 @@ pub fn set_interchain_security_module_instruction( let ixn = Instruction::SetInterchainSecurityModule(new_interchain_security_module); // Accounts: - // 0. [writeable] The token PDA account. - // 1. [signer] The current owner. + // 0. `[writeable]` The token PDA account. + // 1. `[signer]` The current owner. let accounts = vec![ AccountMeta::new(token_key, false), AccountMeta::new_readonly(owner_payer, true), @@ -243,8 +243,8 @@ pub fn set_igp_instruction( let ixn = Instruction::SetInterchainGasPaymaster(igp_program_and_account); // Accounts: - // 0. [writeable] The token PDA account. - // 1. [signer] The current owner. + // 0. `[writeable]` The token PDA account. + // 1. `[signer]` The current owner. let accounts = vec![ AccountMeta::new(token_key, false), AccountMeta::new_readonly(owner_payer, true), diff --git a/rust/sealevel/libraries/hyperlane-sealevel-token/src/processor.rs b/rust/sealevel/libraries/hyperlane-sealevel-token/src/processor.rs index c10482857..801f9df4f 100644 --- a/rust/sealevel/libraries/hyperlane-sealevel-token/src/processor.rs +++ b/rust/sealevel/libraries/hyperlane-sealevel-token/src/processor.rs @@ -138,11 +138,11 @@ where /// Initializes the program. /// /// Accounts: - /// 0. [executable] The system program. - /// 1. [writable] The token PDA account. - /// 2. [writable] The dispatch authority PDA account. - /// 3. [signer] The payer and access control owner. - /// 4..N [??..??] Plugin-specific accounts. + /// 0. `[executable]` The system program. + /// 1. `[writable]` The token PDA account. + /// 2. `[writable]` The dispatch authority PDA account. + /// 3. `[signer]` The payer and access control owner. + /// 4..N `[??..??]` Plugin-specific accounts. pub fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -255,23 +255,23 @@ where /// then dispatches a message to the remote recipient. /// /// Accounts: - /// 0. [executable] The system program. - /// 1. [executable] The spl_noop program. - /// 2. [] The token PDA account. - /// 3. [executable] The mailbox program. - /// 4. [writeable] The mailbox outbox account. - /// 5. [] Message dispatch authority. - /// 6. [signer] The token sender and mailbox payer. - /// 7. [signer] Unique message / gas payment account. - /// 8. [writeable] Message storage PDA. + /// 0. `[executable]` The system program. + /// 1. `[executable]` The spl_noop program. + /// 2. `[]` The token PDA account. + /// 3. `[executable]` The mailbox program. + /// 4. `[writeable]` The mailbox outbox account. + /// 5. `[]` Message dispatch authority. + /// 6. `[signer]` The token sender and mailbox payer. + /// 7. `[signer]` Unique message / gas payment account. + /// 8. `[writeable]` Message storage PDA. /// ---- If using an IGP ---- - /// 9. [executable] The IGP program. - /// 10. [writeable] The IGP program data. - /// 11. [writeable] Gas payment PDA. - /// 12. [] OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. - /// 13. [writeable] The IGP account. + /// 9. `[executable]` The IGP program. + /// 10. `[writeable]` The IGP program data. + /// 11. `[writeable]` Gas payment PDA. + /// 12. `[]` OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. + /// 13. `[writeable]` The IGP account. /// ---- End if ---- - /// 14..N [??..??] Plugin-specific accounts. + /// 14..N `[??..??]` Plugin-specific accounts. pub fn transfer_remote( program_id: &Pubkey, accounts: &[AccountInfo], @@ -362,13 +362,13 @@ where // Accounts expected by the IGP's `PayForGas` instruction: // - // 0. [executable] The system program. - // 1. [signer] The payer. - // 2. [writeable] The IGP program data. - // 3. [signer] Unique gas payment account. - // 4. [writeable] Gas payment PDA. - // 5. [writeable] The IGP account. - // 6. [] Overhead IGP account (optional). + // 0. `[executable]` The system program. + // 1. `[signer]` The payer. + // 2. `[writeable]` The IGP program data. + // 3. `[signer]` Unique gas payment account. + // 4. `[writeable]` Gas payment PDA. + // 5. `[writeable]` The IGP account. + // 6. `[]` Overhead IGP account (optional). let mut igp_payment_account_metas = vec![ AccountMeta::new_readonly(solana_program::system_program::id(), false), @@ -491,11 +491,11 @@ where } /// Accounts: - /// 0. [signer] Mailbox processor authority specific to this program. - /// 1. [executable] system_program - /// 2. [] hyperlane_token storage + /// 0. `[signer]` Mailbox processor authority specific to this program. + /// 1. `[executable]` system_program + /// 2. `[]` hyperlane_token storage /// 3. [depends on plugin] recipient wallet address - /// 4..N [??..??] Plugin-specific accounts. + /// 4..N `[??..??]` Plugin-specific accounts. pub fn transfer_from_remote( program_id: &Pubkey, accounts: &[AccountInfo], @@ -575,7 +575,7 @@ where /// serializes them, and sets them as return data. /// /// Accounts: - /// 0. [] The token PDA, which is the PDA with the seeds `HANDLE_ACCOUNT_METAS_PDA_SEEDS`. + /// 0. `[]` The token PDA, which is the PDA with the seeds `HANDLE_ACCOUNT_METAS_PDA_SEEDS`. pub fn transfer_from_remote_account_metas( program_id: &Pubkey, accounts: &[AccountInfo], @@ -621,9 +621,9 @@ where /// Enrolls a remote router. /// /// Accounts: - /// 0. [executable] The system program. - /// 1. [writeable] The token PDA account. - /// 2. [signer] The owner. + /// 0. `[executable]` The system program. + /// 1. `[writeable]` The token PDA account. + /// 2. `[signer]` The owner. pub fn enroll_remote_router( program_id: &Pubkey, accounts: &[AccountInfo], @@ -670,9 +670,9 @@ where /// Enrolls remote routers. /// /// Accounts: - /// 0. [executable] The system program. - /// 1. [writeable] The token PDA account. - /// 2. [signer] The owner. + /// 0. `[executable]` The system program. + /// 1. `[writeable]` The token PDA account. + /// 2. `[signer]` The owner. pub fn enroll_remote_routers( program_id: &Pubkey, accounts: &[AccountInfo], @@ -719,8 +719,8 @@ where /// Transfers ownership. /// /// Accounts: - /// 0. [writeable] The token PDA account. - /// 1. [signer] The current owner. + /// 0. `[writeable]` The token PDA account. + /// 1. `[signer]` The current owner. pub fn transfer_ownership( program_id: &Pubkey, accounts: &[AccountInfo], @@ -747,7 +747,7 @@ where /// Gets the interchain security module. /// /// Accounts: - /// 0. [] The token PDA account. + /// 0. `[]` The token PDA account. pub fn interchain_security_module( program_id: &Pubkey, accounts: &[AccountInfo], @@ -792,8 +792,8 @@ where /// Lets the owner set the interchain security module. /// /// Accounts: - /// 0. [writeable] The token PDA account. - /// 1. [signer] The access control owner. + /// 0. `[writeable]` The token PDA account. + /// 1. `[signer]` The access control owner. pub fn set_interchain_security_module( program_id: &Pubkey, accounts: &[AccountInfo], @@ -820,9 +820,9 @@ where /// Lets the owner set destination gas configs. /// /// Accounts: - /// 0. [executable] The system program. - /// 1. [writeable] The token PDA account. - /// 2. [signer] The access control owner. + /// 0. `[executable]` The system program. + /// 1. `[writeable]` The token PDA account. + /// 2. `[signer]` The access control owner. pub fn set_destination_gas_configs( program_id: &Pubkey, accounts: &[AccountInfo], @@ -860,8 +860,8 @@ where /// Lets the owner set the interchain gas paymaster. /// /// Accounts: - /// 0. [writeable] The token PDA account. - /// 1. [signer] The access control owner. + /// 0. `[writeable]` The token PDA account. + /// 1. `[signer]` The access control owner. pub fn set_interchain_gas_paymaster( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/rust/sealevel/libraries/serializable-account-meta/src/lib.rs b/rust/sealevel/libraries/serializable-account-meta/src/lib.rs index 1153f9975..5d2df7644 100644 --- a/rust/sealevel/libraries/serializable-account-meta/src/lib.rs +++ b/rust/sealevel/libraries/serializable-account-meta/src/lib.rs @@ -29,7 +29,7 @@ impl From for AccountMeta { } } -/// A ridiculous workaround for https://github.com/solana-labs/solana/issues/31391, +/// A ridiculous workaround for ``, /// which is a bug where if a simulated transaction's return data ends with zero byte(s), /// they end up being incorrectly truncated. /// As a workaround, we can (de)serialize data with a trailing non-zero byte. diff --git a/rust/sealevel/libraries/test-utils/src/igp.rs b/rust/sealevel/libraries/test-utils/src/igp.rs index 688928e9d..70e510006 100644 --- a/rust/sealevel/libraries/test-utils/src/igp.rs +++ b/rust/sealevel/libraries/test-utils/src/igp.rs @@ -74,9 +74,9 @@ pub async fn initialize_igp_program( Pubkey::find_program_address(igp_program_data_pda_seeds!(), &program_id); // Accounts: - // 0. [executable] The system program. - // 1. [signer] The payer account. - // 2. [writeable] The program data account. + // 0. `[executable]` The system program. + // 1. `[signer]` The payer account. + // 2. `[writeable]` The program data account. let init_instruction = Instruction::new_with_borsh( program_id, &IgpInstruction::Init, @@ -104,9 +104,9 @@ pub async fn initialize_igp( let (igp_key, igp_bump_seed) = Pubkey::find_program_address(igp_pda_seeds!(salt), &program_id); // Accounts: - // 0. [executable] The system program. - // 1. [signer] The payer account. - // 2. [writeable] The IGP account to initialize. + // 0. `[executable]` The system program. + // 1. `[signer]` The payer account. + // 2. `[writeable]` The IGP account to initialize. let init_instruction = Instruction::new_with_borsh( program_id, &IgpInstruction::InitIgp(InitIgp { @@ -139,9 +139,9 @@ pub async fn initialize_overhead_igp( Pubkey::find_program_address(overhead_igp_pda_seeds!(salt), &program_id); // Accounts: - // 0. [executable] The system program. - // 1. [signer] The payer account. - // 2. [writeable] The Overhead IGP account to initialize. + // 0. `[executable]` The system program. + // 1. `[signer]` The payer account. + // 2. `[writeable]` The Overhead IGP account to initialize. let init_instruction = Instruction::new_with_borsh( program_id, &IgpInstruction::InitOverheadIgp(InitOverheadIgp { salt, owner, inner }), diff --git a/rust/sealevel/programs/helloworld/src/instruction.rs b/rust/sealevel/programs/helloworld/src/instruction.rs index 5c0a42eda..4b3bbb659 100644 --- a/rust/sealevel/programs/helloworld/src/instruction.rs +++ b/rust/sealevel/programs/helloworld/src/instruction.rs @@ -71,9 +71,9 @@ pub fn init_instruction( }; // Accounts: - // 0. [executable] System program. - // 1. [signer] Payer. - // 2. [writeable] Storage PDA. + // 0. `[executable]` System program. + // 1. `[signer]` Payer. + // 2. `[writeable]` Storage PDA. let accounts = vec![ AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new_readonly(payer, true), @@ -100,9 +100,9 @@ pub fn enroll_remote_routers_instruction( .ok_or(ProgramError::InvalidSeeds)?; // Accounts: - // 0. [executable] System program. - // 1. [signer] Payer. - // 2. [writeable] Storage PDA. + // 0. `[executable]` System program. + // 1. `[signer]` Payer. + // 2. `[writeable]` Storage PDA. let accounts = vec![ AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new(program_storage_account, false), @@ -129,8 +129,8 @@ pub fn set_interchain_security_module_instruction( .ok_or(ProgramError::InvalidSeeds)?; // Accounts: - // 0. [writeable] Storage PDA account. - // 1. [signer] Owner. + // 0. `[writeable]` Storage PDA account. + // 1. `[signer]` Owner. let accounts = vec![ AccountMeta::new(program_storage_account, false), AccountMeta::new(owner, true), diff --git a/rust/sealevel/programs/helloworld/src/processor.rs b/rust/sealevel/programs/helloworld/src/processor.rs index 4e1fdcd92..48ca4119f 100644 --- a/rust/sealevel/programs/helloworld/src/processor.rs +++ b/rust/sealevel/programs/helloworld/src/processor.rs @@ -103,9 +103,9 @@ pub fn process_instruction( /// Creates the storage PDA. /// /// Accounts: -/// 0. [executable] System program. -/// 1. [signer] Payer. -/// 2. [writeable] Storage PDA. +/// 0. `[executable]` System program. +/// 1. `[signer]` Payer. +/// 2. `[writeable]` Storage PDA. fn init(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -155,22 +155,22 @@ fn init(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> ProgramRes /// Dispatches a message using the dispatch authority. /// /// Accounts: -/// 0. [writeable] Program storage. -/// 1. [executable] The Mailbox program. -/// 2. [writeable] Outbox PDA. -/// 3. [] This program's dispatch authority. -/// 4. [executable] System program. -/// 5. [executable] SPL Noop program. -/// 6. [signer] Payer. -/// 7. [signer] Unique message account. -/// 8. [writeable] Dispatched message PDA. An empty message PDA relating to the seeds +/// 0. `[writeable]` Program storage. +/// 1. `[executable]` The Mailbox program. +/// 2. `[writeable]` Outbox PDA. +/// 3. `[]` This program's dispatch authority. +/// 4. `[executable]` System program. +/// 5. `[executable]` SPL Noop program. +/// 6. `[signer]` Payer. +/// 7. `[signer]` Unique message account. +/// 8. `[writeable]` Dispatched message PDA. An empty message PDA relating to the seeds /// `mailbox_dispatched_message_pda_seeds` where the message contents will be stored. /// ---- if an IGP is configured ---- -/// 9. [executable] The IGP program. -/// 10. [writeable] The IGP program data. -/// 11. [writeable] The gas payment PDA. -/// 12. [] OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. -/// 13. [writeable] The IGP account. +/// 9. `[executable]` The IGP program. +/// 10. `[writeable]` The IGP program data. +/// 11. `[writeable]` The gas payment PDA. +/// 12. `[]` OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. +/// 13. `[writeable]` The IGP account. /// ---- end if an IGP is configured ---- fn send_hello_world( program_id: &Pubkey, @@ -261,13 +261,13 @@ fn send_hello_world( // Accounts expected by the IGP's `PayForGas` instruction: // - // 0. [executable] The system program. - // 1. [signer] The payer. - // 2. [writeable] The IGP program data. - // 3. [signer] Unique gas payment account. - // 4. [writeable] Gas payment PDA. - // 5. [writeable] The IGP account. - // 6. [] Overhead IGP account (optional). + // 0. `[executable]` The system program. + // 1. `[signer]` The payer. + // 2. `[writeable]` The IGP program data. + // 3. `[signer]` Unique gas payment account. + // 4. `[writeable]` Gas payment PDA. + // 5. `[writeable]` The IGP account. + // 6. `[]` Overhead IGP account (optional). let mut igp_payment_account_metas = vec![ AccountMeta::new_readonly(solana_program::system_program::id(), false), @@ -355,8 +355,8 @@ fn send_hello_world( /// Handles a message. /// /// Accounts: -/// 0. [writeable] Process authority specific to this program. -/// 1. [] Storage PDA account. +/// 0. `[writeable]` Process authority specific to this program. +/// 1. `[]` Storage PDA account. pub fn handle( program_id: &Pubkey, accounts: &[AccountInfo], @@ -412,8 +412,8 @@ pub fn handle( } /// Accounts: -/// 0. [writeable] Storage PDA account. -/// 1. [signer] Owner. +/// 0. `[writeable]` Storage PDA account. +/// 1. `[signer]` Owner. fn set_interchain_security_module( program_id: &Pubkey, accounts: &[AccountInfo], @@ -445,7 +445,7 @@ fn set_interchain_security_module( } /// Accounts: -/// 0. [] Storage PDA account. +/// 0. `[]` Storage PDA account. fn get_interchain_security_module(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -491,9 +491,9 @@ fn set_account_meta_return_data(program_id: &Pubkey) -> ProgramResult { /// Enrolls remote routers. /// /// Accounts: -/// 0. [executable] System program. -/// 1. [writeable] Storage PDA account. -/// 2. [signer] Owner. +/// 0. `[executable]` System program. +/// 1. `[writeable]` Storage PDA account. +/// 2. `[signer]` Owner. fn enroll_remote_routers( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/rust/sealevel/programs/hyperlane-sealevel-igp-test/src/functional.rs b/rust/sealevel/programs/hyperlane-sealevel-igp-test/src/functional.rs index 0a3e6c962..a7820019a 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-igp-test/src/functional.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-igp-test/src/functional.rs @@ -66,9 +66,9 @@ async fn initialize( Pubkey::find_program_address(igp_program_data_pda_seeds!(), &program_id); // Accounts: - // 0. [executable] The system program. - // 1. [signer] The payer account. - // 2. [writeable] The program data account. + // 0. `[executable]` The system program. + // 1. `[signer]` The payer account. + // 2. `[writeable]` The program data account. let init_instruction = Instruction::new_with_borsh( program_id, &IgpInstruction::Init, @@ -96,9 +96,9 @@ async fn initialize_igp( let (igp_key, igp_bump_seed) = Pubkey::find_program_address(igp_pda_seeds!(salt), &program_id); // Accounts: - // 0. [executable] The system program. - // 1. [signer] The payer account. - // 2. [writeable] The IGP account to initialize. + // 0. `[executable]` The system program. + // 1. `[signer]` The payer account. + // 2. `[writeable]` The IGP account to initialize. let init_instruction = Instruction::new_with_borsh( program_id, &IgpInstruction::InitIgp(InitIgp { @@ -131,9 +131,9 @@ async fn initialize_overhead_igp( Pubkey::find_program_address(overhead_igp_pda_seeds!(salt), &program_id); // Accounts: - // 0. [executable] The system program. - // 1. [signer] The payer account. - // 2. [writeable] The Overhead IGP account to initialize. + // 0. `[executable]` The system program. + // 1. `[signer]` The payer account. + // 2. `[writeable]` The Overhead IGP account to initialize. let init_instruction = Instruction::new_with_borsh( program_id, &IgpInstruction::InitOverheadIgp(InitOverheadIgp { salt, owner, inner }), @@ -438,9 +438,9 @@ async fn test_set_gas_oracle_configs() { ]; // Accounts: - // 0. [executable] The system program. - // 1. [writeable] The IGP. - // 2. [signer] The IGP owner. + // 0. `[executable]` The system program. + // 1. `[writeable]` The IGP. + // 2. `[signer]` The IGP owner. let instruction = Instruction::new_with_borsh( program_id, &IgpInstruction::SetGasOracleConfigs(configs.clone()), @@ -536,9 +536,9 @@ async fn test_set_gas_oracle_configs_errors_if_owner_not_signer() { }]; // Accounts: - // 0. [executable] The system program. - // 1. [writeable] The IGP. - // 2. [signer] The IGP owner. + // 0. `[executable]` The system program. + // 1. `[writeable]` The IGP. + // 2. `[signer]` The IGP owner. // Try with the correct owner passed in, but it's not a signer let instruction = Instruction::new_with_borsh( @@ -600,9 +600,9 @@ async fn test_set_destination_gas_overheads() { ]; // Accounts: - // 0. [executable] The system program. - // 1. [writeable] The Overhead IGP. - // 2. [signer] The Overhead IGP owner. + // 0. `[executable]` The system program. + // 1. `[writeable]` The Overhead IGP. + // 2. `[signer]` The Overhead IGP owner. let instruction = Instruction::new_with_borsh( program_id, &IgpInstruction::SetDestinationGasOverheads(configs.clone()), @@ -698,9 +698,9 @@ async fn test_set_destination_gas_overheads_errors_if_owner_not_signer() { }]; // Accounts: - // 0. [executable] The system program. - // 1. [writeable] The Overhead IGP. - // 2. [signer] The Overhead IGP owner. + // 0. `[executable]` The system program. + // 1. `[writeable]` The Overhead IGP. + // 2. `[signer]` The Overhead IGP owner. // Try with the correct owner passed in, but it's not a signer let instruction = Instruction::new_with_borsh( @@ -986,13 +986,13 @@ async fn pay_for_gas( &program_id, ); - // 0. [executable] The system program. - // 1. [signer] The payer. - // 2. [writeable] The IGP program data. - // 3. [signer] Unique gas payment account. - // 4. [writeable] Gas payment PDA. - // 5. [writeable] The IGP account. - // 6. [] Overhead IGP account (optional). + // 0. `[executable]` The system program. + // 1. `[signer]` The payer. + // 2. `[writeable]` The IGP program data. + // 3. `[signer]` Unique gas payment account. + // 4. `[writeable]` Gas payment PDA. + // 5. `[writeable]` The IGP account. + // 6. `[]` Overhead IGP account (optional). let mut accounts = vec![ AccountMeta::new_readonly(system_program::id(), false), AccountMeta::new(payer.pubkey(), true), @@ -1301,9 +1301,9 @@ async fn test_claim() { let beneficiary_balance_before = banks_client.get_balance(payer.pubkey()).await.unwrap(); // Accounts: - // 0. [executable] The system program. - // 1. [writeable] The IGP. - // 2. [writeable] The IGP beneficiary. + // 0. `[executable]` The system program. + // 1. `[writeable]` The IGP. + // 2. `[writeable]` The IGP beneficiary. process_instruction( &mut banks_client, Instruction::new_with_borsh( @@ -1357,8 +1357,8 @@ async fn test_set_igp_beneficiary() { let new_beneficiary = Pubkey::new_unique(); // Accounts: - // 0. [] The IGP. - // 1. [signer] The owner of the IGP account. + // 0. `[]` The IGP. + // 1. `[signer]` The owner of the IGP account. let instruction = Instruction::new_with_borsh( program_id, &IgpInstruction::SetIgpBeneficiary(new_beneficiary), @@ -1403,8 +1403,8 @@ async fn test_set_igp_beneficiary_errors_if_owner_not_signer() { .unwrap(); // Accounts: - // 0. [] The IGP. - // 1. [signer] The owner of the IGP account. + // 0. `[]` The IGP. + // 1. `[signer]` The owner of the IGP account. // Try with the right owner passed in, but it's not a signer let instruction = Instruction::new_with_borsh( @@ -1448,8 +1448,8 @@ async fn run_transfer_ownership_tests ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -147,9 +147,9 @@ fn init(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { /// Initialize a new IGP account. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [signer] The payer account. -/// 2. [writeable] The IGP account to initialize. +/// 0. `[executable]` The system program. +/// 1. `[signer]` The payer account. +/// 2. `[writeable]` The IGP account to initialize. fn init_igp(program_id: &Pubkey, accounts: &[AccountInfo], data: InitIgp) -> ProgramResult { let igp_key = init_igp_variant( program_id, @@ -175,9 +175,9 @@ fn init_igp(program_id: &Pubkey, accounts: &[AccountInfo], data: InitIgp) -> Pro /// Initialize a new overhead IGP account. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [signer] The payer account. -/// 2. [writeable] The Overhead IGP account to initialize. +/// 0. `[executable]` The system program. +/// 1. `[signer]` The payer account. +/// 2. `[writeable]` The Overhead IGP account to initialize. fn init_overhead_igp( program_id: &Pubkey, accounts: &[AccountInfo], @@ -258,13 +258,13 @@ fn init_igp_variant( /// Pay for gas. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [signer] The payer. -/// 2. [writeable] The IGP program data. -/// 3. [signer] Unique gas payment account. -/// 4. [writeable] Gas payment PDA. -/// 5. [writeable] The IGP account. -/// 6. [] Overhead IGP account (optional). +/// 0. `[executable]` The system program. +/// 1. `[signer]` The payer. +/// 2. `[writeable]` The IGP program data. +/// 3. `[signer]` Unique gas payment account. +/// 4. `[writeable]` Gas payment PDA. +/// 5. `[writeable]` The IGP account. +/// 6. `[]` Overhead IGP account (optional). fn pay_for_gas(program_id: &Pubkey, accounts: &[AccountInfo], payment: PayForGas) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -407,9 +407,9 @@ fn pay_for_gas(program_id: &Pubkey, accounts: &[AccountInfo], payment: PayForGas /// Quotes the required payment for a given gas amount and destination domain. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [] The IGP account. -/// 2. [] The overhead IGP account (optional). +/// 0. `[executable]` The system program. +/// 1. `[]` The IGP account. +/// 2. `[]` The overhead IGP account (optional). fn quote_gas_payment( program_id: &Pubkey, accounts: &[AccountInfo], @@ -463,8 +463,8 @@ fn quote_gas_payment( /// Sets the beneficiary of an IGP. /// /// Accounts: -/// 0. [] The IGP. -/// 1. [signer] The owner of the IGP account. +/// 0. `[]` The IGP. +/// 1. `[signer]` The owner of the IGP account. fn set_igp_beneficiary( program_id: &Pubkey, accounts: &[AccountInfo], @@ -485,8 +485,8 @@ fn set_igp_beneficiary( /// Transfers ownership of an IGP variant. /// /// Accounts: -/// 0. [writeable] The IGP or OverheadIGP. -/// 1. [signer] The owner of the IGP account. +/// 0. `[writeable]` The IGP or OverheadIGP. +/// 1. `[signer]` The owner of the IGP account. fn transfer_igp_variant_ownership( program_id: &Pubkey, accounts: &[AccountInfo], @@ -506,8 +506,8 @@ fn transfer_igp_variant_ownership ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -583,9 +583,9 @@ fn claim(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { /// Sets destination gas overheads for an OverheadIGP. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The OverheadIGP. -/// 2. [signer] The OverheadIGP owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The OverheadIGP. +/// 2. `[signer]` The OverheadIGP owner. fn set_destination_gas_overheads( program_id: &Pubkey, accounts: &[AccountInfo], @@ -629,9 +629,9 @@ fn set_destination_gas_overheads( /// Sets gas oracle configs for an IGP. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The IGP. -/// 2. [signer] The IGP owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The IGP. +/// 2. `[signer]` The IGP owner. fn set_gas_oracle_configs( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/instruction.rs b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/instruction.rs index df0d434fc..3f3d0af86 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/instruction.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/instruction.rs @@ -23,11 +23,11 @@ pub fn init_instruction( let mut instruction = lib_init_instruction(program_id, payer, init)?; // Add additional account metas: - // 0. [executable] The SPL token program for the mint, i.e. either SPL token program or the 2022 version. - // 1. [] The mint. - // 2. [executable] The Rent sysvar program. - // 3. [writable] The escrow PDA account. - // 4. [writable] The ATA payer PDA account. + // 0. `[executable]` The SPL token program for the mint, i.e. either SPL token program or the 2022 version. + // 1. `[]` The mint. + // 2. `[executable]` The Rent sysvar program. + // 3. `[writable]` The escrow PDA account. + // 4. `[writable]` The ATA payer PDA account. let (escrow_key, _escrow_bump) = Pubkey::find_program_address(hyperlane_token_escrow_pda_seeds!(), &program_id); diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/plugin.rs b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/plugin.rs index 81b867b90..0fc224667 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/plugin.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/plugin.rs @@ -100,11 +100,11 @@ impl HyperlaneSealevelTokenPlugin for CollateralPlugin { /// Initializes the plugin. /// /// Accounts: - /// 0. [executable] The SPL token program for the mint, i.e. either SPL token program or the 2022 version. - /// 1. [] The mint. - /// 2. [executable] The Rent sysvar program. - /// 3. [writable] The escrow PDA account. - /// 4. [writable] The ATA payer PDA account. + /// 0. `[executable]` The SPL token program for the mint, i.e. either SPL token program or the 2022 version. + /// 1. `[]` The mint. + /// 2. `[executable]` The Rent sysvar program. + /// 3. `[writable]` The escrow PDA account. + /// 4. `[writable]` The ATA payer PDA account. fn initialize<'a, 'b>( program_id: &Pubkey, system_program: &'a AccountInfo<'b>, @@ -232,10 +232,10 @@ impl HyperlaneSealevelTokenPlugin for CollateralPlugin { /// Burns the tokens from the sender's associated token account. /// /// Accounts: - /// 0. [executable] The SPL token program for the mint. - /// 1. [writeable] The mint. - /// 2. [writeable] The token sender's associated token account, from which tokens will be sent. - /// 3. [writeable] The escrow PDA account. + /// 0. `[executable]` The SPL token program for the mint. + /// 1. `[writeable]` The mint. + /// 2. `[writeable]` The token sender's associated token account, from which tokens will be sent. + /// 3. `[writeable]` The escrow PDA account. fn transfer_in<'a, 'b>( _program_id: &Pubkey, token: &HyperlaneToken, @@ -308,12 +308,12 @@ impl HyperlaneSealevelTokenPlugin for CollateralPlugin { /// result of a transfer to this chain from a remote chain. /// /// Accounts: - /// 0. [executable] SPL token for the mint. - /// 1. [executable] SPL associated token account. - /// 2. [writeable] Mint account. - /// 3. [writeable] Recipient associated token account. - /// 4. [writeable] ATA payer PDA account. - /// 5. [writeable] Escrow account. + /// 0. `[executable]` SPL token for the mint. + /// 1. `[executable]` SPL associated token account. + /// 2. `[writeable]` Mint account. + /// 3. `[writeable]` Recipient associated token account. + /// 4. `[writeable]` ATA payer PDA account. + /// 5. `[writeable]` Escrow account. fn transfer_out<'a, 'b>( program_id: &Pubkey, token: &HyperlaneToken, diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/processor.rs b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/processor.rs index 09546028b..e9dff90ee 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/processor.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/src/processor.rs @@ -89,15 +89,15 @@ pub fn process_instruction( /// Initializes the program. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writable] The token PDA account. -/// 2. [writable] The dispatch authority PDA account. -/// 3. [signer] The payer and access control owner of the program. -/// 4. [executable] The SPL token program for the mint, i.e. either SPL token program or the 2022 version. -/// 5. [] The mint. -/// 6. [executable] The Rent sysvar program. -/// 7. [writable] The escrow PDA account. -/// 8. [writable] The ATA payer PDA account. +/// 0. `[executable]` The system program. +/// 1. `[writable]` The token PDA account. +/// 2. `[writable]` The dispatch authority PDA account. +/// 3. `[signer]` The payer and access control owner of the program. +/// 4. `[executable]` The SPL token program for the mint, i.e. either SPL token program or the 2022 version. +/// 5. `[]` The mint. +/// 6. `[executable]` The Rent sysvar program. +/// 7. `[writable]` The escrow PDA account. +/// 8. `[writable]` The ATA payer PDA account. fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> ProgramResult { HyperlaneSealevelToken::::initialize(program_id, accounts, init) } @@ -107,26 +107,26 @@ fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> Prog /// then dispatches a message to the remote recipient. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [executable] The spl_noop program. -/// 2. [] The token PDA account. -/// 3. [executable] The mailbox program. -/// 4. [writeable] The mailbox outbox account. -/// 5. [] Message dispatch authority. -/// 6. [signer] The token sender and mailbox payer. -/// 7. [signer] Unique message / gas payment account. -/// 8. [writeable] Message storage PDA. +/// 0. `[executable]` The system program. +/// 1. `[executable]` The spl_noop program. +/// 2. `[]` The token PDA account. +/// 3. `[executable]` The mailbox program. +/// 4. `[writeable]` The mailbox outbox account. +/// 5. `[]` Message dispatch authority. +/// 6. `[signer]` The token sender and mailbox payer. +/// 7. `[signer]` Unique message / gas payment account. +/// 8. `[writeable]` Message storage PDA. /// ---- If using an IGP ---- -/// 9. [executable] The IGP program. -/// 10. [writeable] The IGP program data. -/// 11. [writeable] Gas payment PDA. -/// 12. [] OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. -/// 13. [writeable] The IGP account. +/// 9. `[executable]` The IGP program. +/// 10. `[writeable]` The IGP program data. +/// 11. `[writeable]` Gas payment PDA. +/// 12. `[]` OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. +/// 13. `[writeable]` The IGP account. /// ---- End if ---- -/// 14. [executable] The SPL token program for the mint. -/// 15. [writeable] The mint. -/// 16. [writeable] The token sender's associated token account, from which tokens will be sent. -/// 17. [writeable] The escrow PDA account. +/// 14. `[executable]` The SPL token program for the mint. +/// 15. `[writeable]` The mint. +/// 16. `[writeable]` The token sender's associated token account, from which tokens will be sent. +/// 17. `[writeable]` The escrow PDA account. fn transfer_remote( program_id: &Pubkey, accounts: &[AccountInfo], @@ -136,16 +136,16 @@ fn transfer_remote( } // Accounts: -// 0. [signer] Mailbox process authority specific to this program. -// 1. [executable] system_program -// 2. [] hyperlane_token storage -// 3. [] recipient wallet address -// 4. [executable] SPL token 2022 program. -// 5. [executable] SPL associated token account. -// 6. [writeable] Mint account. -// 7. [writeable] Recipient associated token account. -// 8. [writeable] ATA payer PDA account. -// 9. [writeable] Escrow account. +// 0. `[signer]` Mailbox process authority specific to this program. +// 1. `[executable]` system_program +// 2. `[]` hyperlane_token storage +// 3. `[]` recipient wallet address +// 4. `[executable]` SPL token 2022 program. +// 5. `[executable]` SPL associated token account. +// 6. `[writeable]` Mint account. +// 7. `[writeable]` Recipient associated token account. +// 8. `[writeable]` ATA payer PDA account. +// 9. `[writeable]` Escrow account. fn transfer_from_remote( program_id: &Pubkey, accounts: &[AccountInfo], @@ -171,9 +171,9 @@ fn transfer_from_remote_account_metas( /// Enrolls a remote router. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The token PDA account. -/// 2. [signer] The owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The token PDA account. +/// 2. `[signer]` The owner. fn enroll_remote_router( program_id: &Pubkey, accounts: &[AccountInfo], @@ -185,9 +185,9 @@ fn enroll_remote_router( /// Enrolls remote routers. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The token PDA account. -/// 2. [signer] The owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The token PDA account. +/// 2. `[signer]` The owner. fn enroll_remote_routers( program_id: &Pubkey, accounts: &[AccountInfo], @@ -199,9 +199,9 @@ fn enroll_remote_routers( /// Sets the destination gas configs. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The token PDA account. -/// 2. [signer] The owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The token PDA account. +/// 2. `[signer]` The owner. fn set_destination_gas_configs( program_id: &Pubkey, accounts: &[AccountInfo], @@ -215,8 +215,8 @@ fn set_destination_gas_configs( /// Transfers ownership. /// /// Accounts: -/// 0. [writeable] The token PDA account. -/// 1. [signer] The current owner. +/// 0. `[writeable]` The token PDA account. +/// 1. `[signer]` The current owner. fn transfer_ownership( program_id: &Pubkey, accounts: &[AccountInfo], @@ -228,7 +228,7 @@ fn transfer_ownership( /// Gets the interchain security module, returning it as a serialized Option. /// /// Accounts: -/// 0. [] The token PDA account. +/// 0. `[]` The token PDA account. fn interchain_security_module(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { HyperlaneSealevelToken::::interchain_security_module(program_id, accounts) } @@ -244,8 +244,8 @@ fn interchain_security_module_account_metas(program_id: &Pubkey) -> ProgramResul /// Lets the owner set the interchain security module. /// /// Accounts: -/// 0. [writeable] The token PDA account. -/// 1. [signer] The access control owner. +/// 0. `[writeable]` The token PDA account. +/// 1. `[signer]` The access control owner. fn set_interchain_security_module( program_id: &Pubkey, accounts: &[AccountInfo], @@ -259,8 +259,8 @@ fn set_interchain_security_module( /// Lets the owner set the interchain gas paymaster. /// /// Accounts: -/// 0. [writeable] The token PDA account. -/// 1. [signer] The access control owner. +/// 0. `[writeable]` The token PDA account. +/// 1. `[signer]` The access control owner. fn set_interchain_gas_paymaster( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/tests/functional.rs b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/tests/functional.rs index 4a1b2b57f..0f5e33f4d 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-collateral/tests/functional.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-collateral/tests/functional.rs @@ -299,15 +299,15 @@ async fn initialize_hyperlane_token( .encode() .unwrap(), vec![ - // 0. [executable] The system program. - // 1. [writable] The token PDA account. - // 2. [writable] The dispatch authority PDA account. - // 3. [signer] The payer. - // 4. [executable] The SPL token program for the mint, i.e. either SPL token program or the 2022 version. - // 5. [] The mint. - // 6. [executable] The Rent sysvar program. - // 7. [writable] The escrow PDA account. - // 8. [writable] The ATA payer PDA account. + // 0. `[executable]` The system program. + // 1. `[writable]` The token PDA account. + // 2. `[writable]` The dispatch authority PDA account. + // 3. `[signer]` The payer. + // 4. `[executable]` The SPL token program for the mint, i.e. either SPL token program or the 2022 version. + // 5. `[]` The mint. + // 6. `[executable]` The Rent sysvar program. + // 7. `[writable]` The escrow PDA account. + // 8. `[writable]` The ATA payer PDA account. AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new(token_account_key, false), AccountMeta::new(dispatch_authority_key, false), @@ -642,26 +642,26 @@ async fn test_transfer_remote(spl_token_program_id: Pubkey) { }) .encode() .unwrap(), - // 0. [executable] The system program. - // 1. [executable] The spl_noop program. - // 2. [] The token PDA account. - // 3. [executable] The mailbox program. - // 4. [writeable] The mailbox outbox account. - // 5. [] Message dispatch authority. - // 6. [signer] The token sender and mailbox payer. - // 7. [signer] Unique message account. - // 8. [writeable] Message storage PDA. + // 0. `[executable]` The system program. + // 1. `[executable]` The spl_noop program. + // 2. `[]` The token PDA account. + // 3. `[executable]` The mailbox program. + // 4. `[writeable]` The mailbox outbox account. + // 5. `[]` Message dispatch authority. + // 6. `[signer]` The token sender and mailbox payer. + // 7. `[signer]` Unique message account. + // 8. `[writeable]` Message storage PDA. // ---- If using an IGP ---- - // 9. [executable] The IGP program. - // 10. [writeable] The IGP program data. - // 11. [writeable] Gas payment PDA. - // 12. [] OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. - // 13. [writeable] The IGP account. + // 9. `[executable]` The IGP program. + // 10. `[writeable]` The IGP program data. + // 11. `[writeable]` Gas payment PDA. + // 12. `[]` OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. + // 13. `[writeable]` The IGP account. // ---- End if ---- - // 14. [executable] The spl_token_2022 program. - // 15. [writeable] The mint. - // 16. [writeable] The token sender's associated token account, from which tokens will be sent. - // 17. [writeable] The escrow PDA account. + // 14. `[executable]` The spl_token_2022 program. + // 15. `[writeable]` The mint. + // 16. `[writeable]` The token sender's associated token account, from which tokens will be sent. + // 17. `[writeable]` The escrow PDA account. vec![ AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new_readonly(spl_noop::id(), false), @@ -1084,16 +1084,16 @@ async fn test_transfer_from_remote_errors_if_process_authority_not_signer() { .unwrap(), vec![ // Recipient.handle accounts - // 0. [signer] Mailbox process authority - // 1. [executable] system_program - // 2. [] hyperlane_token storage - // 3. [] recipient wallet address - // 4. [executable] SPL token 2022 program. - // 5. [executable] SPL associated token account. - // 6. [writeable] Mint account. - // 7. [writeable] Recipient associated token account. - // 8. [writeable] ATA payer PDA account. - // 9. [writeable] Escrow account. + // 0. `[signer]` Mailbox process authority + // 1. `[executable]` system_program + // 2. `[]` hyperlane_token storage + // 3. `[]` recipient wallet address + // 4. `[executable]` SPL token 2022 program. + // 5. `[executable]` SPL associated token account. + // 6. `[writeable]` Mint account. + // 7. `[writeable]` Recipient associated token account. + // 8. `[writeable]` ATA payer PDA account. + // 9. `[writeable]` Escrow account. AccountMeta::new_readonly( hyperlane_token_accounts.mailbox_process_authority, false, diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-native/src/instruction.rs b/rust/sealevel/programs/hyperlane-sealevel-token-native/src/instruction.rs index 356d176b0..2cc12149f 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-native/src/instruction.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-native/src/instruction.rs @@ -19,7 +19,7 @@ pub fn init_instruction( let mut instruction = lib_init_instruction(program_id, payer, init)?; // Add additional account metas: - // 0. [writable] The native collateral PDA account. + // 0. `[writable]` The native collateral PDA account. let (native_collateral_key, _native_collatera_bump) = Pubkey::find_program_address(hyperlane_token_native_collateral_pda_seeds!(), &program_id); diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-native/src/plugin.rs b/rust/sealevel/programs/hyperlane-sealevel-token-native/src/plugin.rs index 855fa6dcb..8c553058c 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-native/src/plugin.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-native/src/plugin.rs @@ -76,7 +76,7 @@ impl HyperlaneSealevelTokenPlugin for NativePlugin { /// Initializes the plugin. /// /// Accounts: - /// 0. [writable] The native collateral PDA account. + /// 0. `[writable]` The native collateral PDA account. fn initialize<'a, 'b>( program_id: &Pubkey, system_program: &'a AccountInfo<'b>, @@ -115,8 +115,8 @@ impl HyperlaneSealevelTokenPlugin for NativePlugin { /// Burns the tokens from the sender's associated token account. /// /// Accounts: - /// 0. [executable] The system program. - /// 1. [writeable] The native token collateral PDA account. + /// 0. `[executable]` The system program. + /// 1. `[writeable]` The native token collateral PDA account. fn transfer_in<'a, 'b>( program_id: &Pubkey, token: &HyperlaneToken, @@ -145,8 +145,8 @@ impl HyperlaneSealevelTokenPlugin for NativePlugin { /// result of a transfer to this chain from a remote chain. /// /// Accounts: - /// 0. [executable] The system program. - /// 1. [writeable] The native token collateral PDA account. + /// 0. `[executable]` The system program. + /// 1. `[writeable]` The native token collateral PDA account. fn transfer_out<'a, 'b>( program_id: &Pubkey, token: &HyperlaneToken, diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-native/src/processor.rs b/rust/sealevel/programs/hyperlane-sealevel-token-native/src/processor.rs index ab3121b53..1cbfd072d 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-native/src/processor.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-native/src/processor.rs @@ -89,11 +89,11 @@ pub fn process_instruction( /// Initializes the program. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writable] The token PDA account. -/// 2. [writable] The dispatch authority PDA account. -/// 3. [signer] The payer and mailbox payer. -/// 4. [writable] The native collateral PDA account. +/// 0. `[executable]` The system program. +/// 1. `[writable]` The token PDA account. +/// 2. `[writable]` The dispatch authority PDA account. +/// 3. `[signer]` The payer and mailbox payer. +/// 4. `[writable]` The native collateral PDA account. fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> ProgramResult { HyperlaneSealevelToken::::initialize(program_id, accounts, init) } @@ -103,24 +103,24 @@ fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> Prog /// then dispatches a message to the remote recipient. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [executable] The spl_noop program. -/// 2. [] The token PDA account. -/// 3. [executable] The mailbox program. -/// 4. [writeable] The mailbox outbox account. -/// 5. [] Message dispatch authority. -/// 6. [signer] The token sender and mailbox payer. -/// 7. [signer] Unique message / gas payment account. -/// 8. [writeable] Message storage PDA. +/// 0. `[executable]` The system program. +/// 1. `[executable]` The spl_noop program. +/// 2. `[]` The token PDA account. +/// 3. `[executable]` The mailbox program. +/// 4. `[writeable]` The mailbox outbox account. +/// 5. `[]` Message dispatch authority. +/// 6. `[signer]` The token sender and mailbox payer. +/// 7. `[signer]` Unique message / gas payment account. +/// 8. `[writeable]` Message storage PDA. /// ---- If using an IGP ---- -/// 9. [executable] The IGP program. -/// 10. [writeable] The IGP program data. -/// 11. [writeable] Gas payment PDA. -/// 12. [] OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. -/// 13. [writeable] The IGP account. +/// 9. `[executable]` The IGP program. +/// 10. `[writeable]` The IGP program data. +/// 11. `[writeable]` Gas payment PDA. +/// 12. `[]` OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. +/// 13. `[writeable]` The IGP account. /// ---- End if ---- -/// 14. [executable] The system program. -/// 15. [writeable] The native token collateral PDA account. +/// 14. `[executable]` The system program. +/// 15. `[writeable]` The native token collateral PDA account. fn transfer_remote( program_id: &Pubkey, accounts: &[AccountInfo], @@ -130,12 +130,12 @@ fn transfer_remote( } /// Accounts: -/// 0. [signer] Mailbox processor authority specific to this program. -/// 1. [executable] system_program -/// 2. [] hyperlane_token storage -/// 3. [writeable] recipient wallet address -/// 4. [executable] The system program. -/// 5. [writeable] The native token collateral PDA account. +/// 0. `[signer]` Mailbox processor authority specific to this program. +/// 1. `[executable]` system_program +/// 2. `[]` hyperlane_token storage +/// 3. `[writeable]` recipient wallet address +/// 4. `[executable]` The system program. +/// 5. `[writeable]` The native token collateral PDA account. fn transfer_from_remote( program_id: &Pubkey, accounts: &[AccountInfo], @@ -161,9 +161,9 @@ fn transfer_from_remote_account_metas( /// Enrolls a remote router. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The token PDA account. -/// 2. [signer] The owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The token PDA account. +/// 2. `[signer]` The owner. fn enroll_remote_router( program_id: &Pubkey, accounts: &[AccountInfo], @@ -175,9 +175,9 @@ fn enroll_remote_router( /// Enrolls remote routers. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The token PDA account. -/// 2. [signer] The owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The token PDA account. +/// 2. `[signer]` The owner. fn enroll_remote_routers( program_id: &Pubkey, accounts: &[AccountInfo], @@ -189,9 +189,9 @@ fn enroll_remote_routers( /// Sets the destination gas configs. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The token PDA account. -/// 2. [signer] The owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The token PDA account. +/// 2. `[signer]` The owner. fn set_destination_gas_configs( program_id: &Pubkey, accounts: &[AccountInfo], @@ -205,8 +205,8 @@ fn set_destination_gas_configs( /// Transfers ownership. /// /// Accounts: -/// 0. [writeable] The token PDA account. -/// 1. [signer] The current owner. +/// 0. `[writeable]` The token PDA account. +/// 1. `[signer]` The current owner. fn transfer_ownership( program_id: &Pubkey, accounts: &[AccountInfo], @@ -218,7 +218,7 @@ fn transfer_ownership( /// Gets the interchain security module, returning it as a serialized Option. /// /// Accounts: -/// 0. [] The token PDA account. +/// 0. `[]` The token PDA account. fn interchain_security_module(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { HyperlaneSealevelToken::::interchain_security_module(program_id, accounts) } @@ -234,8 +234,8 @@ fn interchain_security_module_account_metas(program_id: &Pubkey) -> ProgramResul /// Lets the owner set the interchain security module. /// /// Accounts: -/// 0. [writeable] The token PDA account. -/// 1. [signer] The access control owner. +/// 0. `[writeable]` The token PDA account. +/// 1. `[signer]` The access control owner. fn set_interchain_security_module( program_id: &Pubkey, accounts: &[AccountInfo], @@ -249,8 +249,8 @@ fn set_interchain_security_module( /// Lets the owner set the interchain gas paymaster. /// /// Accounts: -/// 0. [writeable] The token PDA account. -/// 1. [signer] The access control owner. +/// 0. `[writeable]` The token PDA account. +/// 1. `[signer]` The access control owner. fn set_interchain_gas_paymaster( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/rust/sealevel/programs/hyperlane-sealevel-token-native/tests/functional.rs b/rust/sealevel/programs/hyperlane-sealevel-token-native/tests/functional.rs index 5014dcae5..1863f5b14 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token-native/tests/functional.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token-native/tests/functional.rs @@ -148,11 +148,11 @@ async fn initialize_hyperlane_token( .encode() .unwrap(), vec![ - // 0. [executable] The system program. - // 1. [writable] The token PDA account. - // 2. [writable] The dispatch authority PDA account. - // 3. [signer] The payer and mailbox payer. - // 4. [writable] The native collateral PDA account. + // 0. `[executable]` The system program. + // 1. `[writable]` The token PDA account. + // 2. `[writable]` The dispatch authority PDA account. + // 3. `[signer]` The payer and mailbox payer. + // 4. `[writable]` The native collateral PDA account. AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new(token_account_key, false), AccountMeta::new(dispatch_authority_key, false), @@ -416,24 +416,24 @@ async fn test_transfer_remote() { }) .encode() .unwrap(), - // 0. [executable] The system program. - // 1. [executable] The spl_noop program. - // 2. [] The token PDA account. - // 3. [executable] The mailbox program. - // 4. [writeable] The mailbox outbox account. - // 5. [] Message dispatch authority. - // 6. [signer] The token sender and mailbox payer. - // 7. [signer] Unique message / gas payment account. - // 8. [writeable] Message storage PDA. + // 0. `[executable]` The system program. + // 1. `[executable]` The spl_noop program. + // 2. `[]` The token PDA account. + // 3. `[executable]` The mailbox program. + // 4. `[writeable]` The mailbox outbox account. + // 5. `[]` Message dispatch authority. + // 6. `[signer]` The token sender and mailbox payer. + // 7. `[signer]` Unique message / gas payment account. + // 8. `[writeable]` Message storage PDA. // ---- If using an IGP ---- - // 9. [executable] The IGP program. - // 10. [writeable] The IGP program data. - // 11. [writeable] Gas payment PDA. - // 12. [] OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. - // 13. [writeable] The IGP account. + // 9. `[executable]` The IGP program. + // 10. `[writeable]` The IGP program data. + // 11. `[writeable]` Gas payment PDA. + // 12. `[]` OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. + // 13. `[writeable]` The IGP account. // ---- End if ---- - // 14. [executable] The system program. - // 15. [writeable] The native token collateral PDA account. + // 14. `[executable]` The system program. + // 15. `[writeable]` The native token collateral PDA account. vec![ AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new_readonly(spl_noop::id(), false), @@ -762,12 +762,12 @@ async fn test_transfer_from_remote_errors_if_process_authority_not_signer() { .unwrap(), vec![ // Recipient.handle accounts - // 0. [signer] Mailbox processor authority specific to this program. - // 1. [executable] system_program - // 2. [] hyperlane_token storage - // 3. [writeable] recipient wallet address - // 4. [executable] The system program. - // 5. [writeable] The native token collateral PDA account. + // 0. `[signer]` Mailbox processor authority specific to this program. + // 1. `[executable]` system_program + // 2. `[]` hyperlane_token storage + // 3. `[writeable]` recipient wallet address + // 4. `[executable]` The system program. + // 5. `[writeable]` The native token collateral PDA account. AccountMeta::new_readonly( hyperlane_token_accounts.mailbox_process_authority, false, diff --git a/rust/sealevel/programs/hyperlane-sealevel-token/src/instruction.rs b/rust/sealevel/programs/hyperlane-sealevel-token/src/instruction.rs index 594e5836e..0bfab1f33 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token/src/instruction.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token/src/instruction.rs @@ -19,8 +19,8 @@ pub fn init_instruction( let mut instruction = lib_init_instruction(program_id, payer, init)?; // Add additional account metas: - // 0. [writable] The mint / mint authority PDA account. - // 1. [writable] The ATA payer PDA account. + // 0. `[writable]` The mint / mint authority PDA account. + // 1. `[writable]` The ATA payer PDA account. let (mint_key, _mint_bump) = Pubkey::find_program_address(hyperlane_token_mint_pda_seeds!(), &program_id); diff --git a/rust/sealevel/programs/hyperlane-sealevel-token/src/plugin.rs b/rust/sealevel/programs/hyperlane-sealevel-token/src/plugin.rs index 60928790e..c5029f942 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token/src/plugin.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token/src/plugin.rs @@ -121,8 +121,8 @@ impl HyperlaneSealevelTokenPlugin for SyntheticPlugin { /// instruction initializing the mint with the SPL token 2022 program. /// /// Accounts: - /// 0. [writable] The mint / mint authority PDA account. - /// 1. [writable] The ATA payer PDA account. + /// 0. `[writable]` The mint / mint authority PDA account. + /// 1. `[writable]` The ATA payer PDA account. fn initialize<'a, 'b>( program_id: &Pubkey, system_program: &'a AccountInfo<'b>, @@ -187,9 +187,9 @@ impl HyperlaneSealevelTokenPlugin for SyntheticPlugin { /// Burns the tokens from the sender's associated token account. /// /// Accounts: - /// 0. [executable] The spl_token_2022 program. - /// 1. [writeable] The mint / mint authority PDA account. - /// 2. [writeable] The token sender's associated token account, from which tokens will be burned. + /// 0. `[executable]` The spl_token_2022 program. + /// 1. `[writeable]` The mint / mint authority PDA account. + /// 2. `[writeable]` The token sender's associated token account, from which tokens will be burned. fn transfer_in<'a, 'b>( program_id: &Pubkey, token: &HyperlaneToken, @@ -244,11 +244,11 @@ impl HyperlaneSealevelTokenPlugin for SyntheticPlugin { /// result of a transfer to this chain from a remote chain. /// /// Accounts: - /// 0. [executable] SPL token 2022 program - /// 1. [executable] SPL associated token account - /// 2. [writeable] Mint account - /// 3. [writeable] Recipient associated token account - /// 4. [writeable] ATA payer PDA account. + /// 0. `[executable]` SPL token 2022 program + /// 1. `[executable]` SPL associated token account + /// 2. `[writeable]` Mint account + /// 3. `[writeable]` Recipient associated token account + /// 4. `[writeable]` ATA payer PDA account. fn transfer_out<'a, 'b>( program_id: &Pubkey, token: &HyperlaneToken, diff --git a/rust/sealevel/programs/hyperlane-sealevel-token/src/processor.rs b/rust/sealevel/programs/hyperlane-sealevel-token/src/processor.rs index 50990fe4a..f203a1e4e 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token/src/processor.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token/src/processor.rs @@ -89,12 +89,12 @@ pub fn process_instruction( /// Initializes the program. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writable] The token PDA account. -/// 2. [writable] The dispatch authority PDA account. -/// 3. [signer] The payer. -/// 4. [writable] The mint / mint authority PDA account. -/// 5. [writable] The ATA payer PDA account. +/// 0. `[executable]` The system program. +/// 1. `[writable]` The token PDA account. +/// 2. `[writable]` The dispatch authority PDA account. +/// 3. `[signer]` The payer. +/// 4. `[writable]` The mint / mint authority PDA account. +/// 5. `[writable]` The ATA payer PDA account. fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> ProgramResult { HyperlaneSealevelToken::::initialize(program_id, accounts, init) } @@ -104,26 +104,26 @@ fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> Prog /// then dispatches a message to the remote recipient. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [executable] The spl_noop program. -/// 2. [] The token PDA account. -/// 3. [executable] The mailbox program. -/// 4. [writeable] The mailbox outbox account. -/// 5. [] Message dispatch authority. -/// 6. [signer] The token sender and mailbox payer. -/// 7. [signer] Unique message / gas payment account. -/// 8. [writeable] Message storage PDA. +/// 0. `[executable]` The system program. +/// 1. `[executable]` The spl_noop program. +/// 2. `[]` The token PDA account. +/// 3. `[executable]` The mailbox program. +/// 4. `[writeable]` The mailbox outbox account. +/// 5. `[]` Message dispatch authority. +/// 6. `[signer]` The token sender and mailbox payer. +/// 7. `[signer]` Unique message / gas payment account. +/// 8. `[writeable]` Message storage PDA. /// ---- If using an IGP ---- -/// 9. [executable] The IGP program. -/// 10. [writeable] The IGP program data. -/// 11. [writeable] Gas payment PDA. -/// 12. [] OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. -/// 13. [writeable] The IGP account. +/// 9. `[executable]` The IGP program. +/// 10. `[writeable]` The IGP program data. +/// 11. `[writeable]` Gas payment PDA. +/// 12. `[]` OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. +/// 13. `[writeable]` The IGP account. /// ---- End if ---- -/// 14. [signer] The token sender. -/// 15. [executable] The spl_token_2022 program. -/// 16. [writeable] The mint / mint authority PDA account. -/// 17. [writeable] The token sender's associated token account, from which tokens will be burned. +/// 14. `[signer]` The token sender. +/// 15. `[executable]` The spl_token_2022 program. +/// 16. `[writeable]` The mint / mint authority PDA account. +/// 17. `[writeable]` The token sender's associated token account, from which tokens will be burned. fn transfer_remote( program_id: &Pubkey, accounts: &[AccountInfo], @@ -133,15 +133,15 @@ fn transfer_remote( } // Accounts: -// 0. [signer] Mailbox process authority specific to this program. -// 1. [executable] system_program -// 2. [] hyperlane_token storage -// 3. [] recipient wallet address -// 4. [executable] SPL token 2022 program -// 5. [executable] SPL associated token account -// 6. [writeable] Mint account -// 7. [writeable] Recipient associated token account -// 8. [writeable] ATA payer PDA account. +// 0. `[signer]` Mailbox process authority specific to this program. +// 1. `[executable]` system_program +// 2. `[]` hyperlane_token storage +// 3. `[]` recipient wallet address +// 4. `[executable]` SPL token 2022 program +// 5. `[executable]` SPL associated token account +// 6. `[writeable]` Mint account +// 7. `[writeable]` Recipient associated token account +// 8. `[writeable]` ATA payer PDA account. fn transfer_from_remote( program_id: &Pubkey, accounts: &[AccountInfo], @@ -164,9 +164,9 @@ fn transfer_from_remote_account_metas( /// Enrolls a remote router. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The token PDA account. -/// 2. [signer] The owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The token PDA account. +/// 2. `[signer]` The owner. fn enroll_remote_router( program_id: &Pubkey, accounts: &[AccountInfo], @@ -178,9 +178,9 @@ fn enroll_remote_router( /// Enrolls remote routers. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The token PDA account. -/// 2. [signer] The owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The token PDA account. +/// 2. `[signer]` The owner. fn enroll_remote_routers( program_id: &Pubkey, accounts: &[AccountInfo], @@ -192,9 +192,9 @@ fn enroll_remote_routers( /// Sets the destination gas configs. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [writeable] The token PDA account. -/// 2. [signer] The owner. +/// 0. `[executable]` The system program. +/// 1. `[writeable]` The token PDA account. +/// 2. `[signer]` The owner. fn set_destination_gas_configs( program_id: &Pubkey, accounts: &[AccountInfo], @@ -208,8 +208,8 @@ fn set_destination_gas_configs( /// Transfers ownership. /// /// Accounts: -/// 0. [writeable] The token PDA account. -/// 1. [signer] The current owner. +/// 0. `[writeable]` The token PDA account. +/// 1. `[signer]` The current owner. fn transfer_ownership( program_id: &Pubkey, accounts: &[AccountInfo], @@ -221,7 +221,7 @@ fn transfer_ownership( /// Gets the interchain security module, returning it as a serialized Option. /// /// Accounts: -/// 0. [] The token PDA account. +/// 0. `[]` The token PDA account. fn interchain_security_module(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { HyperlaneSealevelToken::::interchain_security_module(program_id, accounts) } @@ -237,8 +237,8 @@ fn interchain_security_module_account_metas(program_id: &Pubkey) -> ProgramResul /// Lets the owner set the interchain security module. /// /// Accounts: -/// 0. [writeable] The token PDA account. -/// 1. [signer] The access control owner. +/// 0. `[writeable]` The token PDA account. +/// 1. `[signer]` The access control owner. fn set_interchain_security_module( program_id: &Pubkey, accounts: &[AccountInfo], @@ -252,8 +252,8 @@ fn set_interchain_security_module( /// Lets the owner set the interchain gas paymaster. /// /// Accounts: -/// 0. [writeable] The token PDA account. -/// 1. [signer] The access control owner. +/// 0. `[writeable]` The token PDA account. +/// 1. `[signer]` The access control owner. fn set_interchain_gas_paymaster( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/rust/sealevel/programs/hyperlane-sealevel-token/tests/functional.rs b/rust/sealevel/programs/hyperlane-sealevel-token/tests/functional.rs index adac2a05f..73324efde 100644 --- a/rust/sealevel/programs/hyperlane-sealevel-token/tests/functional.rs +++ b/rust/sealevel/programs/hyperlane-sealevel-token/tests/functional.rs @@ -165,12 +165,12 @@ async fn initialize_hyperlane_token( .encode() .unwrap(), vec![ - // 0. [executable] The system program. - // 1. [writable] The token PDA account. - // 2. [writable] The dispatch authority PDA account. - // 3. [signer] The payer. - // 4. [writable] The mint / mint authority PDA account. - // 5. [writable] The ATA payer PDA account. + // 0. `[executable]` The system program. + // 1. `[writable]` The token PDA account. + // 2. `[writable]` The dispatch authority PDA account. + // 3. `[signer]` The payer. + // 4. `[writable]` The mint / mint authority PDA account. + // 5. `[writable]` The ATA payer PDA account. AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new(token_account_key, false), AccountMeta::new(dispatch_authority_key, false), @@ -592,15 +592,15 @@ async fn test_transfer_from_remote_errors_if_process_authority_not_signer() { .unwrap(), vec![ // Recipient.handle accounts - // 0. [signer] Mailbox process authority specific to this program. - // 1. [executable] system_program - // 2. [] hyperlane_token storage - // 3. [] recipient wallet address - // 4. [executable] SPL token 2022 program - // 5. [executable] SPL associated token account - // 6. [writeable] Mint account - // 7. [writeable] Recipient associated token account - // 8. [writeable] ATA payer PDA account. + // 0. `[signer]` Mailbox process authority specific to this program. + // 1. `[executable]` system_program + // 2. `[]` hyperlane_token storage + // 3. `[]` recipient wallet address + // 4. `[executable]` SPL token 2022 program + // 5. `[executable]` SPL associated token account + // 6. `[writeable]` Mint account + // 7. `[writeable]` Recipient associated token account + // 8. `[writeable]` ATA payer PDA account. AccountMeta::new_readonly( hyperlane_token_accounts.mailbox_process_authority, false, @@ -710,25 +710,25 @@ async fn test_transfer_remote() { }) .encode() .unwrap(), - // 0. [executable] The system program. - // 1. [executable] The spl_noop program. - // 2. [] The token PDA account. - // 3. [executable] The mailbox program. - // 4. [writeable] The mailbox outbox account. - // 5. [] Message dispatch authority. - // 6. [signer] The token sender and mailbox payer. - // 7. [signer] Unique message account. - // 8. [writeable] Message storage PDA. + // 0. `[executable]` The system program. + // 1. `[executable]` The spl_noop program. + // 2. `[]` The token PDA account. + // 3. `[executable]` The mailbox program. + // 4. `[writeable]` The mailbox outbox account. + // 5. `[]` Message dispatch authority. + // 6. `[signer]` The token sender and mailbox payer. + // 7. `[signer]` Unique message account. + // 8. `[writeable]` Message storage PDA. // ---- If using an IGP ---- - // 9. [executable] The IGP program. - // 10. [writeable] The IGP program data. - // 11. [writeable] Gas payment PDA. - // 12. [] OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. - // 13. [writeable] The IGP account. + // 9. `[executable]` The IGP program. + // 10. `[writeable]` The IGP program data. + // 11. `[writeable]` Gas payment PDA. + // 12. `[]` OPTIONAL - The Overhead IGP program, if the configured IGP is an Overhead IGP. + // 13. `[writeable]` The IGP account. // ---- End if ---- - // 14. [executable] The spl_token_2022 program. - // 15. [writeable] The mint / mint authority PDA account. - // 16. [writeable] The token sender's associated token account, from which tokens will be burned. + // 14. `[executable]` The spl_token_2022 program. + // 15. `[writeable]` The mint / mint authority PDA account. + // 16. `[writeable]` The token sender's associated token account, from which tokens will be burned. vec![ AccountMeta::new_readonly(solana_program::system_program::id(), false), AccountMeta::new_readonly(spl_noop::id(), false), diff --git a/rust/sealevel/programs/ism/test-ism/src/program.rs b/rust/sealevel/programs/ism/test-ism/src/program.rs index 4b4c87638..ef4914e65 100644 --- a/rust/sealevel/programs/ism/test-ism/src/program.rs +++ b/rust/sealevel/programs/ism/test-ism/src/program.rs @@ -101,9 +101,9 @@ pub fn process_instruction( /// Creates the storage PDA. /// /// Accounts: -/// 0. [executable] System program. -/// 1. [signer] Payer. -/// 2. [writeable] Storage PDA. +/// 0. `[executable]` System program. +/// 1. `[signer]` Payer. +/// 2. `[writeable]` Storage PDA. fn init(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -144,7 +144,7 @@ fn init(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { } /// Accounts: -/// 0. [writeable] Storage PDA. +/// 0. `[writeable]` Storage PDA. fn set_accept(_program_id: &Pubkey, accounts: &[AccountInfo], accept: bool) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -160,7 +160,7 @@ fn set_accept(_program_id: &Pubkey, accounts: &[AccountInfo], accept: bool) -> P } /// Accounts: -/// 0. [] Storage PDA. +/// 0. `[]` Storage PDA. fn verify(_program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let accounts_iter = &mut accounts.iter(); diff --git a/rust/sealevel/programs/ism/test-ism/src/test_client.rs b/rust/sealevel/programs/ism/test-ism/src/test_client.rs index f2bf0f6af..d756dd41d 100644 --- a/rust/sealevel/programs/ism/test-ism/src/test_client.rs +++ b/rust/sealevel/programs/ism/test-ism/src/test_client.rs @@ -38,9 +38,9 @@ impl TestIsmTestClient { program_id, data: TestIsmInstruction::Init.try_to_vec().unwrap(), accounts: vec![ - // 0. [executable] System program. - // 1. [signer] Payer. - // 2. [writeable] Storage PDA. + // 0. `[executable]` System program. + // 1. `[signer]` Payer. + // 2. `[writeable]` Storage PDA. AccountMeta::new_readonly(system_program::id(), false), AccountMeta::new(payer_pubkey, true), AccountMeta::new(Self::get_storage_pda_key(), false), @@ -66,7 +66,7 @@ impl TestIsmTestClient { program_id, data: TestIsmInstruction::SetAccept(accept).try_to_vec().unwrap(), accounts: vec![ - // 0. [writeable] Storage PDA. + // 0. `[writeable]` Storage PDA. AccountMeta::new(Self::get_storage_pda_key(), false), ], }; diff --git a/rust/sealevel/programs/mailbox-test/src/functional.rs b/rust/sealevel/programs/mailbox-test/src/functional.rs index c551eda3c..088dc7da7 100644 --- a/rust/sealevel/programs/mailbox-test/src/functional.rs +++ b/rust/sealevel/programs/mailbox-test/src/functional.rs @@ -411,13 +411,13 @@ async fn test_dispatch_returns_message_id() { .into_instruction_data() .unwrap(), accounts: vec![ - // 0. [writeable] Outbox PDA. - // 1. [signer] Message sender signer. - // 2. [executable] System program. - // 3. [executable] SPL Noop program. - // 4. [signer] Payer. - // 5. [signer] Unique message account. - // 6. [writeable] Dispatched message PDA. An empty message PDA relating to the seeds + // 0. `[writeable]` Outbox PDA. + // 1. `[signer]` Message sender signer. + // 2. `[executable]` System program. + // 3. `[executable]` SPL Noop program. + // 4. `[signer]` Payer. + // 5. `[signer]` Unique message account. + // 6. `[writeable]` Dispatched message PDA. An empty message PDA relating to the seeds // `mailbox_dispatched_message_pda_seeds` where the message contents will be stored. AccountMeta::new(mailbox_accounts.outbox, false), AccountMeta::new(payer.pubkey(), true), @@ -964,9 +964,9 @@ async fn test_inbox_set_default_ism() { .into_instruction_data() .unwrap(), accounts: vec![ - // 0. [writeable] - The Inbox PDA account. - // 1. [] - The Outbox PDA account. - // 2. [signer] - The owner of the Mailbox. + // 0. `[writeable]` - The Inbox PDA account. + // 1. `[]` - The Outbox PDA account. + // 2. `[signer]` - The owner of the Mailbox. AccountMeta::new(mailbox_accounts.inbox, false), AccountMeta::new_readonly(mailbox_accounts.outbox, false), AccountMeta::new(payer.pubkey(), true), @@ -1011,9 +1011,9 @@ async fn test_inbox_set_default_ism_errors_if_owner_not_signer() { .into_instruction_data() .unwrap(), accounts: vec![ - // 0. [writeable] - The Inbox PDA account. - // 1. [] - The Outbox PDA account. - // 2. [signer] - The owner of the Mailbox. + // 0. `[writeable]` - The Inbox PDA account. + // 1. `[]` - The Outbox PDA account. + // 2. `[signer]` - The owner of the Mailbox. AccountMeta::new(mailbox_accounts.inbox, false), AccountMeta::new_readonly(mailbox_accounts.outbox, false), AccountMeta::new_readonly(non_owner.pubkey(), true), @@ -1033,9 +1033,9 @@ async fn test_inbox_set_default_ism_errors_if_owner_not_signer() { .into_instruction_data() .unwrap(), accounts: vec![ - // 0. [writeable] - The Inbox PDA account. - // 1. [] - The Outbox PDA account. - // 2. [signer] - The owner of the Mailbox. + // 0. `[writeable]` - The Inbox PDA account. + // 1. `[]` - The Outbox PDA account. + // 2. `[signer]` - The owner of the Mailbox. AccountMeta::new(mailbox_accounts.inbox, false), AccountMeta::new_readonly(mailbox_accounts.outbox, false), AccountMeta::new_readonly(payer.pubkey(), false), diff --git a/rust/sealevel/programs/mailbox-test/src/utils.rs b/rust/sealevel/programs/mailbox-test/src/utils.rs index 434dce00b..b4e207666 100644 --- a/rust/sealevel/programs/mailbox-test/src/utils.rs +++ b/rust/sealevel/programs/mailbox-test/src/utils.rs @@ -42,13 +42,13 @@ pub async fn dispatch_from_payer( .into_instruction_data() .unwrap(), accounts: vec![ - // 0. [writeable] Outbox PDA. - // 1. [signer] Message sender signer. - // 2. [executable] System program. - // 3. [executable] SPL Noop program. - // 4. [signer] Payer. - // 5. [signer] Unique message account. - // 6. [writeable] Dispatched message PDA. An empty message PDA relating to the seeds + // 0. `[writeable]` Outbox PDA. + // 1. `[signer]` Message sender signer. + // 2. `[executable]` System program. + // 3. `[executable]` SPL Noop program. + // 4. `[signer]` Payer. + // 5. `[signer]` Unique message account. + // 6. `[writeable]` Dispatched message PDA. An empty message PDA relating to the seeds // `mailbox_dispatched_message_pda_seeds` where the message contents will be stored. AccountMeta::new(mailbox_accounts.outbox, false), AccountMeta::new(payer.pubkey(), true), diff --git a/rust/sealevel/programs/mailbox/src/instruction.rs b/rust/sealevel/programs/mailbox/src/instruction.rs index 89d433598..74aac05f9 100644 --- a/rust/sealevel/programs/mailbox/src/instruction.rs +++ b/rust/sealevel/programs/mailbox/src/instruction.rs @@ -156,9 +156,9 @@ pub fn set_default_ism_instruction( Pubkey::try_find_program_address(mailbox_outbox_pda_seeds!(), &program_id) .ok_or(ProgramError::InvalidSeeds)?; - // 0. [writeable] - The Inbox PDA account. - // 1. [] - The Outbox PDA account. - // 2. [signer] - The owner of the Mailbox. + // 0. `[writeable]` - The Inbox PDA account. + // 1. `[]` - The Outbox PDA account. + // 2. `[signer]` - The owner of the Mailbox. let instruction = SolanaInstruction { program_id, data: Instruction::InboxSetDefaultIsm(default_ism).into_instruction_data()?, diff --git a/rust/sealevel/programs/mailbox/src/processor.rs b/rust/sealevel/programs/mailbox/src/processor.rs index c0efa6272..9d4e13396 100644 --- a/rust/sealevel/programs/mailbox/src/processor.rs +++ b/rust/sealevel/programs/mailbox/src/processor.rs @@ -79,10 +79,10 @@ pub fn process_instruction( /// Initializes the Mailbox. /// /// Accounts: -/// 0. [executable] The system program. -/// 1. [signer, writable] The payer account and owner of the Mailbox. -/// 2. [writable] The inbox PDA account. -/// 3. [writable] The outbox PDA account. +/// 0. `[executable]` The system program. +/// 1. `[signer, writable]` The payer account and owner of the Mailbox. +/// 2. `[writable]` The inbox PDA account. +/// 3. `[writable]` The outbox PDA account. fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -164,16 +164,16 @@ fn initialize(program_id: &Pubkey, accounts: &[AccountInfo], init: Init) -> Prog /// Process a message. Non-reentrant through the use of a RefMut. /// // Accounts: -// 0. [signer] Payer account. This pays for the creation of the processed message PDA. -// 1. [executable] The system program. -// 2. [writable] Inbox PDA account. -// 3. [] Mailbox process authority specific to the message recipient. -// 4. [writable] Processed message PDA. +// 0. `[signer]` Payer account. This pays for the creation of the processed message PDA. +// 1. `[executable]` The system program. +// 2. `[writable]` Inbox PDA account. +// 3. `[]` Mailbox process authority specific to the message recipient. +// 4. `[writable]` Processed message PDA. // 5..N [??] Accounts required to invoke the recipient's InterchainSecurityModule instruction. -// N+1. [executable] SPL noop -// N+2. [executable] ISM +// N+1. `[executable]` SPL noop +// N+2. `[executable]` ISM // N+2..M. [??] Accounts required to invoke the ISM's Verify instruction. -// M+1. [executable] Recipient program. +// M+1. `[executable]` Recipient program. // M+2..K. [??] Accounts required to invoke the recipient's Handle instruction. fn inbox_process( program_id: &Pubkey, @@ -414,8 +414,8 @@ fn inbox_process( /// Gets the ISM to use for a recipient program and sets it as return data. /// /// Accounts: -/// 0. [] - The Inbox PDA. -/// 1. [] - The recipient program. +/// 0. `[]` - The Inbox PDA. +/// 1. `[]` - The recipient program. /// 2..N. [??] - The accounts required to make the CPI into the recipient program. /// These can be retrieved from the recipient using the /// `MessageRecipientInstruction::InterchainSecurityModuleAccountMetas` instruction. @@ -505,9 +505,9 @@ fn get_recipient_ism( /// Sets the default ISM. /// /// Accounts: -/// 0. [writeable] - The Inbox PDA account. -/// 1. [] - The Outbox PDA account. -/// 2. [signer] - The owner of the Mailbox. +/// 0. `[writeable]` - The Inbox PDA account. +/// 1. `[]` - The Outbox PDA account. +/// 2. `[signer]` - The owner of the Mailbox. fn inbox_set_default_ism( program_id: &Pubkey, accounts: &[AccountInfo], @@ -549,13 +549,13 @@ fn inbox_set_default_ism( /// Sets the ID of the message as return data. /// /// Accounts: -/// 0. [writeable] Outbox PDA. -/// 1. [signer] Message sender signer. -/// 2. [executable] System program. -/// 3. [executable] SPL Noop program. -/// 4. [signer] Payer. -/// 5. [signer] Unique message account. -/// 6. [writeable] Dispatched message PDA. An empty message PDA relating to the seeds +/// 0. `[writeable]` Outbox PDA. +/// 1. `[signer]` Message sender signer. +/// 2. `[executable]` System program. +/// 3. `[executable]` SPL Noop program. +/// 4. `[signer]` Payer. +/// 5. `[signer]` Unique message account. +/// 6. `[writeable]` Dispatched message PDA. An empty message PDA relating to the seeds /// `mailbox_dispatched_message_pda_seeds` where the message contents will be stored. fn outbox_dispatch( program_id: &Pubkey, @@ -712,7 +712,7 @@ fn outbox_dispatch( /// Gets the number of dispatched messages as little endian encoded return data. /// /// Accounts: -/// 0. [] Outbox PDA account. +/// 0. `[]` Outbox PDA account. fn outbox_get_count(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -743,7 +743,7 @@ fn outbox_get_count(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramRes /// Gets the latest checkpoint as return data. /// /// Accounts: -/// 0. [] Outbox PDA account. +/// 0. `[]` Outbox PDA account. fn outbox_get_latest_checkpoint(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -779,7 +779,7 @@ fn outbox_get_latest_checkpoint(program_id: &Pubkey, accounts: &[AccountInfo]) - /// Gets the root as return data. /// /// Accounts: -/// 0. [] Outbox PDA account. +/// 0. `[]` Outbox PDA account. fn outbox_get_root(program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let accounts_iter = &mut accounts.iter(); diff --git a/rust/sealevel/programs/test-send-receiver/src/program.rs b/rust/sealevel/programs/test-send-receiver/src/program.rs index 0f2bbc37a..46884ea40 100644 --- a/rust/sealevel/programs/test-send-receiver/src/program.rs +++ b/rust/sealevel/programs/test-send-receiver/src/program.rs @@ -37,7 +37,7 @@ pub enum TestSendReceiverError { /// that the Mailbox can handle different ISM getter return data. #[derive(BorshSerialize, BorshDeserialize, Debug)] pub enum IsmReturnDataMode { - /// Encodes the ISM as an Option. + /// Encodes the ISM as an `Option`. EncodeOption, /// Returns no data. ReturnNothing, @@ -161,9 +161,9 @@ pub fn process_instruction( /// Creates the storage PDA. /// /// Accounts: -/// 0. [executable] System program. -/// 1. [signer] Payer. -/// 2. [writeable] Storage PDA. +/// 0. `[executable]` System program. +/// 1. `[signer]` Payer. +/// 2. `[writeable]` Storage PDA. fn init(program_id: &Pubkey, accounts: &[AccountInfo], mailbox: Pubkey) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -211,15 +211,15 @@ fn init(program_id: &Pubkey, accounts: &[AccountInfo], mailbox: Pubkey) -> Progr /// Dispatches a message using the dispatch authority. /// /// Accounts: -/// 0. [executable] The Mailbox program. +/// 0. `[executable]` The Mailbox program. /// And now the accounts expected by the Mailbox's OutboxDispatch instruction: -/// 2. [writeable] Outbox PDA. -/// 3. [] This program's dispatch authority. -/// 4. [executable] System program. -/// 5. [executable] SPL Noop program. -/// 6. [signer] Payer. -/// 7. [signer] Unique message account. -/// 8. [writeable] Dispatched message PDA. An empty message PDA relating to the seeds +/// 2. `[writeable]` Outbox PDA. +/// 3. `[]` This program's dispatch authority. +/// 4. `[executable]` System program. +/// 5. `[executable]` SPL Noop program. +/// 6. `[signer]` Payer. +/// 7. `[signer]` Unique message account. +/// 8. `[writeable]` Dispatched message PDA. An empty message PDA relating to the seeds /// `mailbox_dispatched_message_pda_seeds` where the message contents will be stored. fn dispatch( program_id: &Pubkey, @@ -291,8 +291,8 @@ fn dispatch( /// Handles a message. /// /// Accounts: -/// 0. [writeable] Process authority specific to this program. -/// 1. [] Storage PDA account. +/// 0. `[writeable]` Process authority specific to this program. +/// 1. `[]` Storage PDA account. pub fn handle( program_id: &Pubkey, accounts: &[AccountInfo], @@ -367,7 +367,7 @@ pub fn handle( } /// Accounts: -/// 0. [writeable] Storage PDA account. +/// 0. `[writeable]` Storage PDA account. fn set_interchain_security_module( _program_id: &Pubkey, accounts: &[AccountInfo], @@ -392,7 +392,7 @@ fn set_interchain_security_module( } /// Accounts: -/// 0. [] Storage PDA account. +/// 0. `[]` Storage PDA account. fn get_interchain_security_module(_program_id: &Pubkey, accounts: &[AccountInfo]) -> ProgramResult { let accounts_iter = &mut accounts.iter(); @@ -424,7 +424,7 @@ fn get_interchain_security_module(_program_id: &Pubkey, accounts: &[AccountInfo] } /// Accounts: -/// 0. [writeable] Storage PDA account. +/// 0. `[writeable]` Storage PDA account. fn set_handle_mode( _program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/rust/sealevel/programs/test-send-receiver/src/test_client.rs b/rust/sealevel/programs/test-send-receiver/src/test_client.rs index 3096c10f7..2f1539d9f 100644 --- a/rust/sealevel/programs/test-send-receiver/src/test_client.rs +++ b/rust/sealevel/programs/test-send-receiver/src/test_client.rs @@ -48,9 +48,9 @@ impl TestSendReceiverTestClient { .try_to_vec() .unwrap(), accounts: vec![ - // 0. [executable] System program. - // 1. [signer] Payer. - // 2. [writeable] Storage PDA. + // 0. `[executable]` System program. + // 1. `[signer]` Payer. + // 2. `[writeable]` Storage PDA. AccountMeta::new_readonly(system_program::id(), false), AccountMeta::new(payer_pubkey, true), AccountMeta::new(Self::get_storage_pda_key(), false), @@ -85,7 +85,7 @@ impl TestSendReceiverTestClient { .try_to_vec() .unwrap(), accounts: vec![ - // 0. [writeable] Storage PDA. + // 0. `[writeable]` Storage PDA. AccountMeta::new(Self::get_storage_pda_key(), false), ], }; @@ -114,7 +114,7 @@ impl TestSendReceiverTestClient { .try_to_vec() .unwrap(), accounts: vec![ - // 0. [writeable] Storage PDA. + // 0. `[writeable]` Storage PDA. AccountMeta::new(storage_pda_key, false), ], }; @@ -155,15 +155,15 @@ impl TestSendReceiverTestClient { .try_to_vec() .unwrap(), accounts: vec![ - // 0. [executable] The Mailbox program. + // 0. `[executable]` The Mailbox program. // And now the accounts expected by the Mailbox's OutboxDispatch instruction: - // 1. [writeable] Outbox PDA. - // 2. [] This program's dispatch authority. - // 3. [executable] System program. - // 4. [executable] SPL Noop program. - // 5. [signer] Payer. - // 6. [signer] Unique message account. - // 7. [writeable] Dispatched message PDA. An empty message PDA relating to the seeds + // 1. `[writeable]` Outbox PDA. + // 2. `[]` This program's dispatch authority. + // 3. `[executable]` System program. + // 4. `[executable]` SPL Noop program. + // 5. `[signer]` Payer. + // 6. `[signer]` Unique message account. + // 7. `[writeable]` Dispatched message PDA. An empty message PDA relating to the seeds // `mailbox_dispatched_message_pda_seeds` where the message contents will be stored. AccountMeta::new_readonly(mailbox_accounts.program, false), AccountMeta::new(mailbox_accounts.outbox, false), diff --git a/rust/sealevel/programs/validator-announce/src/instruction.rs b/rust/sealevel/programs/validator-announce/src/instruction.rs index 6501bbd39..a94898fe3 100644 --- a/rust/sealevel/programs/validator-announce/src/instruction.rs +++ b/rust/sealevel/programs/validator-announce/src/instruction.rs @@ -80,9 +80,9 @@ pub fn init_instruction( }); // Accounts: - // 0. [signer] The payer. - // 1. [executable] The system program. - // 2. [writable] The ValidatorAnnounce PDA account. + // 0. `[signer]` The payer. + // 1. `[executable]` The system program. + // 2. `[writable]` The ValidatorAnnounce PDA account. let accounts = vec![ AccountMeta::new_readonly(payer, true), AccountMeta::new_readonly(solana_program::system_program::id(), false), diff --git a/rust/sealevel/programs/validator-announce/src/processor.rs b/rust/sealevel/programs/validator-announce/src/processor.rs index 253c58d56..409dc29e7 100644 --- a/rust/sealevel/programs/validator-announce/src/processor.rs +++ b/rust/sealevel/programs/validator-announce/src/processor.rs @@ -49,9 +49,9 @@ pub fn process_instruction( /// Initializes the program. /// /// Accounts: -/// 0. [signer] The payer. -/// 1. [executable] The system program. -/// 2. [writable] The ValidatorAnnounce PDA account. +/// 0. `[signer]` The payer. +/// 1. `[executable]` The system program. +/// 2. `[writable]` The ValidatorAnnounce PDA account. pub fn process_init( program_id: &Pubkey, accounts: &[AccountInfo], @@ -115,11 +115,11 @@ pub fn process_init( /// Announces a validator. /// /// Accounts: -/// 0. [signer] The payer. -/// 1. [executable] The system program. -/// 2. [] The ValidatorAnnounce PDA account. -/// 3. [writeable] The validator-specific ValidatorStorageLocationsAccount PDA account. -/// 4. [writeable] The ReplayProtection PDA account specific to the announcement being made. +/// 0. `[signer]` The payer. +/// 1. `[executable]` The system program. +/// 2. `[]` The ValidatorAnnounce PDA account. +/// 3. `[writeable]` The validator-specific ValidatorStorageLocationsAccount PDA account. +/// 4. `[writeable]` The ReplayProtection PDA account specific to the announcement being made. fn process_announce( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/rust/sealevel/programs/validator-announce/tests/functional.rs b/rust/sealevel/programs/validator-announce/tests/functional.rs index 68ee589f9..cf1b5f0f5 100644 --- a/rust/sealevel/programs/validator-announce/tests/functional.rs +++ b/rust/sealevel/programs/validator-announce/tests/functional.rs @@ -88,9 +88,9 @@ async fn initialize( Pubkey::find_program_address(validator_announce_pda_seeds!(), &program_id); // Accounts: - // 0. [signer] The payer. - // 1. [executable] The system program. - // 2. [writable] The ValidatorAnnounce PDA account. + // 0. `[signer]` The payer. + // 1. `[executable]` The system program. + // 2. `[writable]` The ValidatorAnnounce PDA account. let init_instruction = Instruction::new_with_borsh( program_id, &ValidatorAnnounceInstruction::Init(InitInstruction { @@ -194,11 +194,11 @@ async fn announce( Pubkey::find_program_address(replay_protection_pda_seeds!(replay_id), &program_id); // Accounts: - // 0. [signer] The payer. - // 1. [executable] The system program. - // 2. [] The ValidatorAnnounce PDA account. - // 3. [writeable] The validator-specific ValidatorStorageLocationsAccount PDA account. - // 4. [writeable] The ReplayProtection PDA account specific to the announcement being made. + // 0. `[signer]` The payer. + // 1. `[executable]` The system program. + // 2. `[]` The ValidatorAnnounce PDA account. + // 3. `[writeable]` The validator-specific ValidatorStorageLocationsAccount PDA account. + // 4. `[writeable]` The ReplayProtection PDA account specific to the announcement being made. let announce_instruction = Instruction::new_with_borsh( program_id, &ValidatorAnnounceInstruction::Announce(announce_instruction), diff --git a/rust/utils/run-locally/Cargo.toml b/rust/utils/run-locally/Cargo.toml index 66e86a92b..4d0d7538f 100644 --- a/rust/utils/run-locally/Cargo.toml +++ b/rust/utils/run-locally/Cargo.toml @@ -13,6 +13,7 @@ version.workspace = true hyperlane-core = { path = "../../hyperlane-core", features = ["float"]} toml_edit.workspace = true k256.workspace = true +jobserver.workspace = true ripemd.workspace = true sha2.workspace = true serde.workspace = true @@ -29,3 +30,6 @@ macro_rules_attribute.workspace = true regex.workspace = true hpl-interface.workspace = true cosmwasm-schema.workspace = true + +[features] +cosmos = [] \ No newline at end of file diff --git a/rust/utils/run-locally/src/cosmos/mod.rs b/rust/utils/run-locally/src/cosmos/mod.rs index 28c951513..4ef4fce63 100644 --- a/rust/utils/run-locally/src/cosmos/mod.rs +++ b/rust/utils/run-locally/src/cosmos/mod.rs @@ -609,7 +609,7 @@ fn termination_invariants_met( Ok(true) } -#[cfg(test)] +#[cfg(feature = "cosmos")] mod test { use super::*; diff --git a/rust/utils/run-locally/src/invariants.rs b/rust/utils/run-locally/src/invariants.rs index 6fe857a43..690021046 100644 --- a/rust/utils/run-locally/src/invariants.rs +++ b/rust/utils/run-locally/src/invariants.rs @@ -1,24 +1,26 @@ // use std::path::Path; +use std::path::Path; + use crate::config::Config; use crate::metrics::agent_balance_sum; use maplit::hashmap; use crate::logging::log; +use crate::solana::solana_termination_invariants_met; use crate::{fetch_metric, ZERO_MERKLE_INSERTION_KATHY_MESSAGES}; -// use crate::solana::solana_termination_invariants_met; // This number should be even, so the messages can be split into two equal halves // sent before and after the relayer spins up, to avoid rounding errors. -pub const SOL_MESSAGES_EXPECTED: u32 = 0; +pub const SOL_MESSAGES_EXPECTED: u32 = 20; /// Use the metrics to check if the relayer queues are empty and the expected /// number of messages have been sent. pub fn termination_invariants_met( config: &Config, starting_relayer_balance: f64, - // solana_cli_tools_path: &Path, - // solana_config_path: &Path, + solana_cli_tools_path: &Path, + solana_config_path: &Path, ) -> eyre::Result { let eth_messages_expected = (config.kathy_messages / 2) as u32 * 2; let total_messages_expected = eth_messages_expected + SOL_MESSAGES_EXPECTED; @@ -74,10 +76,10 @@ pub fn termination_invariants_met( return Ok(false); } - // if !solana_termination_invariants_met(solana_cli_tools_path, solana_config_path) { - // log!("Solana termination invariants not met"); - // return Ok(false); - // } + if !solana_termination_invariants_met(solana_cli_tools_path, solana_config_path) { + log!("Solana termination invariants not met"); + return Ok(false); + } let dispatched_messages_scraped = fetch_metric( "9093", diff --git a/rust/utils/run-locally/src/main.rs b/rust/utils/run-locally/src/main.rs index 52d56ed5d..b4efc6115 100644 --- a/rust/utils/run-locally/src/main.rs +++ b/rust/utils/run-locally/src/main.rs @@ -29,7 +29,7 @@ use tempfile::tempdir; use crate::{ config::Config, ethereum::start_anvil, - invariants::termination_invariants_met, + invariants::{termination_invariants_met, SOL_MESSAGES_EXPECTED}, metrics::agent_balance_sum, solana::*, utils::{concat_path, make_static, stop_child, AgentHandles, ArbitraryData, TaskHandle}, @@ -54,9 +54,9 @@ const RELAYER_KEYS: &[&str] = &[ // test3 "0x4bbbf85ce3377467afe5d46f804f221813b2bb87f24d81f60f1fcdbf7cbf4356", // sealeveltest1 - // "0x892bf6949af4233e62f854cb3618bc1a3ee3341dc71ada08c4d5deca239acf4f", - // // sealeveltest2 - // "0x892bf6949af4233e62f854cb3618bc1a3ee3341dc71ada08c4d5deca239acf4f", + "0x892bf6949af4233e62f854cb3618bc1a3ee3341dc71ada08c4d5deca239acf4f", + // sealeveltest2 + "0x892bf6949af4233e62f854cb3618bc1a3ee3341dc71ada08c4d5deca239acf4f", ]; /// These private keys are from hardhat/anvil's testing accounts. /// These must be consistent with the ISM config for the test. @@ -66,15 +66,13 @@ const VALIDATOR_KEYS: &[&str] = &[ "0x8b3a350cf5c34c9194ca85829a2df0ec3153be0318b5e2d3348e872092edffba", "0x92db14e403b83dfe3df233f83dfa3a0d7096f21ca9b0d6d6b8d88b2b4ec1564e", // sealevel - // "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d", + "0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d", ]; -const VALIDATOR_ORIGIN_CHAINS: &[&str] = &["test1", "test2", "test3"]; -// const VALIDATOR_ORIGIN_CHAINS: &[&str] = &["test1", "test2", "test3", "sealeveltest1"]; +const VALIDATOR_ORIGIN_CHAINS: &[&str] = &["test1", "test2", "test3", "sealeveltest1"]; const AGENT_BIN_PATH: &str = "target/debug"; const INFRA_PATH: &str = "../typescript/infra"; -// const TS_SDK_PATH: &str = "../typescript/sdk"; const MONOREPO_ROOT_PATH: &str = "../"; const ZERO_MERKLE_INSERTION_KATHY_MESSAGES: u32 = 10; @@ -92,6 +90,7 @@ struct State { watchers: Vec>>, data: Vec>, } + impl State { fn push_agent(&mut self, handles: AgentHandles) { self.agents.push((handles.0, handles.1)); @@ -100,6 +99,7 @@ impl State { self.data.push(handles.4); } } + impl Drop for State { fn drop(&mut self) { SHUTDOWN.store(true, Ordering::Relaxed); @@ -137,11 +137,11 @@ fn main() -> ExitCode { let config = Config::load(); - // let solana_checkpoint_path = Path::new(SOLANA_CHECKPOINT_LOCATION); - // fs::remove_dir_all(solana_checkpoint_path).unwrap_or_default(); - let checkpoints_dirs: Vec = (0..VALIDATOR_COUNT) + let solana_checkpoint_path = Path::new(SOLANA_CHECKPOINT_LOCATION); + fs::remove_dir_all(solana_checkpoint_path).unwrap_or_default(); + let checkpoints_dirs: Vec = (0..VALIDATOR_COUNT - 1) .map(|_| Box::new(tempdir().unwrap()) as DynPath) - // .chain([Box::new(solana_checkpoint_path) as DynPath]) + .chain([Box::new(solana_checkpoint_path) as DynPath]) .collect(); let rocks_db_dir = tempdir().unwrap(); let relayer_db = concat_path(&rocks_db_dir, "relayer"); @@ -173,8 +173,8 @@ fn main() -> ExitCode { .hyp_env("DB", relayer_db.to_str().unwrap()) .hyp_env("CHAINS_TEST1_SIGNER_KEY", RELAYER_KEYS[0]) .hyp_env("CHAINS_TEST2_SIGNER_KEY", RELAYER_KEYS[1]) - // .hyp_env("CHAINS_SEALEVELTEST1_SIGNER_KEY", RELAYER_KEYS[3]) - // .hyp_env("CHAINS_SEALEVELTEST2_SIGNER_KEY", RELAYER_KEYS[4]) + .hyp_env("CHAINS_SEALEVELTEST1_SIGNER_KEY", RELAYER_KEYS[3]) + .hyp_env("CHAINS_SEALEVELTEST2_SIGNER_KEY", RELAYER_KEYS[4]) .hyp_env("RELAYCHAINS", "invalidchain,otherinvalid") .hyp_env("ALLOWLOCALCHECKPOINTSYNCERS", "true") .hyp_env( @@ -201,8 +201,7 @@ fn main() -> ExitCode { .arg("defaultSigner.key", RELAYER_KEYS[2]) .arg( "relayChains", - "test1,test2,test3", - // "test1,test2,test3,sealeveltest1,sealeveltest2", + "test1,test2,test3,sealeveltest1,sealeveltest2", ); let base_validator_env = common_agent_env @@ -274,9 +273,9 @@ fn main() -> ExitCode { // Ready to run... // - // let (solana_path, solana_path_tempdir) = install_solana_cli_tools().join(); - // state.data.push(Box::new(solana_path_tempdir)); - // let solana_program_builder = build_solana_programs(solana_path.clone()); + let (solana_path, solana_path_tempdir) = install_solana_cli_tools().join(); + state.data.push(Box::new(solana_path_tempdir)); + let solana_program_builder = build_solana_programs(solana_path.clone()); // this task takes a long time in the CI so run it in parallel log!("Building rust..."); @@ -287,13 +286,13 @@ fn main() -> ExitCode { .arg("bin", "validator") .arg("bin", "scraper") .arg("bin", "init-db") - // .arg("bin", "hyperlane-sealevel-client") + .arg("bin", "hyperlane-sealevel-client") .filter_logs(|l| !l.contains("workspace-inheritance")) .run(); let start_anvil = start_anvil(config.clone()); - // let solana_program_path = solana_program_builder.join(); + let solana_program_path = solana_program_builder.join(); log!("Running postgres db..."); let postgres = Program::new("docker") @@ -308,15 +307,15 @@ fn main() -> ExitCode { build_rust.join(); - // let solana_ledger_dir = tempdir().unwrap(); - // let start_solana_validator = start_solana_test_validator( - // solana_path.clone(), - // solana_program_path, - // solana_ledger_dir.as_ref().to_path_buf(), - // ); + let solana_ledger_dir = tempdir().unwrap(); + let start_solana_validator = start_solana_test_validator( + solana_path.clone(), + solana_program_path, + solana_ledger_dir.as_ref().to_path_buf(), + ); - // let (_solana_config_path, solana_validator) = start_solana_validator.join(); - // state.push_agent(solana_validator); + let (solana_config_path, solana_validator) = start_solana_validator.join(); + state.push_agent(solana_validator); state.push_agent(start_anvil.join()); // spawn 1st validator before any messages have been sent to test empty mailbox @@ -362,9 +361,9 @@ fn main() -> ExitCode { kathy_env_double_insertion.clone().run().join(); // Send some sealevel messages before spinning up the agents, to test the backward indexing cursor - // for _i in 0..(SOL_MESSAGES_EXPECTED / 2) { - // initiate_solana_hyperlane_transfer(solana_path.clone(), solana_config_path.clone()).join(); - // } + for _i in 0..(SOL_MESSAGES_EXPECTED / 2) { + initiate_solana_hyperlane_transfer(solana_path.clone(), solana_config_path.clone()).join(); + } // spawn the rest of the validators for (i, validator_env) in validator_envs.into_iter().enumerate().skip(1) { @@ -375,9 +374,9 @@ fn main() -> ExitCode { state.push_agent(relayer_env.spawn("RLY")); // Send some sealevel messages after spinning up the relayer, to test the forward indexing cursor - // for _i in 0..(SOL_MESSAGES_EXPECTED / 2) { - // initiate_solana_hyperlane_transfer(solana_path.clone(), solana_config_path.clone()).join(); - // } + for _i in 0..(SOL_MESSAGES_EXPECTED / 2) { + initiate_solana_hyperlane_transfer(solana_path.clone(), solana_config_path.clone()).join(); + } log!("Setup complete! Agents running in background..."); log!("Ctrl+C to end execution..."); @@ -395,9 +394,14 @@ fn main() -> ExitCode { while !SHUTDOWN.load(Ordering::Relaxed) { if config.ci_mode { // for CI we have to look for the end condition. - if termination_invariants_met(&config, starting_relayer_balance) - // if termination_invariants_met(&config, &solana_path, &solana_config_path) - .unwrap_or(false) + // if termination_invariants_met(&config, starting_relayer_balance) + if termination_invariants_met( + &config, + starting_relayer_balance, + &solana_path, + &solana_config_path, + ) + .unwrap_or(false) { // end condition reached successfully break; diff --git a/rust/utils/run-locally/src/solana.rs b/rust/utils/run-locally/src/solana.rs index 1d2ccea62..94dbd926f 100644 --- a/rust/utils/run-locally/src/solana.rs +++ b/rust/utils/run-locally/src/solana.rs @@ -282,10 +282,10 @@ pub fn start_solana_test_validator( } #[apply(as_task)] -pub fn _initiate_solana_hyperlane_transfer( +pub fn initiate_solana_hyperlane_transfer( solana_cli_tools_path: PathBuf, solana_config_path: PathBuf, -) { +) -> String { let sender = Program::new(concat_path(&solana_cli_tools_path, "solana")) .arg("config", solana_config_path.to_str().unwrap()) .arg("keypair", SOLANA_KEYPAIR) @@ -309,21 +309,20 @@ pub fn _initiate_solana_hyperlane_transfer( .run_with_output() .join(); - let message_id = _get_message_id_from_logs(output); - if let Some(message_id) = message_id { - sealevel_client(&solana_cli_tools_path, &solana_config_path) - .cmd("igp") - .cmd("pay-for-gas") - .arg("program-id", "GwHaw8ewMyzZn9vvrZEnTEAAYpLdkGYs195XWcLDCN4U") - .arg("message-id", message_id) - .arg("destination-domain", SOLANA_REMOTE_CHAIN_ID) - .arg("gas", "100000") - .run() - .join(); - } + let message_id = get_message_id_from_logs(output).expect("failed to get message id from logs"); + sealevel_client(&solana_cli_tools_path, &solana_config_path) + .cmd("igp") + .cmd("pay-for-gas") + .arg("program-id", "GwHaw8ewMyzZn9vvrZEnTEAAYpLdkGYs195XWcLDCN4U") + .arg("message-id", message_id.clone()) + .arg("destination-domain", SOLANA_REMOTE_CHAIN_ID) + .arg("gas", "100000") + .run() + .join(); + message_id } -fn _get_message_id_from_logs(logs: Vec) -> Option { +fn get_message_id_from_logs(logs: Vec) -> Option { let message_id_regex = Regex::new(r"Dispatched message to \d+, ID 0x([0-9a-fA-F]+)").unwrap(); for log in logs { // Use the regular expression to capture the ID @@ -337,7 +336,7 @@ fn _get_message_id_from_logs(logs: Vec) -> Option { None } -pub fn _solana_termination_invariants_met( +pub fn solana_termination_invariants_met( solana_cli_tools_path: &Path, solana_config_path: &Path, ) -> bool { @@ -349,7 +348,7 @@ pub fn _solana_termination_invariants_met( // This value was gotten by observing the relayer logs. // TODO: get the actual message-id so we don't have to hardcode it "message-id", - "0x7b8ba684e5ce44f898c5fa81785c83a00e32b5bef3412e648eb7a17bec497685", + "0x89c76191bd40b1858b7957e35bf3455122826e4737c5540b9dc5a555370d78c5", ) .arg("program-id", "9tCUWNjpqcf3NUSrtp7vquYVCwbEByvLjZUrhG5dgvhj") .run_with_output()