diff --git a/Cargo.lock b/Cargo.lock index f8b699e..781a661 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -44,7 +44,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -65,7 +65,7 @@ checksum = "b6ac1e58cded18cb28ddc17143c4dea5345b3ad575e14f32f66e4054a56eb271" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -178,9 +178,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac4b22b3e51cac09fd2adfcc73b55f447b4df669f983c13f7894ec82b607c63f" +checksum = "c357da577dfb56998d01f574d81ad7a1958d248740a7981b205d69d65a7da404" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -190,9 +190,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9db948902dfbae96a73c2fbf1f7abec62af034ab883e4c777c3fd29702bd6e2c" +checksum = "6259a506ab13e1d658796c31e6e39d2e2ee89243bcc505ddc613b35732e0a430" dependencies = [ "alloy-rlp", "bytes", @@ -218,9 +218,9 @@ dependencies = [ [[package]] name = "alloy-rlp" -version = "0.3.9" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0822426598f95e45dd1ea32a738dac057529a709ee645fcc516ffa4cbde08f" +checksum = "f542548a609dca89fcd72b3b9f355928cf844d4363c5eed9c5273a3dd225e097" dependencies = [ "arrayvec", "bytes", @@ -228,23 +228,23 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bfd7853b65a2b4f49629ec975fee274faf6dff15ab8894c620943398ef283c0" +checksum = "d9d64f851d95619233f74b310f12bcf16e0cbc27ee3762b6115c14a84809280a" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82ec42f342d9a9261699f8078e57a7a4fda8aaa73c1a212ed3987080e6a9cd13" +checksum = "6bf7ed1574b699f48bf17caab4e6e54c6d12bc3c006ab33d58b1e227c1c3559f" dependencies = [ "alloy-sol-macro-input", "const-hex", @@ -253,31 +253,31 @@ dependencies = [ "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2c50e6a62ee2b4f7ab3c6d0366e5770a21cad426e109c2f40335a1b3aff3df" +checksum = "8c02997ccef5f34f9c099277d4145f183b422938ed5322dc57a089fe9b9ad9ee" dependencies = [ "const-hex", "dunce", "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac17c6e89a50fb4a758012e4b409d9a0ba575228e69b539fe37d7a1bd507ca4a" +checksum = "ce13ff37285b0870d0a0746992a4ae48efaf34b766ae4c2640fa15e5305f8e73" dependencies = [ "serde", "winnow", @@ -285,9 +285,9 @@ dependencies = [ [[package]] name = "alloy-sol-types" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9dc0fffe397aa17628160e16b89f704098bf3c9d74d5d369ebc239575936de5" +checksum = "1174cafd6c6d810711b4e00383037bdb458efc4fe3dbafafa16567e0320c54d8" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -362,9 +362,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "arbitrary" @@ -679,7 +679,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -690,7 +690,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -712,7 +712,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -731,7 +731,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.36.5", + "object 0.36.7", "rustc-demangle", "windows-targets 0.52.6", ] @@ -915,7 +915,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -974,7 +974,7 @@ dependencies = [ "near-light-client-on-eth", "near-rpc-client", "serde_json", - "thiserror 2.0.4", + "thiserror 2.0.9", ] [[package]] @@ -1060,22 +1060,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.20.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b37c88a63ffd85d15b406896cc343916d7cf57838a847b3a6f2ca5d39a5695a" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1169,7 +1169,7 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "thiserror 1.0.69", @@ -1177,9 +1177,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.2" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc" +checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" dependencies = [ "jobserver", "libc", @@ -1218,14 +1218,14 @@ checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1268,9 +1268,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.22" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69371e34337c4c984bbe322360c2547210bf632eb2814bbe78a6e87a2935bd2b" +checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84" dependencies = [ "clap_builder", "clap_derive", @@ -1278,9 +1278,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.22" +version = "4.5.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e24c1b4099818523236a8ca881d2b45db98dadfb4625cf6608c12069fcbbde1" +checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838" dependencies = [ "anstream", "anstyle", @@ -1297,14 +1297,14 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "clap_lex" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "cloudabi" @@ -1407,15 +1407,15 @@ dependencies = [ [[package]] name = "console" -version = "0.15.8" +version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "unicode-width 0.1.14", - "windows-sys 0.52.0", + "once_cell", + "unicode-width", + "windows-sys 0.59.0", ] [[package]] @@ -1629,18 +1629,18 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1657,9 +1657,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -1747,7 +1747,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1771,7 +1771,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1782,7 +1782,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1872,7 +1872,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1893,7 +1893,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1903,7 +1903,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1916,7 +1916,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version 0.4.1", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1936,7 +1936,7 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", "unicode-xid", ] @@ -2020,7 +2020,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2049,7 +2049,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2236,9 +2236,9 @@ dependencies = [ [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" @@ -2284,7 +2284,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2304,7 +2304,7 @@ checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2325,7 +2325,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2380,7 +2380,7 @@ dependencies = [ "near-primitives", "near-rpc-client", "sha3", - "thiserror 2.0.4", + "thiserror 2.0.9", "tracing", ] @@ -2420,7 +2420,7 @@ dependencies = [ "rlp 0.5.2", "serde", "serde_json", - "thiserror 2.0.4", + "thiserror 2.0.9", "tokio", ] @@ -2565,7 +2565,7 @@ dependencies = [ "reqwest", "serde", "serde_json", - "syn 2.0.90", + "syn 2.0.91", "toml 0.8.19", "walkdir", ] @@ -2583,7 +2583,7 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2609,7 +2609,7 @@ dependencies = [ "serde", "serde_json", "strum 0.26.3", - "syn 2.0.90", + "syn 2.0.91", "tempfile", "thiserror 1.0.69", "tiny-keccak", @@ -2625,7 +2625,7 @@ dependencies = [ "chrono", "ethers-core", "reqwest", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "thiserror 1.0.69", @@ -2734,7 +2734,7 @@ dependencies = [ "path-slash", "rayon", "regex", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "solang-parser", @@ -2784,8 +2784,6 @@ dependencies = [ "eth-proof", "ethers", "hex", - "near-bridge-client", - "near-contract-standards", "near-crypto", "near-jsonrpc-client", "near-primitives", @@ -2834,9 +2832,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.2.0" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "486f806e73c5707928240ddc295403b1b93c96a02038563881c4a2fd84b81ac4" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "fastrlp" @@ -2849,6 +2847,17 @@ dependencies = [ "bytes", ] +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + [[package]] name = "feature-probe" version = "0.1.1" @@ -2947,9 +2956,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "foreign-types" @@ -3057,7 +3066,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3408,11 +3417,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3451,9 +3460,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.31" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ "bytes", "futures-channel", @@ -3650,7 +3659,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3733,7 +3742,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3773,7 +3782,7 @@ dependencies = [ "console", "number_prefix", "portable-atomic", - "unicode-width 0.2.0", + "unicode-width", "web-time", ] @@ -3871,9 +3880,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705" +checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7" dependencies = [ "once_cell", "wasm-bindgen", @@ -3994,9 +4003,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.167" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d6582e104315a817dff97f75133544b2e094ee22447d2acf4a74e189ba06fc" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libm" @@ -4268,9 +4277,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", ] @@ -4352,6 +4361,7 @@ dependencies = [ "near-rpc-client", "near-token", "omni-types", + "serde", "serde_json", "tracing", ] @@ -4402,9 +4412,9 @@ dependencies = [ [[package]] name = "near-contract-standards" -version = "5.6.0" +version = "5.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b352e9b2f7c3abe5db91d91e446810433c6afbd3e43d7b3d989a2ef32c1dc2e" +checksum = "6b8bc68a8c2bac5e44b38e322e41cadeefe33f766993bf067375b63cc860a73b" dependencies = [ "near-sdk", ] @@ -4496,7 +4506,7 @@ version = "0.1.0" dependencies = [ "ethereum-types 0.14.1", "ethers", - "thiserror 2.0.4", + "thiserror 2.0.9", "tokio", ] @@ -4624,7 +4634,7 @@ dependencies = [ "near-primitives", "reqwest", "serde_json", - "thiserror 2.0.4", + "thiserror 2.0.9", "tokio", ] @@ -4636,7 +4646,7 @@ checksum = "3610517a56329b7cce0c8c4cf2686fc4bbe0b155181b118acf20d2a301bf29b6" dependencies = [ "quote", "serde", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -4648,14 +4658,14 @@ dependencies = [ "fs2", "near-rpc-error-core", "serde", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "near-sdk" -version = "5.6.0" +version = "5.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581c7e6b1962fca1637bf668c18b498328100f8974aa798ed44702ba77c3bdac" +checksum = "befb9df6da1a6a0b6656388c0db76084867062a87f1cbc066c188a8e360b6463" dependencies = [ "base64 0.22.1", "borsh 1.5.3", @@ -4673,9 +4683,9 @@ dependencies = [ [[package]] name = "near-sdk-macros" -version = "5.6.0" +version = "5.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0818798144d69a248d76e22b04d1b89b84b80575c96c4af0f7f0332b22487a08" +checksum = "1268c4fc56bf53d70c200261fb8d57c6c1c6692243660f5f889c7fa4cf5771d2" dependencies = [ "Inflector", "darling", @@ -4685,7 +4695,7 @@ dependencies = [ "serde_json", "strum 0.26.3", "strum_macros 0.26.4", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5028,7 +5038,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5114,7 +5124,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5137,9 +5147,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.5" +version = "0.36.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" dependencies = [ "memchr", ] @@ -5260,7 +5270,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5447,7 +5457,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.5.7", + "redox_syscall 0.5.8", "smallvec", "windows-targets 0.52.6", ] @@ -5523,12 +5533,12 @@ dependencies = [ [[package]] name = "pest" -version = "2.7.14" +version = "2.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879952a81a83930934cbf1786752d6dedc3b1f29e8f8fb2ad1d0a36f377cf442" +checksum = "8b7cafe60d6cf8e62e1b9b2ea516a089c008945bb5a275416789e7db0bc199dc" dependencies = [ "memchr", - "thiserror 1.0.69", + "thiserror 2.0.9", "ucd-trie", ] @@ -5582,7 +5592,7 @@ dependencies = [ "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5620,7 +5630,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5703,7 +5713,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5803,7 +5813,7 @@ dependencies = [ "proc-macro-error-attr2", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -5960,9 +5970,9 @@ dependencies = [ [[package]] name = "quanta" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" +checksum = "773ce68d0bb9bc7ef20be3536ffe94e223e1f365bd374108b2659fac0c65cfe6" dependencies = [ "crossbeam-utils", "libc", @@ -5990,9 +6000,9 @@ dependencies = [ "quinn-proto", "quinn-udp", "rustc-hash 2.1.0", - "rustls 0.23.19", + "rustls 0.23.20", "socket2", - "thiserror 2.0.4", + "thiserror 2.0.9", "tokio", "tracing", ] @@ -6008,11 +6018,11 @@ dependencies = [ "rand 0.8.5", "ring 0.17.8", "rustc-hash 2.1.0", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-pki-types", "rustls-platform-verifier", "slab", - "thiserror 2.0.4", + "thiserror 2.0.9", "tinyvec", "tracing", "web-time", @@ -6020,9 +6030,9 @@ dependencies = [ [[package]] name = "quinn-udp" -version = "0.5.7" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d5a626c6807713b15cac82a6acaccd6043c9a5408c24baae07611fec3f243da" +checksum = "1c40286217b4ba3a71d644d752e6a0b71f13f1b6a2c5311acfcbe0c2418ed904" dependencies = [ "cfg_aliases", "libc", @@ -6165,9 +6175,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" dependencies = [ "bitflags 2.6.0", ] @@ -6444,16 +6454,18 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.3" +version = "1.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +checksum = "f5ef8fb1dd8de3870cb8400d51b4c2023854bbafd5431a3ac7e7317243e22d2f" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", "ark-ff 0.4.2", "bytes", - "fastrlp", + "fastrlp 0.3.1", + "fastrlp 0.4.0", "num-bigint 0.4.6", + "num-integer", "num-traits", "parity-scale-codec", "primitive-types 0.12.2", @@ -6520,7 +6532,7 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "semver 1.0.23", + "semver 1.0.24", ] [[package]] @@ -6534,15 +6546,15 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.41" +version = "0.38.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" +checksum = "f93dc38ecbab2eb790ff964bb77fa94faf256fd3e73285fd7ba0903b76bedb85" dependencies = [ "bitflags 2.6.0", "errno 0.3.10", "libc", "linux-raw-sys", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6559,9 +6571,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.19" +version = "0.23.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" +checksum = "5065c3f250cbd332cd894be57c40fa52387247659b14a2d6041d121547903b1b" dependencies = [ "once_cell", "ring 0.17.8", @@ -6604,9 +6616,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.10.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16f1201b3c9a7ee8039bcadc17b7e605e2945b27eee7631788c1bd2b0643674b" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" dependencies = [ "web-time", ] @@ -6622,7 +6634,7 @@ dependencies = [ "jni", "log", "once_cell", - "rustls 0.23.19", + "rustls 0.23.20", "rustls-native-certs", "rustls-platform-verifier-android", "rustls-webpki 0.102.8", @@ -6722,7 +6734,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -6823,9 +6835,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.1" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa39c7303dc58b5543c94d22c1766b0d31f2ee58306363ea622b10bbc075eaa2" +checksum = "1863fd3768cd83c56a7f60faa4dc0d403f1b6df0a38c3c25f44b7894e45370d5" dependencies = [ "core-foundation-sys", "libc", @@ -6851,9 +6863,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" dependencies = [ "serde", ] @@ -6887,9 +6899,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6513c1ad0b11a9376da888e3e0baa0077f1aed55c17f50e7b2397136129fb88f" +checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e" dependencies = [ "serde_derive", ] @@ -6915,20 +6927,20 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.215" +version = "1.0.216" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad1e866f866923f252f05c889987993144fb74e722403468a4ebd70c3cd756c0" +checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" dependencies = [ "itoa", "memchr", @@ -6944,7 +6956,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -6970,9 +6982,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ "base64 0.22.1", "chrono", @@ -6988,14 +7000,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -7174,9 +7186,9 @@ dependencies = [ [[package]] name = "solana-account" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc175269051361f32d8651405676a59ba229173cf51d33a36cd0d00e28170ee" +checksum = "71d6ef82dab153c60b1da169126d8eca1b62bbf4026f95a45a71897f3e9a0224" dependencies = [ "bincode", "serde", @@ -7188,9 +7200,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ba531da629cc203b5044e632ce1b3543e80681e1a6223014aa0b5a937e3c9bc" +checksum = "377daf04565dddcc1bd97de7a346918931d467233aeadce992d8f0ed38c51a3c" dependencies = [ "Inflector", "base64 0.22.1", @@ -7214,9 +7226,9 @@ dependencies = [ [[package]] name = "solana-account-decoder-client-types" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c818475cd26500a5f4c8a214fcfdbfc9070a0847085c915fbbde78f88efceb6" +checksum = "82c3a45e569bca5640b620e5f82e11103fb8a338c1f53c02dc305ea15c67de98" dependencies = [ "base64 0.22.1", "bs58 0.5.1", @@ -7230,9 +7242,9 @@ dependencies = [ [[package]] name = "solana-account-info" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57f86633175ed13054cf901a9386e4f447ba51917fc93e746b76658e57cd87a1" +checksum = "8378a48833ee7f828e20a63e93a6cdaef1313a8fd8f71a90b243df83295987b1" dependencies = [ "bincode", "serde", @@ -7243,18 +7255,18 @@ dependencies = [ [[package]] name = "solana-atomic-u64" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11b89f3a07c2bd4aeab92616b7be2fd39c2bbe2caf0702cd561cabc59e4e5a19" +checksum = "bc6f9da603778bbee6402ee2526a3b219b85497c10e49f9c7c112ed8836f46d3" dependencies = [ "parking_lot 0.12.3", ] [[package]] name = "solana-bincode" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed2c1720ee13a7ea06ace039d810af7c4e895f857315a0bdface95e839633cae" +checksum = "eb75b5d25ae05cfddb8b9b53512f17c18c29e3c92b7a848f39598473e6bf6484" dependencies = [ "bincode", "serde", @@ -7263,9 +7275,9 @@ dependencies = [ [[package]] name = "solana-bn254" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ce95c5ff034d5ed2db19144e74b0a3598f32aee1a669164a9fe7bd4fca6a40a" +checksum = "6df7c5b61b4ed3961cbaef5f38c58d1ee9a2268cbe607c67a54083b7b02d6276" dependencies = [ "ark-bn254", "ark-ec", @@ -7278,9 +7290,9 @@ dependencies = [ [[package]] name = "solana-borsh" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0ce4df354110b7a3d40b0722028eabe87e897e4a316acb76ef27e6953e8eebe" +checksum = "055c45b7aae61c8c7b26a537f7a8387cc8a10036081ddfd7170a7a9b4d924ffd" dependencies = [ "borsh 0.10.4", "borsh 1.5.3", @@ -7298,14 +7310,14 @@ dependencies = [ "solana-sdk", "spl-associated-token-account", "spl-token 7.0.0", - "thiserror 2.0.4", + "thiserror 2.0.9", ] [[package]] name = "solana-client" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f302bd43b697d9a27a4d21eafe20b7be13ebc8ddd22d64419eaa5a265fbc451c" +checksum = "ae0f0271e0cf122e282cb39c531e9caaa7732a39c1b4c3a7fb8972d9a3da99a5" dependencies = [ "async-trait", "bincode", @@ -7335,9 +7347,9 @@ dependencies = [ [[package]] name = "solana-clock" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf504af72783141ad1594958a4e8244d9589105143bc0b329972cbbbb6317137" +checksum = "e5d6af32497acc6bb09d8150ea6f53df25dbad713991741999d46688beaf944e" dependencies = [ "serde", "serde_derive", @@ -7347,18 +7359,18 @@ dependencies = [ [[package]] name = "solana-compute-budget" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f2b45606ec0f3045d695cd81da6dd35ccf8a71ad05d99d31d0a5e6028818e08" +checksum = "8fbc816c5b85021103c2a09cee40fb1c07d265144284c604f480b5b8a1fc1e50" dependencies = [ "solana-sdk", ] [[package]] name = "solana-config-program" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32c6881f452959ab16a3be51b700128ed91fd4b8dda3086d22a71ee6016595d3" +checksum = "def13861ad090a81b72f216e5b6fbdb47eaa09e2a24b134d87f44aad356c5d33" dependencies = [ "bincode", "chrono", @@ -7372,9 +7384,9 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d4c9e78e187476f7dc4b3dfcbf1a32a386a5446a32234181f8babdaca009f8" +checksum = "941eb2a3d4209547ebe68e050c8cdce235138add508ccec73a10db0b1efa0048" dependencies = [ "async-trait", "bincode", @@ -7393,9 +7405,9 @@ dependencies = [ [[package]] name = "solana-cpi" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6246ad163c7a1ec62ef3182732b91748631af5214a13176257b98919e699fe4e" +checksum = "380b06ac8e2ebf8a5b8a54645b721f92f5d7a6d116550bbf1817167cc48abeb1" dependencies = [ "solana-account-info", "solana-define-syscall", @@ -7407,9 +7419,9 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b8226b3a12bc753151a79e073bac46e0643c85a57a4fdeba7e15841116644f" +checksum = "5344c8fb488fdf37845765c802f01198db010b16f4b4113dcb122549e303153f" dependencies = [ "bytemuck", "bytemuck_derive", @@ -7420,24 +7432,24 @@ dependencies = [ [[package]] name = "solana-decode-error" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61efcc865627988f6cc96cbe038776d16d378b7ed644268017f73ea8db947c0e" +checksum = "99f2fe3170045ae27951ae476a0c88a40130b242736f033ba5e353cd6f816b8e" dependencies = [ "num-traits", ] [[package]] name = "solana-define-syscall" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8973c0e4811e915f5ee84b68cea4af8231e8157f47b6f6a7aebbac2777227eb5" +checksum = "14a80d323dbe8866aaefb40e3c11564d82f77894d193fa66583e793f3d845723" [[package]] name = "solana-derivation-path" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b873e47fe9c2f2cbc674d555a4fba4513e12dd9e45e170f07d05901b40105b0c" +checksum = "dff423e05929ec73c0997aa0d4aeae7a7bb52ccabc23699ceaa1f2ae854a5fa4" dependencies = [ "derivation-path", "qstring", @@ -7446,9 +7458,9 @@ dependencies = [ [[package]] name = "solana-epoch-schedule" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44e1f2e668cf1c0ace134d6eb54635f1c1e60dd2cdd65e8b14adc4ac383b3e5f" +checksum = "276fda33b7de27df41e3043f344e517d5e85ab345d2f2aa2425d1011bac570c4" dependencies = [ "serde", "serde_derive", @@ -7458,9 +7470,9 @@ dependencies = [ [[package]] name = "solana-feature-set" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6992929b65cc56c406edde40483c9160476eef2479da1f324686649992ee4f5" +checksum = "155ef7ddcf7b75ef92d992839bd00ac4ee02bdfe0fa4d95daf0534b830b1bc0e" dependencies = [ "lazy_static", "solana-clock", @@ -7472,9 +7484,9 @@ dependencies = [ [[package]] name = "solana-fee-calculator" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cc687e6b60ddf1c0e0140a9cb4c524ea8d8c2836d7b723384c382cf8ceb462d" +checksum = "abc0371153eda80024109800051b87bab11f056fae260ca477a50875aaffdfde" dependencies = [ "log", "serde", @@ -7483,9 +7495,9 @@ dependencies = [ [[package]] name = "solana-hash" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1eb018925ea07bf67ce767430fd580a52ed7406f61844ece6b53fdd0d97e8b2e" +checksum = "7067f2bd1e9c3f28153484f03e44bf8dc73cededa6bc132e40de9bfc667b8534" dependencies = [ "borsh 1.5.3", "bs58 0.5.1", @@ -7501,9 +7513,9 @@ dependencies = [ [[package]] name = "solana-inflation" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c7ea5a7f6bef23a9abc26f2300c208f1d64c20b319245a92eb145d4579a412" +checksum = "e4e27906f90ba8df331903292a499cc776e70ee29995da4bf5a81b54d27edefa" dependencies = [ "serde", "serde_derive", @@ -7511,9 +7523,9 @@ dependencies = [ [[package]] name = "solana-inline-spl" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57338f44084dcdda57146c49e66f5561eacb37b44573dffa550c25d9799518e8" +checksum = "85b58f0f8965285c9a045945a4089030914d7198484e4754b087d4217afeff7c" dependencies = [ "bytemuck", "solana-pubkey", @@ -7521,9 +7533,9 @@ dependencies = [ [[package]] name = "solana-instruction" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aac2ccec24c601f939880ec3e9aa4824c689dafb8a3289987f3af6fdfb579f69" +checksum = "7dbf607aff88e4f17079a33d34517b7f379d752dfa0496a94cea798a91e6f6ee" dependencies = [ "bincode", "borsh 1.5.3", @@ -7539,9 +7551,9 @@ dependencies = [ [[package]] name = "solana-last-restart-slot" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf7477c989eecc4b23f7f27ffd0e11492d3dd43c4ae5afcf24942e653def5de" +checksum = "38f2ee9af7a2815137c60d77cb930c26480bc802b55e00d9e230e81fd308062e" dependencies = [ "serde", "serde_derive", @@ -7551,24 +7563,24 @@ dependencies = [ [[package]] name = "solana-log-collector" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94415c115b9de46b906d797991986213639f86426fece3571c2b2dd992e79292" +checksum = "4adf7c3c024afb504796bace240776f9fc5a2287fa32269ee7071058cdd36378" dependencies = [ "log", ] [[package]] name = "solana-measure" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc36b279e4825178c07940cb0a64feb5cb58f57b6215e1415c3c90c91409b384" +checksum = "dcad4cf5c745ecc15fab2840a5bd35489bf467790359316b66950a8cf62c2a04" [[package]] name = "solana-metrics" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b53cc12bfbc197ea85bc2c6fbd4f881ade20d09543c9d2666d9b25e996f685" +checksum = "85f54610e313cad7a251ee8fbac5a43cbba66cdf5a92353a4945743b0e50678d" dependencies = [ "crossbeam-channel", "gethostname", @@ -7581,24 +7593,24 @@ dependencies = [ [[package]] name = "solana-msg" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ceb28774c48fa2bf3493e96216f530c4fe555b378062eaff0c597213c93ec7" +checksum = "406cd9c6ed9d4d036da00c958f0f98edb248c08eb596975011a30063ac3aa902" dependencies = [ "solana-define-syscall", ] [[package]] name = "solana-native-token" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed34b47a38511a53ea6aea47ebbcd0168971b095143b867d14f67a51392a2df5" +checksum = "08ef55ad8dcc8c5f21e2bbbc7298fa59550269e8bdf2c6976c4de626ea8a0069" [[package]] name = "solana-net-utils" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95933bfbb79f654da5a0bb181f5d735f64a657b6bc9716e6d253f47df34b0121" +checksum = "a1f918a07e0df8b68aaaff449c5feaa3cebe2882b772a35c1353fbee8467b00c" dependencies = [ "bincode", "crossbeam-channel", @@ -7615,9 +7627,9 @@ dependencies = [ [[package]] name = "solana-packet" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925a39e728e33a331a72737a1c90c1587951d7a5be8f9db6368ee73ea7a2c323" +checksum = "dfac9266a6cb79d0d37a7ae1a9944559caa286d93005773bf8005583ffcd652c" dependencies = [ "bincode", "bitflags 2.6.0", @@ -7629,9 +7641,9 @@ dependencies = [ [[package]] name = "solana-perf" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70d302f5567ee9d3ffd369980f42484c81144e4a2a8f6b8dd100743bb49d54b3" +checksum = "1e5861b21d523472322d44c71e1fb2d9703e659016abf003fb9eb2917653eaa4" dependencies = [ "ahash 0.8.11", "bincode", @@ -7656,9 +7668,9 @@ dependencies = [ [[package]] name = "solana-precompile-error" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0e5c73f0253cd8a3c25efb2f1e509e631a3181a0f7376c61d00f6b954042579" +checksum = "ba5a85f003d72bcc94cd394dcbef150bb18ccd03bd5fee6b6e8927bb0fbbe26d" dependencies = [ "num-traits", "solana-decode-error", @@ -7666,9 +7678,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8318fafc6f83d0a84b29ea5db73e03abb7e8f5b797f2e14ec28eb5f50a07ee07" +checksum = "99c693c5c392bacc44e7a86baa18069eb966d88afbc9040219ca000e873fb02e" dependencies = [ "base64 0.22.1", "bincode", @@ -7739,9 +7751,9 @@ dependencies = [ [[package]] name = "solana-program-entrypoint" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fa45480f3ea73930aae9bcf379f605565cd0288feba78dab73a33fa96c8255a" +checksum = "9e0696f51a4386f92f4e1807059bd2b649c207688b9249df332d0fd5ecac240c" dependencies = [ "solana-account-info", "solana-msg", @@ -7751,9 +7763,9 @@ dependencies = [ [[package]] name = "solana-program-error" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037b650450ebe2c0079319303e68cfdadda9806d0268200f08e1680a1d2b0796" +checksum = "7bd557d10df4380234f5b4a5971a0cae29eedcc42ebe4bbe926a21ff31912e99" dependencies = [ "borsh 1.5.3", "num-traits", @@ -7767,9 +7779,9 @@ dependencies = [ [[package]] name = "solana-program-memory" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4cab560df1cca31a480d49f0a7de1eaba77b4335b1d964b4ff3dd6c90bc919f" +checksum = "ef71296a3fa6ebaa38ae522bea71af82b7deeea170e459efa3c539b8f14e0155" dependencies = [ "num-traits", "solana-define-syscall", @@ -7777,24 +7789,24 @@ dependencies = [ [[package]] name = "solana-program-option" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7adea2c59db099fdb6aa12519f7158265c4e43dcbf3ada77421fdf8fc6a60ff1" +checksum = "506908720b9b1660f2087d9c6f45ba208fa67a0f34658804517324ef65fd432b" [[package]] name = "solana-program-pack" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e59db3ffc2fe4d000ac4f2663f55f6e3c0b9e7a634a8e1ad2770cd37380b97" +checksum = "21820c32999ce24532fb12d6188daeffa27eb88a366505a4a0553857729aae52" dependencies = [ "solana-program-error", ] [[package]] name = "solana-program-runtime" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cafddf4520976bfb5462002d158a2edd68d171ac4af07e0639fa5c1cf0d6f3" +checksum = "e77e2768067a37a8d20cd98f10e8ac653077171adc15d4acbee01aa253b95051" dependencies = [ "base64 0.22.1", "bincode", @@ -7822,9 +7834,9 @@ dependencies = [ [[package]] name = "solana-pubkey" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75991d40b6717ad11d0357d435c494fbb2af46ffbffdec015d2abb2e5e8bd62" +checksum = "c46701a845b731f2ffcf002c4bb08968434b9cf5e576cdd705259421074d1764" dependencies = [ "borsh 0.10.4", "borsh 1.5.3", @@ -7849,15 +7861,15 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f027b8985a475f32d48d3121833b510d9fe629b0de53778ae24cb43af045d5d" +checksum = "98841872ba1715c3fd783554140031967f98fccd198b387578921af7f220ca85" dependencies = [ "crossbeam-channel", "futures-util", "log", "reqwest", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_derive", "serde_json", @@ -7874,9 +7886,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925444d9129523f12b34a51a8855cd3ec8f4e807a3fe10dbe6012a4a4b8039d9" +checksum = "0a6b0b66474dff5fb3a266b00aadb0e1107350b6e80750cf16c910b10b579819" dependencies = [ "async-lock", "async-trait", @@ -7886,7 +7898,7 @@ dependencies = [ "log", "quinn", "quinn-proto", - "rustls 0.23.19", + "rustls 0.23.20", "solana-connection-cache", "solana-measure", "solana-metrics", @@ -7900,9 +7912,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd35d0923065953174ee0daeb15c79496356ea18ca92c3ac719544f8828eb2a" +checksum = "ed4fecc4b7cc0517ba3966a2845f12037e330821f4e8398d26e95366d363d92b" dependencies = [ "lazy_static", "num_cpus", @@ -7910,9 +7922,9 @@ dependencies = [ [[package]] name = "solana-rent" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef59feb19504816b3910a901ef3586eb50d6e6bf68707fbd6275faa393a07d54" +checksum = "05a4d15fe63d0e9a9551adfecfec495e3d50ba0bc4705001010c724fe84f65d8" dependencies = [ "serde", "serde_derive", @@ -7922,9 +7934,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069e0e9c89316166fd82892bac7cb4ccb3c252b42966fa44c1d112f2501b25b7" +checksum = "f9a8da03038ea6390bf23c4584a8ff026038179b23618ab791ce27114ca64fff" dependencies = [ "async-trait", "base64 0.22.1", @@ -7934,7 +7946,7 @@ dependencies = [ "log", "reqwest", "reqwest-middleware", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_derive", "serde_json", @@ -7949,9 +7961,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9da556eb0234c9b845df290f8adf78b651936bc6bfdfa2057d1958be60ae5f89" +checksum = "00156cc75b95b5a0f0cf1ec48fa9fce878364fe7900c40a87c8cad91647b3af0" dependencies = [ "anyhow", "base64 0.22.1", @@ -7959,7 +7971,7 @@ dependencies = [ "jsonrpc-core", "reqwest", "reqwest-middleware", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_derive", "serde_json", @@ -7973,9 +7985,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "379366d29add56b16e3c164789a6c0eb48175b2d6c4bb14ad9da0b4f88cea886" +checksum = "7350a74a70e53a2c63813354770b890c364508fbff786a4c9530cdbfc83978c4" dependencies = [ "solana-rpc-client", "solana-sdk", @@ -7984,15 +7996,15 @@ dependencies = [ [[package]] name = "solana-sanitize" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2e1169636c290f2bc4d9fb3fc7ab137bf8646ec349212248fa6b96af7eb1807" +checksum = "3b8c536460c84ec7cbcce45d8a68ab1c12c99933cfeb0cb332567e67a27eea2f" [[package]] name = "solana-sdk" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49364109ac57076e4722a6ef9c3cc0fafb8327a2d29cf964350fc91604b2b745" +checksum = "70bf67076763533f4b43210ad2b966672b8d8b1c837f69987bb780e6c4e6d549" dependencies = [ "bincode", "bitflags 2.6.0", @@ -8054,21 +8066,21 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467496ce2b6ea87de69fa34c7dfd9a09197c50906fa5d35cd36025a3ba034e64" +checksum = "24c160cb22c3671fe2e0fd7c3630701cfccae308174d8d31d7fc93386c3cc381" dependencies = [ "bs58 0.5.1", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "solana-secp256k1-recover" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "548f2b996441f5dbbc3b60fc9d59f20614807c5eddb2936a686036837d9b5c4e" +checksum = "3ece1b12237c7755a2070ab1d309a236b506041dd1d7927c7053b04cd3203728" dependencies = [ "borsh 1.5.3", "libsecp256k1", @@ -8078,9 +8090,9 @@ dependencies = [ [[package]] name = "solana-secp256r1-program" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71f9f41eef97932bbed8d4ed6b62df4643fd445a62996cbd4d5e0ac96ba6b9c" +checksum = "298640939d73b9229445f611d5db91bb53edf860f211911e9abc3b666799b12e" dependencies = [ "bytemuck", "openssl", @@ -8098,18 +8110,18 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-serde-varint" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5022865cd3461837f6e8309fcaef816a2f6d46481aa6d307eb0689580fa3011" +checksum = "0ef862fbe970f90d0e024c6dfca71f25210ec9a52c0e62d94249aae10bda8e97" dependencies = [ "serde", ] [[package]] name = "solana-serialize-utils" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aba668bcfbaa1deccef081f5174c1c7f4442c455f934ac0334f10b881550990" +checksum = "a6f1cdaa53aea6fa76dbacd1504e307c4d9665edd50d6d2c5154cd1f88caa1d2" dependencies = [ "solana-instruction", "solana-pubkey", @@ -8118,9 +8130,9 @@ dependencies = [ [[package]] name = "solana-sha256-hasher" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cee22aa72b8e5a58674d6b933ab8099915483a9f0fd5d0363540b32b200c7c6" +checksum = "4806e0ffeeb460968219b6a20176b1dc616089e84de1cd37e50cf7f01e295ad9" dependencies = [ "sha2 0.10.8", "solana-define-syscall", @@ -8129,18 +8141,18 @@ dependencies = [ [[package]] name = "solana-short-vec" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13773ca0f4bdf868440cd2dc389c4a02ce1ae3fafe062bf274bf4131bbf36a55" +checksum = "824dee0886a8504a62a0c06bf95928d43cec0b077992d2b543e0f898775a4931" dependencies = [ "serde", ] [[package]] name = "solana-signature" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "761eaf5d57cdceaf1e40bb1f1206ed40d713808bb536a29eab755edba24d8251" +checksum = "29cb6cae156bc2c80ae34b2b365cf460be974cf5c68799e7024615f88f54aed4" dependencies = [ "bs58 0.5.1", "ed25519-dalek 1.0.1", @@ -8153,9 +8165,9 @@ dependencies = [ [[package]] name = "solana-slot-hashes" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9c3c34cf7bf90511c914cbe34c6f1815812bcc0116c2f5dd39f597c1921ceb" +checksum = "409010900f8c357c6cb7bec25014f96e7a0826ca47c915f61f94358b01df9f68" dependencies = [ "serde", "serde_derive", @@ -8165,9 +8177,9 @@ dependencies = [ [[package]] name = "solana-slot-history" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b23b5c0aed6181f3acd1906a73ad6e7f50f13774c3cce5714f52d142f42d6a8" +checksum = "82dfd06c84fa3baea6686178b34be9f9485849045ba401c5d0e8eee2eaf485ab" dependencies = [ "bv", "serde", @@ -8177,9 +8189,9 @@ dependencies = [ [[package]] name = "solana-stable-layout" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba0c6df67ce1caf21048320a79008aa56c514c6d940464af190bd02508e06888" +checksum = "6d1629426668b0c503ce86e2fad9ed6d9d525efa958365e6b890397af491c545" dependencies = [ "solana-instruction", "solana-pubkey", @@ -8187,9 +8199,9 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156321c6a80a28376a4b8cfe450cc3cb9ff3ef6031c869c66730c5d1c7a5b39" +checksum = "5d0dae30bab2e8d079dd12e148f97090497f842ead0f0902080c2e3b2e5aa8db" dependencies = [ "async-channel", "bytes", @@ -8209,7 +8221,7 @@ dependencies = [ "quinn", "quinn-proto", "rand 0.8.5", - "rustls 0.23.19", + "rustls 0.23.20", "smallvec", "socket2", "solana-measure", @@ -8225,18 +8237,18 @@ dependencies = [ [[package]] name = "solana-sysvar-id" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c14a73d5d544353f640fc0aef023939a5fed91a51b615286227d06d8074eaca7" +checksum = "a9ec6dbb5d57e773722824069d1b2283e552f0363b1be39aa177b1d77b51ea6e" dependencies = [ "solana-pubkey", ] [[package]] name = "solana-thin-client" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0282df26de64893ff1747f6aebbc4cf9e1a48fdc3f9c2f5abb2678689e5f018d" +checksum = "5d2f14d4cee158f1cf721f48ffdbd4e1eb2cd05088dcc15defdf4357bb79de56" dependencies = [ "bincode", "log", @@ -8249,9 +8261,9 @@ dependencies = [ [[package]] name = "solana-timings" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b0e7496f3c01ea411307c737c4fc1e1cce0702ef25c8214fc0eb19e555bb714" +checksum = "c3e757afc3d9bc9b5b9cf1bea1bacd30dbbf32aa6d61e02b45afe0a861ae80f7" dependencies = [ "eager", "enum-iterator", @@ -8260,9 +8272,9 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9edcd8cefc03f0fada182c669e2d5fb274769e409af573a53a9be2367d5b661" +checksum = "e09073492368eab5c3190f4c51a114cb2ed4c5e8fe2c9bf4af6b6dfcc27accbc" dependencies = [ "async-trait", "bincode", @@ -8283,9 +8295,9 @@ dependencies = [ [[package]] name = "solana-transaction-error" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "941819f2d9a9c747417417ce7e569de5093809726667ea81ceec3a002a9de5b7" +checksum = "832ead1987e67eb4cd9a742b8e778169966d600955a39efa50b83a6bb3dec6d3" dependencies = [ "serde", "serde_derive", @@ -8295,9 +8307,9 @@ dependencies = [ [[package]] name = "solana-transaction-metrics-tracker" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e9a0b73abafab9e43a2edf7f87d9fb9c278675aa971dfaecb8f013ee9954041" +checksum = "03bb6d614d538663b1485becb375077ec1f86ebd73e436f589851c3b5fcbbaa8" dependencies = [ "base64 0.22.1", "bincode", @@ -8311,9 +8323,9 @@ dependencies = [ [[package]] name = "solana-transaction-status-client-types" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0991234ba1e3dd61e64621f15ea203286df4f531cc878c96bb16e75ee465627" +checksum = "dcbc1cbda2dd0e7de457af792c708e940dcf82991fc57f10390b62667fc5dd29" dependencies = [ "base64 0.22.1", "bincode", @@ -8329,9 +8341,9 @@ dependencies = [ [[package]] name = "solana-type-overrides" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ab02e327455bc5d1e7112c1ae2605e018088499b0ca8104a452d15d5bf5a7e7" +checksum = "a8ae015d075feeeca8ecf4fe2a7f1b8a1bd8c3002354af260c56f580bee5b737" dependencies = [ "lazy_static", "rand 0.8.5", @@ -8339,9 +8351,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96db922848a8af5118be6450b9578e96901bc2d9766c95e546ebf77d7b7060a" +checksum = "c272288da5327948b65edbafceeab66d152ab9c9141af261afc6d845e39c6dc5" dependencies = [ "async-trait", "solana-connection-cache", @@ -8354,11 +8366,11 @@ dependencies = [ [[package]] name = "solana-version" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78f02c941987e7c6cdc66c344e178d8f20060343bfc19b9036d4f1ac4bcb00ba" +checksum = "9c6e31a55156877e3f8da59dc6428976952fefee9f27d09d77a40dad3bd8aa86" dependencies = [ - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_derive", "solana-feature-set", @@ -8368,9 +8380,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8cfc69cb402926b1caac547b66c79526e5cc1a24bb471cff6c3635cc7b4087" +checksum = "9f83d18727d801e3ef5d8c29a66f9632ecd8e9f069a2891a6f730df0f2b1db82" dependencies = [ "itertools 0.12.1", "log", @@ -8382,9 +8394,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcd7208621ca973dca21cdb531ce16e5bb51249a9aac64abe08664944058ce68" +checksum = "16362e21cdee5b7a55a353f1d6adae59149dab696998ad85fda151ee621aad00" dependencies = [ "bincode", "log", @@ -8402,9 +8414,9 @@ dependencies = [ [[package]] name = "solana-zk-sdk" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1745e79296b52100d86a6c0b6413e93a81df0dd8e7612f14018e645597af95ab" +checksum = "ab1ed794c1cc420e984204c495535293a124aa9befc342441a861648c04df9d3" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -8434,9 +8446,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "2.1.4" +version = "2.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91c3da9372371eef8b32341b639c5861904875dd70518bb3fe882f104dc94912" +checksum = "1c738deb869af7fffa26a189022edc8b3dfb9789f53fc604ca4f5d25aa326170" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -8566,9 +8578,9 @@ dependencies = [ [[package]] name = "spl-discriminator" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a20542d4c8264856d205c0090512f374dbf7b3124479a3d93ab6184ae3631aa" +checksum = "a7398da23554a31660f17718164e31d31900956054f54f52d5ec1be51cb4f4b3" dependencies = [ "bytemuck", "solana-program-error", @@ -8584,7 +8596,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -8596,7 +8608,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.90", + "syn 2.0.91", "thiserror 1.0.69", ] @@ -8705,7 +8717,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -8737,7 +8749,7 @@ dependencies = [ "solana-msg", "solana-program-error", "solana-pubkey", - "spl-discriminator 0.4.0", + "spl-discriminator 0.4.1", "spl-pod 0.5.0", "spl-program-error 0.6.0", "spl-type-length-value 0.7.0", @@ -8890,7 +8902,7 @@ dependencies = [ "solana-msg", "solana-program-error", "solana-pubkey", - "spl-discriminator 0.4.0", + "spl-discriminator 0.4.1", "spl-pod 0.5.0", "thiserror 1.0.69", ] @@ -8924,7 +8936,7 @@ dependencies = [ "solana-msg", "solana-program-error", "solana-pubkey", - "spl-discriminator 0.4.0", + "spl-discriminator 0.4.1", "spl-pod 0.5.0", "spl-type-length-value 0.7.0", "thiserror 1.0.69", @@ -8963,7 +8975,7 @@ dependencies = [ "solana-msg", "solana-program-error", "solana-pubkey", - "spl-discriminator 0.4.0", + "spl-discriminator 0.4.1", "spl-pod 0.5.0", "spl-program-error 0.6.0", "spl-tlv-account-resolution 0.9.0", @@ -8997,7 +9009,7 @@ dependencies = [ "solana-decode-error", "solana-msg", "solana-program-error", - "spl-discriminator 0.4.0", + "spl-discriminator 0.4.1", "spl-pod 0.5.0", "thiserror 1.0.69", ] @@ -9080,7 +9092,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -9100,7 +9112,7 @@ dependencies = [ "hex", "once_cell", "reqwest", - "semver 1.0.23", + "semver 1.0.24", "serde", "serde_json", "sha2 0.10.8", @@ -9122,9 +9134,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035" dependencies = [ "proc-macro2", "quote", @@ -9133,14 +9145,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.8.14" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0523f59468a2696391f2a772edc089342aacd53c3caa2ac3264e598edf119b" +checksum = "219389c1ebe89f8333df8bdfb871f6631c552ff399c23cac02480b6088aad8f0" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -9169,7 +9181,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -9255,11 +9267,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.4" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" dependencies = [ - "thiserror-impl 2.0.4", + "thiserror-impl 2.0.9", ] [[package]] @@ -9270,18 +9282,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "thiserror-impl" -version = "2.0.4" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -9346,9 +9358,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -9395,7 +9407,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -9420,9 +9432,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.16" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ "futures-core", "pin-project-lite", @@ -9621,7 +9633,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -9769,9 +9781,9 @@ checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" [[package]] name = "unicase" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e51b68083f157f853b6379db119d1c1be0e6e4dec98101079dec41f6f5cf6df" +checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539" [[package]] name = "unicode-ident" @@ -9785,12 +9797,6 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "unicode-width" version = "0.2.0" @@ -9967,9 +9973,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c" +checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396" dependencies = [ "cfg-if 1.0.0", "once_cell", @@ -9978,24 +9984,23 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd" +checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.47" +version = "0.4.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d" +checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -10006,9 +10011,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051" +checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -10016,22 +10021,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d" +checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.97" +version = "0.2.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49" +checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6" [[package]] name = "wasm-encoder" @@ -10258,7 +10263,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e06c0641a4add879ba71ccb3a1e4278fd546f76f1eafb21d8f7b07733b547cd5" dependencies = [ "indexmap 2.7.0", - "semver 1.0.23", + "semver 1.0.24", ] [[package]] @@ -10467,7 +10472,7 @@ checksum = "09b5575a75e711ca6c36bb9ad647c93541cdc8e34218031acba5da3f35919dd3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -10478,9 +10483,9 @@ checksum = "9dafab2db172a53e23940e0fa3078c202f567ee5f13f4b42f66b694fab43c658" [[package]] name = "web-sys" -version = "0.3.74" +version = "0.3.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c" +checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc" dependencies = [ "js-sys", "wasm-bindgen", @@ -10848,7 +10853,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", "synstructure 0.13.1", ] @@ -10870,7 +10875,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -10890,7 +10895,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", "synstructure 0.13.1", ] @@ -10911,7 +10916,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -10946,7 +10951,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] diff --git a/bridge-cli/src/defaults.rs b/bridge-cli/src/defaults.rs index cf60c2e..740fdcf 100644 --- a/bridge-cli/src/defaults.rs +++ b/bridge-cli/src/defaults.rs @@ -50,7 +50,7 @@ pub const ARB_BRIDGE_TOKEN_FACTORY_ADDRESS_TESTNET: &str = "0xd565f7CcE0FA1bB8DBe73FCDA281390d545f6200"; pub const SOLANA_RPC_TESTNET: &str = "https://api.devnet.solana.com"; -pub const SOLANA_BRIDGE_ADDRESS_TESTNET: &str = ""; +pub const SOLANA_BRIDGE_ADDRESS_TESTNET: &str = "Gy1XPwYZURfBzHiGAxnw3SYC33SfqsEpGSS5zeBge28p"; pub const SOLANA_WORMHOLE_ADDRESS_TESTNET: &str = "3u8hJUVTA4jH1wYAyUur7FFZVQ8H635K3tSHHF4ssjQ5"; pub const FAST_BRIDGE_ACCOUNT_ID_TESTNET: &str = "fastbridge.testnet"; diff --git a/bridge-cli/src/omni_connector_command.rs b/bridge-cli/src/omni_connector_command.rs index efa836c..e127cf9 100644 --- a/bridge-cli/src/omni_connector_command.rs +++ b/bridge-cli/src/omni_connector_command.rs @@ -10,7 +10,7 @@ use omni_connector::{ BindTokenArgs, DeployTokenArgs, FinTransferArgs, InitTransferArgs, LogMetadataArgs, OmniConnector, OmniConnectorBuilder, }; -use omni_types::{ChainKind, Fee}; +use omni_types::{ChainKind, Fee, TransferId}; use solana_bridge_client::SolanaBridgeClientBuilder; use solana_client::nonblocking::rpc_client::RpcClient; use solana_sdk::signature::Keypair; @@ -51,7 +51,11 @@ pub enum OmniConnectorSubCommand { }, NearSignTransfer { #[clap(short, long)] - nonce: u64, + origin_chain_id: u8, + #[clap(short, long)] + origin_nonce: u64, + #[clap(short, long)] + fee_recipient: Option, #[clap(short, long)] fee: u128, #[clap(long)] @@ -224,15 +228,20 @@ pub async fn match_subcommand(cmd: OmniConnectorSubCommand, network: Network) { .unwrap(); } OmniConnectorSubCommand::NearSignTransfer { - nonce, + origin_chain_id, + origin_nonce, + fee_recipient, fee, native_fee, config_cli, } => { omni_connector(network, config_cli) .near_sign_transfer( - nonce, - None, + TransferId { + origin_chain: ChainKind::try_from(origin_chain_id).unwrap(), + origin_nonce, + }, + fee_recipient.map(|recipient| AccountId::from_str(&recipient).unwrap()), Some(Fee { fee: fee.into(), native_fee: native_fee.into(), @@ -368,8 +377,8 @@ pub async fn match_subcommand(cmd: OmniConnectorSubCommand, network: Network) { config_cli, } => { omni_connector(network, config_cli) - .deploy_token(DeployTokenArgs::SolanaDeployToken { - tx_hash: transaction_hash.parse().unwrap(), + .deploy_token(DeployTokenArgs::SolanaDeployTokenWithTxHash { + near_tx_hash: transaction_hash.parse().unwrap(), sender_id: sender_id.map(|id| id.parse().unwrap()), }) .await @@ -407,8 +416,8 @@ pub async fn match_subcommand(cmd: OmniConnectorSubCommand, network: Network) { config_cli, } => { omni_connector(network, config_cli) - .fin_transfer(FinTransferArgs::SolanaFinTransfer { - tx_hash: transaction_hash.parse().unwrap(), + .fin_transfer(FinTransferArgs::SolanaFinTransferWithTxHash { + near_tx_hash: transaction_hash.parse().unwrap(), solana_token: solana_token.parse().unwrap(), sender_id: sender_id.map(|id| id.parse().unwrap()), }) diff --git a/bridge-sdk/bridge-clients/evm-bridge-client/Cargo.toml b/bridge-sdk/bridge-clients/evm-bridge-client/Cargo.toml index 349a1a9..5408c2a 100644 --- a/bridge-sdk/bridge-clients/evm-bridge-client/Cargo.toml +++ b/bridge-sdk/bridge-clients/evm-bridge-client/Cargo.toml @@ -13,14 +13,12 @@ near-crypto.workspace = true near-jsonrpc-client.workspace = true near-primitives.workspace = true near-token.workspace = true -near-contract-standards.workspace = true omni-types.workspace = true serde_json.workspace = true tracing.workspace = true eth-proof = { path = "../../eth-proof" } near-rpc-client = { path = "../../near-rpc-client" } bridge-connector-common = { path = "../../connectors/bridge-connector-common" } -near-bridge-client = { path = "../near-bridge-client" } [lib] path = "src/evm_bridge_client.rs" diff --git a/bridge-sdk/bridge-clients/near-bridge-client/Cargo.toml b/bridge-sdk/bridge-clients/near-bridge-client/Cargo.toml index e38ff3f..b703950 100644 --- a/bridge-sdk/bridge-clients/near-bridge-client/Cargo.toml +++ b/bridge-sdk/bridge-clients/near-bridge-client/Cargo.toml @@ -12,6 +12,7 @@ near-primitives.workspace = true near-token.workspace = true near-contract-standards.workspace = true omni-types.workspace = true +serde.workspace = true serde_json.workspace = true tracing.workspace = true near-rpc-client = { path = "../../near-rpc-client" } diff --git a/bridge-sdk/bridge-clients/near-bridge-client/src/near_bridge_client.rs b/bridge-sdk/bridge-clients/near-bridge-client/src/near_bridge_client.rs index 1209819..bede32f 100644 --- a/bridge-sdk/bridge-clients/near-bridge-client/src/near_bridge_client.rs +++ b/bridge-sdk/bridge-clients/near-bridge-client/src/near_bridge_client.rs @@ -1,19 +1,17 @@ +use std::str::FromStr; + use bridge_connector_common::result::{BridgeSdkError, Result}; use derive_builder::Builder; use near_contract_standards::storage_management::StorageBalance; use near_crypto::SecretKey; -use near_primitives::{ - hash::CryptoHash, - types::AccountId, - views::{FinalExecutionOutcomeView, FinalExecutionStatus}, -}; +use near_primitives::{hash::CryptoHash, types::AccountId}; +use near_rpc_client::{ChangeRequest, ViewRequest}; use near_token::NearToken; use omni_types::{ locker_args::{BindTokenArgs, ClaimFeeArgs, DeployTokenArgs, FinTransferArgs}, - ChainKind, Fee, OmniAddress, + ChainKind, Fee, OmniAddress, TransferId, }; use serde_json::json; -use std::str::FromStr; const STORAGE_DEPOSIT_GAS: u64 = 10_000_000_000_000; @@ -38,6 +36,11 @@ const FIN_TRANSFER_DEPOSIT: u128 = 60_000_000_000_000_000_000_000; const CLAIM_FEE_GAS: u64 = 300_000_000_000_000; const CLAIM_FEE_DEPOSIT: u128 = 200_000_000_000_000_000_000_000; +#[derive(serde::Deserialize)] +struct StorageBalanceBounds { + min: NearToken, +} + /// Bridging NEAR-originated NEP-141 tokens #[derive(Builder, Default, Clone)] pub struct NearBridgeClient { @@ -58,11 +61,13 @@ impl NearBridgeClient { let response = near_rpc_client::view( endpoint, - token_id, - "get_token_id".to_string(), - serde_json::json!({ - "address": token_address - }), + ViewRequest { + contract_account_id: token_id, + method_name: "get_token_id".to_string(), + args: serde_json::json!({ + "address": token_address + }), + }, ) .await?; @@ -77,11 +82,13 @@ impl NearBridgeClient { let response = near_rpc_client::view( endpoint, - token_id, - "get_native_token_id".to_string(), - serde_json::json!({ - "origin_chain": origin_chain - }), + ViewRequest { + contract_account_id: token_id, + method_name: "get_native_token_id".to_string(), + args: serde_json::json!({ + "chain": origin_chain + }), + }, ) .await?; @@ -90,23 +97,28 @@ impl NearBridgeClient { Ok(token_id) } - pub async fn get_storage_balance(&self, account_id: AccountId) -> Result { + pub async fn get_storage_balance( + &self, + token_id: AccountId, + account_id: AccountId, + ) -> Result { let endpoint = self.endpoint()?; - let token_locker_id = self.token_locker_id_as_account_id()?; let response = near_rpc_client::view( endpoint, - token_locker_id, - "storage_balance_of".to_string(), - serde_json::json!({ - "account_id": account_id - }), + ViewRequest { + contract_account_id: token_id, + method_name: "storage_balance_of".to_string(), + args: serde_json::json!({ + "account_id": account_id + }), + }, ) .await?; let storage_balance: Option = serde_json::from_slice(&response)?; - storage_balance.map_or(Ok(0), |balance| Ok(balance.available.as_yoctonear())) + storage_balance.map_or(Ok(0), |balance| Ok(balance.total.as_yoctonear())) } pub async fn get_required_balance_for_account(&self) -> Result { @@ -115,13 +127,16 @@ impl NearBridgeClient { let response = near_rpc_client::view( endpoint, - token_locker_id, - "required_balance_for_account".to_string(), - serde_json::Value::Null, + ViewRequest { + contract_account_id: token_locker_id, + method_name: "required_balance_for_account".to_string(), + args: serde_json::Value::Null, + }, ) .await?; let required_balance: NearToken = serde_json::from_slice(&response)?; + Ok(required_balance.as_yoctonear()) } @@ -134,17 +149,21 @@ impl NearBridgeClient { let response = near_rpc_client::view( endpoint, - token_id.clone(), - "storage_minimum_balance".to_string(), - serde_json::Value::Null, + ViewRequest { + contract_account_id: token_id.clone(), + method_name: "storage_balance_bounds".to_string(), + args: serde_json::Value::Null, + }, ) .await?; - let storage_minimum_balance = serde_json::from_slice::(&response)?; + let storage_balance_bounds = serde_json::from_slice::(&response)?; - let total_balance = NearToken::from_yoctonear(self.get_storage_balance(account_id).await?); + let total_balance = + NearToken::from_yoctonear(self.get_storage_balance(token_id, account_id).await?); - Ok(storage_minimum_balance + Ok(storage_balance_bounds + .min .saturating_sub(total_balance) .as_yoctonear()) } @@ -159,18 +178,21 @@ impl NearBridgeClient { let endpoint = self.endpoint()?; let token_locker = self.token_locker_id_as_str()?; - let tx_hash = near_rpc_client::change( + let tx_hash = near_rpc_client::change_and_wait( endpoint, - self.signer()?, - token_id, - "storage_deposit".to_string(), - serde_json::json!({ - "account_id": token_locker - }) - .to_string() - .into_bytes(), - STORAGE_DEPOSIT_GAS, - amount, + ChangeRequest { + signer: self.signer()?, + receiver_id: token_id, + method_name: "storage_deposit".to_string(), + args: serde_json::json!({ + "account_id": token_locker + }) + .to_string() + .into_bytes(), + gas: STORAGE_DEPOSIT_GAS, + deposit: amount, + }, + near_primitives::views::TxExecutionStatus::Executed, ) .await?; @@ -182,35 +204,34 @@ impl NearBridgeClient { Ok(tx_hash) } - pub async fn storage_deposit(&self, amount: u128) -> Result<()> { + pub async fn storage_deposit(&self, amount: u128) -> Result { let endpoint = self.endpoint()?; let token_locker_id = self.token_locker_id_as_str()?; - let tx = near_rpc_client::change_and_wait_for_outcome( + let tx_hash = near_rpc_client::change_and_wait( endpoint, - self.signer()?, - token_locker_id.to_string(), - "storage_deposit".to_string(), - json!({ - "account_id": None:: - }) - .to_string() - .into_bytes(), - STORAGE_DEPOSIT_GAS, - amount, + ChangeRequest { + signer: self.signer()?, + receiver_id: token_locker_id.to_string(), + method_name: "storage_deposit".to_string(), + args: json!({ + "account_id": None:: + }) + .to_string() + .into_bytes(), + gas: STORAGE_DEPOSIT_GAS, + deposit: amount, + }, + near_primitives::views::TxExecutionStatus::Executed, ) .await?; - if let FinalExecutionStatus::Failure(_) = tx.status { - return Err(BridgeSdkError::UnknownError); - } - tracing::info!( - tx_hash = format!("{:?}", tx.transaction.hash), + tx_hash = tx_hash.to_string(), "Sent storage deposit transaction" ); - Ok(()) + Ok(tx_hash) } /// Logs token metadata to token_locker contract. The proof from this transaction is then used to deploy a corresponding token on other chains @@ -218,18 +239,21 @@ impl NearBridgeClient { pub async fn log_token_metadata(&self, token_id: String) -> Result { let endpoint = self.endpoint()?; - let tx_hash = near_rpc_client::change( + let tx_hash = near_rpc_client::change_and_wait( endpoint, - self.signer()?, - self.token_locker_id_as_str()?.to_string(), - "log_metadata".to_string(), - serde_json::json!({ - "token_id": token_id - }) - .to_string() - .into_bytes(), - LOG_METADATA_GAS, - LOG_METADATA_DEPOSIT, + ChangeRequest { + signer: self.signer()?, + receiver_id: self.token_locker_id_as_str()?.to_string(), + method_name: "log_metadata".to_string(), + args: serde_json::json!({ + "token_id": token_id + }) + .to_string() + .into_bytes(), + gas: LOG_METADATA_GAS, + deposit: LOG_METADATA_DEPOSIT, + }, + near_primitives::views::TxExecutionStatus::Executed, ) .await?; @@ -257,19 +281,22 @@ impl NearBridgeClient { prover_args: borsh::to_vec(&prover_args).unwrap(), }; - let tx_hash = near_rpc_client::change( + let tx_hash = near_rpc_client::change_and_wait( endpoint, - self.signer()?, - token_locker_id.to_string(), - "deploy_token".to_string(), - borsh::to_vec(&args).map_err(|_| BridgeSdkError::UnknownError)?, - DEPLOY_TOKEN_GAS, - DEPLOY_TOKEN_DEPOSIT, + ChangeRequest { + signer: self.signer()?, + receiver_id: token_locker_id.to_string(), + method_name: "deploy_token".to_string(), + args: borsh::to_vec(&args).map_err(|_| BridgeSdkError::UnknownError)?, + gas: DEPLOY_TOKEN_GAS, + deposit: DEPLOY_TOKEN_DEPOSIT, + }, + near_primitives::views::TxExecutionStatus::Executed, ) .await?; tracing::info!( - tx_hash = format!("{:?}", tx_hash), + tx_hash = tx_hash.to_string(), "Sent deploy token transaction" ); @@ -281,19 +308,22 @@ impl NearBridgeClient { let endpoint = self.endpoint()?; let token_locker_id = self.token_locker_id_as_str()?; - let tx_hash = near_rpc_client::change( + let tx_hash = near_rpc_client::change_and_wait( endpoint, - self.signer()?, - token_locker_id.to_string(), - "deploy_token".to_string(), - borsh::to_vec(&args).map_err(|_| BridgeSdkError::UnknownError)?, - DEPLOY_TOKEN_GAS, - DEPLOY_TOKEN_DEPOSIT, + ChangeRequest { + signer: self.signer()?, + receiver_id: token_locker_id.to_string(), + method_name: "deploy_token".to_string(), + args: borsh::to_vec(&args).map_err(|_| BridgeSdkError::UnknownError)?, + gas: DEPLOY_TOKEN_GAS, + deposit: DEPLOY_TOKEN_DEPOSIT, + }, + near_primitives::views::TxExecutionStatus::Executed, ) .await?; tracing::info!( - tx_hash = format!("{:?}", tx_hash), + tx_hash = tx_hash.to_string(), "Sent deploy token transaction" ); @@ -306,22 +336,21 @@ impl NearBridgeClient { let endpoint = self.endpoint()?; let token_locker_id = self.token_locker_id_as_str()?; - let tx_hash = near_rpc_client::change( + let tx_hash = near_rpc_client::change_and_wait( endpoint, - self.signer()?, - token_locker_id.to_string(), - "bind_token".to_string(), - borsh::to_vec(&args).map_err(|_| BridgeSdkError::UnknownError)?, - BIND_TOKEN_GAS, - BIND_TOKEN_DEPOSIT, + ChangeRequest { + signer: self.signer()?, + receiver_id: token_locker_id.to_string(), + method_name: "bind_token".to_string(), + args: borsh::to_vec(&args).map_err(|_| BridgeSdkError::UnknownError)?, + gas: BIND_TOKEN_GAS, + deposit: BIND_TOKEN_DEPOSIT, + }, + near_primitives::views::TxExecutionStatus::Executed, ) .await?; - tracing::info!( - tx_hash = format!("{:?}", tx_hash), - "Sent bind token transaction" - ); - + tracing::info!(tx_hash = tx_hash.to_string(), "Sent bind token transaction"); Ok(tx_hash) } @@ -329,38 +358,37 @@ impl NearBridgeClient { #[tracing::instrument(skip_all, name = "SIGN TRANSFER")] pub async fn sign_transfer( &self, - origin_nonce: u64, + transfer_id: TransferId, fee_recipient: Option, fee: Option, - ) -> Result { + ) -> Result { let endpoint = self.endpoint()?; - let outcome = near_rpc_client::change_and_wait_for_outcome( + let tx_hash = near_rpc_client::change_and_wait( endpoint, - self.signer()?, - self.token_locker_id_as_str()?.to_string(), - "sign_transfer".to_string(), - serde_json::json!({ - "transfer_id": { - "origin_chain": ChainKind::Near, // TODO: provide transfer_id instead of only nonce - "origin_nonce": origin_nonce - }, - "fee_recipient": fee_recipient, - "fee": fee, - }) - .to_string() - .into_bytes(), - SIGN_TRANSFER_GAS, - SIGN_TRANSFER_DEPOSIT, // TODO: make a contract call to signer account to determine the required deposit + ChangeRequest { + signer: self.signer()?, + receiver_id: self.token_locker_id_as_str()?.to_string(), + method_name: "sign_transfer".to_string(), + args: serde_json::json!({ + "transfer_id": transfer_id, + "fee_recipient": fee_recipient, + "fee": fee, + }) + .to_string() + .into_bytes(), + gas: SIGN_TRANSFER_GAS, + deposit: SIGN_TRANSFER_DEPOSIT, // TODO: make a contract call to signer account to determine the required deposit + }, + near_primitives::views::TxExecutionStatus::Included, ) .await?; tracing::info!( - tx_hash = format!("{:?}", outcome.transaction.hash), + tx_hash = tx_hash.to_string(), "Sent sign transfer transaction" ); - - Ok(outcome) + Ok(tx_hash) } /// Gets the required balance for the init transfer @@ -374,12 +402,14 @@ impl NearBridgeClient { let response = near_rpc_client::view( endpoint, - token_locker_id, - "required_balance_for_init_transfer".to_string(), - serde_json::json!({ - "recipient": recipient, - "sender": format!("near:{}", sender) - }), + ViewRequest { + contract_account_id: token_locker_id, + method_name: "required_balance_for_init_transfer".to_string(), + args: serde_json::json!({ + "recipient": recipient, + "sender": format!("near:{}", sender) + }), + }, ) .await?; @@ -402,7 +432,9 @@ impl NearBridgeClient { .get_required_balance_for_init_transfer(&receiver, self.account_id()?.as_str()) .await? + self.get_required_balance_for_account().await?; - let existing_balance = self.get_storage_balance(self.account_id()?).await?; + let existing_balance = self + .get_storage_balance(self.token_locker_id_as_account_id()?, self.account_id()?) + .await?; if existing_balance < required_balance { self.storage_deposit(required_balance - existing_balance) @@ -412,32 +444,31 @@ impl NearBridgeClient { let fee = 0; let native_fee = 0; - let tx_hash = near_rpc_client::change( + let tx_hash = near_rpc_client::change_and_wait( endpoint, - self.signer()?, - token_id, - "ft_transfer_call".to_string(), - serde_json::json!({ - "receiver_id": token_locker, - "amount": amount.to_string(), - "msg": serde_json::json!({ - "recipient": receiver, - "fee": fee, - "native_token_fee": native_fee + ChangeRequest { + signer: self.signer()?, + receiver_id: token_id, + method_name: "ft_transfer_call".to_string(), + args: serde_json::json!({ + "receiver_id": token_locker, + "amount": amount.to_string(), + "msg": serde_json::json!({ + "recipient": receiver, + "fee": fee, + "native_token_fee": native_fee + }) }) - }) - .to_string() - .into_bytes(), - INIT_TRANSFER_GAS, - INIT_TRANSFER_DEPOSIT, + .to_string() + .into_bytes(), + gas: INIT_TRANSFER_GAS, + deposit: INIT_TRANSFER_DEPOSIT, + }, + near_primitives::views::TxExecutionStatus::Executed, ) .await?; - tracing::info!( - tx_hash = format!("{:?}", tx_hash), - "Sent transfer transaction" - ); - + tracing::info!(tx_hash = tx_hash.to_string(), "Sent transfer transaction"); Ok(tx_hash) } @@ -446,48 +477,49 @@ impl NearBridgeClient { pub async fn fin_transfer(&self, args: FinTransferArgs) -> Result { let endpoint = self.endpoint()?; - let tx_hash = near_rpc_client::change( + let tx_hash = near_rpc_client::change_and_wait( endpoint, - self.signer()?, - self.token_locker_id_as_str()?.to_string(), - "fin_transfer".to_string(), - borsh::to_vec(&args).map_err(|_| BridgeSdkError::UnknownError)?, - FIN_TRANSFER_GAS, - FIN_TRANSFER_DEPOSIT, + ChangeRequest { + signer: self.signer()?, + receiver_id: self.token_locker_id_as_str()?.to_string(), + method_name: "fin_transfer".to_string(), + args: borsh::to_vec(&args).map_err(|_| BridgeSdkError::UnknownError)?, + gas: FIN_TRANSFER_GAS, + deposit: FIN_TRANSFER_DEPOSIT, + }, + near_primitives::views::TxExecutionStatus::Included, ) .await?; tracing::info!( - tx_hash = format!("{:?}", tx_hash), + tx_hash = tx_hash.to_string(), "Sent finalize transfer transaction" ); - Ok(tx_hash) } /// Claims fee on NEAR chain using the token locker #[tracing::instrument(skip_all, name = "CLAIM FEE")] - pub async fn claim_fee(&self, args: ClaimFeeArgs) -> Result { + pub async fn claim_fee(&self, args: ClaimFeeArgs) -> Result { let endpoint = self.endpoint()?; let token_locker_id = self.token_locker_id_as_str()?; - let outcome = near_rpc_client::change_and_wait_for_outcome( + let tx_hash = near_rpc_client::change_and_wait( endpoint, - self.signer()?, - token_locker_id.to_string(), - "claim_fee".to_string(), - borsh::to_vec(&args).map_err(|_| BridgeSdkError::UnknownError)?, - CLAIM_FEE_GAS, - CLAIM_FEE_DEPOSIT, + ChangeRequest { + signer: self.signer()?, + receiver_id: token_locker_id.to_string(), + method_name: "claim_fee".to_string(), + args: borsh::to_vec(&args).map_err(|_| BridgeSdkError::UnknownError)?, + gas: CLAIM_FEE_GAS, + deposit: CLAIM_FEE_DEPOSIT, + }, + near_primitives::views::TxExecutionStatus::Included, ) .await?; - tracing::info!( - tx_hash = format!("{:?}", outcome.transaction.hash), - "Sent claim fee request" - ); - - Ok(outcome) + tracing::info!(tx_hash = tx_hash.to_string(), "Sent claim fee request"); + Ok(tx_hash) } pub async fn extract_transfer_log( @@ -502,9 +534,16 @@ impl NearBridgeClient { Some(id) => id, None => self.account_id()?, }; - let sign_tx = - near_rpc_client::wait_for_tx_final_outcome(transaction_hash, sender_id, endpoint, 30) - .await?; + let tx_hash = near_rpc_client::wait_for_tx( + endpoint, + transaction_hash, + sender_id.clone(), + near_primitives::views::TxExecutionStatus::Executed, + 60, + ) + .await?; + + let sign_tx = near_rpc_client::get_tx_final_outcome(endpoint, tx_hash, sender_id).await?; let transfer_log = sign_tx .receipts_outcome diff --git a/bridge-sdk/bridge-clients/solana-bridge-client/src/error.rs b/bridge-sdk/bridge-clients/solana-bridge-client/src/error.rs index 64fd2c2..5cee5bd 100644 --- a/bridge-sdk/bridge-clients/solana-bridge-client/src/error.rs +++ b/bridge-sdk/bridge-clients/solana-bridge-client/src/error.rs @@ -8,4 +8,6 @@ pub enum SolanaClientError { ConfigError(String), #[error("Invalid account data")] InvalidAccountData(String), + #[error("Invalid event")] + InvalidEvent, } diff --git a/bridge-sdk/bridge-clients/solana-bridge-client/src/instructions.rs b/bridge-sdk/bridge-clients/solana-bridge-client/src/instructions.rs index 5aeef77..e242434 100644 --- a/bridge-sdk/bridge-clients/solana-bridge-client/src/instructions.rs +++ b/bridge-sdk/bridge-clients/solana-bridge-client/src/instructions.rs @@ -57,6 +57,20 @@ impl BorshSerialize for FinalizeTransfer { } } +pub struct FinalizeTransferSol { + pub payload: FinalizeTransferInstructionPayload, + pub signature: [u8; 65], +} + +impl BorshSerialize for FinalizeTransferSol { + fn serialize(&self, writer: &mut W) -> std::io::Result<()> { + writer.write_all(&get_instruction_identifier("global:finalize_transfer_sol"))?; + self.payload.serialize(writer)?; + writer.write_all(&self.signature)?; + Ok(()) + } +} + pub struct LogMetadata { pub override_name: String, pub override_symbol: String, diff --git a/bridge-sdk/bridge-clients/solana-bridge-client/src/solana_bridge_client.rs b/bridge-sdk/bridge-clients/solana-bridge-client/src/solana_bridge_client.rs index 110266e..9572739 100644 --- a/bridge-sdk/bridge-clients/solana-bridge-client/src/solana_bridge_client.rs +++ b/bridge-sdk/bridge-clients/solana-bridge-client/src/solana_bridge_client.rs @@ -1,15 +1,19 @@ -use crate::{error::SolanaClientError, instructions::*}; use borsh::{BorshDeserialize, BorshSerialize}; use derive_builder::Builder; use solana_client::nonblocking::rpc_client::RpcClient; use solana_sdk::{ instruction::{AccountMeta, Instruction}, + program_option::COption, + program_pack::Pack, pubkey::Pubkey, signature::{Keypair, Signature}, signer::Signer, system_program, sysvar, transaction::Transaction, }; +use spl_token::state::Mint; + +use crate::{error::SolanaClientError, instructions::*}; mod error; mod instructions; @@ -38,7 +42,6 @@ pub struct TransferId { pub struct DepositPayload { pub destination_nonce: u64, pub transfer_id: TransferId, - pub token: String, pub amount: u128, pub recipient: Pubkey, pub fee_recipient: Option, @@ -242,17 +245,22 @@ impl SolanaBridgeClient { ], &spl_associated_token_account::ID, ); - let (vault, _) = Pubkey::find_program_address(&[b"vault", token.as_ref()], program_id); let (wormhole_bridge, wormhole_fee_collector, wormhole_sequence) = self.get_wormhole_accounts().await?; let wormhole_message = Keypair::new(); + let is_bridged_token = match self.get_token_owner(token).await? { + COption::Some(owner) => owner == authority, + COption::None => false, + }; + + // TODO: Proved fee&native fee through the arguments let instruction_data = InitTransfer { amount, recipient, - fee: 0, - native_fee: 1, + fee: 20, + native_fee: 10, }; let instruction = Instruction::new_with_borsh( @@ -262,7 +270,13 @@ impl SolanaBridgeClient { AccountMeta::new_readonly(authority, false), AccountMeta::new(token, false), AccountMeta::new(from_token_account, false), - AccountMeta::new(vault, false), // Optional + if is_bridged_token { + AccountMeta::new(*program_id, false) // Vault is not present for non-native tokens + } else { + let (vault, _) = + Pubkey::find_program_address(&[b"vault", token.as_ref()], program_id); + AccountMeta::new(vault, false) + }, AccountMeta::new(sol_vault, false), AccountMeta::new(keypair.pubkey(), true), AccountMeta::new_readonly(config, false), @@ -305,7 +319,7 @@ impl SolanaBridgeClient { amount, recipient, fee: 0, - native_fee: 0, + native_fee: 10, }; let instruction = Instruction::new_with_borsh( @@ -364,9 +378,6 @@ impl SolanaBridgeClient { &spl_associated_token_account::ID, ); - let (vault, _) = - Pubkey::find_program_address(&[b"vault", solana_token.as_ref()], program_id); - let (wormhole_bridge, wormhole_fee_collector, wormhole_sequence) = self.get_wormhole_accounts().await?; let wormhole_message = Keypair::new(); @@ -381,6 +392,11 @@ impl SolanaBridgeClient { signature: data.signature, }; + let is_bridged_token = match self.get_token_owner(solana_token).await? { + COption::Some(owner) => owner == authority, + COption::None => false, + }; + let instruction = Instruction::new_with_borsh( *program_id, &instruction_data, @@ -390,7 +406,15 @@ impl SolanaBridgeClient { AccountMeta::new(authority, false), AccountMeta::new_readonly(recipient, false), AccountMeta::new(solana_token, false), - AccountMeta::new(vault, false), // Optional vault + if is_bridged_token { + AccountMeta::new(*program_id, false) // Vault is not present for non-native tokens + } else { + let (vault, _) = Pubkey::find_program_address( + &[b"vault", solana_token.as_ref()], + program_id, + ); + AccountMeta::new(vault, false) + }, AccountMeta::new(token_account, false), AccountMeta::new_readonly(config, false), AccountMeta::new(wormhole_bridge, false), @@ -440,7 +464,7 @@ impl SolanaBridgeClient { self.get_wormhole_accounts().await?; let wormhole_message = Keypair::new(); - let instruction_data = FinalizeTransfer { + let instruction_data = FinalizeTransferSol { payload: FinalizeTransferInstructionPayload { destination_nonce: data.payload.destination_nonce, transfer_id: data.payload.transfer_id, @@ -511,6 +535,17 @@ impl SolanaBridgeClient { Ok(signature) } + async fn get_token_owner(&self, token: Pubkey) -> Result, SolanaClientError> { + let client = self.client()?; + + let mint_account = client.get_account(&token).await?; + + let mint_data = Mint::unpack(&mint_account.data) + .map_err(|e| SolanaClientError::InvalidAccountData(e.to_string()))?; + + Ok(mint_data.mint_authority) + } + pub fn client(&self) -> Result<&RpcClient, SolanaClientError> { self.client.as_ref().ok_or(SolanaClientError::ConfigError( "Client not initialized".to_string(), diff --git a/bridge-sdk/connectors/eth-connector/src/eth_connector.rs b/bridge-sdk/connectors/eth-connector/src/eth_connector.rs index 2c6cf02..7ecb856 100644 --- a/bridge-sdk/connectors/eth-connector/src/eth_connector.rs +++ b/bridge-sdk/connectors/eth-connector/src/eth_connector.rs @@ -7,6 +7,7 @@ use near_primitives::{ hash::CryptoHash, types::{AccountId, TransactionOrReceiptId}, }; +use near_rpc_client::ChangeRequest; use sha3::{Digest, Keccak256}; use std::{str::FromStr, sync::Arc}; @@ -111,12 +112,14 @@ impl EthConnector { let tx_hash = near_rpc_client::change( near_endpoint, - self.near_signer()?, - self.eth_connector_account_id()?.to_string(), - "deposit".to_string(), - args, - 300_000_000_000_000, - 0, + ChangeRequest { + method_name: "deposit".to_string(), + receiver_id: self.eth_connector_account_id()?.to_string(), + args, + gas: 300_000_000_000_000, + deposit: 0, + signer: self.near_signer()?, + }, ) .await?; @@ -145,12 +148,14 @@ impl EthConnector { let tx_hash = near_rpc_client::change( near_endpoint, - self.near_signer()?, - eth_connector_account_id, - "withdraw".to_string(), - args, - 300_000_000_000_000, - 1, + ChangeRequest { + method_name: "withdraw".to_string(), + receiver_id: eth_connector_account_id, + args, + gas: 300_000_000_000_000, + deposit: 1, + signer: self.near_signer()?, + }, ) .await?; diff --git a/bridge-sdk/connectors/fast-bridge/src/fast_bridge.rs b/bridge-sdk/connectors/fast-bridge/src/fast_bridge.rs index 853b641..a22d90f 100644 --- a/bridge-sdk/connectors/fast-bridge/src/fast_bridge.rs +++ b/bridge-sdk/connectors/fast-bridge/src/fast_bridge.rs @@ -5,6 +5,7 @@ use derive_builder::Builder; use ethers::prelude::*; use near_crypto::SecretKey; use near_primitives::{hash::CryptoHash, types::AccountId}; +use near_rpc_client::ChangeRequest; use sha3::{Digest, Keccak256}; use std::{str::FromStr, sync::Arc}; @@ -106,12 +107,14 @@ impl FastBridge { let tx_hash = near_rpc_client::change( near_endpoint, - self.near_signer()?, - token_id.to_string(), - "ft_transfer_call".to_string(), - args, - 200_000_000_000_000, - 1, + ChangeRequest { + signer: self.near_signer()?, + receiver_id: fast_bridge_account_id, + method_name: "transfer".to_string(), + args, + gas: 20_000_000_000_000, + deposit: 1, + }, ) .await?; @@ -178,12 +181,14 @@ impl FastBridge { let tx_hash = near_rpc_client::change( near_endpoint, - self.near_signer()?, - self.fast_bridge_account_id()?.to_string(), - "lp_unlock".to_string(), - args, - 120_000_000_000_000, - 0, + ChangeRequest { + signer: self.near_signer()?, + receiver_id: self.fast_bridge_account_id()?.to_string(), + method_name: "lp_unlock".to_string(), + args, + gas: 120_000_000_000_000, + deposit: 0, + }, ) .await?; @@ -222,12 +227,14 @@ impl FastBridge { let tx_hash = near_rpc_client::change( near_endpoint, - self.near_signer()?, - self.fast_bridge_account_id()?.to_string(), - "withdraw".to_string(), - args, - 20_000_000_000_000, - 0, + ChangeRequest { + signer: self.near_signer()?, + receiver_id: self.fast_bridge_account_id()?.to_string(), + method_name: "withdraw".to_string(), + args, + gas: 20_000_000_000_000, + deposit: 0, + }, ) .await?; diff --git a/bridge-sdk/connectors/nep141-connector/src/nep141_connector.rs b/bridge-sdk/connectors/nep141-connector/src/nep141_connector.rs index efd0f2b..bac310b 100644 --- a/bridge-sdk/connectors/nep141-connector/src/nep141_connector.rs +++ b/bridge-sdk/connectors/nep141-connector/src/nep141_connector.rs @@ -7,6 +7,7 @@ use near_primitives::{ hash::CryptoHash, types::{AccountId, TransactionOrReceiptId}, }; +use near_rpc_client::ChangeRequest; use sha3::{Digest, Keccak256}; use std::{str::FromStr, sync::Arc}; @@ -66,12 +67,14 @@ impl Nep141Connector { let tx_id = near_rpc_client::change( near_endpoint, - self.near_signer()?, - self.token_locker_id()?.to_string(), - "log_metadata".to_string(), - args, - 300_000_000_000_000, - 0, + ChangeRequest { + signer: self.near_signer()?, + receiver_id: self.token_locker_id()?.to_string(), + method_name: "log_metadata".to_string(), + args, + gas: 300_000_000_000_000, + deposit: 0, + }, ) .await?; @@ -94,12 +97,14 @@ impl Nep141Connector { let tx_id = near_rpc_client::change( near_endpoint, - self.near_signer()?, - near_token_id, - "storage_deposit".to_string(), - args, - 300_000_000_000_000, - amount, + ChangeRequest { + signer: self.near_signer()?, + receiver_id: near_token_id, + method_name: "storage_deposit".to_string(), + args, + gas: 300_000_000_000_000, + deposit: amount, + }, ) .await?; @@ -177,12 +182,14 @@ impl Nep141Connector { let tx_hash = near_rpc_client::change( near_endpoint, - self.near_signer()?, - near_token_id, - "ft_transfer_call".to_string(), - args, - 300_000_000_000_000, - 1, + ChangeRequest { + signer: self.near_signer()?, + receiver_id: near_token_id, + method_name: "ft_transfer_call".to_string(), + args, + gas: 300_000_000_000_000, + deposit: 1, + }, ) .await?; @@ -316,12 +323,14 @@ impl Nep141Connector { let tx_hash = near_rpc_client::change( near_endpoint, - self.near_signer()?, - self.token_locker_id()?.to_string(), - "withdraw".to_string(), - args, - 300_000_000_000_000, - 60_000_000_000_000_000_000_000, + ChangeRequest { + signer: self.near_signer()?, + receiver_id: self.token_locker_id()?.to_string(), + method_name: "withdraw".to_string(), + args, + gas: 300_000_000_000_000, + deposit: 60_000_000_000_000_000_000_000, + }, ) .await?; diff --git a/bridge-sdk/connectors/omni-connector/src/omni_connector.rs b/bridge-sdk/connectors/omni-connector/src/omni_connector.rs index 4d197e3..06f47f7 100644 --- a/bridge-sdk/connectors/omni-connector/src/omni_connector.rs +++ b/bridge-sdk/connectors/omni-connector/src/omni_connector.rs @@ -4,7 +4,6 @@ use ethers::prelude::*; use near_primitives::hash::CryptoHash; use near_primitives::types::AccountId; -use near_primitives::views::FinalExecutionOutcomeView; use omni_types::locker_args::{ClaimFeeArgs, StorageDepositAction}; use omni_types::prover_args::EvmVerifyProofArgs; @@ -56,7 +55,10 @@ pub enum DeployTokenArgs { near_tx_hash: CryptoHash, }, SolanaDeployToken { - tx_hash: CryptoHash, + event: Nep141LockerEvent, + }, + SolanaDeployTokenWithTxHash { + near_tx_hash: CryptoHash, sender_id: Option, }, } @@ -110,7 +112,11 @@ pub enum FinTransferArgs { near_tx_hash: CryptoHash, }, SolanaFinTransfer { - tx_hash: CryptoHash, + event: Nep141LockerEvent, + solana_token: Pubkey, + }, + SolanaFinTransferWithTxHash { + near_tx_hash: CryptoHash, sender_id: Option, solana_token: Pubkey, }, @@ -179,13 +185,13 @@ impl OmniConnector { pub async fn near_sign_transfer( &self, - origin_nonce: u64, + transfer_id: omni_types::TransferId, fee_recipient: Option, fee: Option, - ) -> Result { + ) -> Result { let near_bridge_client = self.near_bridge_client()?; near_bridge_client - .sign_transfer(origin_nonce, fee_recipient, fee) + .sign_transfer(transfer_id, fee_recipient, fee) .await } @@ -217,10 +223,7 @@ impl OmniConnector { .await } - pub async fn near_claim_fee( - &self, - claim_fee_args: ClaimFeeArgs, - ) -> Result { + pub async fn near_claim_fee(&self, claim_fee_args: ClaimFeeArgs) -> Result { let near_bridge_client = self.near_bridge_client()?; near_bridge_client.claim_fee(claim_fee_args).await } @@ -389,27 +392,39 @@ impl OmniConnector { Ok(tx_hash) } - pub async fn solana_deploy_token( + pub async fn solana_deploy_token_with_tx_hash( &self, - transaction_hash: CryptoHash, + near_tx_hash: CryptoHash, sender_id: Option, ) -> Result { - let solana_bridge_client = self.solana_bridge_client()?; let near_bridge_client = self.near_bridge_client()?; let transfer_log = near_bridge_client - .extract_transfer_log(transaction_hash, sender_id, "LogMetadataEvent") - .await - .map_err(|_| BridgeSdkError::UnknownError)?; + .extract_transfer_log(near_tx_hash, sender_id, "LogMetadataEvent") + .await?; + + self.solana_deploy_token_with_event( + serde_json::from_str(&transfer_log).map_err(|_| BridgeSdkError::UnknownError)?, + ) + .await + // TODO: This will silence a real error, so it must be fixed during `BridgeSdkError` refactoring + .map_err(|_| BridgeSdkError::UnknownError) + } + pub async fn solana_deploy_token_with_event( + &self, + event: Nep141LockerEvent, + ) -> Result { let Nep141LockerEvent::LogMetadataEvent { signature, metadata_payload, - } = serde_json::from_str(&transfer_log)? + } = event else { return Err(BridgeSdkError::UnknownError); }; + let solana_bridge_client = self.solana_bridge_client()?; + let mut signature = signature.to_bytes(); signature[64] -= 27; // TODO: Remove recovery_id modification in OmniTypes and add it specifically when submitting to EVM chains @@ -420,22 +435,15 @@ impl OmniConnector { symbol: metadata_payload.symbol, decimals: metadata_payload.decimals, }, - signature: signature - .try_into() - .map_err(|_| BridgeSdkError::UnknownError)?, + signature: signature.try_into().map_err(|_| { + BridgeSdkError::ConfigError("Failed to parse signature".to_string()) + })?, }; - let tx_hash = solana_bridge_client + solana_bridge_client .deploy_token(payload) .await - .map_err(|_| BridgeSdkError::UnknownError)?; - - tracing::info!( - tx_hash = format!("{:?}", tx_hash), - "Sent deploy token transaction" - ); - - Ok(tx_hash) + .map_err(|_| BridgeSdkError::UnknownError) } pub async fn solana_init_transfer( @@ -479,28 +487,43 @@ impl OmniConnector { Ok(tx_hash) } - pub async fn solana_finalize_transfer( + pub async fn solana_finalize_transfer_with_tx_hash( &self, - transaction_hash: CryptoHash, - solana_token: Pubkey, // TODO: retrieve from near contract + near_tx_hash: CryptoHash, sender_id: Option, + solana_token: Pubkey, // TODO: retrieve from near contract ) -> Result { - let solana_bridge_client = self.solana_bridge_client()?; let near_bridge_client = self.near_bridge_client()?; let transfer_log = near_bridge_client - .extract_transfer_log(transaction_hash, sender_id, "SignTransferEvent") + .extract_transfer_log(near_tx_hash, sender_id, "SignTransferEvent") .await .map_err(|_| BridgeSdkError::UnknownError)?; + self.solana_finalize_transfer_with_event( + serde_json::from_str(&transfer_log).map_err(|_| BridgeSdkError::UnknownError)?, + solana_token, + ) + .await + // TODO: This will silence a real error, so it must be fixed during `BridgeSdkError` refactoring + .map_err(|_| BridgeSdkError::UnknownError) + } + + pub async fn solana_finalize_transfer_with_event( + &self, + event: Nep141LockerEvent, + solana_token: Pubkey, // TODO: retrieve from near contract + ) -> Result { let Nep141LockerEvent::SignTransferEvent { message_payload, signature, - } = serde_json::from_str(&transfer_log)? + } = event else { return Err(BridgeSdkError::UnknownError); }; + let solana_bridge_client = self.solana_bridge_client()?; + let mut signature = signature.to_bytes(); signature[64] -= 27; @@ -511,30 +534,29 @@ impl OmniConnector { origin_chain: 1, origin_nonce: message_payload.transfer_id.origin_nonce, }, - token: "wrap.testnet".to_string(), amount: message_payload.amount.into(), recipient: match message_payload.recipient { OmniAddress::Sol(addr) => Pubkey::new_from_array(addr.0), - _ => return Err(BridgeSdkError::UnknownError), + _ => return Err(BridgeSdkError::ConfigError("Invalid recipient".to_string())), }, fee_recipient: message_payload.fee_recipient.map(|addr| addr.to_string()), }, - signature: signature - .try_into() - .map_err(|_| BridgeSdkError::UnknownError)?, + signature: signature.try_into().map_err(|_| { + BridgeSdkError::ConfigError("Failed to parse signature".to_string()) + })?, }; - let tx_hash = solana_bridge_client - .finalize_transfer(payload, solana_token) - .await - .map_err(|_| BridgeSdkError::UnknownError)?; - - tracing::info!( - tx_hash = format!("{:?}", tx_hash), - "Sent finalize transfer transaction" - ); - - Ok(tx_hash) + if solana_token == Pubkey::default() { + solana_bridge_client + .finalize_transfer_sol(payload) + .await + .map_err(|_| BridgeSdkError::UnknownError) + } else { + solana_bridge_client + .finalize_transfer(payload, solana_token) + .await + .map_err(|_| BridgeSdkError::UnknownError) + } } pub async fn log_metadata(&self, log_metadata_args: LogMetadataArgs) -> Result { @@ -567,8 +589,16 @@ impl OmniConnector { .evm_deploy_token_with_tx_hash(chain_kind, near_tx_hash) .await .map(|hash| hash.to_string()), - DeployTokenArgs::SolanaDeployToken { tx_hash, sender_id } => self - .solana_deploy_token(tx_hash, sender_id) + DeployTokenArgs::SolanaDeployToken { event } => self + .solana_deploy_token_with_event(event) + .await + .map(|hash| hash.to_string()) + .map_err(|_| BridgeSdkError::UnknownError), + DeployTokenArgs::SolanaDeployTokenWithTxHash { + near_tx_hash: tx_hash, + sender_id, + } => self + .solana_deploy_token_with_tx_hash(tx_hash, sender_id) .await .map(|hash| hash.to_string()), DeployTokenArgs::NearDeployTokenWithEvmProof { @@ -654,11 +684,18 @@ impl OmniConnector { .await .map(|tx_hash| tx_hash.to_string()), FinTransferArgs::SolanaFinTransfer { - tx_hash, + event, + solana_token, + } => self + .solana_finalize_transfer_with_event(event, solana_token) + .await + .map(|tx_hash| tx_hash.to_string()), + FinTransferArgs::SolanaFinTransferWithTxHash { + near_tx_hash, sender_id, solana_token, } => self - .solana_finalize_transfer(tx_hash, solana_token, sender_id) + .solana_finalize_transfer_with_tx_hash(near_tx_hash, sender_id, solana_token) .await .map(|tx_hash| tx_hash.to_string()), } diff --git a/bridge-sdk/near-rpc-client/src/near_rpc_client.rs b/bridge-sdk/near-rpc-client/src/near_rpc_client.rs index 85447f4..2c5168c 100644 --- a/bridge-sdk/near-rpc-client/src/near_rpc_client.rs +++ b/bridge-sdk/near-rpc-client/src/near_rpc_client.rs @@ -19,6 +19,23 @@ lazy_static! { ); } +#[derive(Clone)] +pub struct ViewRequest { + pub contract_account_id: AccountId, + pub method_name: String, + pub args: serde_json::Value, +} + +#[derive(Clone)] +pub struct ChangeRequest { + pub signer: near_crypto::InMemorySigner, + pub receiver_id: String, + pub method_name: String, + pub args: Vec, + pub gas: u64, + pub deposit: u128, +} + fn new_near_rpc_client(timeout: Option) -> reqwest::Client { let mut headers = HeaderMap::with_capacity(2); headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json")); @@ -30,19 +47,14 @@ fn new_near_rpc_client(timeout: Option) -> reqwest::Client builder.build().unwrap() } -pub async fn view( - server_addr: &str, - contract_account_id: AccountId, - method_name: String, - args: serde_json::Value, -) -> Result, NearRpcError> { +pub async fn view(server_addr: &str, view_request: ViewRequest) -> Result, NearRpcError> { let client = DEFAULT_CONNECTOR.connect(server_addr); let request = methods::query::RpcQueryRequest { block_reference: BlockReference::Finality(Finality::Final), request: QueryRequest::CallFunction { - account_id: contract_account_id, - method_name, - args: FunctionArgs::from(args.to_string().into_bytes()), + account_id: view_request.contract_account_id, + method_name: view_request.method_name, + args: FunctionArgs::from(view_request.args.to_string().into_bytes()), }, }; @@ -102,19 +114,14 @@ pub async fn get_block( pub async fn change( server_addr: &str, - signer: near_crypto::InMemorySigner, - receiver_id: String, - method_name: String, - args: Vec, - gas: u64, - deposit: u128, + change_request: ChangeRequest, ) -> Result { let client = DEFAULT_CONNECTOR.connect(server_addr); let rpc_request = methods::query::RpcQueryRequest { block_reference: BlockReference::latest(), request: near_primitives::views::QueryRequest::ViewAccessKey { - account_id: signer.account_id.clone(), - public_key: signer.public_key.clone(), + account_id: change_request.signer.account_id.clone(), + public_key: change_request.signer.public_key.clone(), }, }; let access_key_query_response = client.call(rpc_request).await?; @@ -124,60 +131,49 @@ pub async fn change( _ => Err(NearRpcError::NonceError)?, }; let transaction = Transaction { - signer_id: signer.account_id.clone(), - public_key: signer.public_key.clone(), + signer_id: change_request.signer.account_id.clone(), + public_key: change_request.signer.public_key.clone(), nonce: current_nonce + 1, - receiver_id: receiver_id.parse().unwrap(), + receiver_id: change_request.receiver_id.parse().unwrap(), block_hash: access_key_query_response.block_hash, actions: vec![Action::FunctionCall(Box::new(FunctionCallAction { - method_name, - args, - gas, - deposit, + method_name: change_request.method_name, + args: change_request.args, + gas: change_request.gas, + deposit: change_request.deposit, }))], }; let request = methods::broadcast_tx_async::RpcBroadcastTxAsyncRequest { - signed_transaction: transaction.sign(&signer), + signed_transaction: transaction.sign(&change_request.signer), }; Ok(client.call(request).await?) } -pub async fn change_and_wait_for_outcome( +pub async fn change_and_wait( server_addr: &str, - signer: near_crypto::InMemorySigner, - receiver_id: String, - method_name: String, - args: Vec, - gas: u64, - deposit: u128, -) -> Result { - let tx_hash = change( - server_addr, - signer.clone(), - receiver_id, - method_name, - args, - gas, - deposit, - ) - .await?; + change_request: ChangeRequest, + wait_until: near_primitives::views::TxExecutionStatus, +) -> Result { + let tx_hash = change(server_addr, change_request.clone()).await?; - wait_for_tx_final_outcome( - tx_hash, - signer.account_id, + wait_for_tx( server_addr, + tx_hash, + change_request.signer.account_id, + wait_until, DEFAULT_WAIT_FINAL_OUTCOME_TIMEOUT_SEC, ) .await } -pub async fn wait_for_tx_final_outcome( +pub async fn wait_for_tx( + server_addr: &str, hash: CryptoHash, account_id: AccountId, - server_addr: &str, + wait_until: near_primitives::views::TxExecutionStatus, timeout_sec: u64, -) -> Result { +) -> Result { let client = DEFAULT_CONNECTOR.connect(server_addr); let sent_at = time::Instant::now(); let tx_info = TransactionInfo::TransactionId { @@ -189,7 +185,7 @@ pub async fn wait_for_tx_final_outcome( let response = client .call(methods::tx::RpcTransactionStatusRequest { transaction_info: tx_info.clone(), - wait_until: near_primitives::views::TxExecutionStatus::Executed, + wait_until: wait_until.clone(), }) .await; @@ -199,6 +195,7 @@ pub async fn wait_for_tx_final_outcome( } match response { + Ok(_) => return Ok(hash), Err(err) => match err.handler_error() { Some(_err) => { time::sleep(time::Duration::from_secs(2)).await; @@ -206,13 +203,40 @@ pub async fn wait_for_tx_final_outcome( } _ => Err(NearRpcError::RpcTransactionError(err))?, }, - Ok(response) => match response.final_execution_outcome { - None => { - time::sleep(time::Duration::from_secs(2)).await; - continue; - } - Some(outcome) => return Ok(outcome.into_outcome()), - }, } } } + +pub async fn get_tx_final_outcome( + server_addr: &str, + hash: CryptoHash, + account_id: AccountId, +) -> Result { + let client = DEFAULT_CONNECTOR.connect(server_addr); + + let tx_info = TransactionInfo::TransactionId { + tx_hash: hash, + sender_account_id: account_id, + }; + + let response = client + .call(methods::tx::RpcTransactionStatusRequest { + transaction_info: tx_info.clone(), + wait_until: near_primitives::views::TxExecutionStatus::Executed, + }) + .await; + + match response { + Ok(optional_outcome) => { + if let Some(outcome) = optional_outcome.final_execution_outcome { + Ok(outcome.into_outcome()) + } else { + Err(NearRpcError::FinalizationError) + } + } + Err(err) => match err.handler_error() { + Some(_err) => Err(NearRpcError::FinalizationError), + _ => Err(NearRpcError::RpcTransactionError(err)), + }, + } +}