diff --git a/Cargo.lock b/Cargo.lock index c93827bb0..6084fcc93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -49,9 +49,9 @@ checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.69" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", @@ -107,6 +107,12 @@ version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +[[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + [[package]] name = "bytes-lit" version = "0.0.5" @@ -121,9 +127,12 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.98" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41c270e7540d725e65ac7f1b212ac8ce349719624d7bcff99f8e2e488e8cf03f" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" +dependencies = [ + "shlex", +] [[package]] name = "cfg-if" @@ -152,15 +161,15 @@ checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -218,16 +227,15 @@ dependencies = [ [[package]] name = "curve25519-dalek" -version = "4.1.2" +version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest", "fiat-crypto", - "platforms", "rustc_version", "subtle", "zeroize", @@ -246,9 +254,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ "darling_core", "darling_macro", @@ -256,9 +264,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", @@ -270,9 +278,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", @@ -345,7 +353,6 @@ dependencies = [ "elliptic-curve", "rfc6979", "signature", - "spki", ] [[package]] @@ -360,23 +367,24 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", "rand_core", "serde", "sha2", + "subtle", "zeroize", ] [[package]] name = "either" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -390,7 +398,6 @@ dependencies = [ "ff", "generic-array", "group", - "pkcs8", "rand_core", "sec1", "subtle", @@ -450,9 +457,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -463,9 +470,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "group" @@ -556,9 +563,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -588,25 +595,23 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] [[package]] name = "k256" -version = "0.13.1" +version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cadb76004ed8e97623117f3df85b17aaa6626ab0b0831e6573f104df16cd1bcc" +checksum = "956ff9b67e26e1a6a866cb758f12c6f8746208489e3e4a4b5580802f2f0a587b" dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "once_cell", "sha2", - "signature", ] [[package]] @@ -620,9 +625,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libm" @@ -632,32 +637,31 @@ checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "miniz_oxide" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "num-traits", ] @@ -670,9 +674,9 @@ checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" [[package]] name = "num-derive" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfb77679af88f8b125209d354a202862602672222e7f2313fdd6dc349bad4712" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", @@ -681,28 +685,27 @@ dependencies = [ [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.17" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", ] [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -713,6 +716,18 @@ version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + [[package]] name = "paste" version = "1.0.15" @@ -817,12 +832,6 @@ dependencies = [ "spki", ] -[[package]] -name = "platforms" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" - [[package]] name = "powerfmt" version = "0.2.0" @@ -831,9 +840,12 @@ checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" [[package]] name = "ppv-lite86" -version = "0.2.17" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "pretty_assertions" @@ -847,28 +859,37 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.15" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", "syn", ] +[[package]] +name = "primeorder" +version = "0.13.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "proc-macro2" -version = "1.0.69" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134c189feb4956b20f6f547d2cf727d4c0fe06722b20a0eec87ed445a97f92da" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.33" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -943,7 +964,6 @@ dependencies = [ "base16ct", "der", "generic-array", - "pkcs8", "subtle", "zeroize", ] @@ -956,18 +976,18 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.192" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001" +checksum = "cff085d2cb684faa248efb494c39b68e522822ac0de72ccf08109abde717cfb2" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.192" +version = "1.0.208" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1" +checksum = "24008e81ff7613ed8e5ba0cfaf24e2c2f1e5b8a0495711e44fcd4882fca62bcf" dependencies = [ "proc-macro2", "quote", @@ -976,26 +996,27 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.108" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] name = "serde_with" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "69cecfa94848272156ea67b2b1a53f20fc7bc638c4a46d2f8abde08f05f4b857" dependencies = [ "base64 0.22.1", "chrono", "hex", "indexmap 1.9.3", - "indexmap 2.2.6", + "indexmap 2.4.0", "serde", "serde_derive", "serde_json", @@ -1005,9 +1026,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.1" +version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "a8fee4991ef4f274617a51ad4af30519438dacb2f56ac773b08a1922ff743350" dependencies = [ "darling", "proc-macro2", @@ -1036,6 +1057,12 @@ dependencies = [ "keccak", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signature" version = "2.2.0" @@ -1054,9 +1081,9 @@ checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "soroban-builtin-sdk-macros" -version = "20.3.0" +version = "21.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc32c6e817f3ca269764ec0d7d14da6210b74a5bf14d4e745aa3ee860558900" +checksum = "2f57a68ef8777e28e274de0f3a88ad9a5a41d9a2eb461b4dd800b086f0e83b80" dependencies = [ "itertools", "proc-macro2", @@ -1073,9 +1100,9 @@ dependencies = [ [[package]] name = "soroban-env-common" -version = "20.3.0" +version = "21.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c14e18d879c520ff82612eaae0590acaf6a7f3b977407e1abb1c9e31f94c7814" +checksum = "2fd1c89463835fe6da996318156d39f424b4f167c725ec692e5a7a2d4e694b3d" dependencies = [ "arbitrary", "crate-git-revision", @@ -1087,13 +1114,14 @@ dependencies = [ "soroban-wasmi", "static_assertions", "stellar-xdr", + "wasmparser", ] [[package]] name = "soroban-env-guest" -version = "20.3.0" +version = "21.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5122ca2abd5ebcc1e876a96b9b44f87ce0a0e06df8f7c09772ddb58b159b7454" +checksum = "6bfb2536811045d5cd0c656a324cbe9ce4467eb734c7946b74410d90dea5d0ce" dependencies = [ "soroban-env-common", "static_assertions", @@ -1101,13 +1129,16 @@ dependencies = [ [[package]] name = "soroban-env-host" -version = "20.3.0" +version = "21.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "114a0fa0d0cc39d0be16b1ee35b6e5f4ee0592ddcf459bde69391c02b03cf520" +checksum = "2b7a32c28f281c423189f1298960194f0e0fc4eeb72378028171e556d8cd6160" dependencies = [ "backtrace", "curve25519-dalek", + "ecdsa", "ed25519-dalek", + "elliptic-curve", + "generic-array", "getrandom", "hex-literal", "hmac", @@ -1115,8 +1146,10 @@ dependencies = [ "num-derive", "num-integer", "num-traits", + "p256", "rand", "rand_chacha", + "sec1", "sha2", "sha3", "soroban-builtin-sdk-macros", @@ -1124,13 +1157,14 @@ dependencies = [ "soroban-wasmi", "static_assertions", "stellar-strkey", + "wasmparser", ] [[package]] name = "soroban-env-macros" -version = "20.3.0" +version = "21.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13e3f8c86f812e0669e78fcb3eae40c385c6a9dd1a4886a1de733230b4fcf27" +checksum = "242926fe5e0d922f12d3796cd7cd02dd824e5ef1caa088f45fce20b618309f64" dependencies = [ "itertools", "proc-macro2", @@ -1143,9 +1177,9 @@ dependencies = [ [[package]] name = "soroban-ledger-snapshot" -version = "20.5.0" +version = "21.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61a54708f44890e0546180db6b4f530e2a88d83b05a9b38a131caa21d005e25a" +checksum = "07a2c3aeb3dba21530133f7f1dc533f53d96abff0df6497a5a2fad8f0fbda200" dependencies = [ "serde", "serde_json", @@ -1157,9 +1191,9 @@ dependencies = [ [[package]] name = "soroban-sdk" -version = "20.5.0" +version = "21.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84fc8be9068dd4e0212d8b13ad61089ea87e69ac212c262914503a961c8dc3a3" +checksum = "cab66a39d18a5d8ed60df8cb77fc51067ef45a69af3c8fec52b6bc3bf7190351" dependencies = [ "arbitrary", "bytes-lit", @@ -1177,9 +1211,9 @@ dependencies = [ [[package]] name = "soroban-sdk-macros" -version = "20.5.0" +version = "21.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db20def4ead836663633f58d817d0ed8e1af052c9650a04adf730525af85b964" +checksum = "3d92e9fb43bc3ca5180ff7f115156e732817fe27f8328787991c5eb38b30c26c" dependencies = [ "crate-git-revision", "darling", @@ -1197,9 +1231,9 @@ dependencies = [ [[package]] name = "soroban-spec" -version = "20.5.0" +version = "21.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eefeb5d373b43f6828145d00f0c5cc35e96db56a6671ae9614f84beb2711cab" +checksum = "1f92a657578b121b06a29ab630bf24f02a32327cf9858c474157f0a8c25bfdb2" dependencies = [ "base64 0.13.1", "stellar-xdr", @@ -1209,9 +1243,9 @@ dependencies = [ [[package]] name = "soroban-spec-rust" -version = "20.5.0" +version = "21.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3152bca4737ef734ac37fe47b225ee58765c9095970c481a18516a2b287c7a33" +checksum = "c7d95644321515640288dae87e71264ed070454c22b6bdf3527423dcaccdfff0" dependencies = [ "prettyplease", "proc-macro2", @@ -1233,9 +1267,9 @@ dependencies = [ [[package]] name = "soroban-token-sdk" -version = "20.5.0" +version = "21.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8ed0ae2e5d5e67b7939200bba3712b4c81dcf87b2ccd68bba049bec64c780f" +checksum = "7e879bfcb7d00ac9c0f91ba65babd6dde713037181df13b2163fafd1e3edf271" dependencies = [ "soroban-sdk", ] @@ -1288,9 +1322,9 @@ dependencies = [ [[package]] name = "stellar-xdr" -version = "20.1.0" +version = "21.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e59cdf3eb4467fb5a4b00b52e7de6dca72f67fac6f9b700f55c95a5d86f09c9d" +checksum = "2675a71212ed39a806e415b0dbf4702879ff288ec7f5ee996dda42a135512b50" dependencies = [ "arbitrary", "base64 0.13.1", @@ -1310,15 +1344,15 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.39" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -1360,18 +1394,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.55" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e3de26b0965292219b4287ff031fcba86837900fe9cd2b34ea8ad893c0953d2" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.55" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268026685b2be38d7103e9e507c938a1fcb3d7e6eb15e87870b617bf37b6d581" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -1423,9 +1457,9 @@ checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wasi" @@ -1435,19 +1469,20 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", @@ -1460,9 +1495,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1470,9 +1505,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -1483,9 +1518,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasmi_arena" @@ -1507,11 +1542,12 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.88.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8cf7dd82407fe68161bedcd57fde15596f32ebf6e9b3bdbf3ae1da20e38e5e" +checksum = "a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.4.0", + "semver", ] [[package]] @@ -1534,9 +1570,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", @@ -1550,51 +1586,51 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "yansi" @@ -1602,6 +1638,27 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" +[[package]] +name = "zerocopy" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +dependencies = [ + "byteorder", + "zerocopy-derive", +] + +[[package]] +name = "zerocopy-derive" +version = "0.7.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "zeroize" version = "1.8.1" diff --git a/Cargo.toml b/Cargo.toml index 7045769d2..e6736e9a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,8 +15,8 @@ phoenix = { path = "./packages/phoenix" } num-integer = { version = "0.1.45", default-features = false, features = [ "i128", ] } -soroban-sdk = "20.5.0" -soroban-token-sdk = "20.5.0" +soroban-sdk = "21.6.0" +soroban-token-sdk = "21.6.0" test-case = "3.3" pretty_assertions = "1.4.0" diff --git a/contracts/factory/src/tests/config.rs b/contracts/factory/src/tests/config.rs index f9e40bf70..e0eaa31a6 100644 --- a/contracts/factory/src/tests/config.rs +++ b/contracts/factory/src/tests/config.rs @@ -17,6 +17,7 @@ use soroban_sdk::{ fn factory_successfully_inits_itself() { let env = Env::default(); let admin = Address::generate(&env); + env.budget().reset_unlimited(); let factory = deploy_factory_contract(&env, Some(admin.clone())); @@ -27,6 +28,7 @@ fn factory_successfully_inits_itself() { fn factory_successfully_inits_multihop() { let env = Env::default(); env.mock_all_auths(); + env.budget().reset_unlimited(); let admin = Address::generate(&env); @@ -34,7 +36,7 @@ fn factory_successfully_inits_multihop() { let multihop_address = factory.get_config().multihop_address; - assert!(multihop_address.to_string().len() != 0); + assert!(!multihop_address.to_string().is_empty()); } #[test] @@ -260,6 +262,7 @@ fn factory_fails_to_init_lp_when_no_whitelisted_accounts() { fn successfully_updates_new_list_of_whitelisted_accounts() { let env = Env::default(); env.mock_all_auths(); + env.budget().reset_unlimited(); let admin = Address::generate(&env); let first_wl_addr = Address::generate(&env); @@ -289,6 +292,7 @@ fn successfully_updates_new_list_of_whitelisted_accounts() { fn doesn_not_change_whitelisted_accounts_when_removing_non_existent() { let env = Env::default(); env.mock_all_auths(); + env.budget().reset_unlimited(); let admin = Address::generate(&env); @@ -309,6 +313,7 @@ fn doesn_not_change_whitelisted_accounts_when_removing_non_existent() { fn fails_to_update_whitelisted_accounts_when_not_authorized() { let env = Env::default(); env.mock_all_auths(); + env.budget().reset_unlimited(); let admin = Address::generate(&env); let first_wl_addr = Address::generate(&env); @@ -328,6 +333,7 @@ fn fails_to_update_whitelisted_accounts_when_not_authorized() { fn test_add_vec_with_duplicates_should_be_handled_correctly() { let env = Env::default(); env.mock_all_auths(); + env.budget().reset_unlimited(); let admin = Address::generate(&env); let first_wl_addr = Address::generate(&env); diff --git a/contracts/factory/src/tests/queries.rs b/contracts/factory/src/tests/queries.rs index 78b4d179d..ff78d2e93 100644 --- a/contracts/factory/src/tests/queries.rs +++ b/contracts/factory/src/tests/queries.rs @@ -255,6 +255,7 @@ fn test_deploy_multiple_liquidity_pools() { #[test] fn test_queries_by_tuple() { let env = Env::default(); + env.budget().reset_unlimited(); let admin = Address::generate(&env); let user = Address::generate(&env); @@ -427,6 +428,7 @@ fn test_queries_by_tuple() { #[should_panic(expected = "Factory: query_for_pool_by_token_pair failed: No liquidity pool found")] fn test_queries_by_tuple_errors() { let env = Env::default(); + env.budget().reset_unlimited(); let admin = Address::generate(&env); let factory = deploy_factory_contract(&env, Some(admin.clone())); @@ -436,6 +438,7 @@ fn test_queries_by_tuple_errors() { #[test] fn test_query_user_portfolio_with_stake() { let env = Env::default(); + env.budget().reset_unlimited(); let admin = Address::generate(&env); let fee_recipient = Address::generate(&env); @@ -443,14 +446,26 @@ fn test_query_user_portfolio_with_stake() { let user_1 = Address::generate(&env); let user_2 = Address::generate(&env); - let mut token1 = - token_contract::Client::new(&env, &env.register_stellar_asset_contract(admin.clone())); - let mut token2 = - token_contract::Client::new(&env, &env.register_stellar_asset_contract(admin.clone())); - let mut token3 = - token_contract::Client::new(&env, &env.register_stellar_asset_contract(admin.clone())); - let mut token4 = - token_contract::Client::new(&env, &env.register_stellar_asset_contract(admin.clone())); + let mut token1 = token_contract::Client::new( + &env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ); + let mut token2 = token_contract::Client::new( + &env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ); + let mut token3 = token_contract::Client::new( + &env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ); + let mut token4 = token_contract::Client::new( + &env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ); env.mock_all_auths(); env.budget().reset_unlimited(); @@ -672,20 +687,33 @@ fn test_query_user_portfolio_with_stake() { #[test] fn test_query_user_portfolio_with_multiple_users_staking_in_multiple_liquidity_pools() { let env = Env::default(); + env.budget().reset_unlimited(); let admin = Address::generate(&env); let fee_recipient = Address::generate(&env); let manager = Address::generate(&env); let user_1 = Address::generate(&env); let user_2 = Address::generate(&env); - let mut token1 = - token_contract::Client::new(&env, &env.register_stellar_asset_contract(admin.clone())); - let mut token2 = - token_contract::Client::new(&env, &env.register_stellar_asset_contract(admin.clone())); - let mut token3 = - token_contract::Client::new(&env, &env.register_stellar_asset_contract(admin.clone())); - let mut token4 = - token_contract::Client::new(&env, &env.register_stellar_asset_contract(admin.clone())); + let mut token1 = token_contract::Client::new( + &env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ); + let mut token2 = token_contract::Client::new( + &env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ); + let mut token3 = token_contract::Client::new( + &env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ); + let mut token4 = token_contract::Client::new( + &env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ); env.mock_all_auths(); env.budget().reset_unlimited(); @@ -1196,16 +1224,23 @@ fn test_query_user_portfolio_with_multiple_users_staking_in_multiple_liquidity_p #[test] fn test_query_user_portfolio_without_stake() { let env = Env::default(); + env.budget().reset_unlimited(); let admin = Address::generate(&env); let fee_recipient = Address::generate(&env); let manager = Address::generate(&env); let user_1 = Address::generate(&env); - let mut token1 = - token_contract::Client::new(&env, &env.register_stellar_asset_contract(admin.clone())); - let mut token2 = - token_contract::Client::new(&env, &env.register_stellar_asset_contract(admin.clone())); + let mut token1 = token_contract::Client::new( + &env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ); + let mut token2 = token_contract::Client::new( + &env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ); env.mock_all_auths(); env.budget().reset_unlimited(); diff --git a/contracts/multihop/src/tests/setup.rs b/contracts/multihop/src/tests/setup.rs index 8940bc8a4..7a73dbee6 100644 --- a/contracts/multihop/src/tests/setup.rs +++ b/contracts/multihop/src/tests/setup.rs @@ -35,7 +35,11 @@ pub fn install_token_wasm(env: &Env) -> BytesN<32> { } pub fn deploy_token_contract<'a>(env: &Env, admin: &Address) -> token_contract::Client<'a> { - token_contract::Client::new(env, &env.register_stellar_asset_contract(admin.clone())) + token_contract::Client::new( + env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ) } #[allow(clippy::too_many_arguments)] diff --git a/contracts/pool/src/tests/setup.rs b/contracts/pool/src/tests/setup.rs index 674ec436e..8f48312b6 100644 --- a/contracts/pool/src/tests/setup.rs +++ b/contracts/pool/src/tests/setup.rs @@ -8,7 +8,11 @@ use crate::{ use phoenix::utils::{LiquidityPoolInitInfo, StakeInitInfo, TokenInitInfo}; pub fn deploy_token_contract<'a>(env: &Env, admin: &Address) -> token_contract::Client<'a> { - token_contract::Client::new(env, &env.register_stellar_asset_contract(admin.clone())) + token_contract::Client::new( + env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ) } pub fn install_token_wasm(env: &Env) -> BytesN<32> { diff --git a/contracts/pool_stable/src/tests/setup.rs b/contracts/pool_stable/src/tests/setup.rs index 1ebd13e4b..f7ca2fe3e 100644 --- a/contracts/pool_stable/src/tests/setup.rs +++ b/contracts/pool_stable/src/tests/setup.rs @@ -8,7 +8,11 @@ use crate::{ use phoenix::utils::{LiquidityPoolInitInfo, StakeInitInfo, TokenInitInfo}; pub fn deploy_token_contract<'a>(env: &Env, admin: &Address) -> token_contract::Client<'a> { - token_contract::Client::new(env, &env.register_stellar_asset_contract(admin.clone())) + token_contract::Client::new( + env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ) } pub fn install_token_wasm(env: &Env) -> BytesN<32> { diff --git a/contracts/stake/src/tests/setup.rs b/contracts/stake/src/tests/setup.rs index 18b11dad4..861246cb6 100644 --- a/contracts/stake/src/tests/setup.rs +++ b/contracts/stake/src/tests/setup.rs @@ -6,7 +6,11 @@ use crate::{ }; pub fn deploy_token_contract<'a>(env: &Env, admin: &Address) -> token_contract::Client<'a> { - token_contract::Client::new(env, &env.register_stellar_asset_contract(admin.clone())) + token_contract::Client::new( + env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ) } #[allow(clippy::too_many_arguments)] diff --git a/contracts/stake_rewards/src/tests/setup.rs b/contracts/stake_rewards/src/tests/setup.rs index e7025180a..ba9ffd01e 100644 --- a/contracts/stake_rewards/src/tests/setup.rs +++ b/contracts/stake_rewards/src/tests/setup.rs @@ -6,7 +6,11 @@ use crate::{ }; pub fn deploy_token_contract<'a>(env: &Env, admin: &Address) -> token_contract::Client<'a> { - token_contract::Client::new(env, &env.register_stellar_asset_contract(admin.clone())) + token_contract::Client::new( + env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ) } const MIN_BOND: i128 = 1000; diff --git a/contracts/token/Cargo.lock b/contracts/token/Cargo.lock index b867afc26..1630e280a 100644 --- a/contracts/token/Cargo.lock +++ b/contracts/token/Cargo.lock @@ -369,7 +369,6 @@ dependencies = [ "elliptic-curve", "rfc6979", "signature", - "spki", ] [[package]] @@ -384,15 +383,16 @@ dependencies = [ [[package]] name = "ed25519-dalek" -version = "2.0.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7277392b266383ef8396db7fdeb1e77b6c52fed775f5df15bb24f35b72156980" +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" dependencies = [ "curve25519-dalek", "ed25519", "rand_core", "serde", "sha2", + "subtle", "zeroize", ] @@ -414,7 +414,6 @@ dependencies = [ "ff", "generic-array", "group", - "pkcs8", "rand_core", "sec1", "subtle", @@ -629,9 +628,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "once_cell", "sha2", - "signature", ] [[package]] @@ -744,6 +741,18 @@ version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +[[package]] +name = "p256" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9863ad85fa8f4460f9c48cb909d38a0d689dba1f6f6988a5e3e0d31071bcd4b" +dependencies = [ + "ecdsa", + "elliptic-curve", + "primeorder", + "sha2", +] + [[package]] name = "paste" version = "1.0.12" @@ -782,6 +791,15 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "primeorder" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7dbe9ed3b56368bd99483eb32fe9c17fdd3730aebadc906918ce78d54c7eeb4" +dependencies = [ + "elliptic-curve", +] + [[package]] name = "proc-macro2" version = "1.0.69" @@ -876,7 +894,6 @@ dependencies = [ "base16ct", "der", "generic-array", - "pkcs8", "subtle", "zeroize", ] @@ -986,9 +1003,9 @@ checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "soroban-builtin-sdk-macros" -version = "20.0.0" +version = "21.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42487d6b0268748f753feeb579c6f7908dbb002faf20b703e6a7185b12f0527" +checksum = "44877373b3dc6c662377cb1600e3a62706d75e484b6064f9cd22e467c676b159" dependencies = [ "itertools", "proc-macro2", @@ -998,9 +1015,9 @@ dependencies = [ [[package]] name = "soroban-env-common" -version = "20.0.0" +version = "21.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb493483fa3e3ebfb4c081472495d14b0abcfbe04ba142a56ff63056cc62700" +checksum = "590add16843a61b01844e19e89bccaaee6aa21dc76809017b0662c17dc139ee9" dependencies = [ "arbitrary", "crate-git-revision", @@ -1012,13 +1029,14 @@ dependencies = [ "soroban-wasmi", "static_assertions", "stellar-xdr", + "wasmparser", ] [[package]] name = "soroban-env-guest" -version = "20.0.0" +version = "21.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f31a738ef5faf4084c4b1824a8e3f93dfff0261a3909e86060f818e728479a3" +checksum = "05ec8dc43acdd6c7e7b371acf44fc1a7dac24934ae3b2f05fafd618818548176" dependencies = [ "soroban-env-common", "static_assertions", @@ -1026,13 +1044,16 @@ dependencies = [ [[package]] name = "soroban-env-host" -version = "20.0.0" +version = "21.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd1172a76c0bc2ce67ec7f28ca37dddbe9fefabe583f80434f5f60aaee3547e" +checksum = "4e25aaffe0c62eb65e0e349f725b4b8b13ad0764d78a15aab5bbccb5c4797726" dependencies = [ "backtrace", "curve25519-dalek", + "ecdsa", "ed25519-dalek", + "elliptic-curve", + "generic-array", "getrandom", "hex-literal", "hmac", @@ -1040,8 +1061,10 @@ dependencies = [ "num-derive", "num-integer", "num-traits", + "p256", "rand", "rand_chacha", + "sec1", "sha2", "sha3", "soroban-builtin-sdk-macros", @@ -1049,13 +1072,14 @@ dependencies = [ "soroban-wasmi", "static_assertions", "stellar-strkey", + "wasmparser", ] [[package]] name = "soroban-env-macros" -version = "20.0.0" +version = "21.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c0536648cea69ab3bae1801d35f92c0a31e7449cd2c7d14a18fb5e413f43279" +checksum = "3e16b761459fdf3c4b62b24df3941498d14e5246e6fadfb4774ed8114d243aa4" dependencies = [ "itertools", "proc-macro2", @@ -1068,9 +1092,9 @@ dependencies = [ [[package]] name = "soroban-ledger-snapshot" -version = "20.0.0" +version = "21.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37960eec21d7dc5dbd976fa16e38c056429663a89243798486b07afbb263c9b5" +checksum = "eaebb7961fc6d8f47e00d404d9240f51aba85df9d67a4f556ef1c6057b5327a8" dependencies = [ "serde", "serde_json", @@ -1082,9 +1106,9 @@ dependencies = [ [[package]] name = "soroban-sdk" -version = "20.0.0" +version = "21.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f08e1fdb18dbee88160ea6640962faf021a49f22eb1bd212c4d8b0cef32c582c" +checksum = "60cd55eb88cbe1d9e7fe3ab1845c7c10c26b27e2d226e973150e5b55580aa359" dependencies = [ "arbitrary", "bytes-lit", @@ -1102,9 +1126,9 @@ dependencies = [ [[package]] name = "soroban-sdk-macros" -version = "20.0.0" +version = "21.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5cae44f304f2fd32f9cfa9a31a9b58eb1c10aa07a7d5b591921cf7fa649e44" +checksum = "b1916985d1871aa340d7eec834c387f74f80231c846801193c3252266a60a41e" dependencies = [ "crate-git-revision", "darling", @@ -1122,9 +1146,9 @@ dependencies = [ [[package]] name = "soroban-spec" -version = "20.0.0" +version = "21.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7539cfa0abe36f3d33c49fe1253f6b652c91c9a9841fe83dedc1799b7f4bb55f" +checksum = "439faff6a155975a9951f27aaa04ae8ef3fd8fe9413d202e2ea2ff094a593449" dependencies = [ "base64 0.13.1", "stellar-xdr", @@ -1134,9 +1158,9 @@ dependencies = [ [[package]] name = "soroban-spec-rust" -version = "20.0.0" +version = "21.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb6189ef3ede0061db14b0cf9fa2692a2cb6c6e8d941689f0c9ca82b68c47ab2" +checksum = "20b2a571055f1ed15427ccb8d34ce4208b4135666eade124cfbecfc010fa2ea3" dependencies = [ "prettyplease", "proc-macro2", @@ -1158,18 +1182,18 @@ dependencies = [ [[package]] name = "soroban-token-sdk" -version = "20.0.0" +version = "21.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9675d01424e718340a4d9121c67a1a2d10d91ddce7cf9c00d432b2010e4c65a5" +checksum = "63be4a8070dab1ac67007da10e51e0c3366046ead5dbff974b3cec468532250b" dependencies = [ "soroban-sdk", ] [[package]] name = "soroban-wasmi" -version = "0.31.1-soroban.20.0.0" +version = "0.31.1-soroban.20.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1aaa682a67cbd2173f1d60cb1e7b951d490d7c4e0b7b6f5387cbb952e963c46" +checksum = "710403de32d0e0c35375518cb995d4fc056d0d48966f2e56ea471b8cb8fc9719" dependencies = [ "smallvec", "spin", @@ -1213,9 +1237,9 @@ dependencies = [ [[package]] name = "stellar-xdr" -version = "20.0.0" +version = "21.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9595b775539e475da4179fa46212b11e4575f526d57b13308989a8c1dd59238c" +checksum = "2675a71212ed39a806e415b0dbf4702879ff288ec7f5ee996dda42a135512b50" dependencies = [ "arbitrary", "base64 0.13.1", @@ -1421,11 +1445,12 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.88.0" +version = "0.116.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8cf7dd82407fe68161bedcd57fde15596f32ebf6e9b3bdbf3ae1da20e38e5e" +checksum = "a58e28b80dd8340cb07b8242ae654756161f6fc8d0038123d679b7b99964fa50" dependencies = [ - "indexmap 1.9.3", + "indexmap 2.1.0", + "semver", ] [[package]] diff --git a/contracts/token/Makefile b/contracts/token/Makefile index 6c7c1e8fd..8ed428c36 100644 --- a/contracts/token/Makefile +++ b/contracts/token/Makefile @@ -12,7 +12,7 @@ fmt: cargo fmt --all clippy: build - cargo clippy --all-targets -- -D warnings + cargo clippy --tests -- -D warnings clean: cargo clean diff --git a/contracts/token/src/admin.rs b/contracts/token/src/admin.rs index 03ddc4049..a820bf040 100644 --- a/contracts/token/src/admin.rs +++ b/contracts/token/src/admin.rs @@ -2,19 +2,16 @@ use soroban_sdk::{Address, Env}; use crate::storage_types::DataKey; -#[allow(dead_code)] pub fn has_administrator(e: &Env) -> bool { let key = DataKey::Admin; e.storage().instance().has(&key) } -#[allow(dead_code)] pub fn read_administrator(e: &Env) -> Address { let key = DataKey::Admin; e.storage().instance().get(&key).unwrap() } -#[allow(dead_code)] pub fn write_administrator(e: &Env, id: &Address) { let key = DataKey::Admin; e.storage().instance().set(&key, id); diff --git a/contracts/token/src/contract.rs b/contracts/token/src/contract.rs index 415f822f3..3722b3ddd 100644 --- a/contracts/token/src/contract.rs +++ b/contracts/token/src/contract.rs @@ -23,14 +23,13 @@ pub struct Token; #[contractimpl] impl Token { - #[allow(dead_code)] pub fn initialize(e: Env, admin: Address, decimal: u32, name: String, symbol: String) { if has_administrator(&e) { panic!("already initialized") } write_administrator(&e, &admin); - if decimal > u8::MAX.into() { - panic!("Decimal must fit in a u8"); + if decimal > 18 { + panic!("Decimal must not be greater than 18"); } write_metadata( @@ -43,7 +42,6 @@ impl Token { ) } - #[allow(dead_code)] pub fn mint(e: Env, to: Address, amount: i128) { check_nonnegative_amount(amount); let admin = read_administrator(&e); @@ -57,7 +55,6 @@ impl Token { TokenUtils::new(&e).events().mint(admin, to, amount); } - #[allow(dead_code)] pub fn set_admin(e: Env, new_admin: Address) { let admin = read_administrator(&e); admin.require_auth(); @@ -70,6 +67,7 @@ impl Token { TokenUtils::new(&e).events().set_admin(admin, new_admin); } + #[cfg_attr(not(test), allow(dead_code))] #[cfg(test)] pub fn get_allowance(e: Env, from: Address, spender: Address) -> Option { let key = DataKey::Allowance(AllowanceDataKey { from, spender }); diff --git a/contracts/token/src/storage_types.rs b/contracts/token/src/storage_types.rs index 5710c0574..038562fcc 100644 --- a/contracts/token/src/storage_types.rs +++ b/contracts/token/src/storage_types.rs @@ -25,7 +25,6 @@ pub struct AllowanceValue { pub enum DataKey { Allowance(AllowanceDataKey), Balance(Address), - Nonce(Address), State(Address), Admin, } diff --git a/contracts/token/src/test.rs b/contracts/token/src/test.rs index 8f75daf77..c3718c0ee 100644 --- a/contracts/token/src/test.rs +++ b/contracts/token/src/test.rs @@ -242,17 +242,12 @@ fn initialize_already_initialized() { } #[test] -#[should_panic(expected = "Decimal must fit in a u8")] -fn decimal_is_over_max() { +#[should_panic(expected = "Decimal must not be greater than 18")] +fn decimal_is_over_eighteen() { let e = Env::default(); let admin = Address::generate(&e); let token = TokenClient::new(&e, &e.register_contract(None, Token {})); - token.initialize( - &admin, - &(u32::from(u8::MAX) + 1), - &"name".into_val(&e), - &"symbol".into_val(&e), - ); + token.initialize(&admin, &19, &"name".into_val(&e), &"symbol".into_val(&e)); } #[test] diff --git a/contracts/vesting/src/tests/setup.rs b/contracts/vesting/src/tests/setup.rs index e875806a8..00d7613cf 100644 --- a/contracts/vesting/src/tests/setup.rs +++ b/contracts/vesting/src/tests/setup.rs @@ -10,5 +10,9 @@ pub fn instantiate_vesting_client(env: &Env) -> VestingClient { } pub fn deploy_token_contract<'a>(env: &Env, admin: &Address) -> token_contract::Client<'a> { - token_contract::Client::new(env, &env.register_stellar_asset_contract(admin.clone())) + token_contract::Client::new( + env, + &env.register_stellar_asset_contract_v2(admin.clone()) + .address(), + ) }