diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 09315b932..fd870762f 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -20,61 +20,9 @@ permissions: jobs: contracts: name: Contracts - uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v2.3.5 + uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v4.2.2 with: - rust-toolchain: nightly-2023-12-11 - vmtools-version: v1.5.24 + rust-toolchain: stable + coverage-args: --ignore-filename-regex='/.cargo/git' --output ./coverage.md secrets: token: ${{ secrets.GITHUB_TOKEN }} - - # TEMPORARY: Remove this job when we can upgrade to mx-sc-actions v3+ - test_coverage: - name: Test Coverage - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Install rust - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - toolchain: nightly-2023-12-11 - target: wasm32-unknown-unknown - - - name: Install prerequisites - run: | - rustup component add llvm-tools-preview - dirname $(find ~/.rustup -name llvm-cov) >> $GITHUB_PATH - - echo $(dirname $(find ~/.rustup -name llvm-cov)) - - cargo install multiversx-sc-meta --locked - - - name: Run tests and generate report - env: - RUSTFLAGS: "" - run: | - sc-meta test-coverage --output ./coverage.md - - - name: Upload the report - uses: actions/upload-artifact@v3 - with: - name: coverage - path: coverage.md - - - name: Find the comment containing the report - id: fc - uses: peter-evans/find-comment@v2 - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository - with: - issue-number: ${{ github.event.pull_request.number }} - comment-author: "github-actions[bot]" - body-includes: "Coverage Summary" - - - name: Create or update the report comment - uses: peter-evans/create-or-update-comment@v2 - if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository - with: - comment-id: ${{ steps.fc.outputs.comment-id }} - issue-number: ${{ github.event.pull_request.number }} - body-file: ./coverage.md - edit-mode: replace \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a19b5ed98..8672e0210 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,7 +9,7 @@ permissions: jobs: build: - uses: multiversx/mx-sc-actions/.github/workflows/reproducible-build.yml@v2.3.5 + uses: multiversx/mx-sc-actions/.github/workflows/reproducible-build.yml@v4.2.1 with: - image_tag: v6.0.0 + image_tag: v7.0.0 attach_to_existing_release: true diff --git a/Cargo.lock b/Cargo.lock index 4fc006009..6fb5127e4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,39 +1,17 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] -name = "Inflector" -version = "0.11.4" +name = "ahash" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "lazy_static", - "regex", -] - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", + "cfg-if 1.0.0", + "once_cell", + "version_check", + "zerocopy", ] [[package]] @@ -92,9 +70,9 @@ checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -102,21 +80,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if 1.0.0", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - [[package]] name = "banned_addresses" version = "0.0.0" @@ -127,9 +90,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.21.7" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" [[package]] name = "base64ct" @@ -139,40 +102,15 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - -[[package]] -name = "bip39" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93f2635620bf0b9d4576eb7bb9a38a55df78bd1205d26fa994b25911a69f212f" -dependencies = [ - "bitcoin_hashes", - "rand", - "rand_core", - "serde", - "unicode-normalization", -] - -[[package]] -name = "bitcoin_hashes" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90064b8dee6815a6470d60bad07bbbaee885c0e12d04177138fa3291a01b7bc4" - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "block-buffer" @@ -183,43 +121,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "bstr" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c48f0051a4b4c5e0b6d365cd04af53aeaa209e3cc15ec2cdb69e73cc87fbd0dc" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" - -[[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" -dependencies = [ - "libc", -] - [[package]] name = "cfg-if" version = "0.1.10" @@ -288,12 +189,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "common-path" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2382f75942f4b3be3690fe4f86365e9c853c1587d6ee58212cebf6e2a9ccd101" - [[package]] name = "common-types" version = "0.0.0" @@ -363,31 +258,6 @@ dependencies = [ "unicode-segmentation", ] -[[package]] -name = "copy_dir" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "543d1dd138ef086e2ff05e3a48cf9da045da2033d16f8538fd76b86cd49b2ca3" -dependencies = [ - "walkdir", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - [[package]] name = "cpufeatures" version = "0.2.12" @@ -397,40 +267,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" -dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - [[package]] name = "crypto-common" version = "0.1.6" @@ -479,32 +315,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "dex-tests" -version = "0.0.0" -dependencies = [ - "common_structs", - "config", - "factory", - "farm", - "farm-boosted-yields", - "farm-staking", - "farm-staking-proxy", - "farm_token", - "fees-collector", - "governance", - "locking_module", - "multiversx-sc", - "multiversx-sc-modules", - "multiversx-sc-scenario", - "num-bigint", - "pair", - "pausable", - "rewards", - "router", - "simple-lock", -] - [[package]] name = "digest" version = "0.10.7" @@ -513,7 +323,6 @@ checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer", "crypto-common", - "subtle", ] [[package]] @@ -531,7 +340,7 @@ name = "distribution-abi" version = "0.0.0" dependencies = [ "distribution", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -588,15 +397,6 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if 1.0.0", -] - [[package]] name = "endian-type" version = "0.1.2" @@ -628,7 +428,7 @@ name = "energy-factory-meta" version = "0.0.0" dependencies = [ "energy-factory", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -645,7 +445,7 @@ name = "energy-factory-mock-meta" version = "0.0.0" dependencies = [ "energy-factory-mock", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -673,7 +473,7 @@ name = "energy-update-meta" version = "0.0.0" dependencies = [ "energy-update", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -682,16 +482,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - [[package]] name = "events" version = "0.0.0" @@ -727,7 +517,7 @@ name = "factory-abi" version = "0.0.0" dependencies = [ "factory", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -768,7 +558,7 @@ name = "farm-abi" version = "0.0.0" dependencies = [ "farm", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -824,7 +614,7 @@ name = "farm-staking-abi" version = "0.0.0" dependencies = [ "farm-staking", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -864,7 +654,7 @@ name = "farm-staking-nft-abi" version = "0.0.0" dependencies = [ "farm-staking-nft", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -903,7 +693,7 @@ name = "farm-staking-proxy-meta" version = "0.0.0" dependencies = [ "farm-staking-proxy", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -944,7 +734,7 @@ name = "farm-with-locked-rewards-meta" version = "0.0.0" dependencies = [ "farm-with-locked-rewards", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -984,12 +774,6 @@ dependencies = [ "token_send", ] -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - [[package]] name = "fees-collector" version = "0.0.0" @@ -1015,7 +799,7 @@ name = "fees-collector-meta" version = "0.0.0" dependencies = [ "fees-collector", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -1031,94 +815,6 @@ dependencies = [ "multiversx-sc", ] -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-core", - "futures-io", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - [[package]] name = "fuzz" version = "0.0.0" @@ -1163,25 +859,6 @@ dependencies = [ "wasi", ] -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "globset" -version = "0.4.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata", - "regex-syntax", -] - [[package]] name = "governance" version = "0.0.0" @@ -1197,7 +874,7 @@ name = "governance-meta" version = "0.0.0" dependencies = [ "governance", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -1219,26 +896,7 @@ name = "governance-v2-meta" version = "0.0.0" dependencies = [ "governance-v2", - "multiversx-sc-meta", -] - -[[package]] -name = "h2" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", + "multiversx-sc-meta-lib", ] [[package]] @@ -1246,6 +904,10 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "serde", +] [[package]] name = "heck" @@ -1253,12 +915,6 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" -[[package]] -name = "hermit-abi" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0c62115964e08cb8039170eb33c1d0e2388a256930279edca206fff675f82c3" - [[package]] name = "hex" version = "0.4.3" @@ -1278,195 +934,69 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] -name = "hmac" -version = "0.12.1" +name = "indexmap" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" dependencies = [ - "digest", + "equivalent", + "hashbrown", + "serde", ] [[package]] -name = "http" -version = "0.2.11" +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ - "bytes", - "fnv", - "itoa", + "either", ] [[package]] -name = "http-body" -version = "0.4.6" +name = "itertools" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ - "bytes", - "http", - "pin-project-lite", + "either", ] [[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" +name = "itoa" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] -name = "hyper" -version = "0.14.28" +name = "keccak" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", + "cpufeatures", ] [[package]] -name = "hyper-tls" -version = "0.5.0" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-native-tls", -] +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" +name = "legacy_token_decode_module" +version = "0.0.0" dependencies = [ - "unicode-bidi", - "unicode-normalization", + "common_structs", + "multiversx-sc", + "utils", ] [[package]] -name = "ignore" -version = "0.4.22" +name = "libc" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" -dependencies = [ - "crossbeam-deque", - "globset", - "log", - "memchr", - "regex-automata", - "same-file", - "walkdir", - "winapi-util", -] - -[[package]] -name = "indexmap" -version = "2.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" -dependencies = [ - "equivalent", - "hashbrown", -] - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "js-sys" -version = "0.3.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "legacy_token_decode_module" -version = "0.0.0" -dependencies = [ - "common_structs", - "multiversx-sc", - "utils", -] - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "lkmex-transfer" @@ -1490,17 +1020,7 @@ name = "lkmex-transfer-abi" version = "0.0.0" dependencies = [ "lkmex-transfer", - "multiversx-sc-meta", -] - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", + "multiversx-sc-meta-lib", ] [[package]] @@ -1528,7 +1048,7 @@ name = "locked-token-wrapper-meta" version = "0.0.0" dependencies = [ "locked-token-wrapper", - "multiversx-sc-meta", + "multiversx-sc-meta-lib", ] [[package]] @@ -1542,9 +1062,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "math" @@ -1555,9 +1075,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memory_units" @@ -1589,40 +1109,14 @@ name = "metabonding-staking-meta" version = "0.0.0" dependencies = [ "metabonding-staking", - "multiversx-sc-meta", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" -dependencies = [ - "libc", - "wasi", - "windows-sys 0.48.0", + "multiversx-sc-meta-lib", ] [[package]] name = "multiversx-chain-scenario-format" -version = "0.21.1" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfc2b1dc76af14c24145672c2779474046ab44ef56bac82a58844328f4b4d2e" +checksum = "dcca77966bf5eb9c9f96d0597f17a4fa7b64681cc7b83e39bdf31f8c6ca04d44" dependencies = [ "bech32", "hex", @@ -1635,15 +1129,16 @@ dependencies = [ [[package]] name = "multiversx-chain-vm" -version = "0.7.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75459864359798406a45a7bb2ed221d623b2e39484ec3e4ac6d23167bfc50b33" +checksum = "13c537d27dfc7a8e295d4f7c5f67a967ce66b6c3fc8e31a160e8cf28e14ecb2d" dependencies = [ - "bitflags 2.4.2", + "bitflags", + "colored", "ed25519-dalek", "hex", "hex-literal 0.4.1", - "itertools 0.12.1", + "itertools 0.13.0", "multiversx-chain-vm-executor", "num-bigint", "num-traits", @@ -1661,33 +1156,35 @@ checksum = "b59072fa0624b55ae5ae3fa6bfa91515bbeb4ac440214bc4a509e2c8806d6e9f" [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ - "bitflags 2.4.2", + "bitflags", "hex-literal 0.4.1", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", "num-bigint", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -1697,9 +1194,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -1709,110 +1206,59 @@ dependencies = [ ] [[package]] -name = "multiversx-sc-meta" -version = "0.46.1" +name = "multiversx-sc-meta-lib" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c8250fd72b78dff76fd3789078aee3dec2524ca37250c645dcb2b1bf067551e" +checksum = "ef023806e14a8a6245408c4a7dfdf17d4a1eb39425cedfe50cd2c48f96708ab6" dependencies = [ "clap", "colored", - "common-path", "convert_case", - "copy_dir", "hex", "lazy_static", "multiversx-sc", - "pathdiff", - "reqwest", - "ruplacer", "rustc_version", + "semver", "serde", "serde_json", "toml", - "wasmparser 0.118.1", + "wasmparser", "wasmprinter", - "zip", ] [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-scenario" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3aa2644018c85caf3cc39a130961e39bd719ff3d75751b60a7394d6eace1c847" +checksum = "cd16e3bf1f6696d0add36b7b905b1ffdd13b836e584da000f5e265c11e2bfc8d" dependencies = [ "base64", "bech32", - "clap", "colored", "hex", - "itertools 0.12.1", + "itertools 0.13.0", "log", "multiversx-chain-scenario-format", "multiversx-chain-vm", "multiversx-chain-vm-executor", "multiversx-sc", - "multiversx-sc-meta", - "multiversx-sdk", + "multiversx-sc-meta-lib", "num-bigint", "num-traits", "pathdiff", "serde", "serde_json", "sha2", - "tokio", -] - -[[package]] -name = "multiversx-sdk" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f86d0da66ca2eb334414786a287010bb669b8d815a7d3b690d629a04b86bb80" -dependencies = [ - "anyhow", - "base64", - "bech32", - "bip39", - "hex", - "hmac", - "itertools 0.12.1", - "pbkdf2", - "pem", - "rand", - "reqwest", - "serde", - "serde_json", - "serde_repr", - "sha2", - "sha3", - "tokio", - "zeroize", -] - -[[package]] -name = "native-tls" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" -dependencies = [ - "lazy_static", - "libc", - "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", + "unwrap-infallible", ] [[package]] @@ -1847,82 +1293,19 @@ dependencies = [ [[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 = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - [[package]] name = "once_cell" version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" -[[package]] -name = "openssl" -version = "0.10.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c9d69dd87a29568d4d017cfe8ec518706046a05184e5aea92d0af890b803c8" -dependencies = [ - "bitflags 2.4.2", - "cfg-if 1.0.0", - "foreign-types", - "libc", - "once_cell", - "openssl-macros", - "openssl-sys", -] - -[[package]] -name = "openssl-macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "openssl-sys" -version = "0.9.99" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22e1bf214306098e4832460f797824c05d25aacdf896f64a985fb0fd992454ae" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "pair" version = "0.0.0" @@ -1946,7 +1329,7 @@ dependencies = [ name = "pair-abi" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "pair", ] @@ -1964,7 +1347,7 @@ dependencies = [ name = "pair-hooks-sample-meta" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "pair-hooks-sample", ] @@ -1982,33 +1365,10 @@ dependencies = [ name = "pair-mock-meta" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "pair-mock", ] -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.5", -] - [[package]] name = "pathdiff" version = "0.2.1" @@ -2039,56 +1399,19 @@ dependencies = [ name = "pause-all-meta" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "pause-all", ] -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest", -] - -[[package]] -name = "pem" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" -dependencies = [ - "base64", - "serde", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - [[package]] name = "permissions_module" version = "0.0.0" dependencies = [ - "bitflags 2.4.2", + "bitflags", "common_errors", "multiversx-sc", ] -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - [[package]] name = "pkcs8" version = "0.10.2" @@ -2099,12 +1422,6 @@ dependencies = [ "spki", ] -[[package]] -name = "pkg-config" -version = "0.3.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2900ede94e305130c13ddd391e0ab7cbaeb783945ae07a279c268cb05109c6cb" - [[package]] name = "platforms" version = "3.3.0" @@ -2136,15 +1453,15 @@ dependencies = [ name = "price-discovery-meta" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "price-discovery", ] [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -2166,7 +1483,7 @@ dependencies = [ name = "proxy-deployer-meta" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "proxy-deployer", ] @@ -2208,15 +1525,15 @@ dependencies = [ name = "proxy_dex-meta" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "proxy_dex", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -2263,91 +1580,13 @@ dependencies = [ [[package]] name = "rand_seeder" -version = "0.2.3" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2890aaef0aa82719a50e808de264f9484b74b442e1a3a0e5ee38243ac40bdb" +checksum = "4a9febe641d2842ffc76ee962668a17578767c4e01735e4802b21ed9a24b2e4e" dependencies = [ "rand_core", ] -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "regex" -version = "1.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bb987efffd3c6d0d8f5f89510bb458559eab11e4f869acb20bf845e016259cd" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "reqwest" -version = "0.11.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" -dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - [[package]] name = "rewards" version = "0.0.0" @@ -2380,30 +1619,10 @@ dependencies = [ name = "router-abi" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "router", ] -[[package]] -name = "ruplacer" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58a26a1b15ff113d31d139357f7422708312978ed69cd5dd47e36d1b80b7eaf3" -dependencies = [ - "Inflector", - "anyhow", - "clap", - "colored", - "ignore", - "regex", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - [[package]] name = "rustc_version" version = "0.4.0" @@ -2413,43 +1632,12 @@ dependencies = [ "semver", ] -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64", -] - [[package]] name = "ryu" version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - [[package]] name = "sc_whitelist_module" version = "0.0.0" @@ -2458,44 +1646,6 @@ dependencies = [ "multiversx-sc", ] -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - [[package]] name = "semver" version = "1.0.21" @@ -2528,23 +1678,11 @@ version = "1.0.113" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" dependencies = [ - "indexmap", "itoa", "ryu", "serde", ] -[[package]] -name = "serde_repr" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b2e6b945e9d3df726b65d6ee24060aff8e3533d431f677a9695db04eff9dfdb" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "serde_spanned" version = "0.6.5" @@ -2554,18 +1692,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - [[package]] name = "sha2" version = "0.10.8" @@ -2587,15 +1713,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - [[package]] name = "signature" version = "2.2.0" @@ -2622,7 +1739,7 @@ dependencies = [ name = "simple-lock-meta" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "simple-lock", ] @@ -2644,35 +1761,16 @@ dependencies = [ name = "simple-lock-whitelist-meta" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "simple-lock-whitelist", ] -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - [[package]] name = "smallvec" version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" -[[package]] -name = "socket2" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" -dependencies = [ - "libc", - "windows-sys 0.48.0", -] - [[package]] name = "spki" version = "0.7.3" @@ -2697,9 +1795,9 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -2707,59 +1805,14 @@ dependencies = [ ] [[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tempfile" -version = "3.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a365e8cd18e44762ef95d87f284f4b5cd04107fec2ff3052bd6a3e6069669e67" -dependencies = [ - "cfg-if 1.0.0", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" +name = "termcolor" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ - "tinyvec_macros", + "winapi-util", ] -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - [[package]] name = "token-unstake" version = "0.0.0" @@ -2783,7 +1836,7 @@ dependencies = [ name = "token-unstake-abi" version = "0.0.0" dependencies = [ - "multiversx-sc-meta", + "multiversx-sc-meta-lib", "token-unstake", ] @@ -2804,60 +1857,6 @@ dependencies = [ "multiversx-sc", ] -[[package]] -name = "tokio" -version = "1.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "tokio-native-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - [[package]] name = "toml" version = "0.8.10" @@ -2893,70 +1892,30 @@ dependencies = [ "winnow", ] -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "pin-project-lite", - "tracing-core", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - [[package]] name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" -[[package]] -name = "unicode-normalization" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" -dependencies = [ - "tinyvec", -] - [[package]] name = "unicode-segmentation" version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" @@ -2964,17 +1923,6 @@ dependencies = [ "multiversx-sc", ] -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", -] - [[package]] name = "utf8parse" version = "0.2.1" @@ -2991,148 +1939,41 @@ dependencies = [ "multiversx-sc", ] -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" -[[package]] -name = "walkdir" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" -[[package]] -name = "wasm-bindgen" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" -dependencies = [ - "cfg-if 1.0.0", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" -dependencies = [ - "cfg-if 1.0.0", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.91" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" - -[[package]] -name = "wasmparser" -version = "0.118.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ee9723b928e735d53000dec9eae7b07a60e490c85ab54abb66659fc61bfcd9" -dependencies = [ - "indexmap", - "semver", -] - [[package]] name = "wasmparser" -version = "0.121.0" +version = "0.216.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953cf6a7606ab31382cb1caa5ae403e77ba70c7f8e12eeda167e7040d42bfda8" +checksum = "1cc7c63191ae61c70befbe6045b9be65ef2082fa89421a386ae172cb1e08e92d" dependencies = [ - "bitflags 2.4.2", + "ahash", + "bitflags", + "hashbrown", "indexmap", "semver", + "serde", ] [[package]] name = "wasmprinter" -version = "0.2.78" +version = "0.216.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05e32c13c59fdc64d3f6998a1d52eb1d362b6904a88b754190ccb85661ad577a" +checksum = "07544896b6c5a387e2ba18ad4f0d44c3cae8f2c5b7a8b55507044be646d29bbc" dependencies = [ "anyhow", - "wasmparser 0.121.0", -] - -[[package]] -name = "web-sys" -version = "0.3.68" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96565907687f7aceb35bc5fc03770a8a0471d82e479f25832f54a0e3f4b28446" -dependencies = [ - "js-sys", - "wasm-bindgen", + "termcolor", + "wasmparser", ] [[package]] @@ -3340,29 +2181,27 @@ dependencies = [ ] [[package]] -name = "winreg" -version = "0.50.0" +name = "zerocopy" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ - "cfg-if 1.0.0", - "windows-sys 0.48.0", + "zerocopy-derive", ] [[package]] -name = "zeroize" -version = "1.7.0" +name = "zerocopy-derive" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] -name = "zip" -version = "0.6.6" +name = "zeroize" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "byteorder", - "crc32fast", - "crossbeam-utils", - "flate2", -] +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" diff --git a/Cargo.toml b/Cargo.toml index 0b1700692..3e35f9703 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,6 @@ resolver = "2" members = [ - "dex", "dex/farm", "dex/farm/meta", "dex/farm-with-locked-rewards", diff --git a/common/common_errors/Cargo.toml b/common/common_errors/Cargo.toml index c61a89e80..343089fb5 100644 --- a/common/common_errors/Cargo.toml +++ b/common/common_errors/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/common_structs/Cargo.toml b/common/common_structs/Cargo.toml index 8e5655f12..74e79fc08 100644 --- a/common/common_structs/Cargo.toml +++ b/common/common_structs/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.mergeable] diff --git a/common/modules/banned_addresses/Cargo.toml b/common/modules/banned_addresses/Cargo.toml index 149d2dbcf..347157c18 100644 --- a/common/modules/banned_addresses/Cargo.toml +++ b/common/modules/banned_addresses/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.permissions_module] diff --git a/common/modules/farm/config/Cargo.toml b/common/modules/farm/config/Cargo.toml index b5de657af..42868939f 100644 --- a/common/modules/farm/config/Cargo.toml +++ b/common/modules/farm/config/Cargo.toml @@ -23,5 +23,5 @@ path = "../../pausable" path = "../../permissions_module" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/farm/contexts/Cargo.toml b/common/modules/farm/contexts/Cargo.toml index b61c7a7cb..1e09c2bed 100644 --- a/common/modules/farm/contexts/Cargo.toml +++ b/common/modules/farm/contexts/Cargo.toml @@ -35,8 +35,8 @@ path = "../../pausable" path = "../../permissions_module" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" diff --git a/common/modules/farm/contexts/src/mod.rs b/common/modules/farm/contexts/src/mod.rs index e8f133eb6..a1ceed191 100644 --- a/common/modules/farm/contexts/src/mod.rs +++ b/common/modules/farm/contexts/src/mod.rs @@ -1,5 +1,4 @@ #![no_std] -#![feature(trait_alias)] pub mod claim_rewards_context; pub mod enter_farm_context; diff --git a/common/modules/farm/contexts/src/storage_cache.rs b/common/modules/farm/contexts/src/storage_cache.rs index 4e14ea2ec..4b443ff98 100644 --- a/common/modules/farm/contexts/src/storage_cache.rs +++ b/common/modules/farm/contexts/src/storage_cache.rs @@ -3,8 +3,15 @@ multiversx_sc::derive_imports!(); use pausable::State; -pub trait FarmContracTraitBounds = - config::ConfigModule + rewards::RewardsModule + farm_token::FarmTokenModule; +pub trait FarmContracTraitBounds: + config::ConfigModule + rewards::RewardsModule + farm_token::FarmTokenModule +{ +} + +impl FarmContracTraitBounds for T where + T: config::ConfigModule + rewards::RewardsModule + farm_token::FarmTokenModule +{ +} pub struct StorageCache<'a, C: FarmContracTraitBounds> { sc_ref: &'a C, @@ -34,6 +41,7 @@ impl<'a, C: FarmContracTraitBounds> StorageCache<'a, C> { } } +#[allow(clippy::needless_lifetimes)] impl<'a, C: FarmContracTraitBounds> Drop for StorageCache<'a, C> { fn drop(&mut self) { // commit changes to storage for the mutable fields diff --git a/common/modules/farm/events/Cargo.toml b/common/modules/farm/events/Cargo.toml index f69904d95..06b1c21c7 100644 --- a/common/modules/farm/events/Cargo.toml +++ b/common/modules/farm/events/Cargo.toml @@ -14,5 +14,5 @@ path = "../../../common_structs" path = "../contexts" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/farm/farm_base_impl/Cargo.toml b/common/modules/farm/farm_base_impl/Cargo.toml index 7ac538eff..e8c7462d3 100644 --- a/common/modules/farm/farm_base_impl/Cargo.toml +++ b/common/modules/farm/farm_base_impl/Cargo.toml @@ -50,11 +50,11 @@ path = "../../../traits/mergeable" path = "../../../traits/fixed-supply-token" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/common/modules/farm/farm_base_impl/src/base_traits_impl.rs b/common/modules/farm/farm_base_impl/src/base_traits_impl.rs index b10f2ff72..c994e3369 100644 --- a/common/modules/farm/farm_base_impl/src/base_traits_impl.rs +++ b/common/modules/farm/farm_base_impl/src/base_traits_impl.rs @@ -4,18 +4,31 @@ use common_structs::{FarmToken, FarmTokenAttributes, Nonce}; use config::ConfigModule; use contexts::storage_cache::StorageCache; use core::marker::PhantomData; +use farm_token::FarmTokenModule; use fixed_supply_token::FixedSupplyToken; use mergeable::Mergeable; use multiversx_sc_modules::transfer_role_proxy::PaymentsVec; use rewards::RewardsModule; -pub trait AllBaseFarmImplTraits = +pub trait AllBaseFarmImplTraits: rewards::RewardsModule + + config::ConfigModule + + farm_token::FarmTokenModule + + permissions_module::PermissionsModule + + pausable::PausableModule + + multiversx_sc_modules::default_issue_callbacks::DefaultIssueCallbacksModule +{ +} + +impl AllBaseFarmImplTraits for T where + T: rewards::RewardsModule + config::ConfigModule + farm_token::FarmTokenModule + permissions_module::PermissionsModule + pausable::PausableModule - + multiversx_sc_modules::default_issue_callbacks::DefaultIssueCallbacksModule; + + multiversx_sc_modules::default_issue_callbacks::DefaultIssueCallbacksModule +{ +} pub trait FarmContract { type FarmSc: AllBaseFarmImplTraits; @@ -30,8 +43,7 @@ pub trait FarmContract { + FixedSupplyToken<::Api> + FarmToken<::Api> + From::Api>> - + Into::Api>> = - FarmTokenAttributes<::Api>; + + Into::Api>>; #[inline] fn mint_rewards( @@ -258,4 +270,5 @@ where T: AllBaseFarmImplTraits, { type FarmSc = T; + type AttributesType = FarmTokenAttributes<::Api>; } diff --git a/common/modules/farm/farm_base_impl/src/lib.rs b/common/modules/farm/farm_base_impl/src/lib.rs index f63df2820..00c0d2672 100644 --- a/common/modules/farm/farm_base_impl/src/lib.rs +++ b/common/modules/farm/farm_base_impl/src/lib.rs @@ -1,8 +1,5 @@ #![no_std] #![allow(clippy::too_many_arguments)] -#![feature(exact_size_is_empty)] -#![feature(trait_alias)] -#![feature(associated_type_defaults)] multiversx_sc::imports!(); multiversx_sc::derive_imports!(); diff --git a/common/modules/farm/farm_token/Cargo.toml b/common/modules/farm/farm_token/Cargo.toml index 64834bd68..aef369e13 100644 --- a/common/modules/farm/farm_token/Cargo.toml +++ b/common/modules/farm/farm_token/Cargo.toml @@ -26,8 +26,8 @@ path = "../../pausable" path = "../../permissions_module" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" diff --git a/common/modules/farm/farm_token_merge/Cargo.toml b/common/modules/farm/farm_token_merge/Cargo.toml index 4df9540e8..038e7b313 100644 --- a/common/modules/farm/farm_token_merge/Cargo.toml +++ b/common/modules/farm/farm_token_merge/Cargo.toml @@ -23,11 +23,11 @@ path = "../../token_merge_helper" path = "../farm_token" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/common/modules/farm/rewards/Cargo.toml b/common/modules/farm/rewards/Cargo.toml index 68d37f46d..06bed7548 100644 --- a/common/modules/farm/rewards/Cargo.toml +++ b/common/modules/farm/rewards/Cargo.toml @@ -29,8 +29,8 @@ path = "../../pausable" path = "../../permissions_module" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" diff --git a/common/modules/legacy_token_decode_module/Cargo.toml b/common/modules/legacy_token_decode_module/Cargo.toml index 124b2ec02..29bb78f56 100644 --- a/common/modules/legacy_token_decode_module/Cargo.toml +++ b/common/modules/legacy_token_decode_module/Cargo.toml @@ -8,7 +8,7 @@ edition = "2018" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.common_structs] diff --git a/common/modules/locking_module/Cargo.toml b/common/modules/locking_module/Cargo.toml index 660635a24..3de83e7e6 100644 --- a/common/modules/locking_module/Cargo.toml +++ b/common/modules/locking_module/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.simple-lock] diff --git a/common/modules/locking_module/src/lock_with_energy_module.rs b/common/modules/locking_module/src/lock_with_energy_module.rs index cb7b02911..7569c4f61 100644 --- a/common/modules/locking_module/src/lock_with_energy_module.rs +++ b/common/modules/locking_module/src/lock_with_energy_module.rs @@ -36,7 +36,7 @@ pub trait LockWithEnergyModule { .execute_on_dest_context() } - fn get_locking_sc_proxy_instance(&self) -> energy_factory::Proxy { + fn get_locking_sc_proxy_instance(&self) -> energy_factory::ProxyTo { let locking_sc_address = self.locking_sc_address().get(); self.locking_sc_proxy_obj(locking_sc_address) } diff --git a/common/modules/locking_module/src/locking_module.rs b/common/modules/locking_module/src/locking_module.rs index 4b79a57af..a484ea500 100644 --- a/common/modules/locking_module/src/locking_module.rs +++ b/common/modules/locking_module/src/locking_module.rs @@ -53,7 +53,7 @@ pub trait LockingModule { .execute_on_dest_context() } - fn get_locking_sc_proxy_instance(&self) -> simple_lock::Proxy { + fn get_locking_sc_proxy_instance(&self) -> simple_lock::ProxyTo { let locking_sc_address = self.locking_sc_address().get(); self.locking_sc_proxy_obj(locking_sc_address) } diff --git a/common/modules/math/Cargo.toml b/common/modules/math/Cargo.toml index 5f1f99325..b8aa25486 100644 --- a/common/modules/math/Cargo.toml +++ b/common/modules/math/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/pausable/Cargo.toml b/common/modules/pausable/Cargo.toml index 2f258161b..9f19f8302 100644 --- a/common/modules/pausable/Cargo.toml +++ b/common/modules/pausable/Cargo.toml @@ -11,5 +11,5 @@ path = "src/pausable.rs" path = "../permissions_module" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/permissions_module/Cargo.toml b/common/modules/permissions_module/Cargo.toml index fdc8d7d2e..99b07bc79 100644 --- a/common/modules/permissions_module/Cargo.toml +++ b/common/modules/permissions_module/Cargo.toml @@ -17,5 +17,5 @@ bitflags = "2.4.1" path = "../../common_errors" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/permissions_module/src/permissions.rs b/common/modules/permissions_module/src/permissions.rs index 623c72718..c0e4ec205 100644 --- a/common/modules/permissions_module/src/permissions.rs +++ b/common/modules/permissions_module/src/permissions.rs @@ -1,6 +1,6 @@ use bitflags::bitflags; use multiversx_sc::{ - abi::TypeAbi, + abi::{TypeAbi, TypeAbiFrom}, codec::{DecodeError, TopDecode, TopEncode}, }; bitflags! { @@ -32,8 +32,16 @@ impl TopDecode for Permissions { } } +impl TypeAbiFrom for Permissions {} + impl TypeAbi for Permissions { + type Unmanaged = Self; + fn type_name() -> multiversx_sc::abi::TypeName { core::any::type_name::().into() } + + fn type_name_rust() -> multiversx_sc::abi::TypeName { + core::any::type_name::().into() + } } diff --git a/common/modules/sc_whitelist_module/Cargo.toml b/common/modules/sc_whitelist_module/Cargo.toml index 978cd6a89..b67ca8ee6 100644 --- a/common/modules/sc_whitelist_module/Cargo.toml +++ b/common/modules/sc_whitelist_module/Cargo.toml @@ -11,5 +11,5 @@ path = "src/sc_whitelist_module.rs" path = "../../common_errors" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/token_merge_helper/Cargo.toml b/common/modules/token_merge_helper/Cargo.toml index c337a5996..b5b8c1997 100644 --- a/common/modules/token_merge_helper/Cargo.toml +++ b/common/modules/token_merge_helper/Cargo.toml @@ -11,5 +11,5 @@ path = "src/lib.rs" path = "../../common_errors" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/token_send/Cargo.toml b/common/modules/token_send/Cargo.toml index 28b005064..2f2ddb019 100644 --- a/common/modules/token_send/Cargo.toml +++ b/common/modules/token_send/Cargo.toml @@ -14,5 +14,5 @@ path = "../../common_structs" path = "../../common_errors" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/modules/utils/Cargo.toml b/common/modules/utils/Cargo.toml index a18635d6e..6f68bd56b 100644 --- a/common/modules/utils/Cargo.toml +++ b/common/modules/utils/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.common_structs] diff --git a/common/traits/fixed-supply-token/Cargo.toml b/common/traits/fixed-supply-token/Cargo.toml index eafd9fe32..ec88d5add 100644 --- a/common/traits/fixed-supply-token/Cargo.toml +++ b/common/traits/fixed-supply-token/Cargo.toml @@ -8,4 +8,4 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" diff --git a/common/traits/mergeable/Cargo.toml b/common/traits/mergeable/Cargo.toml index 4800de5ca..1f7ce043d 100644 --- a/common/traits/mergeable/Cargo.toml +++ b/common/traits/mergeable/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/common/traits/unwrappable/Cargo.toml b/common/traits/unwrappable/Cargo.toml index 9ba6e7e73..a406958a0 100644 --- a/common/traits/unwrappable/Cargo.toml +++ b/common/traits/unwrappable/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/dex/Cargo.toml b/dex/Cargo.toml deleted file mode 100644 index 62d9161bf..000000000 --- a/dex/Cargo.toml +++ /dev/null @@ -1,66 +0,0 @@ -[package] -name = "dex-tests" -version = "0.0.0" -edition = "2021" -publish = false - -[dependencies.multiversx-sc] -version = "=0.46.1" -features = ["esdt-token-payment-legacy-decode"] - -[dev-dependencies] -num-bigint = "0.4.2" - -[dev-dependencies.multiversx-sc-modules] -version = "=0.46.1" - -[dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" - -[dev-dependencies.config] -path = "../common/modules/farm/config" - -[dev-dependencies.farm_token] -path = "../common/modules/farm/farm_token" - -[dev-dependencies.rewards] -path = "../common/modules/farm/rewards" - -[dev-dependencies.locking_module] -path = "../common/modules/locking_module" - -[dev-dependencies.pausable] -path = "../common/modules/pausable" - -[dev-dependencies.common_structs] -path = "../common/common_structs" - -[dev-dependencies.farm] -path = "farm" - -[dev-dependencies.farm-staking] -path = "../farm-staking/farm-staking" - -[dev-dependencies.farm-staking-proxy] -path = "../farm-staking/farm-staking-proxy" - -[dev-dependencies.factory] -path = "../locked-asset/factory" - -[dev-dependencies.simple-lock] -path = "../locked-asset/simple-lock" - -[dev-dependencies.pair] -path = "pair" - -[dev-dependencies.router] -path = "router" - -[dev-dependencies.governance] -path = "governance" - -[dev-dependencies.fees-collector] -path = "../energy-integration/fees-collector" - -[dev-dependencies.farm-boosted-yields] -path = "../energy-integration/farm-boosted-yields" diff --git a/dex/farm-with-locked-rewards/Cargo.toml b/dex/farm-with-locked-rewards/Cargo.toml index c19480688..eedd45925 100644 --- a/dex/farm-with-locked-rewards/Cargo.toml +++ b/dex/farm-with-locked-rewards/Cargo.toml @@ -75,17 +75,17 @@ path = "../../locked-asset/energy-factory" path = "../../energy-integration/common-modules/energy-query" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.simple-lock] path = "../../locked-asset/simple-lock" diff --git a/dex/farm-with-locked-rewards/meta/Cargo.toml b/dex/farm-with-locked-rewards/meta/Cargo.toml index 47476c339..ba8b0bc2b 100644 --- a/dex/farm-with-locked-rewards/meta/Cargo.toml +++ b/dex/farm-with-locked-rewards/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.farm-with-locked-rewards] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/dex/farm-with-locked-rewards/meta/src/main.rs b/dex/farm-with-locked-rewards/meta/src/main.rs index fa5c57cdf..0f8ec78ae 100644 --- a/dex/farm-with-locked-rewards/meta/src/main.rs +++ b/dex/farm-with-locked-rewards/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/dex/farm-with-locked-rewards/src/lib.rs b/dex/farm-with-locked-rewards/src/lib.rs index a42f6518c..18e7c28e3 100644 --- a/dex/farm-with-locked-rewards/src/lib.rs +++ b/dex/farm-with-locked-rewards/src/lib.rs @@ -1,6 +1,5 @@ #![no_std] #![allow(clippy::too_many_arguments)] -#![feature(exact_size_is_empty)] multiversx_sc::imports!(); multiversx_sc::derive_imports!(); @@ -81,7 +80,7 @@ pub trait Farm: self.try_set_farm_position_migration_nonce(farm_token_mapper); } - #[endpoint] + #[upgrade] fn upgrade(&self) { let current_epoch = self.blockchain().get_block_epoch(); self.first_week_start_epoch().set_if_empty(current_epoch); diff --git a/dex/farm-with-locked-rewards/wasm/Cargo.lock b/dex/farm-with-locked-rewards/wasm/Cargo.lock index 8b27f284e..969c79c4a 100644 --- a/dex/farm-with-locked-rewards/wasm/Cargo.lock +++ b/dex/farm-with-locked-rewards/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -323,32 +323,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -358,9 +360,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -371,18 +373,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -398,9 +400,9 @@ dependencies = [ [[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", ] @@ -441,18 +443,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -507,9 +509,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -539,6 +541,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/dex/farm-with-locked-rewards/wasm/Cargo.toml b/dex/farm-with-locked-rewards/wasm/Cargo.toml index 369d8346f..020472854 100644 --- a/dex/farm-with-locked-rewards/wasm/Cargo.toml +++ b/dex/farm-with-locked-rewards/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.farm-with-locked-rewards] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/farm-with-locked-rewards/wasm/src/lib.rs b/dex/farm-with-locked-rewards/wasm/src/lib.rs index 47d140e12..997c89918 100644 --- a/dex/farm-with-locked-rewards/wasm/src/lib.rs +++ b/dex/farm-with-locked-rewards/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 68 +// Upgrade: 1 +// Endpoints: 67 // Async Callback: 1 // Total number of exported functions: 70 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/farm/Cargo.toml b/dex/farm/Cargo.toml index 517a35cae..f883c4579 100644 --- a/dex/farm/Cargo.toml +++ b/dex/farm/Cargo.toml @@ -69,11 +69,11 @@ path = "../../energy-integration/common-modules/weekly-rewards-splitting" path = "../../energy-integration/common-modules/energy-query" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies] num-bigint = "0.4.2" @@ -82,7 +82,7 @@ num-bigint = "0.4.2" path = "../../energy-integration/energy-update" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.energy-factory-mock] path = "../../energy-integration/energy-factory-mock" diff --git a/dex/farm/meta/Cargo.toml b/dex/farm/meta/Cargo.toml index d6abd09e7..14fe0a21e 100644 --- a/dex/farm/meta/Cargo.toml +++ b/dex/farm/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.farm] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/dex/farm/meta/src/main.rs b/dex/farm/meta/src/main.rs index 0616303c9..ea21b8cf9 100644 --- a/dex/farm/meta/src/main.rs +++ b/dex/farm/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/dex/farm/src/lib.rs b/dex/farm/src/lib.rs index 669dd2e50..639adf203 100644 --- a/dex/farm/src/lib.rs +++ b/dex/farm/src/lib.rs @@ -1,6 +1,5 @@ #![no_std] #![allow(clippy::too_many_arguments)] -#![feature(exact_size_is_empty)] multiversx_sc::imports!(); multiversx_sc::derive_imports!(); @@ -82,7 +81,7 @@ pub trait Farm: self.try_set_farm_position_migration_nonce(farm_token_mapper); } - #[endpoint] + #[upgrade] fn upgrade(&self) { let current_epoch = self.blockchain().get_block_epoch(); self.first_week_start_epoch().set_if_empty(current_epoch); diff --git a/dex/farm/wasm/Cargo.lock b/dex/farm/wasm/Cargo.lock index 5bbf4a6b3..b73770ac7 100644 --- a/dex/farm/wasm/Cargo.lock +++ b/dex/farm/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -293,32 +293,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -328,9 +330,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -341,18 +343,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -368,9 +370,9 @@ dependencies = [ [[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", ] @@ -411,18 +413,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -477,9 +479,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -509,6 +511,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/dex/farm/wasm/Cargo.toml b/dex/farm/wasm/Cargo.toml index 26ce2670b..4c5b25ae8 100644 --- a/dex/farm/wasm/Cargo.toml +++ b/dex/farm/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.farm] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/farm/wasm/src/lib.rs b/dex/farm/wasm/src/lib.rs index de7b89ee5..eef834da9 100644 --- a/dex/farm/wasm/src/lib.rs +++ b/dex/farm/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 65 +// Upgrade: 1 +// Endpoints: 64 // Async Callback: 1 // Total number of exported functions: 67 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/fuzz/Cargo.toml b/dex/fuzz/Cargo.toml index 57800c37f..fbc4fb3dd 100644 --- a/dex/fuzz/Cargo.toml +++ b/dex/fuzz/Cargo.toml @@ -12,11 +12,11 @@ num-bigint = "0.4.2" rand = "0.8.4" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dependencies.pausable] path = "../../common/modules/pausable" diff --git a/dex/fuzz/src/fuzz_data.rs b/dex/fuzz/src/fuzz_data.rs index 14de4e7c3..316f847b4 100644 --- a/dex/fuzz/src/fuzz_data.rs +++ b/dex/fuzz/src/fuzz_data.rs @@ -151,6 +151,7 @@ pub mod fuzz_data_tests { PriceDiscObjBuilder: 'static + Copy + Fn() -> price_discovery::ContractObj, { pub rng: StdRng, + #[allow(dead_code)] pub owner_address: Address, pub fuzz_args: FuzzDexExecutorInitArgs, pub statistics: EventsStatistics, @@ -590,6 +591,7 @@ pub mod fuzz_data_tests { { pub pd_wrapper: ContractObjWrapper, PriceDiscObjBuilder>, + #[allow(dead_code)] pub locking_sc_address: Address, } diff --git a/dex/governance/Cargo.toml b/dex/governance/Cargo.toml index 74d9f2849..8cbaf6093 100644 --- a/dex/governance/Cargo.toml +++ b/dex/governance/Cargo.toml @@ -9,14 +9,14 @@ publish = false path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.pair-mock] path = "../pair-mock" diff --git a/dex/governance/meta/Cargo.toml b/dex/governance/meta/Cargo.toml index b692c9007..8102f75d0 100644 --- a/dex/governance/meta/Cargo.toml +++ b/dex/governance/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.governance] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/dex/governance/meta/src/main.rs b/dex/governance/meta/src/main.rs index dd17f3d9d..2acd760bf 100644 --- a/dex/governance/meta/src/main.rs +++ b/dex/governance/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/dex/governance/src/lib.rs b/dex/governance/src/lib.rs index e9d4147d3..460aabcda 100644 --- a/dex/governance/src/lib.rs +++ b/dex/governance/src/lib.rs @@ -49,7 +49,7 @@ pub trait Governance: self.try_change_price_providers(price_providers); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} #[payable("*")] diff --git a/dex/governance/wasm/Cargo.lock b/dex/governance/wasm/Cargo.lock index 30ca50940..a2d7115ea 100644 --- a/dex/governance/wasm/Cargo.lock +++ b/dex/governance/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "endian-type" @@ -55,32 +55,34 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -90,9 +92,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -103,9 +105,9 @@ dependencies = [ [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -121,27 +123,27 @@ dependencies = [ [[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 = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -164,9 +166,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -178,3 +180,9 @@ name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/dex/governance/wasm/Cargo.toml b/dex/governance/wasm/Cargo.toml index 905950d0e..249faee52 100644 --- a/dex/governance/wasm/Cargo.toml +++ b/dex/governance/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.governance] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/governance/wasm/src/lib.rs b/dex/governance/wasm/src/lib.rs index 913c84bba..8e699c12c 100644 --- a/dex/governance/wasm/src/lib.rs +++ b/dex/governance/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 22 +// Upgrade: 1 +// Endpoints: 21 // Async Callback (empty): 1 // Total number of exported functions: 24 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/pair-mock/Cargo.toml b/dex/pair-mock/Cargo.toml index bc58d1089..30deea9fc 100644 --- a/dex/pair-mock/Cargo.toml +++ b/dex/pair-mock/Cargo.toml @@ -12,7 +12,7 @@ path = "src/pair.rs" path = "../../common/common_errors" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.itertools] @@ -20,4 +20,4 @@ version = "0.10.1" default-features = false [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/dex/pair-mock/meta/Cargo.toml b/dex/pair-mock/meta/Cargo.toml index 673a8fc84..a78d34547 100644 --- a/dex/pair-mock/meta/Cargo.toml +++ b/dex/pair-mock/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.pair-mock] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/dex/pair-mock/meta/src/main.rs b/dex/pair-mock/meta/src/main.rs index e4776f4f6..17e5421af 100644 --- a/dex/pair-mock/meta/src/main.rs +++ b/dex/pair-mock/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/dex/pair-mock/wasm/Cargo.lock b/dex/pair-mock/wasm/Cargo.lock index 6311e01de..5a16bf6a7 100644 --- a/dex/pair-mock/wasm/Cargo.lock +++ b/dex/pair-mock/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common_errors" @@ -62,32 +62,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -97,9 +99,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -110,9 +112,9 @@ dependencies = [ [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -128,9 +130,9 @@ dependencies = [ [[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", ] @@ -154,18 +156,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -188,9 +190,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -202,3 +204,9 @@ name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/dex/pair-mock/wasm/Cargo.toml b/dex/pair-mock/wasm/Cargo.toml index 9bf537c94..8978d06da 100644 --- a/dex/pair-mock/wasm/Cargo.toml +++ b/dex/pair-mock/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.pair-mock] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/pair-mock/wasm/src/lib.rs b/dex/pair-mock/wasm/src/lib.rs index e3462d773..4501da7a5 100644 --- a/dex/pair-mock/wasm/src/lib.rs +++ b/dex/pair-mock/wasm/src/lib.rs @@ -10,8 +10,6 @@ // Total number of exported functions: 4 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/pair/Cargo.toml b/dex/pair/Cargo.toml index 2cb51d6a7..247c593c9 100644 --- a/dex/pair/Cargo.toml +++ b/dex/pair/Cargo.toml @@ -40,11 +40,11 @@ version = "0.10.1" default-features = false [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/dex/pair/meta/Cargo.toml b/dex/pair/meta/Cargo.toml index b07218ea1..ee273e2ec 100644 --- a/dex/pair/meta/Cargo.toml +++ b/dex/pair/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.pair] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/dex/pair/meta/src/main.rs b/dex/pair/meta/src/main.rs index 5adcd78f3..962c4f515 100644 --- a/dex/pair/meta/src/main.rs +++ b/dex/pair/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/dex/pair/src/contexts/base.rs b/dex/pair/src/contexts/base.rs index 751ca7fc1..81f8de5d6 100644 --- a/dex/pair/src/contexts/base.rs +++ b/dex/pair/src/contexts/base.rs @@ -97,6 +97,7 @@ where } } +#[allow(clippy::needless_lifetimes)] impl<'a, C> Drop for StorageCache<'a, C> where C: crate::config::ConfigModule, diff --git a/dex/pair/src/lib.rs b/dex/pair/src/lib.rs index 8bb3c36e7..6a5337f73 100644 --- a/dex/pair/src/lib.rs +++ b/dex/pair/src/lib.rs @@ -13,6 +13,7 @@ mod liquidity_pool; pub mod locking_wrapper; pub mod pair_actions; pub mod pair_hooks; +pub mod read_pair_storage; pub mod safe_price; pub mod safe_price_view; @@ -34,6 +35,7 @@ pub trait Pair: + config::ConfigModule + token_send::TokenSendModule + events::EventsModule + + read_pair_storage::ReadPairStorageModule + safe_price::SafePriceModule + safe_price_view::SafePriceViewModule + contexts::output_builder::OutputBuilderModule @@ -106,7 +108,7 @@ pub trait Pair: self.banned_addresses().add(&sc_address); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} #[endpoint(setLpTokenIdentifier)] diff --git a/dex/pair/src/locking_wrapper.rs b/dex/pair/src/locking_wrapper.rs index 14fb910b8..88d056044 100644 --- a/dex/pair/src/locking_wrapper.rs +++ b/dex/pair/src/locking_wrapper.rs @@ -74,7 +74,7 @@ pub trait LockingWrapperModule: current_epoch < locking_deadline_epoch } - fn get_locking_sc_proxy_instance(&self) -> simple_lock::Proxy { + fn get_locking_sc_proxy_instance(&self) -> simple_lock::ProxyTo { let locking_sc_address = self.locking_sc_address().get(); self.locking_sc_proxy_obj(locking_sc_address) } diff --git a/dex/pair/src/pair_actions/add_liq.rs b/dex/pair/src/pair_actions/add_liq.rs index 9d5ae41bc..c4ca83986 100644 --- a/dex/pair/src/pair_actions/add_liq.rs +++ b/dex/pair/src/pair_actions/add_liq.rs @@ -90,6 +90,7 @@ pub trait AddLiquidityModule: self.update_safe_price( &storage_cache.first_token_reserve, &storage_cache.second_token_reserve, + &storage_cache.lp_token_supply, ); let initial_k = self.calculate_k_constant( diff --git a/dex/pair/src/pair_actions/remove_liq.rs b/dex/pair/src/pair_actions/remove_liq.rs index 535fd68f5..79441ca69 100644 --- a/dex/pair/src/pair_actions/remove_liq.rs +++ b/dex/pair/src/pair_actions/remove_liq.rs @@ -60,6 +60,7 @@ pub trait RemoveLiquidityModule: self.update_safe_price( &storage_cache.first_token_reserve, &storage_cache.second_token_reserve, + &storage_cache.lp_token_supply, ); let initial_k = self.calculate_k_constant( @@ -144,6 +145,7 @@ pub trait RemoveLiquidityModule: self.update_safe_price( &storage_cache.first_token_reserve, &storage_cache.second_token_reserve, + &storage_cache.lp_token_supply, ); let mut remove_liq_context = diff --git a/dex/pair/src/pair_actions/swap.rs b/dex/pair/src/pair_actions/swap.rs index 7381602e2..482c0c73d 100644 --- a/dex/pair/src/pair_actions/swap.rs +++ b/dex/pair/src/pair_actions/swap.rs @@ -53,6 +53,7 @@ pub trait SwapModule: self.update_safe_price( &storage_cache.first_token_reserve, &storage_cache.second_token_reserve, + &storage_cache.lp_token_supply, ); let initial_k = self.calculate_k_constant( @@ -118,6 +119,7 @@ pub trait SwapModule: self.update_safe_price( &storage_cache.first_token_reserve, &storage_cache.second_token_reserve, + &storage_cache.lp_token_supply, ); let initial_k = self.calculate_k_constant( @@ -210,6 +212,7 @@ pub trait SwapModule: self.update_safe_price( &storage_cache.first_token_reserve, &storage_cache.second_token_reserve, + &storage_cache.lp_token_supply, ); let initial_k = self.calculate_k_constant( diff --git a/dex/pair/src/pair_hooks/call_hook.rs b/dex/pair/src/pair_hooks/call_hook.rs index fa9414ad3..5eb4a6d45 100644 --- a/dex/pair/src/pair_hooks/call_hook.rs +++ b/dex/pair/src/pair_hooks/call_hook.rs @@ -28,6 +28,7 @@ pub trait CallHookModule { let mut output_payments = input_payments; for hook in &hooks { + #[allow(deprecated)] let (_, back_transfers) = ContractCallNoPayment::<_, MultiValueEncoded>::new( hook.dest_address, diff --git a/dex/pair/src/read_pair_storage.rs b/dex/pair/src/read_pair_storage.rs new file mode 100644 index 000000000..2aeff0566 --- /dev/null +++ b/dex/pair/src/read_pair_storage.rs @@ -0,0 +1,76 @@ +use multiversx_sc::storage::StorageKey; + +use crate::safe_price::PriceObservation; + +multiversx_sc::imports!(); + +pub static LP_TOKEN_SUPPLY_STORAGE_KEY: &[u8] = b"lp_token_supply"; +pub static FIRST_TOKEN_ID_STORAGE_KEY: &[u8] = b"first_token_id"; +pub static SECOND_TOKEN_ID_STORAGE_KEY: &[u8] = b"second_token_id"; +pub static SAFE_PRICE_CURRENT_INDEX_STORAGE_KEY: &[u8] = b"safe_price_current_index"; +pub static PRICE_OBSERVATIONS_STORAGE_KEY: &[u8] = b"price_observations"; +pub static PAIR_RESERVE_BASE_STORAGE_KEY: &[u8] = b"reserve"; + +#[multiversx_sc::module] +pub trait ReadPairStorageModule { + fn get_lp_token_supply_mapper( + &self, + pair_address: ManagedAddress, + ) -> SingleValueMapper { + SingleValueMapper::<_, _, ManagedAddress>::new_from_address( + pair_address, + StorageKey::new(LP_TOKEN_SUPPLY_STORAGE_KEY), + ) + } + + fn get_first_token_id_mapper( + &self, + pair_address: ManagedAddress, + ) -> SingleValueMapper { + SingleValueMapper::<_, _, ManagedAddress>::new_from_address( + pair_address, + StorageKey::new(FIRST_TOKEN_ID_STORAGE_KEY), + ) + } + + fn get_second_token_id_mapper( + &self, + pair_address: ManagedAddress, + ) -> SingleValueMapper { + SingleValueMapper::<_, _, ManagedAddress>::new_from_address( + pair_address, + StorageKey::new(SECOND_TOKEN_ID_STORAGE_KEY), + ) + } + + fn get_safe_price_current_index_mapper( + &self, + pair_address: ManagedAddress, + ) -> SingleValueMapper { + SingleValueMapper::<_, _, ManagedAddress>::new_from_address( + pair_address, + StorageKey::new(SAFE_PRICE_CURRENT_INDEX_STORAGE_KEY), + ) + } + + fn get_price_observation_mapper( + &self, + pair_address: ManagedAddress, + ) -> VecMapper, ManagedAddress> { + VecMapper::<_, _, ManagedAddress>::new_from_address( + pair_address, + StorageKey::new(PRICE_OBSERVATIONS_STORAGE_KEY), + ) + } + + fn get_pair_reserve_mapper( + &self, + pair_address: ManagedAddress, + token_id: &TokenIdentifier, + ) -> SingleValueMapper { + let mut storage_key = StorageKey::new(PAIR_RESERVE_BASE_STORAGE_KEY); + storage_key.append_item(&token_id); + + SingleValueMapper::<_, _, ManagedAddress>::new_from_address(pair_address, storage_key) + } +} diff --git a/dex/pair/src/safe_price.rs b/dex/pair/src/safe_price.rs index 1173cc291..c3823ca44 100644 --- a/dex/pair/src/safe_price.rs +++ b/dex/pair/src/safe_price.rs @@ -1,18 +1,21 @@ multiversx_sc::imports!(); multiversx_sc::derive_imports!(); +use multiversx_sc::codec::{NestedDecodeInput, TopDecodeInput}; + use crate::{amm, config, errors::ERROR_SAFE_PRICE_CURRENT_INDEX}; pub type Round = u64; pub const MAX_OBSERVATIONS: usize = 65_536; // 2^{16} records, to optimise binary search -#[derive(ManagedVecItem, Clone, TopEncode, TopDecode, NestedEncode, NestedDecode, TypeAbi)] +#[derive(ManagedVecItem, Clone, TopEncode, NestedEncode, TypeAbi, Debug)] pub struct PriceObservation { pub first_token_reserve_accumulated: BigUint, pub second_token_reserve_accumulated: BigUint, pub weight_accumulated: u64, pub recording_round: Round, + pub lp_supply_accumulated: BigUint, } impl Default for PriceObservation { @@ -22,7 +25,45 @@ impl Default for PriceObservation { second_token_reserve_accumulated: BigUint::zero(), weight_accumulated: 0, recording_round: 0, + lp_supply_accumulated: BigUint::zero(), + } + } +} + +impl TopDecode for PriceObservation { + fn top_decode(input: I) -> Result + where + I: TopDecodeInput, + { + let mut buffer = input.into_nested_buffer(); + Self::dep_decode(&mut buffer) + } +} + +impl NestedDecode for PriceObservation { + fn dep_decode(input: &mut I) -> Result { + let first_token_reserve_accumulated = BigUint::dep_decode(input)?; + let second_token_reserve_accumulated = BigUint::dep_decode(input)?; + let weight_accumulated = u64::dep_decode(input)?; + let recording_round = u64::dep_decode(input)?; + + let lp_supply_accumulated = if !input.is_depleted() { + BigUint::dep_decode(input)? + } else { + BigUint::zero() + }; + + if !input.is_depleted() { + return Result::Err(DecodeError::INPUT_TOO_LONG); } + + Result::Ok(PriceObservation { + first_token_reserve_accumulated, + second_token_reserve_accumulated, + weight_accumulated, + recording_round, + lp_supply_accumulated, + }) } } @@ -34,8 +75,13 @@ pub trait SafePriceModule: + permissions_module::PermissionsModule + pausable::PausableModule { - fn update_safe_price(&self, first_token_reserve: &BigUint, second_token_reserve: &BigUint) { - if first_token_reserve == &0u64 || second_token_reserve == &0u64 { + fn update_safe_price( + &self, + first_token_reserve: &BigUint, + second_token_reserve: &BigUint, + lp_supply: &BigUint, + ) { + if first_token_reserve == &0u64 || second_token_reserve == &0u64 || lp_supply == &0u64 { return; } @@ -62,6 +108,7 @@ pub trait SafePriceModule: current_round, first_token_reserve, second_token_reserve, + lp_supply, &last_price_observation, ); @@ -79,6 +126,7 @@ pub trait SafePriceModule: new_round: Round, new_first_reserve: &BigUint, new_second_reserve: &BigUint, + new_lp_supply: &BigUint, current_price_observation: &PriceObservation, ) -> PriceObservation { let new_weight = if current_price_observation.recording_round == 0 { @@ -92,6 +140,7 @@ pub trait SafePriceModule: BigUint::from(new_weight) * new_first_reserve; new_price_observation.second_token_reserve_accumulated += BigUint::from(new_weight) * new_second_reserve; + new_price_observation.lp_supply_accumulated += BigUint::from(new_weight) * new_lp_supply; new_price_observation.weight_accumulated += new_weight; new_price_observation.recording_round = new_round; diff --git a/dex/pair/src/safe_price_view.rs b/dex/pair/src/safe_price_view.rs index 4a1042a56..e286bc370 100644 --- a/dex/pair/src/safe_price_view.rs +++ b/dex/pair/src/safe_price_view.rs @@ -6,12 +6,19 @@ use core::cmp::Ordering; use crate::{ amm, config, errors::{ERROR_SAFE_PRICE_OBSERVATION_DOES_NOT_EXIST, ERROR_SAFE_PRICE_SAME_ROUNDS}, + read_pair_storage, safe_price::{self, PriceObservation, Round, MAX_OBSERVATIONS}, }; pub const DEFAULT_SAFE_PRICE_ROUNDS_OFFSET: u64 = 10 * 60; pub const SECONDS_PER_ROUND: u64 = 6; +struct PriceObservationWeightedAmounts { + weighted_first_token_reserve: BigUint, + weighted_second_token_reserve: BigUint, + weighted_lp_supply: BigUint, +} + #[multiversx_sc::module] pub trait SafePriceViewModule: safe_price::SafePriceModule @@ -20,6 +27,7 @@ pub trait SafePriceViewModule: + amm::AmmModule + permissions_module::PermissionsModule + pausable::PausableModule + + read_pair_storage::ReadPairStorageModule { #[label("safe-price-view")] #[view(getLpTokensSafePriceByDefaultOffset)] @@ -83,36 +91,16 @@ pub trait SafePriceViewModule: ) -> MultiValue2 { require!(end_round > start_round, ERROR_PARAMETERS); - let lp_total_supply = self.lp_token_supply().get_from_address(&pair_address); - let first_token_id = self.first_token_id().get_from_address(&pair_address); - let second_token_id = self.second_token_id().get_from_address(&pair_address); - if lp_total_supply == 0 { - return ( - EsdtTokenPayment::new(first_token_id, 0, BigUint::zero()), - EsdtTokenPayment::new(second_token_id, 0, BigUint::zero()), - ) - .into(); - } + let first_token_id = self.get_first_token_id_mapper(pair_address.clone()).get(); + let second_token_id = self.get_second_token_id_mapper(pair_address.clone()).get(); let safe_price_current_index = self - .safe_price_current_index() - .get_from_address(&pair_address); - let price_observations = self.price_observations(); + .get_safe_price_current_index_mapper(pair_address.clone()) + .get(); + let price_observations = self.get_price_observation_mapper(pair_address.clone()); - let last_price_observation = self.get_price_observation( - &pair_address, - &first_token_id, - &second_token_id, - safe_price_current_index, - &price_observations, - end_round, - ); - - let oldest_price_observation = self.get_oldest_price_observation( - &pair_address, - safe_price_current_index, - &price_observations, - ); + let oldest_price_observation = + self.get_oldest_price_observation(safe_price_current_index, &price_observations); require!( start_round >= oldest_price_observation.recording_round, @@ -128,11 +116,35 @@ pub trait SafePriceViewModule: start_round, ); - let (weighted_first_token_reserve, weighted_second_token_reserve) = - self.compute_weighted_reserves(&first_price_observation, &last_price_observation); + let last_price_observation = self.get_price_observation( + &pair_address, + &first_token_id, + &second_token_id, + safe_price_current_index, + &price_observations, + end_round, + ); + + let mut weighted_amounts = + self.compute_weighted_amounts(&first_price_observation, &last_price_observation); + + if weighted_amounts.weighted_lp_supply == 0 { + let current_lp_supply = self.get_lp_token_supply_mapper(pair_address.clone()).get(); + if current_lp_supply == 0 { + return ( + EsdtTokenPayment::new(first_token_id, 0, BigUint::zero()), + EsdtTokenPayment::new(second_token_id, 0, BigUint::zero()), + ) + .into(); + } else { + weighted_amounts.weighted_lp_supply = current_lp_supply; + } + } - let first_token_worth = &liquidity * &weighted_first_token_reserve / &lp_total_supply; - let second_token_worth = &liquidity * &weighted_second_token_reserve / &lp_total_supply; + let first_token_worth = &liquidity * &weighted_amounts.weighted_first_token_reserve + / &weighted_amounts.weighted_lp_supply; + let second_token_worth = &liquidity * &weighted_amounts.weighted_second_token_reserve + / &weighted_amounts.weighted_lp_supply; let first_token_payment = EsdtTokenPayment::new(first_token_id, 0, first_token_worth); let second_token_payment = EsdtTokenPayment::new(second_token_id, 0, second_token_worth); @@ -199,22 +211,19 @@ pub trait SafePriceViewModule: require!(end_round > start_round, ERROR_PARAMETERS); let safe_price_current_index = self - .safe_price_current_index() - .get_from_address(&pair_address); - let price_observations = self.price_observations(); + .get_safe_price_current_index_mapper(pair_address.clone()) + .get(); + let price_observations = self.get_price_observation_mapper(pair_address.clone()); - let oldest_price_observation = self.get_oldest_price_observation( - &pair_address, - safe_price_current_index, - &price_observations, - ); + let oldest_price_observation = + self.get_oldest_price_observation(safe_price_current_index, &price_observations); require!( oldest_price_observation.recording_round <= start_round, ERROR_SAFE_PRICE_OBSERVATION_DOES_NOT_EXIST ); - let first_token_id = self.first_token_id().get_from_address(&pair_address); - let second_token_id = self.second_token_id().get_from_address(&pair_address); + let first_token_id = self.get_first_token_id_mapper(pair_address.clone()).get(); + let second_token_id = self.get_second_token_id_mapper(pair_address.clone()).get(); let first_price_observation = self.get_price_observation( &pair_address, &first_token_id, @@ -248,17 +257,14 @@ pub trait SafePriceViewModule: search_round: Round, ) -> PriceObservation { let safe_price_current_index = self - .safe_price_current_index() - .get_from_address(&pair_address); - let first_token_id = self.first_token_id().get_from_address(&pair_address); - let second_token_id = self.second_token_id().get_from_address(&pair_address); - let price_observations = self.price_observations(); - - let oldest_price_observation = self.get_oldest_price_observation( - &pair_address, - safe_price_current_index, - &price_observations, - ); + .get_safe_price_current_index_mapper(pair_address.clone()) + .get(); + let first_token_id = self.get_first_token_id_mapper(pair_address.clone()).get(); + let second_token_id = self.get_second_token_id_mapper(pair_address.clone()).get(); + let price_observations = self.get_price_observation_mapper(pair_address.clone()); + + let oldest_price_observation = + self.get_oldest_price_observation(safe_price_current_index, &price_observations); require!( oldest_price_observation.recording_round <= search_round, ERROR_SAFE_PRICE_OBSERVATION_DOES_NOT_EXIST @@ -281,19 +287,21 @@ pub trait SafePriceViewModule: first_price_observation: &PriceObservation, last_price_observation: &PriceObservation, ) -> EsdtTokenPayment { - let first_token_id = self.first_token_id().get_from_address(pair_address); - let second_token_id = self.second_token_id().get_from_address(pair_address); + let first_token_id = self.get_first_token_id_mapper(pair_address.clone()).get(); + let second_token_id = self.get_second_token_id_mapper(pair_address.clone()).get(); - let (weighted_first_token_reserve, weighted_second_token_reserve) = - self.compute_weighted_reserves(first_price_observation, last_price_observation); + let weighted_amounts = + self.compute_weighted_amounts(first_price_observation, last_price_observation); if input_payment.token_identifier == first_token_id { - let output_amount = - input_payment.amount * weighted_second_token_reserve / weighted_first_token_reserve; + let output_amount = input_payment.amount + * weighted_amounts.weighted_second_token_reserve + / weighted_amounts.weighted_first_token_reserve; EsdtTokenPayment::new(second_token_id, 0, output_amount) } else if input_payment.token_identifier == second_token_id { - let output_amount = - input_payment.amount * weighted_first_token_reserve / weighted_second_token_reserve; + let output_amount = input_payment.amount + * weighted_amounts.weighted_first_token_reserve + / weighted_amounts.weighted_second_token_reserve; EsdtTokenPayment::new(first_token_id, 0, output_amount) } else { sc_panic!(ERROR_BAD_INPUT_TOKEN); @@ -306,16 +314,16 @@ pub trait SafePriceViewModule: first_token_id: &TokenIdentifier, second_token_id: &TokenIdentifier, current_index: usize, - price_observations: &VecMapper>, + price_observations: &VecMapper, ManagedAddress>, search_round: Round, ) -> PriceObservation { require!( - !price_observations.is_empty_at_address(pair_address), + !price_observations.is_empty(), ERROR_SAFE_PRICE_OBSERVATION_DOES_NOT_EXIST ); // Check if the requested price observation is the last one - let last_observation = price_observations.get_at_address(pair_address, current_index); + let last_observation = price_observations.get(current_index); if last_observation.recording_round == search_round { return last_observation; } @@ -331,21 +339,22 @@ pub trait SafePriceViewModule: ); let first_token_reserve = self - .pair_reserve(first_token_id) - .get_from_address(pair_address); + .get_pair_reserve_mapper(pair_address.clone(), first_token_id) + .get(); let second_token_reserve = self - .pair_reserve(second_token_id) - .get_from_address(pair_address); + .get_pair_reserve_mapper(pair_address.clone(), second_token_id) + .get(); + let current_lp_supply = self.get_lp_token_supply_mapper(pair_address.clone()).get(); return self.compute_new_observation( search_round, &first_token_reserve, &second_token_reserve, + ¤t_lp_supply, &last_observation, ); } let (mut price_observation, last_search_index) = self.price_observation_by_binary_search( - pair_address, current_index, price_observations, search_round, @@ -356,7 +365,6 @@ pub trait SafePriceViewModule: } price_observation = self.price_observation_by_linear_interpolation( - pair_address, price_observations, search_round, last_search_index, @@ -367,45 +375,43 @@ pub trait SafePriceViewModule: fn get_oldest_price_observation( &self, - pair_address: &ManagedAddress, current_index: usize, - price_observations: &VecMapper>, + price_observations: &VecMapper, ManagedAddress>, ) -> PriceObservation { require!( - !price_observations.is_empty_at_address(pair_address), + !price_observations.is_empty(), ERROR_SAFE_PRICE_OBSERVATION_DOES_NOT_EXIST ); // VecMapper index starts at 1 let mut oldest_observation_index = 1; - if price_observations.len_at_address(pair_address) == MAX_OBSERVATIONS { + if price_observations.len() == MAX_OBSERVATIONS { oldest_observation_index = (current_index % MAX_OBSERVATIONS) + 1 } - price_observations.get_at_address(pair_address, oldest_observation_index) + price_observations.get(oldest_observation_index) } fn price_observation_by_binary_search( &self, - pair_address: &ManagedAddress, current_index: usize, - price_observations: &VecMapper>, + price_observations: &VecMapper, ManagedAddress>, search_round: Round, ) -> (PriceObservation, usize) { let mut search_index = 1; let mut left_index; let mut right_index; - let observation_at_index_1 = price_observations.get_at_address(pair_address, search_index); + let observation_at_index_1 = price_observations.get(search_index); if observation_at_index_1.recording_round <= search_round { left_index = search_index; right_index = current_index - 1; } else { left_index = current_index + 1; - right_index = price_observations.len_at_address(pair_address); + right_index = price_observations.len(); } while left_index <= right_index { search_index = (left_index + right_index) / 2; - let price_observation = price_observations.get_at_address(pair_address, search_index); + let price_observation = price_observations.get(search_index); match price_observation.recording_round.cmp(&search_round) { Ordering::Equal => return (price_observation, search_index), Ordering::Less => left_index = search_index + 1, @@ -418,27 +424,24 @@ pub trait SafePriceViewModule: fn price_observation_by_linear_interpolation( &self, - pair_address: &ManagedAddress, - price_observations: &VecMapper>, + price_observations: &VecMapper, ManagedAddress>, search_round: Round, search_index: usize, ) -> PriceObservation { - let last_found_observation = price_observations.get_at_address(pair_address, search_index); + let last_found_observation = price_observations.get(search_index); let left_observation; let right_observation; if last_found_observation.recording_round < search_round { left_observation = last_found_observation; let right_observation_index = (search_index % MAX_OBSERVATIONS) + 1; - right_observation = - price_observations.get_at_address(pair_address, right_observation_index); + right_observation = price_observations.get(right_observation_index); } else { let left_observation_index = if search_index == 1 { MAX_OBSERVATIONS } else { search_index - 1 }; - left_observation = - price_observations.get_at_address(pair_address, left_observation_index); + left_observation = price_observations.get(left_observation_index); right_observation = last_found_observation; }; @@ -455,9 +458,12 @@ pub trait SafePriceViewModule: let second_token_reserve_sum = BigUint::from(left_weight) * left_observation.second_token_reserve_accumulated + BigUint::from(right_weight) * right_observation.second_token_reserve_accumulated; + let lp_supply_sum = BigUint::from(left_weight) * left_observation.lp_supply_accumulated + + BigUint::from(right_weight) * right_observation.lp_supply_accumulated; let first_token_reserve_accumulated = first_token_reserve_sum / weight_sum; let second_token_reserve_accumulated = second_token_reserve_sum / weight_sum; + let lp_supply_accumulated = lp_supply_sum / weight_sum; let weight_accumulated = left_observation.weight_accumulated + search_round - left_observation.recording_round; @@ -466,14 +472,15 @@ pub trait SafePriceViewModule: second_token_reserve_accumulated, weight_accumulated, recording_round: search_round, + lp_supply_accumulated, } } - fn compute_weighted_reserves( + fn compute_weighted_amounts( &self, first_price_observation: &PriceObservation, last_price_observation: &PriceObservation, - ) -> (BigUint, BigUint) { + ) -> PriceObservationWeightedAmounts { let weight_diff = last_price_observation.weight_accumulated - first_price_observation.weight_accumulated; @@ -494,19 +501,29 @@ pub trait SafePriceViewModule: let weighted_first_token_reserve = first_token_reserve_diff / weight_diff; let weighted_second_token_reserve = second_token_reserve_diff / weight_diff; - (weighted_first_token_reserve, weighted_second_token_reserve) + + let weighted_lp_supply = if first_price_observation.lp_supply_accumulated > 0 { + let lp_supply_diff = &last_price_observation.lp_supply_accumulated + - &first_price_observation.lp_supply_accumulated; + lp_supply_diff / weight_diff + } else { + BigUint::zero() + }; + + PriceObservationWeightedAmounts { + weighted_first_token_reserve, + weighted_second_token_reserve, + weighted_lp_supply, + } } fn get_default_offset_rounds(&self, pair_address: &ManagedAddress, end_round: Round) -> u64 { let safe_price_current_index = self - .safe_price_current_index() - .get_from_address(pair_address); - let price_observations = self.price_observations(); - let oldest_price_observation = self.get_oldest_price_observation( - pair_address, - safe_price_current_index, - &price_observations, - ); + .get_safe_price_current_index_mapper(pair_address.clone()) + .get(); + let price_observations = self.get_price_observation_mapper(pair_address.clone()); + let oldest_price_observation = + self.get_oldest_price_observation(safe_price_current_index, &price_observations); let mut default_offset_rounds = end_round - oldest_price_observation.recording_round; if default_offset_rounds > DEFAULT_SAFE_PRICE_ROUNDS_OFFSET { @@ -522,16 +539,13 @@ pub trait SafePriceViewModule: fn update_and_get_tokens_for_given_position_with_safe_price( &self, liquidity: BigUint, - ) -> MultiValue2, EsdtTokenPayment> { + ) -> MultiValue2 { let pair_address = self.blockchain().get_sc_address(); self.get_lp_tokens_safe_price_by_default_offset(pair_address, liquidity) } #[endpoint(updateAndGetSafePrice)] - fn update_and_get_safe_price( - &self, - input: EsdtTokenPayment, - ) -> EsdtTokenPayment { + fn update_and_get_safe_price(&self, input: EsdtTokenPayment) -> EsdtTokenPayment { let pair_address = self.blockchain().get_sc_address(); self.get_safe_price_by_default_offset(pair_address, input) } diff --git a/dex/pair/wasm-pair-full/Cargo.lock b/dex/pair/wasm-pair-full/Cargo.lock index bd9f43d99..81275e229 100644 --- a/dex/pair/wasm-pair-full/Cargo.lock +++ b/dex/pair/wasm-pair-full/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -169,32 +169,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -204,9 +206,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -217,18 +219,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -244,9 +246,9 @@ dependencies = [ [[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", ] @@ -295,18 +297,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -346,9 +348,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -370,6 +372,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/dex/pair/wasm-pair-full/Cargo.toml b/dex/pair/wasm-pair-full/Cargo.toml index 5fc0f4b76..dc76ad64d 100644 --- a/dex/pair/wasm-pair-full/Cargo.toml +++ b/dex/pair/wasm-pair-full/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.pair] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/pair/wasm-pair-full/src/lib.rs b/dex/pair/wasm-pair-full/src/lib.rs index f9e43af4e..c34359ff0 100644 --- a/dex/pair/wasm-pair-full/src/lib.rs +++ b/dex/pair/wasm-pair-full/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 68 +// Upgrade: 1 +// Endpoints: 67 // Async Callback (empty): 1 // Total number of exported functions: 70 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/pair/wasm-safe-price-view/Cargo.lock b/dex/pair/wasm-safe-price-view/Cargo.lock index 9c0bdd3ca..1a96fa644 100644 --- a/dex/pair/wasm-safe-price-view/Cargo.lock +++ b/dex/pair/wasm-safe-price-view/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -169,32 +169,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -204,9 +206,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -217,18 +219,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -244,9 +246,9 @@ dependencies = [ [[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", ] @@ -287,18 +289,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -346,9 +348,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -370,6 +372,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/dex/pair/wasm-safe-price-view/Cargo.toml b/dex/pair/wasm-safe-price-view/Cargo.toml index 28c1d40a9..1d7822b69 100644 --- a/dex/pair/wasm-safe-price-view/Cargo.toml +++ b/dex/pair/wasm-safe-price-view/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.pair] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/pair/wasm-safe-price-view/src/lib.rs b/dex/pair/wasm-safe-price-view/src/lib.rs index cc5f99d90..de0966c65 100644 --- a/dex/pair/wasm-safe-price-view/src/lib.rs +++ b/dex/pair/wasm-safe-price-view/src/lib.rs @@ -10,8 +10,6 @@ // Total number of exported functions: 11 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/pair/wasm/Cargo.lock b/dex/pair/wasm/Cargo.lock index 34434c55b..2b05c93d5 100644 --- a/dex/pair/wasm/Cargo.lock +++ b/dex/pair/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -169,32 +169,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -204,9 +206,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -217,18 +219,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -244,9 +246,9 @@ dependencies = [ [[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", ] @@ -295,18 +297,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -346,9 +348,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -370,6 +372,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/dex/pair/wasm/Cargo.toml b/dex/pair/wasm/Cargo.toml index 7e096d156..4d8c6bfa9 100644 --- a/dex/pair/wasm/Cargo.toml +++ b/dex/pair/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.pair] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/pair/wasm/src/lib.rs b/dex/pair/wasm/src/lib.rs index ce29b60ec..dcefb5501 100644 --- a/dex/pair/wasm/src/lib.rs +++ b/dex/pair/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 59 +// Upgrade: 1 +// Endpoints: 58 // Async Callback (empty): 1 // Total number of exported functions: 61 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/price-discovery/Cargo.toml b/dex/price-discovery/Cargo.toml index 51aa316e3..dbce3a106 100644 --- a/dex/price-discovery/Cargo.toml +++ b/dex/price-discovery/Cargo.toml @@ -12,11 +12,11 @@ path = "src/lib.rs" hex-literal = "0.3.1" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dependencies.locking_module] path = "../../common/modules/locking_module" @@ -30,4 +30,4 @@ hex = "0.4" path = "../../locked-asset/simple-lock" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/dex/price-discovery/meta/Cargo.toml b/dex/price-discovery/meta/Cargo.toml index 176823d06..cf2ee11ea 100644 --- a/dex/price-discovery/meta/Cargo.toml +++ b/dex/price-discovery/meta/Cargo.toml @@ -8,6 +8,6 @@ authors = ["Dorin Iancu "] [dependencies.price-discovery] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/dex/price-discovery/meta/src/main.rs b/dex/price-discovery/meta/src/main.rs index cd6c3e67a..99c719344 100644 --- a/dex/price-discovery/meta/src/main.rs +++ b/dex/price-discovery/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/dex/price-discovery/src/lib.rs b/dex/price-discovery/src/lib.rs index 32a07acf0..b0c430e52 100644 --- a/dex/price-discovery/src/lib.rs +++ b/dex/price-discovery/src/lib.rs @@ -113,7 +113,7 @@ pub trait PriceDiscovery: self.set_locking_sc_address(locking_sc_address); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} /// Users can deposit either launched_token or accepted_token. diff --git a/dex/price-discovery/wasm/Cargo.lock b/dex/price-discovery/wasm/Cargo.lock index fbcb7ca84..b245d3d71 100644 --- a/dex/price-discovery/wasm/Cargo.lock +++ b/dex/price-discovery/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common_errors" @@ -119,32 +119,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal 0.4.1", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -154,9 +156,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -167,18 +169,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -194,9 +196,9 @@ dependencies = [ [[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", ] @@ -221,18 +223,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -272,9 +274,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -287,6 +289,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/dex/price-discovery/wasm/Cargo.toml b/dex/price-discovery/wasm/Cargo.toml index 04885bcda..cc6bf1c73 100644 --- a/dex/price-discovery/wasm/Cargo.toml +++ b/dex/price-discovery/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.price-discovery] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/price-discovery/wasm/src/lib.rs b/dex/price-discovery/wasm/src/lib.rs index c29196d8a..5e55db7a5 100644 --- a/dex/price-discovery/wasm/src/lib.rs +++ b/dex/price-discovery/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 28 +// Upgrade: 1 +// Endpoints: 27 // Async Callback: 1 // Total number of exported functions: 30 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/proxy-deployer/Cargo.toml b/dex/proxy-deployer/Cargo.toml index f5c3b8955..d703dda15 100644 --- a/dex/proxy-deployer/Cargo.toml +++ b/dex/proxy-deployer/Cargo.toml @@ -21,11 +21,11 @@ path = "../../common/modules/farm/config" path = "../../common/modules/farm/farm_token" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/dex/proxy-deployer/meta/Cargo.toml b/dex/proxy-deployer/meta/Cargo.toml index 629fddbdf..22fe6e5de 100644 --- a/dex/proxy-deployer/meta/Cargo.toml +++ b/dex/proxy-deployer/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.proxy-deployer] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/dex/proxy-deployer/meta/src/main.rs b/dex/proxy-deployer/meta/src/main.rs index 6df25a6b5..287e43ccd 100644 --- a/dex/proxy-deployer/meta/src/main.rs +++ b/dex/proxy-deployer/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/dex/proxy-deployer/src/lib.rs b/dex/proxy-deployer/src/lib.rs index a05bab7b0..7f7f0c16a 100644 --- a/dex/proxy-deployer/src/lib.rs +++ b/dex/proxy-deployer/src/lib.rs @@ -16,6 +16,6 @@ pub trait ProxyDeployer: farm_deploy::FarmDeployModule { self.farm_template_address().set(&farm_template_address); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} } diff --git a/dex/proxy-deployer/wasm/Cargo.lock b/dex/proxy-deployer/wasm/Cargo.lock index cc2e1ce6f..cf0703071 100644 --- a/dex/proxy-deployer/wasm/Cargo.lock +++ b/dex/proxy-deployer/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -285,32 +285,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -320,9 +322,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -333,18 +335,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -360,9 +362,9 @@ dependencies = [ [[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", ] @@ -403,9 +405,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -431,9 +433,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -488,9 +490,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -520,6 +522,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/dex/proxy-deployer/wasm/Cargo.toml b/dex/proxy-deployer/wasm/Cargo.toml index 97ada3a24..e5da175f9 100644 --- a/dex/proxy-deployer/wasm/Cargo.toml +++ b/dex/proxy-deployer/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.proxy-deployer] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/proxy-deployer/wasm/src/lib.rs b/dex/proxy-deployer/wasm/src/lib.rs index b8f3493f8..620fcb058 100644 --- a/dex/proxy-deployer/wasm/src/lib.rs +++ b/dex/proxy-deployer/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 5 +// Upgrade: 1 +// Endpoints: 4 // Async Callback (empty): 1 // Total number of exported functions: 7 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/router/Cargo.toml b/dex/router/Cargo.toml index cc3698241..4ecf1aa3c 100644 --- a/dex/router/Cargo.toml +++ b/dex/router/Cargo.toml @@ -15,7 +15,7 @@ path = "../../common/modules/token_send" path = "../../common/modules/pausable" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.pair] @@ -28,4 +28,4 @@ path = "../../common/modules/locking_module" path = "../../locked-asset/simple-lock" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/dex/router/meta/Cargo.toml b/dex/router/meta/Cargo.toml index c5deaf0be..7dcef100f 100644 --- a/dex/router/meta/Cargo.toml +++ b/dex/router/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.router] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/dex/router/meta/src/main.rs b/dex/router/meta/src/main.rs index 675a0e481..c79cfbcc5 100644 --- a/dex/router/meta/src/main.rs +++ b/dex/router/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/dex/router/src/contract.rs b/dex/router/src/contract.rs index 04b787a03..11a3e2211 100644 --- a/dex/router/src/contract.rs +++ b/dex/router/src/contract.rs @@ -38,10 +38,10 @@ pub trait Router: self.pair_creation_enabled().set_if_empty(false); self.init_factory(pair_template_address_opt.into_option()); - self.owner().set(&self.blockchain().get_caller()); + self.owner().set(self.blockchain().get_caller()); } - #[endpoint] + #[upgrade] fn upgrade(&self) { self.state().set(false); } @@ -159,9 +159,6 @@ pub trait Router: &self, first_token_id: TokenIdentifier, second_token_id: TokenIdentifier, - initial_liquidity_adder: ManagedAddress, - total_fee_percent_requested: u64, - special_fee_percent_requested: u64, ) { require!(self.is_active(), "Not active"); @@ -177,21 +174,7 @@ pub trait Router: let pair_address = self.get_pair(first_token_id.clone(), second_token_id.clone()); require!(!pair_address.is_zero(), "Pair does not exists"); - require!( - total_fee_percent_requested >= special_fee_percent_requested - && total_fee_percent_requested < MAX_TOTAL_FEE_PERCENT, - "Bad percents" - ); - - self.upgrade_pair( - pair_address, - &first_token_id, - &second_token_id, - &self.owner().get(), - &initial_liquidity_adder, - total_fee_percent_requested, - special_fee_percent_requested, - ); + self.upgrade_pair(pair_address); } #[payable("EGLD")] @@ -250,12 +233,11 @@ pub trait Router: can_add_special_roles: true, }, ) - .async_call() .with_callback( self.callbacks() .lp_token_issue_callback(&caller, &pair_address), ) - .call_and_exit() + .async_call_and_exit(); } #[endpoint(setLocalRoles)] @@ -274,8 +256,7 @@ pub trait Router: self.send() .esdt_system_sc_proxy() .set_special_roles(&pair_address, &pair_token, roles.iter().cloned()) - .async_call() - .call_and_exit() + .async_call_and_exit(); } #[only_owner] diff --git a/dex/router/src/factory.rs b/dex/router/src/factory.rs index 4994db235..765e23324 100644 --- a/dex/router/src/factory.rs +++ b/dex/router/src/factory.rs @@ -88,32 +88,16 @@ pub trait FactoryModule: config::ConfigModule { new_address } - fn upgrade_pair( - &self, - pair_address: ManagedAddress, - first_token_id: &TokenIdentifier, - second_token_id: &TokenIdentifier, - owner: &ManagedAddress, - _initial_liquidity_adder: &ManagedAddress, - total_fee_percent: u64, - special_fee_percent: u64, - ) { - self.pair_contract_deploy_proxy() - .contract(pair_address) - .init( - first_token_id, - second_token_id, - self.blockchain().get_sc_address(), - owner, - total_fee_percent, - special_fee_percent, - ManagedAddress::zero(), - MultiValueEncoded::new(), - ) - .upgrade_from_source( - &self.pair_template_address().get(), - CodeMetadata::UPGRADEABLE | CodeMetadata::READABLE | CodeMetadata::PAYABLE_BY_SC, - ); + fn upgrade_pair(&self, pair_address: ManagedAddress) { + let pair_template_address = self.pair_template_address().get(); + let code_metadata = + CodeMetadata::UPGRADEABLE | CodeMetadata::READABLE | CodeMetadata::PAYABLE_BY_SC; + self.tx() + .to(pair_address) + .raw_upgrade() + .from_source(pair_template_address) + .code_metadata(code_metadata) + .upgrade_async_call_and_exit(); } #[view(getAllPairsManagedAddresses)] diff --git a/dex/router/tests/router_test.rs b/dex/router/tests/router_test.rs index 54c73c838..e11efa15e 100644 --- a/dex/router/tests/router_test.rs +++ b/dex/router/tests/router_test.rs @@ -113,13 +113,7 @@ fn test_router_upgrade_pair() { .execute_tx(&owner, &router_wrapper, &rust_zero, |sc| { let first_token_id = managed_token_id!(CUSTOM_TOKEN_ID); let second_token_id = managed_token_id!(USDC_TOKEN_ID); - sc.upgrade_pair_endpoint( - first_token_id, - second_token_id, - managed_address!(&user), - 300, - 50, - ); + sc.upgrade_pair_endpoint(first_token_id, second_token_id); }) .assert_ok(); diff --git a/dex/router/wasm/Cargo.lock b/dex/router/wasm/Cargo.lock index 57bbe464d..18d9d84fa 100644 --- a/dex/router/wasm/Cargo.lock +++ b/dex/router/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -169,32 +169,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -204,9 +206,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -217,18 +219,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -244,9 +246,9 @@ dependencies = [ [[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", ] @@ -287,18 +289,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -358,9 +360,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -382,6 +384,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/dex/router/wasm/Cargo.toml b/dex/router/wasm/Cargo.toml index dc895383b..608f891d0 100644 --- a/dex/router/wasm/Cargo.toml +++ b/dex/router/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.router] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/router/wasm/src/lib.rs b/dex/router/wasm/src/lib.rs index df0c8feb5..d2a19fcaa 100644 --- a/dex/router/wasm/src/lib.rs +++ b/dex/router/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 32 +// Upgrade: 1 +// Endpoints: 31 // Async Callback: 1 // Total number of exported functions: 34 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/sample-hooks/pair-hooks-sample/Cargo.toml b/dex/sample-hooks/pair-hooks-sample/Cargo.toml index 211b40099..5faf85564 100644 --- a/dex/sample-hooks/pair-hooks-sample/Cargo.toml +++ b/dex/sample-hooks/pair-hooks-sample/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" [dependencies.pair] path = "../../pair" @@ -18,4 +18,4 @@ path = "../../pair" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/dex/sample-hooks/pair-hooks-sample/meta/Cargo.toml b/dex/sample-hooks/pair-hooks-sample/meta/Cargo.toml index 06eda390c..8724d3aed 100644 --- a/dex/sample-hooks/pair-hooks-sample/meta/Cargo.toml +++ b/dex/sample-hooks/pair-hooks-sample/meta/Cargo.toml @@ -7,6 +7,6 @@ publish = false [dependencies.pair-hooks-sample] path = ".." -[dependencies.multiversx-sc-meta] -version = "=0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "=0.53.2" default-features = false diff --git a/dex/sample-hooks/pair-hooks-sample/meta/src/main.rs b/dex/sample-hooks/pair-hooks-sample/meta/src/main.rs index 956f28e39..59c971f79 100644 --- a/dex/sample-hooks/pair-hooks-sample/meta/src/main.rs +++ b/dex/sample-hooks/pair-hooks-sample/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/dex/sample-hooks/pair-hooks-sample/wasm/Cargo.lock b/dex/sample-hooks/pair-hooks-sample/wasm/Cargo.lock index bc2ae280b..7e01222b4 100644 --- a/dex/sample-hooks/pair-hooks-sample/wasm/Cargo.lock +++ b/dex/sample-hooks/pair-hooks-sample/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -169,32 +169,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -204,9 +206,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -217,18 +219,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -244,9 +246,9 @@ dependencies = [ [[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", ] @@ -303,18 +305,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -354,9 +356,9 @@ checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -378,6 +380,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/dex/sample-hooks/pair-hooks-sample/wasm/Cargo.toml b/dex/sample-hooks/pair-hooks-sample/wasm/Cargo.toml index 9ce799efc..332d190f9 100644 --- a/dex/sample-hooks/pair-hooks-sample/wasm/Cargo.toml +++ b/dex/sample-hooks/pair-hooks-sample/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.pair-hooks-sample] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/dex/sample-hooks/pair-hooks-sample/wasm/src/lib.rs b/dex/sample-hooks/pair-hooks-sample/wasm/src/lib.rs index a059bba6b..ed1532f78 100644 --- a/dex/sample-hooks/pair-hooks-sample/wasm/src/lib.rs +++ b/dex/sample-hooks/pair-hooks-sample/wasm/src/lib.rs @@ -10,8 +10,6 @@ // Total number of exported functions: 4 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/dex/scenarios/add_liquidity.scen.json b/dex/scenarios/add_liquidity.scen.json deleted file mode 100644 index 6d2eeb8e8..000000000 --- a/dex/scenarios/add_liquidity.scen.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "add liquidity", - "steps": [ - { - "step": "externalSteps", - "path": "complete_setup.scen.json" - }, - { - "step": "scCall", - "txId": "add-liquidity", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:WEGLD-abcdef", - "value": "2,000,000,000" - }, - { - "tokenIdentifier": "str:ALC-abcdef", - "value": "2,000,000,000" - } - ], - "function": "addLiquidity", - "arguments": [ - "1,000,000,000", - "1,000,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "*", - "*", - "*" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/calculate_rewards_for_given_position.scen.json b/dex/scenarios/calculate_rewards_for_given_position.scen.json deleted file mode 100644 index b3101fa52..000000000 --- a/dex/scenarios/calculate_rewards_for_given_position.scen.json +++ /dev/null @@ -1,115 +0,0 @@ -{ - "name": "unbond", - "steps": [ - { - "step": "externalSteps", - "path": "enter_farm.scen.json" - }, - { - "step": "scQuery", - "txId": "calculateRewards-1", - "tx": { - "to": "sc:farm_contract", - "function": "calculateRewardsForGivenPosition", - "arguments": [ - "address:user1", - "100,000,000", - { - "1-reward_per_share": "biguint:0", - "2-entering_epoch": "u64:0", - "3:compounded_reward": "biguint:0", - "4-current_farm_amount": "biguint:100,000,000", - "5-original_owner": "address:user1" - } - ] - }, - "expect": { - "out": [ - "0" - ], - "status": "0", - "message": "", - "refund": "*" - } - }, - { - "step": "setState", - "comment": "set block nonce. Set per_block_reward and produce_rewards_enabled", - "currentBlockInfo": { - "blockNonce": "2" - }, - "accounts": { - "sc:farm_contract": { - "nonce": "0", - "balance": "0", - "esdt": { - "str:FARM-abcdef": { - "lastNonce": "2", - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - }, - "str:LPTOK-abcdef": { - "instances": [ - { - "nonce": "0", - "balance": "200000000" - } - ], - "lastNonce": "0" - }, - "str:WEGLD-abcdef": { - "roles": [ - "ESDTRoleLocalMint" - ] - } - }, - "storage": { - "str:division_safety_constant": "1,000,000,000,000", - "str:farm_token_id": "str:FARM-abcdef", - "str:farm_token_supply": "200,000,000", - "str:farming_token_id": "str:LPTOK-abcdef", - "str:minimum_farming_epochs": "2", - "str:pair_contract_address": "sc:pair_contract", - "str:penalty_percent": "100", - "str:reward_token_id": "str:WEGLD-abcdef", - "str:router_address": "sc:router_contract", - "str:state": "1", - "str:per_block_reward_amount": "500", - "str:produce_rewards_enabled": "1" - }, - "code": "file:../farm/output/farm.wasm", - "owner": "address:owner" - } - } - }, - { - "step": "scQuery", - "txId": "calculateRewards-2", - "tx": { - "to": "sc:farm_contract", - "function": "calculateRewardsForGivenPosition", - "arguments": [ - "address:user1", - "100,000,000", - { - "1-reward_per_share": "biguint:0", - "2-entering_epoch": "u64:0", - "3:compounded_reward": "biguint:0", - "4-current_farm_amount": "biguint:100,000,000", - "5-original_owner": "address:user1" - } - ] - }, - "expect": { - "out": [ - "500" - ], - "status": "0", - "message": "" - } - } - ] -} diff --git a/dex/scenarios/calculate_rewards_for_given_position_after_compound.scen.json b/dex/scenarios/calculate_rewards_for_given_position_after_compound.scen.json deleted file mode 100644 index 0d74deb7f..000000000 --- a/dex/scenarios/calculate_rewards_for_given_position_after_compound.scen.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "unbond", - "steps": [ - { - "step": "externalSteps", - "path": "compound_rewards.scen.json" - }, - { - "step": "scQuery", - "txId": "calculateRewards", - "tx": { - "to": "sc:mex_farm_contract", - "function": "calculateRewardsForGivenPosition", - "arguments": [ - "address:user1", - "100,050,000", - { - "1-reward_per_share": "biguint:500,000,000", - "2-entering_epoch": "u64:10", - "3-compounded_reward": "biguint:50,000", - "4-current_farm_amount": "biguint:100,050,000", - "5-original_owner": "address:user1" - } - ] - }, - "expect": { - "out": [ - "0" - ], - "status": "0", - "message": "" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "11", - "blockEpoch": "10" - } - }, - { - "step": "scQuery", - "txId": "calculateRewards2", - "tx": { - "to": "sc:mex_farm_contract", - "function": "calculateRewardsForGivenPosition", - "arguments": [ - "address:user1", - "100,050,000", - { - "1-reward_per_share": "biguint:500,000,000", - "2-entering_epoch": "u64:10", - "3-compounded_reward": "biguint:50,000", - "4-current_farm_amount": "biguint:100,050,000", - "5-original_owner": "address:user1" - } - ] - }, - "expect": { - "out": [ - "4999" - ], - "status": "0", - "message": "" - } - } - ] -} diff --git a/dex/scenarios/check_fee_disabled_after_swap.scen.json b/dex/scenarios/check_fee_disabled_after_swap.scen.json deleted file mode 100644 index 85c9d6a11..000000000 --- a/dex/scenarios/check_fee_disabled_after_swap.scen.json +++ /dev/null @@ -1,88 +0,0 @@ -{ - "name": "check fee after swap", - "steps": [ - { - "step": "externalSteps", - "path": "complete_setup.scen.json" - }, - { - "step": "externalSteps", - "path": "steps/set_fee_off.steps.json" - }, - { - "step": "scCall", - "txId": "add-liquidity", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:WEGLD-abcdef", - "value": "2,000,000,000" - }, - { - "tokenIdentifier": "str:ALC-abcdef", - "value": "2,000,000,000" - } - ], - "function": "addLiquidity", - "arguments": [ - "1,000,000,000", - "1,000,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "*", - "*", - "*" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "sc:farm_contract": { - "nonce": "*", - "balance": "0", - "esdt": { - "str:WEGLD-abcdef": "0", - "str:FARM-abcdef": { - "instances": [ - { - "nonce": "", - "balance": "0" - } - ], - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - } - }, - "storage": { - "str:farming_token_id": "str:LPTOK-abcdef", - "str:reward_token_id": "str:WEGLD-abcdef", - "str:farm_token_id": "str:FARM-abcdef", - "str:router_address": "sc:router_contract", - "str:state": "1", - "str:minimum_farming_epochs": "2", - "str:division_safety_constant": "1000000000000", - "str:penalty_percent": "100", - "str:pair_contract_address": "sc:pair_contract", - "+": "" - }, - "code": "file:../farm/output/farm.wasm" - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/check_fee_enabled_after_swap.scen.json b/dex/scenarios/check_fee_enabled_after_swap.scen.json deleted file mode 100644 index fa53a902b..000000000 --- a/dex/scenarios/check_fee_enabled_after_swap.scen.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "check fee after swap", - "steps": [ - { - "step": "externalSteps", - "path": "swap_fixed_input.scen.json" - }, - { - "step": "scCall", - "txId": "swap-fixed-input", - "tx": { - "from": "address:user2", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:WEGLD-abcdef", - "value": "100,000" - } - ], - "function": "swapTokensFixedInput", - "arguments": [ - "str:ALC-abcdef", - "50,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x0000000a414c432d616263646566000000000000000000000003018578" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "sc:farm_contract": { - "nonce": "*", - "balance": "0", - "esdt": { - "str:WEGLD-abcdef": "0", - "str:FARM-abcdef": { - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - } - }, - "storage": { - "str:farming_token_id": "str:LPTOK-abcdef", - "str:reward_token_id": "str:WEGLD-abcdef", - "str:farm_token_id": "str:FARM-abcdef", - "str:router_address": "sc:router_contract", - "str:state": "1", - "str:minimum_farming_epochs": "2", - "str:division_safety_constant": "1000000000000", - "str:penalty_percent": "100", - "str:pair_contract_address": "sc:pair_contract", - "+": "" - }, - "code": "file:../farm/output/farm.wasm" - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/claim_rewards.scen.json b/dex/scenarios/claim_rewards.scen.json deleted file mode 100644 index 222d679f1..000000000 --- a/dex/scenarios/claim_rewards.scen.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "name": "exit farm", - "steps": [ - { - "step": "externalSteps", - "path": "enter_farm.scen.json" - }, - { - "step": "scCall", - "txId": "unstake", - "tx": { - "from": "address:user1", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "2", - "value": "100,000" - } - ], - "function": "claimRewards", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x0000000b4641524d2d6162636465660000000000000003000000030186a0", - "0x0000000c5745474c442d616263646566000000000000000000000000" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:user1": { - "nonce": "*", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "3000000000", - "str:ALC-abcdef": "3000000000", - "str:BLC-abcdef": "5000000000", - "str:LPTOK-abcdef": "1799999000", - "str:FARM-abcdef": { - "instances": [ - { - "nonce": "0x01", - "balance": "100,000,000" - }, - { - "nonce": "0x02", - "balance": "99,900,000" - }, - { - "nonce": "0x03", - "balance": "100,000" - } - ] - } - } - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/complete_setup.scen.json b/dex/scenarios/complete_setup.scen.json deleted file mode 100644 index a5f225d22..000000000 --- a/dex/scenarios/complete_setup.scen.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "name": "accept esdt payment", - "steps": [ - { - "step": "externalSteps", - "path": "steps/init_accounts.steps.json" - }, - { - "step": "externalSteps", - "path": "steps/deploy_contracts.steps.json" - }, - { - "step": "externalSteps", - "path": "steps/create_pair.steps.json" - }, - { - "step": "externalSteps", - "path": "steps/hackish.steps.json" - }, - { - "step": "externalSteps", - "path": "steps/set_fee_on.steps.json" - }, - { - "step": "externalSteps", - "path": "steps/pair_whitelist.steps.json" - } - ] -} \ No newline at end of file diff --git a/dex/scenarios/compound_rewards.scen.json b/dex/scenarios/compound_rewards.scen.json deleted file mode 100644 index 1ef82ebcc..000000000 --- a/dex/scenarios/compound_rewards.scen.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "exit farm", - "steps": [ - { - "step": "externalSteps", - "path": "enter_mex_farm.scen.json" - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "10", - "blockEpoch": "10" - } - }, - { - "step": "scCall", - "txId": "unstake", - "tx": { - "from": "address:user_with_mex", - "to": "sc:mex_farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "1", - "value": "100,000,000" - } - ], - "function": "compoundRewards", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x0000000b4641524d2d61626364656600000000000000020000000405f6a450" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:user_with_mex": { - "nonce": "*", - "balance": "100,000,000", - "esdt": { - "str:FARM-abcdef": { - "instances": [ - { - "nonce": "2", - "balance": "100,050,000" - } - ] - }, - "str:MEX-abcdef": "4,900,000,000" - }, - "storage": {}, - "code": "" - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/create_pair_twice.scen.json b/dex/scenarios/create_pair_twice.scen.json deleted file mode 100644 index 29a5d14d6..000000000 --- a/dex/scenarios/create_pair_twice.scen.json +++ /dev/null @@ -1,77 +0,0 @@ -{ - "name": "create pair twice", - "steps": [ - { - "step": "externalSteps", - "path": "complete_setup.scen.json" - }, - { - "step": "scCall", - "txId": "create-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "createPair", - "arguments": [ - "str:ALC-abcdef", - "str:WEGLD-abcdef", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "str:Pair already exists", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "create-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "createPair", - "arguments": [ - "str:WEGLD-abcdef", - "str:ALC-abcdef", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "str:Pair already exists", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "create-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "createPair", - "arguments": [ - "str:BLC-abcdef", - "str:BLC-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/enter_farm.scen.json b/dex/scenarios/enter_farm.scen.json deleted file mode 100644 index dcd92c2d4..000000000 --- a/dex/scenarios/enter_farm.scen.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "enter farm", - "steps": [ - { - "step": "externalSteps", - "path": "add_liquidity.scen.json" - }, - { - "step": "scCall", - "txId": "enter farm", - "tx": { - "from": "address:user1", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "100,000,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:1", - "3-amount": "biguint:100,000,000" - }, - { - "1-token_id": "nested:str:WEGLD-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "stake", - "tx": { - "from": "address:user1", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "100,000,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:2", - "3-amount": "biguint:100,000,000" - }, - { - "1-token_id": "nested:str:WEGLD-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/enter_farm_with_merge_tokens.scen.json b/dex/scenarios/enter_farm_with_merge_tokens.scen.json deleted file mode 100644 index 442b556a4..000000000 --- a/dex/scenarios/enter_farm_with_merge_tokens.scen.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "name": "enter farm", - "steps": [ - { - "step": "externalSteps", - "path": "enter_farm.scen.json" - }, - { - "step": "scCall", - "txId": "stake", - "tx": { - "from": "address:user1", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "100,000,000" - }, - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "1", - "value": "100,000,000" - }, - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "2", - "value": "100,000,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:3", - "3-amount": "biguint:300,000,000" - }, - { - "1-token_id": "nested:str:WEGLD-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:user1": { - "nonce": "*", - "balance": "1000000000000000000000000000000", - "esdt": { - "str:FARM-abcdef": { - "instances": [ - { - "nonce": "3", - "balance": "300,000,000" - } - ] - }, - "str:WEGLD-abcdef": "3,000,000,000", - "str:BLC-abcdef": "5,000,000,000", - "str:ALC-abcdef": "3,000,000,000", - "str:LPTOK-abcdef": "1,699,999,000" - } - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/enter_mex_farm.scen.json b/dex/scenarios/enter_mex_farm.scen.json deleted file mode 100644 index e3d734c67..000000000 --- a/dex/scenarios/enter_mex_farm.scen.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "enter farm", - "steps": [ - { - "step": "externalSteps", - "path": "complete_setup.scen.json" - }, - { - "step": "externalSteps", - "path": "steps/setup_mex_farm_contract.steps.json" - }, - { - "step": "scCall", - "txId": "enter farm", - "tx": { - "from": "address:user_with_mex", - "to": "sc:mex_farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:MEX-abcdef", - "value": "100,000,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:1", - "3-amount": "biguint:100,000,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:user_with_mex": { - "nonce": "*", - "balance": "100,000,000", - "esdt": { - "str:FARM-abcdef": { - "instances": [ - { - "nonce": "1", - "balance": "100,000,000" - } - ] - }, - "str:MEX-abcdef": "4,900,000,000" - }, - "storage": {}, - "code": "" - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/exit_farm.scen.json b/dex/scenarios/exit_farm.scen.json deleted file mode 100644 index 495520be4..000000000 --- a/dex/scenarios/exit_farm.scen.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "exit farm", - "steps": [ - { - "step": "externalSteps", - "path": "enter_farm.scen.json" - }, - { - "step": "setState", - "currentBlockInfo": { - "blockEpoch": "4" - } - }, - { - "step": "scCall", - "txId": "unstake", - "tx": { - "from": "address:user1", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "2", - "value": "100,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:100,000" - }, - { - "1-token_id": "nested:str:WEGLD-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/exit_farm_too_soon.scen.json b/dex/scenarios/exit_farm_too_soon.scen.json deleted file mode 100644 index 72b596bda..000000000 --- a/dex/scenarios/exit_farm_too_soon.scen.json +++ /dev/null @@ -1,173 +0,0 @@ -{ - "name": "exit farm", - "steps": [ - { - "step": "externalSteps", - "path": "enter_farm.scen.json" - }, - { - "step": "checkState", - "accounts": { - "address:user1": { - "nonce": "*", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "3,000,000,000", - "str:ALC-abcdef": "3,000,000,000", - "str:BLC-abcdef": "5,000,000,000", - "str:FARM-abcdef": { - "instances": [ - { - "nonce": "0x01", - "balance": "100,000,000" - }, - { - "nonce": "0x02", - "balance": "100,000,000" - } - ] - }, - "str:LPTOK-abcdef": "1,799,999,000" - } - }, - "+": "" - } - }, - { - "step": "scCall", - "txId": "unstake", - "tx": { - "from": "address:user1", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "2", - "value": "100,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "1,000,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:99,000" - }, - { - "1-token_id": "nested:str:WEGLD-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:user1": { - "nonce": "*", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "3,000,000,000", - "str:ALC-abcdef": "3,000,000,000", - "str:BLC-abcdef": "5,000,000,000", - "str:FARM-abcdef": { - "instances": [ - { - "nonce": "0x01", - "balance": "100,000,000" - }, - { - "nonce": "0x02", - "balance": "99,900,000" - } - ] - }, - "str:LPTOK-abcdef": "1,800,098,000" - } - }, - "+": "" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockEpoch": "5" - } - }, - { - "step": "scCall", - "txId": "unstake2", - "tx": { - "from": "address:user1", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "2", - "value": "100,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "1,000,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:100,000" - }, - { - "1-token_id": "nested:str:WEGLD-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:user1": { - "nonce": "*", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "3,000,000,000", - "str:ALC-abcdef": "3,000,000,000", - "str:BLC-abcdef": "5,000,000,000", - "str:FARM-abcdef": { - "instances": [ - { - "nonce": "0x01", - "balance": "100,000,000" - }, - { - "nonce": "0x02", - "balance": "99,800,000" - } - ] - }, - "str:LPTOK-abcdef": "1,800,198,000" - } - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/exit_mex_farm.scen.json b/dex/scenarios/exit_mex_farm.scen.json deleted file mode 100644 index 3cc9dca89..000000000 --- a/dex/scenarios/exit_mex_farm.scen.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "name": "exit farm", - "steps": [ - { - "step": "externalSteps", - "path": "enter_mex_farm.scen.json" - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "10", - "blockEpoch": "10" - } - }, - { - "step": "scCall", - "txId": "unstake", - "tx": { - "from": "address:user_with_mex", - "to": "sc:mex_farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "1", - "value": "100,000,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:100,000,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:50,000" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:user_with_mex": { - "nonce": "*", - "balance": "100,000,000", - "esdt": { - "str:MEX-abcdef": "5000050000" - }, - "storage": {}, - "code": "" - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/farm_reward_distr_scen_1.scen.json b/dex/scenarios/farm_reward_distr_scen_1.scen.json deleted file mode 100644 index e45afaa8e..000000000 --- a/dex/scenarios/farm_reward_distr_scen_1.scen.json +++ /dev/null @@ -1,253 +0,0 @@ -{ - "name": "accept esdt payment", - "steps": [ - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "0" - } - }, - { - "step": "setState", - "accounts": { - "address:alice": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "1,000" - } - }, - "address:bob": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "1,000" - } - }, - "sc:farm_contract": { - "nonce": "0", - "balance": "0", - "esdt": { - "str:FARM-abcdef": { - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - }, - "str:LPTOK-abcdef": { - "roles": [ - "ESDTRoleLocalBurn" - ] - }, - "str:MEX-abcdef": { - "roles": [ - "ESDTRoleLocalMint", - "ESDTRoleLocalBurn" - ] - } - }, - "storage": { - "str:farming_token_id": "str:LPTOK-abcdef", - "str:farm_token_id": "str:FARM-abcdef", - "str:reward_token_id": "str:MEX-abcdef", - "str:state": "1", - "str:minimum_farming_epochs": "2", - "str:penalty_percent": "0", - "str:division_safety_constant": "1000000000000", - "str:per_block_reward_amount": "100", - "str:produce_rewards_enabled": "1" - }, - "code": "file:../farm/output/farm.wasm", - "owner": "address:owner" - } - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "1" - } - }, - { - "step": "scCall", - "txId": "alice-enters", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "1,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:1", - "3-amount": "biguint:1,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "2" - } - }, - { - "step": "scCall", - "txId": "bob-enters", - "tx": { - "from": "address:bob", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "1,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:2", - "3-amount": "biguint:1,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "9" - } - }, - { - "step": "scCall", - "txId": "alice-exits", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "1", - "value": "1,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:1,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:450" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "bob-exits", - "tx": { - "from": "address:bob", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "2", - "value": "1,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:1,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:350" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:alice": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "1,000", - "str:MEX-abcdef": "450" - } - }, - "address:bob": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "1,000", - "str:MEX-abcdef": "350" - } - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/farm_reward_distr_scen_2.scen.json b/dex/scenarios/farm_reward_distr_scen_2.scen.json deleted file mode 100644 index fc607055a..000000000 --- a/dex/scenarios/farm_reward_distr_scen_2.scen.json +++ /dev/null @@ -1,353 +0,0 @@ -{ - "name": "accept esdt payment", - "steps": [ - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "0" - } - }, - { - "step": "setState", - "accounts": { - "address:alice": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "1,000" - } - }, - "address:bob": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "2,000" - } - }, - "address:eve": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "500" - } - }, - "sc:farm_contract": { - "nonce": "0", - "balance": "0", - "esdt": { - "str:FARM-abcdef": { - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - }, - "str:LPTOK-abcdef": { - "roles": [ - "ESDTRoleLocalBurn" - ] - }, - "str:MEX-abcdef": { - "roles": [ - "ESDTRoleLocalMint", - "ESDTRoleLocalBurn" - ] - } - }, - "storage": { - "str:farming_token_id": "str:LPTOK-abcdef", - "str:farm_token_id": "str:FARM-abcdef", - "str:reward_token_id": "str:MEX-abcdef", - "str:state": "1", - "str:minimum_farming_epochs": "2", - "str:penalty_percent": "0", - "str:division_safety_constant": "1000000000000", - "str:per_block_reward_amount": "100", - "str:produce_rewards_enabled": "1" - }, - "code": "file:../farm/output/farm.wasm", - "owner": "address:owner" - } - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "3" - } - }, - { - "step": "scCall", - "txId": "alice-enters", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "1,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:1", - "3-amount": "biguint:1,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "bob-enters", - "tx": { - "from": "address:bob", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "2,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:2", - "3-amount": "biguint:2,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "6" - } - }, - { - "step": "scCall", - "txId": "eve-enters", - "tx": { - "from": "address:eve", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "500" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:3", - "3-amount": "biguint:500" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "10" - } - }, - { - "step": "scCall", - "txId": "bob-exits", - "tx": { - "from": "address:bob", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "2", - "value": "2,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:2,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:428" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "13" - } - }, - { - "step": "scCall", - "txId": "alice-exits", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "1", - "value": "1,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:1,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:414" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "16" - } - }, - { - "step": "scCall", - "txId": "eve-exits", - "tx": { - "from": "address:eve", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "3", - "value": "500" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:500" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:457" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:alice": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "1,000", - "str:MEX-abcdef": "414" - } - }, - "address:bob": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "2,000", - "str:MEX-abcdef": "428" - } - }, - "address:eve": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "500", - "str:MEX-abcdef": "457" - } - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/farm_reward_distr_scen_3.scen.json b/dex/scenarios/farm_reward_distr_scen_3.scen.json deleted file mode 100644 index b850e7bd9..000000000 --- a/dex/scenarios/farm_reward_distr_scen_3.scen.json +++ /dev/null @@ -1,403 +0,0 @@ -{ - "name": "accept esdt payment", - "steps": [ - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "0" - } - }, - { - "step": "setState", - "accounts": { - "address:alice": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "1,000" - } - }, - "address:bob": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "2,000" - } - }, - "address:eve": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "500" - } - }, - "sc:farm_contract": { - "nonce": "0", - "balance": "0", - "esdt": { - "str:FARM-abcdef": { - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - }, - "str:LPTOK-abcdef": { - "roles": [ - "ESDTRoleLocalBurn" - ] - }, - "str:MEX-abcdef": { - "roles": [ - "ESDTRoleLocalMint", - "ESDTRoleLocalBurn" - ] - } - }, - "storage": { - "str:farming_token_id": "str:LPTOK-abcdef", - "str:farm_token_id": "str:FARM-abcdef", - "str:reward_token_id": "str:MEX-abcdef", - "str:state": "1", - "str:minimum_farming_epochs": "2", - "str:router_address": "address:alice", - "str:penalty_percent": "0", - "str:division_safety_constant": "1000000000000", - "str:per_block_reward_amount": "100", - "str:produce_rewards_enabled": "1", - "str:permissions|address:alice": "5" - }, - "code": "file:../farm/output/farm.wasm", - "owner": "address:alice" - } - } - }, - { - "step": "scCall", - "txId": "add-admin", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "function": "addAdmin", - "arguments": [ - "address:alice" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "3" - } - }, - { - "step": "scCall", - "txId": "alice-enters", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "1,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:1", - "3-amount": "biguint:1,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "bob-enters", - "tx": { - "from": "address:bob", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "2,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:2", - "3-amount": "biguint:2,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "6" - } - }, - { - "step": "scCall", - "txId": "eve-enters", - "tx": { - "from": "address:eve", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "500" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:3", - "3-amount": "biguint:500" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "8" - } - }, - { - "step": "scCall", - "txId": "change-reward-rate", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "function": "setPerBlockRewardAmount", - "arguments": [ - "50" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "10" - } - }, - { - "step": "scCall", - "txId": "bob-exits", - "tx": { - "from": "address:bob", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "2", - "value": "2,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:2,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:371" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "13" - } - }, - { - "step": "scCall", - "txId": "alice-exits", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "1", - "value": "1,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:1,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:285" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "16" - } - }, - { - "step": "scCall", - "txId": "eve-exits", - "tx": { - "from": "address:eve", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "3", - "value": "500" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:500" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:242" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:alice": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "1,000", - "str:MEX-abcdef": "285" - } - }, - "address:bob": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "2,000", - "str:MEX-abcdef": "371" - } - }, - "address:eve": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "500", - "str:MEX-abcdef": "242" - } - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/farm_reward_distr_scen_4.scen.json b/dex/scenarios/farm_reward_distr_scen_4.scen.json deleted file mode 100644 index 0a9dbaf60..000000000 --- a/dex/scenarios/farm_reward_distr_scen_4.scen.json +++ /dev/null @@ -1,403 +0,0 @@ -{ - "name": "accept esdt payment", - "steps": [ - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "0" - } - }, - { - "step": "setState", - "accounts": { - "address:alice": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "1,000,000,000,000,000,000,000" - } - }, - "address:bob": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "2,000,000,000,000,000,000,000" - } - }, - "address:eve": { - "nonce": "0", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "500,000,000,000,000,000,000" - } - }, - "sc:farm_contract": { - "nonce": "0", - "balance": "0", - "esdt": { - "str:FARM-abcdef": { - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - }, - "str:LPTOK-abcdef": { - "roles": [ - "ESDTRoleLocalBurn" - ] - }, - "str:MEX-abcdef": { - "roles": [ - "ESDTRoleLocalMint", - "ESDTRoleLocalBurn" - ] - } - }, - "storage": { - "str:farming_token_id": "str:LPTOK-abcdef", - "str:farm_token_id": "str:FARM-abcdef", - "str:reward_token_id": "str:MEX-abcdef", - "str:state": "1", - "str:minimum_farming_epochs": "2", - "str:router_address": "address:alice", - "str:penalty_percent": "0", - "str:division_safety_constant": "1000000000000", - "str:per_block_reward_amount": "1,000,000,000,000,000,000,000", - "str:produce_rewards_enabled": "1", - "str:permissions|address:alice": "5" - }, - "code": "file:../farm/output/farm.wasm", - "owner": "address:alice" - } - } - }, - { - "step": "scCall", - "txId": "add-admin", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "function": "addAdmin", - "arguments": [ - "address:alice" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "3" - } - }, - { - "step": "scCall", - "txId": "alice-enters", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "1,000,000,000,000,000,000,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:1", - "3-amount": "biguint:1,000,000,000,000,000,000,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "bob-enters", - "tx": { - "from": "address:bob", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "2,000,000,000,000,000,000,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:2", - "3-amount": "biguint:2,000,000,000,000,000,000,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "6" - } - }, - { - "step": "scCall", - "txId": "eve-enters", - "tx": { - "from": "address:eve", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "500,000,000,000,000,000,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:3", - "3-amount": "biguint:500,000,000,000,000,000,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "8" - } - }, - { - "step": "scCall", - "txId": "change-reward-rate", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "function": "setPerBlockRewardAmount", - "arguments": [ - "500,000,000,000,000,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "10" - } - }, - { - "step": "scCall", - "txId": "bob-exits", - "tx": { - "from": "address:bob", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "2", - "value": "2,000,000,000,000,000,000,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:2,000,000,000,000,000,000,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:3,714,285,714,284,000,000,000" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "13" - } - }, - { - "step": "scCall", - "txId": "alice-exits", - "tx": { - "from": "address:alice", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "1", - "value": "1,000,000,000,000,000,000,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:1,000,000,000,000,000,000,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:2,857,142,857,142,000,000,000" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "setState", - "currentBlockInfo": { - "blockNonce": "16" - } - }, - { - "step": "scCall", - "txId": "eve-exits", - "tx": { - "from": "address:eve", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "3", - "value": "500,000,000,000,000,000,000" - } - ], - "function": "exitFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:LPTOK-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:500,000,000,000,000,000,000" - }, - { - "1-token_id": "nested:str:MEX-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:2,428,571,428,571,000,000,000" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:alice": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "1,000,000,000,000,000,000,000", - "str:MEX-abcdef": "2,857,142,857,142,000,000,000" - } - }, - "address:bob": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "2,000,000,000,000,000,000,000", - "str:MEX-abcdef": "3,714,285,714,284,000,000,000" - } - }, - "address:eve": { - "nonce": "*", - "balance": "1,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "500,000,000,000,000,000,000", - "str:MEX-abcdef": "2,428,571,428,571,000,000,000" - } - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/farm_with_egld_token.scen.json b/dex/scenarios/farm_with_egld_token.scen.json deleted file mode 100644 index b1cb7d8c2..000000000 --- a/dex/scenarios/farm_with_egld_token.scen.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "name": "farm with mex", - "steps": [ - { - "step": "externalSteps", - "path": "steps/init_accounts.steps.json" - }, - { - "step": "setState", - "accounts": { - "sc:egld_farm_contract": { - "nonce": "0", - "balance": "0", - "esdt": { - "str:FARM-abcdef": { - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - } - }, - "storage": { - "str:farming_token_id": "str:WEGLD-abcdef", - "str:reward_token_id": "str:WEGLD-abcdef", - "str:farm_token_id": "str:FARM-abcdef", - "str:router_address": "sc:router_contract", - "str:state": "1" - }, - "code": "file:../farm/output/farm.wasm" - } - } - }, - { - "step": "scCall", - "txId": "enter farm", - "tx": { - "from": "address:user1", - "to": "sc:egld_farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:WEGLD-abcdef", - "value": "100,000,000" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - { - "1-token_id": "nested:str:FARM-abcdef", - "2-nonce": "u64:1", - "3-amount": "biguint:100,000,000" - }, - { - "1-token_id": "nested:str:WEGLD-abcdef", - "2-nonce": "u64:0", - "3-amount": "biguint:0" - } - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:user1": { - "nonce": "*", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "4,900,000,000", - "str:ALC-abcdef": "5,000,000,000", - "str:BLC-abcdef": "5,000,000,000", - "str:FARM-abcdef": { - "instances": [ - { - "nonce": "0x01", - "balance": "100,000,000" - } - ] - } - } - }, - "sc:egld_farm_contract": { - "nonce": "*", - "balance": "0", - "esdt": { - "str:WEGLD-abcdef": "100,000,000", - "str:FARM-abcdef": { - "lastNonce": "1", - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - } - }, - "storage": { - "str:farm_token_id": "str:FARM-abcdef", - "str:router_address": "sc:router_contract", - "str:state": "1", - "str:farming_token_id": "str:WEGLD-abcdef", - "str:reward_token_id": "str:WEGLD-abcdef", - "+": "" - }, - "code": "file:../farm/output/farm.wasm" - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/farm_wrong_lp_token.scen.json b/dex/scenarios/farm_wrong_lp_token.scen.json deleted file mode 100644 index 060e445d8..000000000 --- a/dex/scenarios/farm_wrong_lp_token.scen.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "farm", - "steps": [ - { - "step": "externalSteps", - "path": "complete_setup.scen.json" - }, - { - "step": "scCall", - "txId": "farm", - "tx": { - "from": "address:user1", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:ALC-abcdef", - "value": "1" - } - ], - "function": "enterFarm", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "str:Bad payments", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/get_amounts.scen.json b/dex/scenarios/get_amounts.scen.json deleted file mode 100644 index 605ba2ee9..000000000 --- a/dex/scenarios/get_amounts.scen.json +++ /dev/null @@ -1,307 +0,0 @@ -{ - "name": "get pair views", - "steps": [ - { - "step": "externalSteps", - "path": "add_liquidity.scen.json" - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountOut", - "arguments": [ - "str:ALC-abcdef", - "0" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountOut", - "arguments": [ - "str:CLC-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountOut", - "arguments": [ - "str:ALC-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "99" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountOut", - "arguments": [ - "str:ALC-abcdef", - "1,000,000,000,000,000,000,000,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "1999999999" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountIn", - "arguments": [ - "str:ALC-abcdef", - "0" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountIn", - "arguments": [ - "str:ALC-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "101" - ], - "status": "0", - "message": "0", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountIn", - "arguments": [ - "str:ALC-abcdef", - "100,000,000,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountIn", - "arguments": [ - "str:BLC-abcdef", - "100,000,000,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getEquivalent", - "arguments": [ - "str:ALC-abcdef", - "0" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getEquivalent", - "arguments": [ - "str:BLC-abcdef", - "1" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getEquivalent", - "arguments": [ - "str:ALC-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "100" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getEquivalent", - "arguments": [ - "str:WEGLD-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "100" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getEquivalent", - "arguments": [ - "str:WEGLD-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "100" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/get_amounts_no_liquidity.scen.json b/dex/scenarios/get_amounts_no_liquidity.scen.json deleted file mode 100644 index 847f3fa42..000000000 --- a/dex/scenarios/get_amounts_no_liquidity.scen.json +++ /dev/null @@ -1,303 +0,0 @@ -{ - "name": "get pair views", - "steps": [ - { - "step": "externalSteps", - "path": "complete_setup.scen.json" - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountOut", - "arguments": [ - "str:ALC-abcdef", - "0" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-amount-out1", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountOut", - "arguments": [ - "str:CLC-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountOut", - "arguments": [ - "str:ALC-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountOut", - "arguments": [ - "str:ALC-abcdef", - "1,000,000,000,000,000,000,000,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountIn", - "arguments": [ - "str:ALC-abcdef", - "0" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountIn", - "arguments": [ - "str:ALC-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountIn", - "arguments": [ - "str:ALC-abcdef", - "100,000,000,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-amount-out2", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getAmountIn", - "arguments": [ - "str:BLC-abcdef", - "100,000,000,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getEquivalent", - "arguments": [ - "str:ALC-abcdef", - "0" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getEquivalent", - "arguments": [ - "str:BLC-abcdef", - "1" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0" - ], - "status": "0", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getEquivalent", - "arguments": [ - "str:ALC-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0" - ], - "status": "0", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getEquivalent", - "arguments": [ - "str:WEGLD-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "function": "getEquivalent", - "arguments": [ - "str:WEGLD-abcdef", - "100" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/get_pair_non_existent.scen.json b/dex/scenarios/get_pair_non_existent.scen.json deleted file mode 100644 index 30244d4f9..000000000 --- a/dex/scenarios/get_pair_non_existent.scen.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "get pair views", - "steps": [ - { - "step": "externalSteps", - "path": "complete_setup.scen.json" - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "getPair", - "arguments": [ - "str:ALC-abcdef", - "str:ALC-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x000000000000000000000000000000000000000000000000000000000000000" - ], - "status": "", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "getPair", - "arguments": [ - "str:ALC-abcdef", - "str:BLC-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x000000000000000000000000000000000000000000000000000000000000000" - ], - "status": "0", - "message": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/get_pair_views.scen.json b/dex/scenarios/get_pair_views.scen.json deleted file mode 100644 index 8fa75aaa8..000000000 --- a/dex/scenarios/get_pair_views.scen.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "name": "get pair views", - "steps": [ - { - "step": "externalSteps", - "path": "complete_setup.scen.json" - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "getPair", - "arguments": [ - "str:ALC-abcdef", - "str:WEGLD-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "sc:pair_contract" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "getPair", - "arguments": [ - "str:WEGLD-abcdef", - "str:ALC-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "sc:pair_contract" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/merge_tokens.scen.json b/dex/scenarios/merge_tokens.scen.json deleted file mode 100644 index ed059f31b..000000000 --- a/dex/scenarios/merge_tokens.scen.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "enter farm", - "steps": [ - { - "step": "externalSteps", - "path": "enter_farm.scen.json" - }, - { - "step": "scCall", - "txId": "stake", - "tx": { - "from": "address:user1", - "to": "sc:farm_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "1", - "value": "100,000,000" - }, - { - "tokenIdentifier": "str:FARM-abcdef", - "nonce": "2", - "value": "100,000,000" - } - ], - "function": "mergeFarmTokens", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x0000000b4641524d2d6162636465660000000000000003000000040bebc200", - "0x0000000c5745474c442d616263646566000000000000000000000000" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "address:user1": { - "nonce": "*", - "balance": "1000000000000000000000000000000", - "esdt": { - "str:FARM-abcdef": { - "instances": [ - { - "nonce": "0x03", - "balance": "200,000,000" - } - ] - }, - "str:WEGLD-abcdef": "3,000,000,000", - "str:BLC-abcdef": "5,000,000,000", - "str:ALC-abcdef": "3,000,000,000", - "str:LPTOK-abcdef": "1,799,999,000" - } - }, - "+": "" - } - } - ] -} \ No newline at end of file diff --git a/dex/scenarios/owner_pause_farm.scen.json b/dex/scenarios/owner_pause_farm.scen.json deleted file mode 100644 index 0a6fa0e64..000000000 --- a/dex/scenarios/owner_pause_farm.scen.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "name": "pause farm", - "steps": [ - { - "step": "externalSteps", - "path": "steps/init_accounts.steps.json" - }, - { - "step": "externalSteps", - "path": "steps/deploy_contracts.steps.json" - }, - { - "step": "scCall", - "txId": "pause", - "tx": { - "from": "address:owner", - "to": "sc:farm_contract", - "function": "pause", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-state", - "tx": { - "from": "address:owner", - "to": "sc:farm_contract", - "function": "getState", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/owner_resume_farm.scen.json b/dex/scenarios/owner_resume_farm.scen.json deleted file mode 100644 index ac870287f..000000000 --- a/dex/scenarios/owner_resume_farm.scen.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "resume farm", - "steps": [ - { - "step": "externalSteps", - "path": "owner_pause_farm.scen.json" - }, - { - "step": "scCall", - "txId": "resume", - "tx": { - "from": "address:owner", - "to": "sc:farm_contract", - "function": "resume", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-state", - "tx": { - "from": "address:owner", - "to": "sc:farm_contract", - "function": "getState", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "1" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/remove_liquidity.scen.json b/dex/scenarios/remove_liquidity.scen.json deleted file mode 100644 index efc3d5eb8..000000000 --- a/dex/scenarios/remove_liquidity.scen.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "remove liquidity", - "steps": [ - { - "step": "externalSteps", - "path": "add_liquidity.scen.json" - }, - { - "step": "scCall", - "txId": "remove-liquidity", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "1,999,999,000" - } - ], - "function": "removeLiquidity", - "arguments": [ - "500,000,000", - "500,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x0000000c5745474c442d61626364656600000000000000000000000477359018", - "0x0000000a414c432d61626364656600000000000000000000000477359018" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/remove_liquidity_and_buyback_and_burn_token.scen.json b/dex/scenarios/remove_liquidity_and_buyback_and_burn_token.scen.json deleted file mode 100644 index 7971045ed..000000000 --- a/dex/scenarios/remove_liquidity_and_buyback_and_burn_token.scen.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "name": "remove liquidity twice", - "steps": [ - { - "step": "externalSteps", - "path": "add_liquidity.scen.json" - }, - { - "step": "checkState", - "accounts": { - "sc:pair_contract": { - "nonce": "*", - "balance": "0", - "esdt": { - "str:WEGLD-abcdef": { - "instances": [ - { - "nonce": "", - "balance": "2,000,000,000" - } - ], - "roles": [ - "ESDTRoleLocalBurn" - ] - }, - "str:ALC-abcdef": "2,000,000,000", - "str:LPTOK-abcdef": { - "instances": [ - { - "nonce": "", - "balance": "1,000" - } - ], - "roles": [ - "ESDTRoleLocalBurn", - "ESDTRoleLocalMint" - ] - } - }, - "storage": { - "+": "" - }, - "code": "file:../pair/output/pair.wasm" - }, - "+": "" - } - }, - { - "step": "scCall", - "txId": "remove-liquidity", - "tx": { - "from": "address:user_with_lp", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "1,000,000" - } - ], - "function": "removeLiquidityAndBuyBackAndBurnToken", - "arguments": [ - "str:WEGLD-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "sc:pair_contract": { - "nonce": "*", - "balance": "0", - "esdt": { - "str:WEGLD-abcdef": { - "instances": [ - { - "nonce": "", - "balance": "1,998,000,500" - } - ], - "roles": [ - "ESDTRoleLocalBurn" - ] - }, - "str:ALC-abcdef": "2,000,000,000", - "str:LPTOK-abcdef": { - "instances": [ - { - "nonce": "", - "balance": "1,000" - } - ], - "roles": [ - "ESDTRoleLocalBurn", - "ESDTRoleLocalMint" - ] - } - }, - "storage": { - "+": "" - }, - "code": "file:../pair/output/pair.wasm" - }, - "+": "" - } - } - ] -} diff --git a/dex/scenarios/remove_liquidity_twice.scen.json b/dex/scenarios/remove_liquidity_twice.scen.json deleted file mode 100644 index 940321ae6..000000000 --- a/dex/scenarios/remove_liquidity_twice.scen.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "remove liquidity twice", - "steps": [ - { - "step": "externalSteps", - "path": "remove_liquidity.scen.json" - }, - { - "step": "scCall", - "txId": "remove-liquidity", - "tx": { - "from": "address:user_with_lp", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "1,999,999,000" - } - ], - "function": "removeLiquidity", - "arguments": [ - "500,000,000", - "500,000,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "str:Not enough LP token supply", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/remove_pair.scen.json b/dex/scenarios/remove_pair.scen.json deleted file mode 100644 index 634bdc346..000000000 --- a/dex/scenarios/remove_pair.scen.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "name": "remove pair", - "steps": [ - { - "step": "externalSteps", - "path": "complete_setup.scen.json" - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "getPair", - "arguments": [ - "str:ALC-abcdef", - "str:WEGLD-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "sc:pair_contract" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "create-pair", - "tx": { - "from": "address:user1", - "to": "sc:router_contract", - "function": "removePair", - "arguments": [ - "str:ALC-abcdef", - "str:WEGLD-abcdef" - ], - "gasLimit": "200,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "str:Endpoint can only be called by owner", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "create-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "removePair", - "arguments": [ - "str:ALC-abcdef", - "str:WEGLD-abcdef" - ], - "gasLimit": "200,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "sc:pair_contract" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "getPair", - "arguments": [ - "str:ALC-abcdef", - "str:WEGLD-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/router_pause_self.scen.json b/dex/scenarios/router_pause_self.scen.json deleted file mode 100644 index 41c3ad0df..000000000 --- a/dex/scenarios/router_pause_self.scen.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "name": "pause self", - "steps": [ - { - "step": "externalSteps", - "path": "steps/init_accounts.steps.json" - }, - { - "step": "externalSteps", - "path": "steps/deploy_contracts.steps.json" - }, - { - "step": "scCall", - "txId": "pause", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "pause", - "arguments": [ - "sc:router_contract" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-state", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "getState", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/router_resume_self.scen.json b/dex/scenarios/router_resume_self.scen.json deleted file mode 100644 index 004773512..000000000 --- a/dex/scenarios/router_resume_self.scen.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "name": "resume self", - "steps": [ - { - "step": "externalSteps", - "path": "router_pause_self.scen.json" - }, - { - "step": "scCall", - "txId": "resume", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "resume", - "arguments": [ - "sc:router_contract" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-state", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "getState", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "1" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/steps/create_pair.steps.json b/dex/scenarios/steps/create_pair.steps.json deleted file mode 100644 index 7df2c1b0f..000000000 --- a/dex/scenarios/steps/create_pair.steps.json +++ /dev/null @@ -1,66 +0,0 @@ -{ - "name": "create pair", - "steps": [ - { - "step": "setState", - "newAddresses": [ - { - "creatorAddress": "sc:router_contract", - "creatorNonce": "0", - "newAddress": "sc:pair_contract" - } - ] - }, - { - "step": "scCall", - "txId": "create-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "createPair", - "arguments": [ - "str:ALC-abcdef", - "str:WEGLD-abcdef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "300", - "100" - ], - "gasLimit": "200,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "sc:pair_contract" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-pair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "getPair", - "arguments": [ - "str:ALC-abcdef", - "str:WEGLD-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "sc:pair_contract" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/steps/deploy_contracts.steps.json b/dex/scenarios/steps/deploy_contracts.steps.json deleted file mode 100644 index 83231fb69..000000000 --- a/dex/scenarios/steps/deploy_contracts.steps.json +++ /dev/null @@ -1,67 +0,0 @@ -{ - "name": "deploy router", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:pair_template": { - "code": "file:../../pair/output/pair.wasm" - } - }, - "newAddresses": [ - { - "creatorAddress": "address:owner", - "creatorNonce": "0", - "newAddress": "sc:router_contract" - }, - { - "creatorAddress": "address:owner", - "creatorNonce": "1", - "newAddress": "sc:farm_contract" - } - ] - }, - { - "step": "scDeploy", - "txId": "deploy-router", - "tx": { - "from": "address:owner", - "contractCode": "file:../../router/output/router.wasm", - "arguments": [ - "sc:pair_template" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scDeploy", - "txId": "deploy-staking22", - "tx": { - "from": "address:owner", - "contractCode": "file:../../farm/output/farm.wasm", - "arguments": [ - "str:WEGLD-abcdef", - "str:LPTOK-abcdef", - "1000000000000", - "sc:pair_contract", - "0x0000000000000000000000000000000000000000000000000000000000000000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/steps/hackish.steps.json b/dex/scenarios/steps/hackish.steps.json deleted file mode 100644 index d0bc75b20..000000000 --- a/dex/scenarios/steps/hackish.steps.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "name": "hackish step dont commit", - "steps": [ - { - "step": "setState", - "accounts": { - "sc:pair_contract": { - "nonce": "0", - "balance": "0", - "esdt": { - "str:LPTOK-abcdef": { - "roles": [ - "ESDTRoleLocalMint", - "ESDTRoleLocalBurn" - ] - }, - "str:WEGLD-abcdef": { - "roles": [ - "ESDTRoleLocalBurn" - ] - } - }, - "storage": { - "str:first_token_id": "str:WEGLD-abcdef", - "str:second_token_id": "str:ALC-abcdef", - "str:state": "1", - "str:lpTokenIdentifier": "str:LPTOK-abcdef", - "str:router_address": "sc:router_contract", - "str:router_owner_address": "address:owner", - "str:total_fee_percent": "300", - "str:special_fee_percent": "100", - "str:send_fee_gas_limit": "25,000,000", - "str:extern_swap_gas_limit": "50,000,000", - "str:permissions|sc:router_contract": "7", - "str:permissions|address:owner": "7" - }, - "code": "file:../../pair/output/pair.wasm", - "owner": "sc:router_contract" - }, - "sc:farm_contract": { - "nonce": "0", - "balance": "0", - "esdt": { - "str:FARM-abcdef": { - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - } - }, - "storage": { - "str:farming_token_id": "str:LPTOK-abcdef", - "str:reward_token_id": "str:WEGLD-abcdef", - "str:farm_token_id": "str:FARM-abcdef", - "str:router_address": "sc:router_contract", - "str:state": "1", - "str:minimum_farming_epochs": "2", - "str:division_safety_constant": "1000000000000", - "str:penalty_percent": "100", - "str:pair_contract_address": "sc:pair_contract", - "str:burn_gas_limit": "50,000,000" - }, - "code": "file:../../farm/output/farm.wasm" - } - } - } - ] -} diff --git a/dex/scenarios/steps/init_accounts.steps.json b/dex/scenarios/steps/init_accounts.steps.json deleted file mode 100644 index 7c26ed414..000000000 --- a/dex/scenarios/steps/init_accounts.steps.json +++ /dev/null @@ -1,95 +0,0 @@ -{ - "name": "init accounts", - "steps": [ - { - "step": "setState", - "accounts": { - "address:owner": { - "nonce": "0", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "5,000,000,000", - "str:ALC-abcdef": "5,000,000,000", - "str:BLC-abcdef": "5,000,000,000" - } - }, - "address:user1": { - "nonce": "0", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "5,000,000,000", - "str:ALC-abcdef": "5,000,000,000", - "str:BLC-abcdef": "5,000,000,000" - } - }, - "address:user2": { - "nonce": "0", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "5,000,000,000", - "str:ALC-abcdef": "5,000,000,000", - "str:BLC-abcdef": "5,000,000,000" - } - }, - "address:user_with_lp": { - "nonce": "0", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "5,000,000,000" - } - } - } - }, - { - "step": "checkState", - "accounts": { - "address:owner": { - "nonce": "0", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "5,000,000,000", - "str:ALC-abcdef": "5,000,000,000", - "str:BLC-abcdef": "5,000,000,000" - }, - "storage": { - "+": "" - } - }, - "address:user1": { - "nonce": "0", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "5,000,000,000", - "str:ALC-abcdef": "5,000,000,000", - "str:BLC-abcdef": "5,000,000,000" - }, - "storage": { - "+": "" - } - }, - "address:user2": { - "nonce": "0", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:WEGLD-abcdef": "5,000,000,000", - "str:ALC-abcdef": "5,000,000,000", - "str:BLC-abcdef": "5,000,000,000" - }, - "storage": { - "+": "" - } - }, - "address:user_with_lp": { - "nonce": "0", - "balance": "1,000,000,000,000,000,000,000,000,000,000", - "esdt": { - "str:LPTOK-abcdef": "5,000,000,000" - }, - "storage": { - "+": "" - } - } - } - } - ] -} diff --git a/dex/scenarios/steps/issue_lp_token.steps.json b/dex/scenarios/steps/issue_lp_token.steps.json deleted file mode 100644 index 81c69e84a..000000000 --- a/dex/scenarios/steps/issue_lp_token.steps.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "issue lp token", - "steps": [ - { - "step": "scCall", - "txId": "issue-lp-token", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "egldValue": "5,000,000,000,000,000,000", - "function": "issueLpToken", - "arguments": [ - "sc:pair_contract", - "0x4c49515544495459504f4f4c544f4b454e", - "0x4c50544f4b454e" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x45474c44" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-issued-lp-token", - "tx": { - "from": "address:owner", - "to": "sc:pair_contract", - "function": "getLpTokenIdentifier", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x45474c44" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/steps/pair_whitelist.steps.json b/dex/scenarios/steps/pair_whitelist.steps.json deleted file mode 100644 index 4260c64ef..000000000 --- a/dex/scenarios/steps/pair_whitelist.steps.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "whitelist", - "steps": [ - { - "step": "scCall", - "txId": "whitelist1", - "tx": { - "from": "address:owner", - "to": "sc:pair_contract", - "function": "whitelist", - "arguments": [ - "sc:farm_contract" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "whitelist2", - "tx": { - "from": "address:owner", - "to": "sc:pair_contract", - "function": "whitelist", - "arguments": [ - "address:user_with_lp" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/steps/register_farm_token.steps.json b/dex/scenarios/steps/register_farm_token.steps.json deleted file mode 100644 index f37ab12af..000000000 --- a/dex/scenarios/steps/register_farm_token.steps.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "register farm token", - "steps": [ - { - "step": "scCall", - "txId": "register-farm-token", - "tx": { - "from": "address:owner", - "to": "sc:farm_contract", - "egldValue": "5,000,000,000,000,000,000", - "function": "registerFarmToken", - "arguments": [ - "0x4c49515544495459504f4f4c544f4b454e", - "0x4c50544f4b454e", - "18" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-registered-lp-token", - "tx": { - "from": "address:owner", - "to": "sc:farm_contract", - "function": "getFarmTokenId", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x45474c44" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/steps/set_fee_off.steps.json b/dex/scenarios/steps/set_fee_off.steps.json deleted file mode 100644 index 6a1ee87df..000000000 --- a/dex/scenarios/steps/set_fee_off.steps.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "name": "set fee on", - "steps": [ - { - "step": "scCall", - "txId": "set-fee-off", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "setFeeOff", - "arguments": [ - "sc:pair_contract", - "sc:farm_contract", - "str:WEGLD-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-fee-state", - "tx": { - "from": "address:owner", - "to": "sc:pair_contract", - "function": "getFeeState", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/steps/set_fee_on.steps.json b/dex/scenarios/steps/set_fee_on.steps.json deleted file mode 100644 index b8cbcd1ae..000000000 --- a/dex/scenarios/steps/set_fee_on.steps.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "name": "set fee on", - "steps": [ - { - "step": "scCall", - "txId": "set-fee-on", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "setFeeOn", - "arguments": [ - "sc:pair_contract", - "sc:farm_contract", - "str:WEGLD-abcdef" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/steps/set_local_roles_farm_token.steps.json b/dex/scenarios/steps/set_local_roles_farm_token.steps.json deleted file mode 100644 index 2db7f6bb6..000000000 --- a/dex/scenarios/steps/set_local_roles_farm_token.steps.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "name": "set local roles farm token", - "steps": [ - { - "step": "scCall", - "txId": "set-local-roles", - "tx": { - "from": "address:owner", - "to": "sc:farm_contract", - "function": "setLocalRolesFarmToken", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-last-error-message", - "tx": { - "from": "address:owner", - "to": "sc:farm_contract", - "function": "getLastErrorMessage", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/steps/set_local_roles_pair.steps.json b/dex/scenarios/steps/set_local_roles_pair.steps.json deleted file mode 100644 index cb12c9b52..000000000 --- a/dex/scenarios/steps/set_local_roles_pair.steps.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "name": "set local roles pair", - "steps": [ - { - "step": "scCall", - "txId": "set-local-roles", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "setLocalRoles", - "arguments": [ - "sc:pair_contract" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "get-last-error-message", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "getLastErrorMessage", - "arguments": [], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/steps/setup_mex_farm_contract.steps.json b/dex/scenarios/steps/setup_mex_farm_contract.steps.json deleted file mode 100644 index d680df3c0..000000000 --- a/dex/scenarios/steps/setup_mex_farm_contract.steps.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "distribution", - "steps": [ - { - "step": "setState", - "accounts": { - "address:user_with_mex": { - "nonce": "0", - "balance": "100,000,000", - "esdt": { - "str:MEX-abcdef": "5,000,000,000" - } - }, - "sc:mex_farm_contract": { - "nonce": "0", - "balance": "0", - "esdt": { - "str:FARM-abcdef": { - "roles": [ - "ESDTRoleNFTCreate", - "ESDTRoleNFTAddQuantity", - "ESDTRoleNFTBurn" - ] - }, - "str:MEX-abcdef": { - "roles": [ - "ESDTRoleLocalMint", - "ESDTRoleLocalBurn" - ] - } - }, - "storage": { - "str:farming_token_id": "str:MEX-abcdef", - "str:reward_token_id": "str:MEX-abcdef", - "str:farm_token_id": "str:FARM-abcdef", - "str:router_address": "address:owner", - "str:state": "1", - "str:per_block_reward_amount": "5000", - "str:last_reward_block_nonce": "0", - "str:minimum_farming_epochs": "2", - "str:produce_rewards_enabled": "1", - "str:penalty_percent": "10", - "str:division_safety_constant": "1000000000000", - "str:pair_contract_address": "0x0000000000000000000000000000000000000000000000000000000000000000" - }, - "code": "file:../../farm/output/farm.wasm", - "owner": "address:owner" - } - } - } - ] -} diff --git a/dex/scenarios/swap_fixed_input.scen.json b/dex/scenarios/swap_fixed_input.scen.json deleted file mode 100644 index 5485ff8a5..000000000 --- a/dex/scenarios/swap_fixed_input.scen.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "swap fixed input", - "steps": [ - { - "step": "externalSteps", - "path": "add_liquidity.scen.json" - }, - { - "step": "scCall", - "txId": "swap-fixed-input", - "tx": { - "from": "address:user2", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:ALC-abcdef", - "value": "100,000" - } - ], - "function": "swapTokensFixedInput", - "arguments": [ - "str:WEGLD-abcdef", - "50,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x0000000c5745474c442d61626364656600000000000000000000000301856f" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/swap_fixed_input_after_removed_liquidity.scen.json b/dex/scenarios/swap_fixed_input_after_removed_liquidity.scen.json deleted file mode 100644 index cc8103c5d..000000000 --- a/dex/scenarios/swap_fixed_input_after_removed_liquidity.scen.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "swap fixed input", - "steps": [ - { - "step": "externalSteps", - "path": "remove_liquidity.scen.json" - }, - { - "step": "scCall", - "txId": "swap-fixed-input", - "tx": { - "from": "address:owner", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:ALC-abcdef", - "value": "1000000000" - } - ], - "function": "swapTokensFixedInput", - "arguments": [ - "str:WEGLD-abcdef", - "1" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/swap_fixed_output.scen.json b/dex/scenarios/swap_fixed_output.scen.json deleted file mode 100644 index 74480f7a0..000000000 --- a/dex/scenarios/swap_fixed_output.scen.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "name": "swap fixed output", - "steps": [ - { - "step": "externalSteps", - "path": "add_liquidity.scen.json" - }, - { - "step": "scCall", - "txId": "swap-fixed-output", - "tx": { - "from": "address:user2", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:ALC-abcdef", - "value": "100,000" - } - ], - "function": "swapTokensFixedOutput", - "arguments": [ - "str:WEGLD-abcdef", - "50,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [ - "0x0000000c5745474c442d616263646566000000000000000000000002c350", - "0x0000000a414c432d616263646566000000000000000000000002c2b8" - ], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/swap_same_token.scen.json b/dex/scenarios/swap_same_token.scen.json deleted file mode 100644 index a3c51c23c..000000000 --- a/dex/scenarios/swap_same_token.scen.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "name": "swap same token", - "steps": [ - { - "step": "externalSteps", - "path": "add_liquidity.scen.json" - }, - { - "step": "scCall", - "txId": "swap-fixed-input", - "tx": { - "from": "address:user2", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:ALC-abcdef", - "value": "100,000" - } - ], - "function": "swapTokensFixedInput", - "arguments": [ - "str:ALC-abcdef", - "50,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "swap-fixed-input", - "tx": { - "from": "address:user2", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:ALC-abcdef", - "value": "100,000" - } - ], - "function": "swapTokensFixedOutput", - "arguments": [ - "str:ALC-abcdef", - "50,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/swap_wrong_token.scen.json b/dex/scenarios/swap_wrong_token.scen.json deleted file mode 100644 index 470f969cd..000000000 --- a/dex/scenarios/swap_wrong_token.scen.json +++ /dev/null @@ -1,121 +0,0 @@ -{ - "name": "swap wrong token", - "steps": [ - { - "step": "externalSteps", - "path": "add_liquidity.scen.json" - }, - { - "step": "scCall", - "txId": "swap-fixed-input", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:BLC-abcdef", - "value": "100,000" - } - ], - "function": "swapTokensFixedInput", - "arguments": [ - "str:ALC-abcdef", - "50,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "swap-fixed-input", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:ALC-abcdef", - "value": "100,000" - } - ], - "function": "swapTokensFixedInput", - "arguments": [ - "str:BLC-abcdef", - "50,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "swap-fixed-input", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:LPTOK-abcdef", - "value": "100,000" - } - ], - "function": "swapTokensFixedOutput", - "arguments": [ - "str:BLC-abcdef", - "50,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - }, - { - "step": "scCall", - "txId": "swap-fixed-input", - "tx": { - "from": "address:user1", - "to": "sc:pair_contract", - "esdtValue": [ - { - "tokenIdentifier": "str:ALC-abcdef", - "value": "100,000" - } - ], - "function": "swapTokensFixedOutput", - "arguments": [ - "str:BLC-abcdef", - "50,000" - ], - "gasLimit": "100,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "4", - "message": "*", - "gas": "*", - "refund": "*" - } - } - ] -} diff --git a/dex/scenarios/upgrade_contract.scen.json b/dex/scenarios/upgrade_contract.scen.json deleted file mode 100644 index cdadc752b..000000000 --- a/dex/scenarios/upgrade_contract.scen.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "name": "create pair", - "steps": [ - { - "step": "externalSteps", - "path": "complete_setup.scen.json" - }, - { - "step": "scCall", - "txId": "upgradePair", - "tx": { - "from": "address:owner", - "to": "sc:router_contract", - "function": "upgradePair", - "arguments": [ - "str:ALC-abcdef", - "str:WEGLD-abcdef", - "0x0000000000000000000000000000000000000000000000000000000000000000", - "300", - "100" - ], - "gasLimit": "1,000,000,000", - "gasPrice": "0" - }, - "expect": { - "out": [], - "status": "0", - "message": "", - "gas": "*", - "refund": "*" - } - }, - { - "step": "checkState", - "accounts": { - "sc:pair_contract": { - "nonce": "*", - "balance": "*", - "esdt": "*", - "storage": { - "str:total_fee_percent": "300", - "+": "" - }, - "code": "file:../pair/output/pair.wasm" - }, - "+": "" - } - } - ] -} diff --git a/dex/tests/dex_scenario_go_test.rs b/dex/tests/dex_scenario_go_test.rs deleted file mode 100644 index 5675b0a8d..000000000 --- a/dex/tests/dex_scenario_go_test.rs +++ /dev/null @@ -1,205 +0,0 @@ -use multiversx_sc_scenario::*; - -fn world() -> ScenarioWorld { - ScenarioWorld::vm_go() -} - -#[test] -fn add_liquidity_go() { - world().run("scenarios/add_liquidity.scen.json"); -} - -#[test] -fn calculate_rewards_for_given_position_go() { - world().run("scenarios/calculate_rewards_for_given_position.scen.json"); -} - -#[test] -fn calculate_rewards_for_given_position_after_compound_go() { - world().run("scenarios/calculate_rewards_for_given_position_after_compound.scen.json"); -} - -#[test] -fn check_fee_disabled_after_swap_go() { - world().run("scenarios/check_fee_disabled_after_swap.scen.json"); -} - -#[test] -fn check_fee_enabled_after_swap_go() { - world().run("scenarios/check_fee_enabled_after_swap.scen.json"); -} - -#[test] -fn claim_rewards_go() { - world().run("scenarios/claim_rewards.scen.json"); -} - -#[test] -fn complete_setup_go() { - world().run("scenarios/complete_setup.scen.json"); -} - -#[test] -fn compound_rewards_go() { - world().run("scenarios/compound_rewards.scen.json"); -} - -#[test] -fn create_pair_twice_go() { - world().run("scenarios/create_pair_twice.scen.json"); -} - -#[test] -fn enter_farm_go() { - world().run("scenarios/enter_farm.scen.json"); -} - -#[test] -fn enter_farm_with_merge_tokens_go() { - world().run("scenarios/enter_farm_with_merge_tokens.scen.json"); -} - -#[test] -fn enter_mex_farm_go() { - world().run("scenarios/enter_mex_farm.scen.json"); -} - -#[test] -fn exit_farm_go() { - world().run("scenarios/exit_farm.scen.json"); -} - -#[test] -fn exit_farm_too_soon_go() { - world().run("scenarios/exit_farm_too_soon.scen.json"); -} - -#[test] -fn exit_mex_farm_go() { - world().run("scenarios/exit_mex_farm.scen.json"); -} - -#[test] -fn farm_reward_distr_scen_1_go() { - world().run("scenarios/farm_reward_distr_scen_1.scen.json"); -} - -#[test] -fn farm_reward_distr_scen_2_go() { - world().run("scenarios/farm_reward_distr_scen_2.scen.json"); -} - -#[test] -fn farm_reward_distr_scen_3_go() { - world().run("scenarios/farm_reward_distr_scen_3.scen.json"); -} - -#[test] -fn farm_reward_distr_scen_4_go() { - world().run("scenarios/farm_reward_distr_scen_4.scen.json"); -} - -#[test] -fn farm_with_egld_token_go() { - world().run("scenarios/farm_with_egld_token.scen.json"); -} - -#[test] -fn farm_wrong_lp_token_go() { - world().run("scenarios/farm_wrong_lp_token.scen.json"); -} - -#[test] -fn get_amounts_go() { - world().run("scenarios/get_amounts.scen.json"); -} - -#[test] -fn get_amounts_no_liquidity_go() { - world().run("scenarios/get_amounts_no_liquidity.scen.json"); -} - -#[test] -fn get_pair_non_existent_go() { - world().run("scenarios/get_pair_non_existent.scen.json"); -} - -#[test] -fn get_pair_views_go() { - world().run("scenarios/get_pair_views.scen.json"); -} - -#[test] -fn merge_tokens_go() { - world().run("scenarios/merge_tokens.scen.json"); -} - -#[test] -fn owner_pause_farm_go() { - world().run("scenarios/owner_pause_farm.scen.json"); -} - -#[test] -fn owner_resume_farm_go() { - world().run("scenarios/owner_resume_farm.scen.json"); -} - -#[test] -fn remove_liquidity_go() { - world().run("scenarios/remove_liquidity.scen.json"); -} - -#[test] -fn remove_liquidity_and_buyback_and_burn_token_go() { - world().run("scenarios/remove_liquidity_and_buyback_and_burn_token.scen.json"); -} - -#[test] -fn remove_liquidity_twice_go() { - world().run("scenarios/remove_liquidity_twice.scen.json"); -} - -#[test] -fn remove_pair_go() { - world().run("scenarios/remove_pair.scen.json"); -} - -#[test] -fn router_pause_self_go() { - world().run("scenarios/router_pause_self.scen.json"); -} - -#[test] -fn router_resume_self_go() { - world().run("scenarios/router_resume_self.scen.json"); -} - -#[test] -fn swap_fixed_input_go() { - world().run("scenarios/swap_fixed_input.scen.json"); -} - -#[test] -fn swap_fixed_input_after_removed_liquidity_go() { - world().run("scenarios/swap_fixed_input_after_removed_liquidity.scen.json"); -} - -#[test] -fn swap_fixed_output_go() { - world().run("scenarios/swap_fixed_output.scen.json"); -} - -#[test] -fn swap_same_token_go() { - world().run("scenarios/swap_same_token.scen.json"); -} - -#[test] -fn swap_wrong_token_go() { - world().run("scenarios/swap_wrong_token.scen.json"); -} - -#[test] -fn upgrade_contract_go() { - world().run("scenarios/upgrade_contract.scen.json"); -} diff --git a/dex/tests/dex_scenario_rs_test.rs b/dex/tests/dex_scenario_rs_test.rs deleted file mode 100644 index 623f63667..000000000 --- a/dex/tests/dex_scenario_rs_test.rs +++ /dev/null @@ -1,212 +0,0 @@ -use multiversx_sc_scenario::ScenarioWorld; - -fn world() -> ScenarioWorld { - let mut blockchain = ScenarioWorld::new(); - blockchain.set_current_dir_from_workspace("dex"); - - blockchain.register_contract("file:router/output/router.wasm", router::ContractBuilder); - blockchain.register_contract("file:pair/output/pair.wasm", pair::ContractBuilder); - blockchain.register_contract("file:farm/output/farm.wasm", farm::ContractBuilder); - - blockchain -} - -#[test] -fn add_liquidity_rs() { - world().run("scenarios/add_liquidity.scen.json"); -} - -#[test] -fn calculate_rewards_for_given_position_rs() { - world().run("scenarios/calculate_rewards_for_given_position.scen.json"); -} - -#[test] -fn calculate_rewards_for_given_position_after_compound_rs() { - world().run("scenarios/calculate_rewards_for_given_position_after_compound.scen.json"); -} - -#[test] -fn check_fee_disabled_after_swap_rs() { - world().run("scenarios/check_fee_disabled_after_swap.scen.json"); -} - -#[test] -fn check_fee_enabled_after_swap_rs() { - world().run("scenarios/check_fee_enabled_after_swap.scen.json"); -} - -#[test] -fn claim_rewards_rs() { - world().run("scenarios/claim_rewards.scen.json"); -} - -#[test] -fn complete_setup_rs() { - world().run("scenarios/complete_setup.scen.json"); -} - -#[test] -fn compound_rewards_rs() { - world().run("scenarios/compound_rewards.scen.json"); -} - -#[test] -fn create_pair_twice_rs() { - world().run("scenarios/create_pair_twice.scen.json"); -} - -#[test] -fn enter_farm_rs() { - world().run("scenarios/enter_farm.scen.json"); -} - -#[test] -fn enter_farm_with_merge_tokens_rs() { - world().run("scenarios/enter_farm_with_merge_tokens.scen.json"); -} - -#[test] -fn enter_mex_farm_rs() { - world().run("scenarios/enter_mex_farm.scen.json"); -} - -#[test] -fn exit_farm_rs() { - world().run("scenarios/exit_farm.scen.json"); -} - -#[test] -fn exit_farm_too_soon_rs() { - world().run("scenarios/exit_farm_too_soon.scen.json"); -} - -#[test] -fn exit_mex_farm_rs() { - world().run("scenarios/exit_mex_farm.scen.json"); -} - -#[test] -fn farm_reward_distr_scen_1_rs() { - world().run("scenarios/farm_reward_distr_scen_1.scen.json"); -} - -#[test] -fn farm_reward_distr_scen_2_rs() { - world().run("scenarios/farm_reward_distr_scen_2.scen.json"); -} - -#[test] -fn farm_reward_distr_scen_3_rs() { - world().run("scenarios/farm_reward_distr_scen_3.scen.json"); -} - -#[test] -fn farm_reward_distr_scen_4_rs() { - world().run("scenarios/farm_reward_distr_scen_4.scen.json"); -} - -#[test] -fn farm_with_egld_token_rs() { - world().run("scenarios/farm_with_egld_token.scen.json"); -} - -#[test] -fn farm_wrong_lp_token_rs() { - world().run("scenarios/farm_wrong_lp_token.scen.json"); -} - -#[test] -fn get_amounts_rs() { - world().run("scenarios/get_amounts.scen.json"); -} - -#[test] -fn get_amounts_no_liquidity_rs() { - world().run("scenarios/get_amounts_no_liquidity.scen.json"); -} - -#[test] -fn get_pair_non_existent_rs() { - world().run("scenarios/get_pair_non_existent.scen.json"); -} - -#[test] -fn get_pair_views_rs() { - world().run("scenarios/get_pair_views.scen.json"); -} - -#[test] -fn merge_tokens_rs() { - world().run("scenarios/merge_tokens.scen.json"); -} - -#[test] -fn owner_pause_farm_rs() { - world().run("scenarios/owner_pause_farm.scen.json"); -} - -#[test] -fn owner_resume_farm_rs() { - world().run("scenarios/owner_resume_farm.scen.json"); -} - -#[test] -fn remove_liquidity_rs() { - world().run("scenarios/remove_liquidity.scen.json"); -} - -#[test] -fn remove_liquidity_and_buyback_and_burn_token_rs() { - world().run("scenarios/remove_liquidity_and_buyback_and_burn_token.scen.json"); -} - -#[test] -fn remove_liquidity_twice_rs() { - world().run("scenarios/remove_liquidity_twice.scen.json"); -} - -#[test] -fn remove_pair_rs() { - world().run("scenarios/remove_pair.scen.json"); -} - -#[test] -fn router_pause_self_rs() { - world().run("scenarios/router_pause_self.scen.json"); -} - -#[test] -fn router_resume_self_rs() { - world().run("scenarios/router_resume_self.scen.json"); -} - -#[test] -fn swap_fixed_input_rs() { - world().run("scenarios/swap_fixed_input.scen.json"); -} - -#[test] -fn swap_fixed_input_after_removed_liquidity_rs() { - world().run("scenarios/swap_fixed_input_after_removed_liquidity.scen.json"); -} - -#[test] -fn swap_fixed_output_rs() { - world().run("scenarios/swap_fixed_output.scen.json"); -} - -#[test] -fn swap_same_token_rs() { - world().run("scenarios/swap_same_token.scen.json"); -} - -#[test] -fn swap_wrong_token_rs() { - world().run("scenarios/swap_wrong_token.scen.json"); -} - -#[test] -fn upgrade_contract_rs() { - world().run("scenarios/upgrade_contract.scen.json"); -} diff --git a/energy-integration/common-modules/energy-query/Cargo.toml b/energy-integration/common-modules/energy-query/Cargo.toml index 429ddafe2..bb7f02bc2 100644 --- a/energy-integration/common-modules/energy-query/Cargo.toml +++ b/energy-integration/common-modules/energy-query/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.energy-factory] diff --git a/energy-integration/common-modules/week-timekeeping/Cargo.toml b/energy-integration/common-modules/week-timekeeping/Cargo.toml index 32e16b01e..64a65bd3e 100644 --- a/energy-integration/common-modules/week-timekeeping/Cargo.toml +++ b/energy-integration/common-modules/week-timekeeping/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.common-types] diff --git a/energy-integration/common-modules/weekly-rewards-splitting/Cargo.toml b/energy-integration/common-modules/weekly-rewards-splitting/Cargo.toml index 0603f0084..df65be5b4 100644 --- a/energy-integration/common-modules/weekly-rewards-splitting/Cargo.toml +++ b/energy-integration/common-modules/weekly-rewards-splitting/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.energy-query] diff --git a/energy-integration/common-modules/weekly-rewards-splitting/src/base_impl.rs b/energy-integration/common-modules/weekly-rewards-splitting/src/base_impl.rs index c8579672d..de8783686 100644 --- a/energy-integration/common-modules/weekly-rewards-splitting/src/base_impl.rs +++ b/energy-integration/common-modules/weekly-rewards-splitting/src/base_impl.rs @@ -3,16 +3,32 @@ multiversx_sc::imports!(); use common_types::PaymentsVec; use week_timekeeping::Week; -use crate::{events, ClaimProgress}; +use crate::{ + events, global_info::WeeklyRewardsGlobalInfo, + update_claim_progress_energy::UpdateClaimProgressEnergyModule, ClaimProgress, +}; -pub trait AllBaseWeeklyRewardsSplittingImplTraits = +pub trait AllBaseWeeklyRewardsSplittingImplTraits: crate::WeeklyRewardsSplittingModule + + energy_query::EnergyQueryModule + + week_timekeeping::WeekTimekeepingModule + + crate::global_info::WeeklyRewardsGlobalInfo + + crate::locked_token_buckets::WeeklyRewardsLockedTokenBucketsModule + + events::WeeklyRewardsSplittingEventsModule + + crate::update_claim_progress_energy::UpdateClaimProgressEnergyModule +{ +} + +impl AllBaseWeeklyRewardsSplittingImplTraits for T where + T: crate::WeeklyRewardsSplittingModule + energy_query::EnergyQueryModule + week_timekeeping::WeekTimekeepingModule + crate::global_info::WeeklyRewardsGlobalInfo + crate::locked_token_buckets::WeeklyRewardsLockedTokenBucketsModule + events::WeeklyRewardsSplittingEventsModule - + crate::update_claim_progress_energy::UpdateClaimProgressEnergyModule; + + crate::update_claim_progress_energy::UpdateClaimProgressEnergyModule +{ +} pub trait WeeklyRewardsSplittingTraitsModule { type WeeklyRewardsSplittingMod: AllBaseWeeklyRewardsSplittingImplTraits; diff --git a/energy-integration/common-modules/weekly-rewards-splitting/src/lib.rs b/energy-integration/common-modules/weekly-rewards-splitting/src/lib.rs index 9268023bd..456bf60d2 100644 --- a/energy-integration/common-modules/weekly-rewards-splitting/src/lib.rs +++ b/energy-integration/common-modules/weekly-rewards-splitting/src/lib.rs @@ -1,6 +1,4 @@ #![no_std] -#![feature(trait_alias)] -#![feature(int_roundings)] multiversx_sc::imports!(); multiversx_sc::derive_imports!(); diff --git a/energy-integration/common-types/Cargo.toml b/energy-integration/common-types/Cargo.toml index b2ba8bc79..09dd6ccec 100644 --- a/energy-integration/common-types/Cargo.toml +++ b/energy-integration/common-types/Cargo.toml @@ -8,5 +8,5 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] diff --git a/energy-integration/energy-factory-mock/Cargo.toml b/energy-integration/energy-factory-mock/Cargo.toml index 6e246e8fb..56ee42be8 100644 --- a/energy-integration/energy-factory-mock/Cargo.toml +++ b/energy-integration/energy-factory-mock/Cargo.toml @@ -12,8 +12,8 @@ path = "src/lib.rs" path = "../common-modules/energy-query" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/energy-integration/energy-factory-mock/meta/Cargo.toml b/energy-integration/energy-factory-mock/meta/Cargo.toml index 94241670d..684df0109 100644 --- a/energy-integration/energy-factory-mock/meta/Cargo.toml +++ b/energy-integration/energy-factory-mock/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.energy-factory-mock] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/energy-integration/energy-factory-mock/meta/src/main.rs b/energy-integration/energy-factory-mock/meta/src/main.rs index ac08ec4b7..3866ddff7 100644 --- a/energy-integration/energy-factory-mock/meta/src/main.rs +++ b/energy-integration/energy-factory-mock/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/energy-integration/energy-factory-mock/src/lib.rs b/energy-integration/energy-factory-mock/src/lib.rs index d3354e67e..9ed54cc6c 100644 --- a/energy-integration/energy-factory-mock/src/lib.rs +++ b/energy-integration/energy-factory-mock/src/lib.rs @@ -17,7 +17,7 @@ pub trait EnergyFactoryMock { total_locked_tokens: BigUint, ) { let current_epoch = self.blockchain().get_block_epoch(); - self.user_energy(&user).set(&Energy::new( + self.user_energy(&user).set(Energy::new( BigInt::from(energy_amount), current_epoch, total_locked_tokens, diff --git a/energy-integration/energy-factory-mock/wasm/Cargo.lock b/energy-integration/energy-factory-mock/wasm/Cargo.lock index 0693d6d5f..48c436487 100644 --- a/energy-integration/energy-factory-mock/wasm/Cargo.lock +++ b/energy-integration/energy-factory-mock/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common_errors" @@ -128,32 +128,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -163,9 +165,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -176,18 +178,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -203,27 +205,27 @@ dependencies = [ [[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 = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -263,9 +265,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -278,6 +280,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/energy-integration/energy-factory-mock/wasm/Cargo.toml b/energy-integration/energy-factory-mock/wasm/Cargo.toml index 426c4c9f0..49b7fc839 100644 --- a/energy-integration/energy-factory-mock/wasm/Cargo.toml +++ b/energy-integration/energy-factory-mock/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.energy-factory-mock] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/energy-integration/energy-factory-mock/wasm/src/lib.rs b/energy-integration/energy-factory-mock/wasm/src/lib.rs index c52b88848..400849b5a 100644 --- a/energy-integration/energy-factory-mock/wasm/src/lib.rs +++ b/energy-integration/energy-factory-mock/wasm/src/lib.rs @@ -10,8 +10,6 @@ // Total number of exported functions: 6 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/energy-integration/energy-update/Cargo.toml b/energy-integration/energy-update/Cargo.toml index 01489f0d7..58f7627f4 100644 --- a/energy-integration/energy-update/Cargo.toml +++ b/energy-integration/energy-update/Cargo.toml @@ -9,11 +9,11 @@ publish = false path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dependencies.farm] path = "../../dex/farm" @@ -25,4 +25,4 @@ path = "../common-modules/weekly-rewards-splitting" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/energy-integration/energy-update/meta/Cargo.toml b/energy-integration/energy-update/meta/Cargo.toml index aa816ac82..245463e6b 100644 --- a/energy-integration/energy-update/meta/Cargo.toml +++ b/energy-integration/energy-update/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.energy-update] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/energy-integration/energy-update/meta/src/main.rs b/energy-integration/energy-update/meta/src/main.rs index d1938e1aa..0dd45d8fd 100644 --- a/energy-integration/energy-update/meta/src/main.rs +++ b/energy-integration/energy-update/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/energy-integration/energy-update/src/lib.rs b/energy-integration/energy-update/src/lib.rs index a8e10213f..6cb9a7520 100644 --- a/energy-integration/energy-update/src/lib.rs +++ b/energy-integration/energy-update/src/lib.rs @@ -9,7 +9,7 @@ pub trait EnergyUpdate { #[init] fn init(&self) {} - #[endpoint] + #[upgrade] fn upgrade(&self) {} #[endpoint(updateFarmsEnergyForUser)] diff --git a/energy-integration/energy-update/wasm/Cargo.lock b/energy-integration/energy-update/wasm/Cargo.lock index 10f9a5d46..7605736c6 100644 --- a/energy-integration/energy-update/wasm/Cargo.lock +++ b/energy-integration/energy-update/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -303,32 +303,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -338,9 +340,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -351,18 +353,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -378,9 +380,9 @@ dependencies = [ [[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", ] @@ -421,18 +423,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -487,9 +489,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -519,6 +521,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/energy-integration/energy-update/wasm/Cargo.toml b/energy-integration/energy-update/wasm/Cargo.toml index 399b3a678..0c9dd6013 100644 --- a/energy-integration/energy-update/wasm/Cargo.toml +++ b/energy-integration/energy-update/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.energy-update] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/energy-integration/energy-update/wasm/src/lib.rs b/energy-integration/energy-update/wasm/src/lib.rs index b4de939ec..7d5e5998a 100644 --- a/energy-integration/energy-update/wasm/src/lib.rs +++ b/energy-integration/energy-update/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 2 +// Upgrade: 1 +// Endpoints: 1 // Async Callback (empty): 1 // Total number of exported functions: 4 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/energy-integration/farm-boosted-yields/Cargo.toml b/energy-integration/farm-boosted-yields/Cargo.toml index 5a75c8b80..e3e8bb0c0 100644 --- a/energy-integration/farm-boosted-yields/Cargo.toml +++ b/energy-integration/farm-boosted-yields/Cargo.toml @@ -8,7 +8,7 @@ edition = "2021" path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.config] diff --git a/energy-integration/fees-collector/Cargo.toml b/energy-integration/fees-collector/Cargo.toml index 1b233b7f6..df169e2c7 100644 --- a/energy-integration/fees-collector/Cargo.toml +++ b/energy-integration/fees-collector/Cargo.toml @@ -9,11 +9,11 @@ publish = false path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dependencies.energy-query] path = "../common-modules/energy-query" @@ -49,7 +49,7 @@ path = "../../common/common_errors" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.sc_whitelist_module] path = "../../common/modules/sc_whitelist_module" diff --git a/energy-integration/fees-collector/meta/Cargo.toml b/energy-integration/fees-collector/meta/Cargo.toml index c91986348..4a593cb5d 100644 --- a/energy-integration/fees-collector/meta/Cargo.toml +++ b/energy-integration/fees-collector/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.fees-collector] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/energy-integration/fees-collector/meta/src/main.rs b/energy-integration/fees-collector/meta/src/main.rs index bb6376b4d..6be62c753 100644 --- a/energy-integration/fees-collector/meta/src/main.rs +++ b/energy-integration/fees-collector/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/energy-integration/fees-collector/src/lib.rs b/energy-integration/fees-collector/src/lib.rs index b5a37d7fb..e78ed6812 100644 --- a/energy-integration/fees-collector/src/lib.rs +++ b/energy-integration/fees-collector/src/lib.rs @@ -44,7 +44,7 @@ pub trait FeesCollector: self.energy_factory_address().set(&energy_factory_address); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} #[endpoint(claimRewards)] diff --git a/energy-integration/fees-collector/wasm/Cargo.lock b/energy-integration/fees-collector/wasm/Cargo.lock index d31ccf2dc..c3f84ed93 100644 --- a/energy-integration/fees-collector/wasm/Cargo.lock +++ b/energy-integration/fees-collector/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -154,32 +154,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -189,9 +191,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -202,18 +204,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -229,27 +231,27 @@ dependencies = [ [[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 = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -289,9 +291,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -304,6 +306,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/energy-integration/fees-collector/wasm/Cargo.toml b/energy-integration/fees-collector/wasm/Cargo.toml index 67ff1cdc8..6c004828a 100644 --- a/energy-integration/fees-collector/wasm/Cargo.toml +++ b/energy-integration/fees-collector/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.fees-collector] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/energy-integration/fees-collector/wasm/src/lib.rs b/energy-integration/fees-collector/wasm/src/lib.rs index 75812bfb1..283f21a67 100644 --- a/energy-integration/fees-collector/wasm/src/lib.rs +++ b/energy-integration/fees-collector/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 39 +// Upgrade: 1 +// Endpoints: 38 // Async Callback (empty): 1 // Total number of exported functions: 41 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/energy-integration/governance-v2/Cargo.toml b/energy-integration/governance-v2/Cargo.toml index 1b190cd64..4ebea1437 100644 --- a/energy-integration/governance-v2/Cargo.toml +++ b/energy-integration/governance-v2/Cargo.toml @@ -12,7 +12,7 @@ path = "src/lib.rs" path = "../common-modules/energy-query" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.permissions_module] @@ -28,7 +28,7 @@ path = "../common-modules/weekly-rewards-splitting" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.energy-factory-mock] path = "../energy-factory-mock" diff --git a/energy-integration/governance-v2/meta/Cargo.toml b/energy-integration/governance-v2/meta/Cargo.toml index ca5a80d29..b0f3544fe 100644 --- a/energy-integration/governance-v2/meta/Cargo.toml +++ b/energy-integration/governance-v2/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.governance-v2] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/energy-integration/governance-v2/meta/src/main.rs b/energy-integration/governance-v2/meta/src/main.rs index 6b82b6292..f4db3e0b9 100644 --- a/energy-integration/governance-v2/meta/src/main.rs +++ b/energy-integration/governance-v2/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/energy-integration/governance-v2/src/configurable.rs b/energy-integration/governance-v2/src/configurable.rs index 12751ce7f..06c394730 100644 --- a/energy-integration/governance-v2/src/configurable.rs +++ b/energy-integration/governance-v2/src/configurable.rs @@ -28,8 +28,6 @@ multiversx_sc::imports!(); /// /// Please note that although the main contract can modify the module's storage directly, it is not recommended to do so, /// as that defeats the whole purpose of having governance. These parameters should only be modified through actions. -/// - const MIN_VOTING_DELAY: u64 = 1; const MAX_VOTING_DELAY: u64 = 100_800; // 1 Week const MIN_VOTING_PERIOD: u64 = 14_400; // 24 Hours diff --git a/energy-integration/governance-v2/src/lib.rs b/energy-integration/governance-v2/src/lib.rs index 0fcb53dca..2014b3a53 100644 --- a/energy-integration/governance-v2/src/lib.rs +++ b/energy-integration/governance-v2/src/lib.rs @@ -61,7 +61,7 @@ pub trait GovernanceV2: self.try_change_fee_token_id(fee_token); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} /// Propose a list of actions. diff --git a/energy-integration/governance-v2/tests/gov_test_setup/mod.rs b/energy-integration/governance-v2/tests/gov_test_setup/mod.rs index 489fec3b3..b461d2faa 100644 --- a/energy-integration/governance-v2/tests/gov_test_setup/mod.rs +++ b/energy-integration/governance-v2/tests/gov_test_setup/mod.rs @@ -35,6 +35,7 @@ pub const USER_ENERGY: u64 = 1_000_000; pub const GAS_LIMIT: u64 = 1_000_000; #[derive(Clone)] +#[allow(dead_code)] pub struct Payment { pub token: Vec, pub nonce: u64, diff --git a/energy-integration/governance-v2/wasm/Cargo.lock b/energy-integration/governance-v2/wasm/Cargo.lock index 71cf78cfd..b98562812 100644 --- a/energy-integration/governance-v2/wasm/Cargo.lock +++ b/energy-integration/governance-v2/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -165,32 +165,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -200,9 +202,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -213,18 +215,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -240,9 +242,9 @@ dependencies = [ [[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", ] @@ -258,18 +260,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -309,9 +311,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -324,6 +326,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/energy-integration/governance-v2/wasm/Cargo.toml b/energy-integration/governance-v2/wasm/Cargo.toml index 02189aabe..59d23c81c 100644 --- a/energy-integration/governance-v2/wasm/Cargo.toml +++ b/energy-integration/governance-v2/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.governance-v2] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/energy-integration/governance-v2/wasm/src/lib.rs b/energy-integration/governance-v2/wasm/src/lib.rs index bb977bc97..0211fca5a 100644 --- a/energy-integration/governance-v2/wasm/src/lib.rs +++ b/energy-integration/governance-v2/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 30 +// Upgrade: 1 +// Endpoints: 29 // Async Callback (empty): 1 // Total number of exported functions: 32 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/farm-staking/farm-staking-nft/Cargo.toml b/farm-staking/farm-staking-nft/Cargo.toml index e8fbd6b46..7ac8ab0d2 100644 --- a/farm-staking/farm-staking-nft/Cargo.toml +++ b/farm-staking/farm-staking-nft/Cargo.toml @@ -75,14 +75,14 @@ path = "../../common/common_structs" path = "../../common/common_errors" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/farm-staking/farm-staking-nft/meta/Cargo.toml b/farm-staking/farm-staking-nft/meta/Cargo.toml index ebc5a504d..5647e5efd 100644 --- a/farm-staking/farm-staking-nft/meta/Cargo.toml +++ b/farm-staking/farm-staking-nft/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.farm-staking-nft] path = ".." -[dependencies.multiversx-sc-meta] -version = "=0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "=0.53.2" default-features = false diff --git a/farm-staking/farm-staking-nft/meta/src/main.rs b/farm-staking/farm-staking-nft/meta/src/main.rs index 87ca7a010..f0579bafc 100644 --- a/farm-staking/farm-staking-nft/meta/src/main.rs +++ b/farm-staking/farm-staking-nft/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/farm-staking/farm-staking-nft/src/farm_hooks/call_hook.rs b/farm-staking/farm-staking-nft/src/farm_hooks/call_hook.rs index a54038f6a..d58ca2386 100644 --- a/farm-staking/farm-staking-nft/src/farm_hooks/call_hook.rs +++ b/farm-staking/farm-staking-nft/src/farm_hooks/call_hook.rs @@ -28,6 +28,7 @@ pub trait CallHookModule { let mut output_payments = input_payments; for hook in &hooks { + #[allow(deprecated)] let (_, back_transfers) = ContractCallNoPayment::<_, MultiValueEncoded>::new( hook.dest_address, diff --git a/farm-staking/farm-staking-nft/src/lib.rs b/farm-staking/farm-staking-nft/src/lib.rs index 4dfbcb741..1992b9072 100644 --- a/farm-staking/farm-staking-nft/src/lib.rs +++ b/farm-staking/farm-staking-nft/src/lib.rs @@ -1,6 +1,5 @@ #![no_std] #![allow(clippy::from_over_into)] -#![feature(trait_alias)] multiversx_sc::imports!(); multiversx_sc::derive_imports!(); @@ -101,7 +100,7 @@ pub trait FarmStaking: self.banned_addresses().add(&sc_address); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} #[payable("*")] diff --git a/farm-staking/farm-staking-nft/wasm/Cargo.lock b/farm-staking/farm-staking-nft/wasm/Cargo.lock index c9ae5c457..1c0dc34c1 100644 --- a/farm-staking/farm-staking-nft/wasm/Cargo.lock +++ b/farm-staking/farm-staking-nft/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -323,32 +323,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -358,9 +360,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -371,18 +373,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -398,9 +400,9 @@ dependencies = [ [[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", ] @@ -441,18 +443,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -507,9 +509,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -539,6 +541,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/farm-staking/farm-staking-nft/wasm/Cargo.toml b/farm-staking/farm-staking-nft/wasm/Cargo.toml index 5510f4302..b1945b150 100644 --- a/farm-staking/farm-staking-nft/wasm/Cargo.toml +++ b/farm-staking/farm-staking-nft/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.farm-staking-nft] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/farm-staking/farm-staking-nft/wasm/src/lib.rs b/farm-staking/farm-staking-nft/wasm/src/lib.rs index 4ecb0f2cd..16192bb50 100644 --- a/farm-staking/farm-staking-nft/wasm/src/lib.rs +++ b/farm-staking/farm-staking-nft/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 73 +// Upgrade: 1 +// Endpoints: 72 // Async Callback: 1 // Total number of exported functions: 75 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/farm-staking/farm-staking-proxy/Cargo.toml b/farm-staking/farm-staking-proxy/Cargo.toml index 7e986d221..34ee079f9 100644 --- a/farm-staking/farm-staking-proxy/Cargo.toml +++ b/farm-staking/farm-staking-proxy/Cargo.toml @@ -12,11 +12,11 @@ path = "src/lib.rs" hex-literal = "0.3.1" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dependencies.farm] path = "../../dex/farm" @@ -67,7 +67,7 @@ path = "../../energy-integration/common-modules/energy-query" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.farm_token] path = "../../common/modules/farm/farm_token" diff --git a/farm-staking/farm-staking-proxy/meta/Cargo.toml b/farm-staking/farm-staking-proxy/meta/Cargo.toml index f0a036136..87fda1b2f 100644 --- a/farm-staking/farm-staking-proxy/meta/Cargo.toml +++ b/farm-staking/farm-staking-proxy/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.farm-staking-proxy] path = ".." -[dependencies.multiversx-sc-meta] -version = "=0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "=0.53.2" default-features = false diff --git a/farm-staking/farm-staking-proxy/meta/src/main.rs b/farm-staking/farm-staking-proxy/meta/src/main.rs index 3d6b55dbc..ba0dc8fa3 100644 --- a/farm-staking/farm-staking-proxy/meta/src/main.rs +++ b/farm-staking/farm-staking-proxy/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/farm-staking/farm-staking-proxy/src/external_contracts_interactions.rs b/farm-staking/farm-staking-proxy/src/external_contracts_interactions.rs index c3be2b229..fef30b8a8 100644 --- a/farm-staking/farm-staking-proxy/src/external_contracts_interactions.rs +++ b/farm-staking/farm-staking-proxy/src/external_contracts_interactions.rs @@ -34,7 +34,7 @@ pub trait ExternalContractsInteractionsModule: let lp_farm_address = self.lp_farm_address().get(); let lp_farm_result: ClaimRewardsResultType = self .lp_farm_proxy_obj(lp_farm_address) - .claim_rewards_endpoint(orig_caller) + .claim_rewards_endpoint(OptionalValue::Some(orig_caller)) .with_esdt_transfer((lp_farm_token_id, lp_farm_token_nonce, lp_farm_token_amount)) .execute_on_dest_context(); let (new_lp_farm_tokens, lp_farm_rewards) = lp_farm_result.into_tuple(); @@ -55,7 +55,7 @@ pub trait ExternalContractsInteractionsModule: let lp_farm_address = self.lp_farm_address().get(); let exit_farm_result: ExitFarmWithPartialPosResultType = self .lp_farm_proxy_obj(lp_farm_address) - .exit_farm_endpoint(orig_caller) + .exit_farm_endpoint(OptionalValue::Some(orig_caller)) .with_esdt_transfer((lp_farm_token_id, lp_farm_token_nonce, lp_farm_token_amount)) .execute_on_dest_context(); let (lp_tokens, lp_farm_rewards) = exit_farm_result.into_tuple(); @@ -82,7 +82,7 @@ pub trait ExternalContractsInteractionsModule: let lp_farm_address = self.lp_farm_address().get(); self.lp_farm_proxy_obj(lp_farm_address) - .merge_farm_tokens_endpoint(orig_caller) + .merge_farm_tokens_endpoint(OptionalValue::Some(orig_caller)) .with_multi_token_transfer(additional_lp_farm_tokens) .execute_on_dest_context() } diff --git a/farm-staking/farm-staking-proxy/src/lib.rs b/farm-staking/farm-staking-proxy/src/lib.rs index bd8ef7013..7bfc66bab 100644 --- a/farm-staking/farm-staking-proxy/src/lib.rs +++ b/farm-staking/farm-staking-proxy/src/lib.rs @@ -58,6 +58,6 @@ pub trait FarmStakingProxy: self.lp_token_id().set_if_empty(&lp_token_id); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} } diff --git a/farm-staking/farm-staking-proxy/wasm/Cargo.lock b/farm-staking/farm-staking-proxy/wasm/Cargo.lock index e846e0713..22db51431 100644 --- a/farm-staking/farm-staking-proxy/wasm/Cargo.lock +++ b/farm-staking/farm-staking-proxy/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -385,32 +385,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal 0.4.1", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -420,9 +422,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -433,18 +435,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -460,9 +462,9 @@ dependencies = [ [[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", ] @@ -503,18 +505,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -569,9 +571,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -601,6 +603,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/farm-staking/farm-staking-proxy/wasm/Cargo.toml b/farm-staking/farm-staking-proxy/wasm/Cargo.toml index b95744497..dc496fd7e 100644 --- a/farm-staking/farm-staking-proxy/wasm/Cargo.toml +++ b/farm-staking/farm-staking-proxy/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.farm-staking-proxy] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/farm-staking/farm-staking-proxy/wasm/src/lib.rs b/farm-staking/farm-staking-proxy/wasm/src/lib.rs index ee8a50b10..3f9abd0a4 100644 --- a/farm-staking/farm-staking-proxy/wasm/src/lib.rs +++ b/farm-staking/farm-staking-proxy/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 18 +// Upgrade: 1 +// Endpoints: 17 // Async Callback: 1 // Total number of exported functions: 20 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/farm-staking/farm-staking/Cargo.toml b/farm-staking/farm-staking/Cargo.toml index 11383675b..21cac3932 100644 --- a/farm-staking/farm-staking/Cargo.toml +++ b/farm-staking/farm-staking/Cargo.toml @@ -81,14 +81,14 @@ path = "../../common/common_errors" path = "../../common/modules/banned_addresses" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/farm-staking/farm-staking/meta/Cargo.toml b/farm-staking/farm-staking/meta/Cargo.toml index 5823c5c8a..bf809cbac 100644 --- a/farm-staking/farm-staking/meta/Cargo.toml +++ b/farm-staking/farm-staking/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.farm-staking] path = ".." -[dependencies.multiversx-sc-meta] -version = "=0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "=0.53.2" default-features = false diff --git a/farm-staking/farm-staking/meta/src/main.rs b/farm-staking/farm-staking/meta/src/main.rs index de7773d55..b7990d697 100644 --- a/farm-staking/farm-staking/meta/src/main.rs +++ b/farm-staking/farm-staking/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/farm-staking/farm-staking/src/base_impl_wrapper.rs b/farm-staking/farm-staking/src/base_impl_wrapper.rs index 2b671677f..357d2f048 100644 --- a/farm-staking/farm-staking/src/base_impl_wrapper.rs +++ b/farm-staking/farm-staking/src/base_impl_wrapper.rs @@ -9,15 +9,29 @@ use multiversx_sc_modules::transfer_role_proxy::PaymentsVec; use crate::token_attributes::StakingFarmTokenAttributes; -pub trait FarmStakingTraits = +pub trait FarmStakingTraits: crate::custom_rewards::CustomRewardsModule + + rewards::RewardsModule + + config::ConfigModule + + farm_token::FarmTokenModule + + pausable::PausableModule + + permissions_module::PermissionsModule + + multiversx_sc_modules::default_issue_callbacks::DefaultIssueCallbacksModule + + farm_boosted_yields::FarmBoostedYieldsModule +{ +} + +impl FarmStakingTraits for T where + T: crate::custom_rewards::CustomRewardsModule + rewards::RewardsModule + config::ConfigModule + farm_token::FarmTokenModule + pausable::PausableModule + permissions_module::PermissionsModule + multiversx_sc_modules::default_issue_callbacks::DefaultIssueCallbacksModule - + farm_boosted_yields::FarmBoostedYieldsModule; + + farm_boosted_yields::FarmBoostedYieldsModule +{ +} pub struct FarmStakingWrapper where diff --git a/farm-staking/farm-staking/src/farm_hooks/call_hook.rs b/farm-staking/farm-staking/src/farm_hooks/call_hook.rs index a54038f6a..d58ca2386 100644 --- a/farm-staking/farm-staking/src/farm_hooks/call_hook.rs +++ b/farm-staking/farm-staking/src/farm_hooks/call_hook.rs @@ -28,6 +28,7 @@ pub trait CallHookModule { let mut output_payments = input_payments; for hook in &hooks { + #[allow(deprecated)] let (_, back_transfers) = ContractCallNoPayment::<_, MultiValueEncoded>::new( hook.dest_address, diff --git a/farm-staking/farm-staking/src/lib.rs b/farm-staking/farm-staking/src/lib.rs index 739fe724b..37da09aba 100644 --- a/farm-staking/farm-staking/src/lib.rs +++ b/farm-staking/farm-staking/src/lib.rs @@ -1,6 +1,5 @@ #![no_std] #![allow(clippy::from_over_into)] -#![feature(trait_alias)] multiversx_sc::imports!(); multiversx_sc::derive_imports!(); @@ -96,7 +95,7 @@ pub trait FarmStaking: self.try_set_farm_position_migration_nonce(farm_token_mapper); } - #[endpoint] + #[upgrade] fn upgrade(&self) { let current_epoch = self.blockchain().get_block_epoch(); self.first_week_start_epoch().set_if_empty(current_epoch); diff --git a/farm-staking/farm-staking/wasm/Cargo.lock b/farm-staking/farm-staking/wasm/Cargo.lock index 824d1b8a9..7a83a77b3 100644 --- a/farm-staking/farm-staking/wasm/Cargo.lock +++ b/farm-staking/farm-staking/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -325,32 +325,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -360,9 +362,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -373,18 +375,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -400,9 +402,9 @@ dependencies = [ [[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", ] @@ -443,18 +445,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -509,9 +511,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -541,6 +543,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/farm-staking/farm-staking/wasm/Cargo.toml b/farm-staking/farm-staking/wasm/Cargo.toml index 0dbb347b9..9b6328d70 100644 --- a/farm-staking/farm-staking/wasm/Cargo.toml +++ b/farm-staking/farm-staking/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.farm-staking] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/farm-staking/farm-staking/wasm/src/lib.rs b/farm-staking/farm-staking/wasm/src/lib.rs index 8579ee7db..b2489f0d0 100644 --- a/farm-staking/farm-staking/wasm/src/lib.rs +++ b/farm-staking/farm-staking/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 75 +// Upgrade: 1 +// Endpoints: 74 // Async Callback: 1 // Total number of exported functions: 77 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/farm-staking/metabonding-staking/Cargo.toml b/farm-staking/metabonding-staking/Cargo.toml index de3c1ff97..61822eff9 100644 --- a/farm-staking/metabonding-staking/Cargo.toml +++ b/farm-staking/metabonding-staking/Cargo.toml @@ -9,11 +9,11 @@ publish = false path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dependencies.factory] path = "../../locked-asset/factory" @@ -22,7 +22,7 @@ path = "../../locked-asset/factory" num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.common_structs] path = "../../common/common_structs" diff --git a/farm-staking/metabonding-staking/meta/Cargo.toml b/farm-staking/metabonding-staking/meta/Cargo.toml index 71df2c0ba..db0316656 100644 --- a/farm-staking/metabonding-staking/meta/Cargo.toml +++ b/farm-staking/metabonding-staking/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.metabonding-staking] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/farm-staking/metabonding-staking/meta/src/main.rs b/farm-staking/metabonding-staking/meta/src/main.rs index 481297930..68dc59c5b 100644 --- a/farm-staking/metabonding-staking/meta/src/main.rs +++ b/farm-staking/metabonding-staking/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/farm-staking/metabonding-staking/src/lib.rs b/farm-staking/metabonding-staking/src/lib.rs index 94be22193..d15ce3c90 100644 --- a/farm-staking/metabonding-staking/src/lib.rs +++ b/farm-staking/metabonding-staking/src/lib.rs @@ -26,7 +26,7 @@ pub trait MetabondingStaking: .set_if_empty(&locked_asset_factory_address); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} #[payable("*")] diff --git a/farm-staking/metabonding-staking/wasm/Cargo.lock b/farm-staking/metabonding-staking/wasm/Cargo.lock index 739fec429..120807605 100644 --- a/farm-staking/metabonding-staking/wasm/Cargo.lock +++ b/farm-staking/metabonding-staking/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "cfg-if" @@ -170,32 +170,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -205,9 +207,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -218,18 +220,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -245,27 +247,27 @@ dependencies = [ [[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 = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -305,9 +307,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -337,6 +339,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/farm-staking/metabonding-staking/wasm/Cargo.toml b/farm-staking/metabonding-staking/wasm/Cargo.toml index fe2a7c6c2..3e6162e7d 100644 --- a/farm-staking/metabonding-staking/wasm/Cargo.toml +++ b/farm-staking/metabonding-staking/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.metabonding-staking] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/farm-staking/metabonding-staking/wasm/src/lib.rs b/farm-staking/metabonding-staking/wasm/src/lib.rs index b8e948d22..22b6f6de2 100644 --- a/farm-staking/metabonding-staking/wasm/src/lib.rs +++ b/farm-staking/metabonding-staking/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 11 +// Upgrade: 1 +// Endpoints: 10 // Async Callback (empty): 1 // Total number of exported functions: 13 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/locked-asset/Cargo.toml b/locked-asset/Cargo.toml index d7ba66a4c..20bb7f2db 100644 --- a/locked-asset/Cargo.toml +++ b/locked-asset/Cargo.toml @@ -5,7 +5,7 @@ edition = "2021" publish = false [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.farm] @@ -50,7 +50,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/locked-asset/distribution/Cargo.toml b/locked-asset/distribution/Cargo.toml index 3ebf0939b..bf9655499 100644 --- a/locked-asset/distribution/Cargo.toml +++ b/locked-asset/distribution/Cargo.toml @@ -14,8 +14,8 @@ path = "../../common/common_structs" path = "../factory" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/locked-asset/distribution/meta/Cargo.toml b/locked-asset/distribution/meta/Cargo.toml index 76c13747b..973e79b00 100644 --- a/locked-asset/distribution/meta/Cargo.toml +++ b/locked-asset/distribution/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.distribution] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/locked-asset/distribution/meta/src/main.rs b/locked-asset/distribution/meta/src/main.rs index 5dc92d871..40a5fd883 100644 --- a/locked-asset/distribution/meta/src/main.rs +++ b/locked-asset/distribution/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/locked-asset/distribution/src/lib.rs b/locked-asset/distribution/src/lib.rs index 93187154e..b996701df 100644 --- a/locked-asset/distribution/src/lib.rs +++ b/locked-asset/distribution/src/lib.rs @@ -47,7 +47,7 @@ pub trait Distribution: global_op::GlobalOperationModule { .set_if_empty(&locked_asset_factory_address); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} #[only_owner] diff --git a/locked-asset/distribution/wasm/Cargo.lock b/locked-asset/distribution/wasm/Cargo.lock index fce0d3ebe..74b7197b0 100644 --- a/locked-asset/distribution/wasm/Cargo.lock +++ b/locked-asset/distribution/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "cfg-if" @@ -170,32 +170,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -205,9 +207,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -218,18 +220,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -245,27 +247,27 @@ dependencies = [ [[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 = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -305,9 +307,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -337,6 +339,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/locked-asset/distribution/wasm/Cargo.toml b/locked-asset/distribution/wasm/Cargo.toml index f1cc0ae57..5012013d1 100644 --- a/locked-asset/distribution/wasm/Cargo.toml +++ b/locked-asset/distribution/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.distribution] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/locked-asset/distribution/wasm/src/lib.rs b/locked-asset/distribution/wasm/src/lib.rs index 87c728bb7..4f919ac08 100644 --- a/locked-asset/distribution/wasm/src/lib.rs +++ b/locked-asset/distribution/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 16 +// Upgrade: 1 +// Endpoints: 15 // Async Callback (empty): 1 // Total number of exported functions: 18 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/locked-asset/energy-factory/Cargo.toml b/locked-asset/energy-factory/Cargo.toml index 74e3cbea9..feb1470b4 100644 --- a/locked-asset/energy-factory/Cargo.toml +++ b/locked-asset/energy-factory/Cargo.toml @@ -33,11 +33,11 @@ path = "../../common/traits/unwrappable" path = "../../common/modules/legacy_token_decode_module" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies] num-bigint = "0.4.2" @@ -45,4 +45,4 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/locked-asset/energy-factory/meta/Cargo.toml b/locked-asset/energy-factory/meta/Cargo.toml index 6365191f0..0f95b5590 100644 --- a/locked-asset/energy-factory/meta/Cargo.toml +++ b/locked-asset/energy-factory/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.energy-factory] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/locked-asset/energy-factory/meta/src/main.rs b/locked-asset/energy-factory/meta/src/main.rs index 2eca0970a..74eed8b7c 100644 --- a/locked-asset/energy-factory/meta/src/main.rs +++ b/locked-asset/energy-factory/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/locked-asset/energy-factory/src/lib.rs b/locked-asset/energy-factory/src/lib.rs index d146566d6..f38c2e0e7 100644 --- a/locked-asset/energy-factory/src/lib.rs +++ b/locked-asset/energy-factory/src/lib.rs @@ -91,7 +91,7 @@ pub trait SimpleLockEnergy: self.set_paused(true); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} /// Locks a whitelisted token until `unlock_epoch` and receive meta ESDT LOCKED tokens diff --git a/locked-asset/energy-factory/wasm/Cargo.lock b/locked-asset/energy-factory/wasm/Cargo.lock index b7f42af38..058896ac8 100644 --- a/locked-asset/energy-factory/wasm/Cargo.lock +++ b/locked-asset/energy-factory/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common_errors" @@ -112,32 +112,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -147,9 +149,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -160,18 +162,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -187,27 +189,27 @@ dependencies = [ [[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 = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -247,9 +249,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -262,6 +264,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/locked-asset/energy-factory/wasm/Cargo.toml b/locked-asset/energy-factory/wasm/Cargo.toml index 944055b38..f66b75da6 100644 --- a/locked-asset/energy-factory/wasm/Cargo.toml +++ b/locked-asset/energy-factory/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.energy-factory] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/locked-asset/energy-factory/wasm/src/lib.rs b/locked-asset/energy-factory/wasm/src/lib.rs index 7393a9e97..fafdc534e 100644 --- a/locked-asset/energy-factory/wasm/src/lib.rs +++ b/locked-asset/energy-factory/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 34 +// Upgrade: 1 +// Endpoints: 33 // Async Callback: 1 // Total number of exported functions: 36 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/locked-asset/factory/Cargo.toml b/locked-asset/factory/Cargo.toml index 6996881d1..a25bc6a78 100644 --- a/locked-asset/factory/Cargo.toml +++ b/locked-asset/factory/Cargo.toml @@ -26,11 +26,11 @@ path = "../../common/modules/token_merge_helper" path = "../energy-factory" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dependencies.arrayvec] version = "0.7.1" @@ -49,4 +49,4 @@ hex = "0.4" path = "../simple-lock" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/locked-asset/factory/meta/Cargo.toml b/locked-asset/factory/meta/Cargo.toml index d81d3bb85..2729e2b36 100644 --- a/locked-asset/factory/meta/Cargo.toml +++ b/locked-asset/factory/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.factory] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/locked-asset/factory/meta/src/main.rs b/locked-asset/factory/meta/src/main.rs index db03496aa..159d4dcaa 100644 --- a/locked-asset/factory/meta/src/main.rs +++ b/locked-asset/factory/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/locked-asset/factory/src/lib.rs b/locked-asset/factory/src/lib.rs index d8de993b4..bd27c4752 100644 --- a/locked-asset/factory/src/lib.rs +++ b/locked-asset/factory/src/lib.rs @@ -1,5 +1,4 @@ #![no_std] -#![feature(exact_size_is_empty)] mod attr_ex_helper; mod cache; @@ -63,7 +62,7 @@ pub trait LockedAssetFactory: self.set_paused(true); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} fn set_extended_attributes_activation_nonce(&self, is_sc_upgrade: bool) { diff --git a/locked-asset/factory/src/locked_asset_token_merge.rs b/locked-asset/factory/src/locked_asset_token_merge.rs index 995d13528..00d19b7cf 100644 --- a/locked-asset/factory/src/locked_asset_token_merge.rs +++ b/locked-asset/factory/src/locked_asset_token_merge.rs @@ -27,7 +27,7 @@ pub trait LockedAssetTokenMergeModule: let payments_iter = payments_vec.iter(); let (amount, attrs) = - self.get_merged_locked_asset_token_amount_and_attributes(payments_iter.clone()); + self.get_merged_locked_asset_token_amount_and_attributes(&payments_vec); self.burn_tokens_from_payments(payments_iter); @@ -47,7 +47,7 @@ pub trait LockedAssetTokenMergeModule: fn get_merged_locked_asset_token_amount_and_attributes( &self, - payments: ManagedVecRefIterator>, + payments: &ManagedVec, ) -> (BigUint, LockedAssetTokenAttributesEx) { require!(!payments.is_empty(), "Cannot merge with 0 tokens"); diff --git a/locked-asset/factory/wasm/Cargo.lock b/locked-asset/factory/wasm/Cargo.lock index 39d478ef4..8d9bfc9d1 100644 --- a/locked-asset/factory/wasm/Cargo.lock +++ b/locked-asset/factory/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "cfg-if" @@ -161,32 +161,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -196,9 +198,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -209,18 +211,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -236,27 +238,27 @@ dependencies = [ [[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 = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -296,9 +298,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -328,6 +330,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/locked-asset/factory/wasm/Cargo.toml b/locked-asset/factory/wasm/Cargo.toml index eb8c084a5..9b9edbd0c 100644 --- a/locked-asset/factory/wasm/Cargo.toml +++ b/locked-asset/factory/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.factory] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/locked-asset/factory/wasm/src/lib.rs b/locked-asset/factory/wasm/src/lib.rs index 7ad9e4ac0..8b83df95b 100644 --- a/locked-asset/factory/wasm/src/lib.rs +++ b/locked-asset/factory/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 25 +// Upgrade: 1 +// Endpoints: 24 // Async Callback: 1 // Total number of exported functions: 27 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/locked-asset/lkmex-transfer/Cargo.toml b/locked-asset/lkmex-transfer/Cargo.toml index a6fb9ca95..9ba8540ae 100644 --- a/locked-asset/lkmex-transfer/Cargo.toml +++ b/locked-asset/lkmex-transfer/Cargo.toml @@ -30,14 +30,14 @@ path = "../energy-factory" path = "../../energy-integration/common-modules/energy-query" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dev-dependencies] num-bigint = "0.4.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" diff --git a/locked-asset/lkmex-transfer/meta/Cargo.toml b/locked-asset/lkmex-transfer/meta/Cargo.toml index e0c0588d1..c288344c0 100644 --- a/locked-asset/lkmex-transfer/meta/Cargo.toml +++ b/locked-asset/lkmex-transfer/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.lkmex-transfer] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/locked-asset/lkmex-transfer/meta/src/main.rs b/locked-asset/lkmex-transfer/meta/src/main.rs index d5cc7ad21..bc5614448 100644 --- a/locked-asset/lkmex-transfer/meta/src/main.rs +++ b/locked-asset/lkmex-transfer/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/locked-asset/lkmex-transfer/src/lib.rs b/locked-asset/lkmex-transfer/src/lib.rs index 7c187882e..126e740b8 100644 --- a/locked-asset/lkmex-transfer/src/lib.rs +++ b/locked-asset/lkmex-transfer/src/lib.rs @@ -56,7 +56,7 @@ pub trait LkmexTransfer: self.add_permissions(caller, Permissions::OWNER); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} #[endpoint] diff --git a/locked-asset/lkmex-transfer/wasm/Cargo.lock b/locked-asset/lkmex-transfer/wasm/Cargo.lock index 503d067d7..bb3404c61 100644 --- a/locked-asset/lkmex-transfer/wasm/Cargo.lock +++ b/locked-asset/lkmex-transfer/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common_errors" @@ -134,32 +134,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -169,9 +171,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -182,18 +184,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -209,9 +211,9 @@ dependencies = [ [[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", ] @@ -227,18 +229,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -278,9 +280,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -293,6 +295,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/locked-asset/lkmex-transfer/wasm/Cargo.toml b/locked-asset/lkmex-transfer/wasm/Cargo.toml index dee74ceae..f77ddab32 100644 --- a/locked-asset/lkmex-transfer/wasm/Cargo.toml +++ b/locked-asset/lkmex-transfer/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.lkmex-transfer] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/locked-asset/lkmex-transfer/wasm/src/lib.rs b/locked-asset/lkmex-transfer/wasm/src/lib.rs index 6df953b3e..24d976e2b 100644 --- a/locked-asset/lkmex-transfer/wasm/src/lib.rs +++ b/locked-asset/lkmex-transfer/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 12 +// Upgrade: 1 +// Endpoints: 11 // Async Callback (empty): 1 // Total number of exported functions: 14 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/locked-asset/locked-token-wrapper/Cargo.toml b/locked-asset/locked-token-wrapper/Cargo.toml index 787914eeb..b89fc108b 100644 --- a/locked-asset/locked-token-wrapper/Cargo.toml +++ b/locked-asset/locked-token-wrapper/Cargo.toml @@ -9,10 +9,10 @@ publish = false path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dependencies.utils] path = "../../common/modules/utils" @@ -44,4 +44,4 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/locked-asset/locked-token-wrapper/meta/Cargo.toml b/locked-asset/locked-token-wrapper/meta/Cargo.toml index 6de0a4093..987c0f65d 100644 --- a/locked-asset/locked-token-wrapper/meta/Cargo.toml +++ b/locked-asset/locked-token-wrapper/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.locked-token-wrapper] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/locked-asset/locked-token-wrapper/meta/src/main.rs b/locked-asset/locked-token-wrapper/meta/src/main.rs index fb820b88e..fe7de3557 100644 --- a/locked-asset/locked-token-wrapper/meta/src/main.rs +++ b/locked-asset/locked-token-wrapper/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/locked-asset/locked-token-wrapper/src/lib.rs b/locked-asset/locked-token-wrapper/src/lib.rs index 980736f63..2ac0efddd 100644 --- a/locked-asset/locked-token-wrapper/src/lib.rs +++ b/locked-asset/locked-token-wrapper/src/lib.rs @@ -20,7 +20,7 @@ pub trait LockedTokenWrapper: self.energy_factory_address().set(&energy_factory_address); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} #[payable("*")] diff --git a/locked-asset/locked-token-wrapper/src/wrapped_token.rs b/locked-asset/locked-token-wrapper/src/wrapped_token.rs index ae3fce50a..3cc18365f 100644 --- a/locked-asset/locked-token-wrapper/src/wrapped_token.rs +++ b/locked-asset/locked-token-wrapper/src/wrapped_token.rs @@ -57,6 +57,8 @@ pub trait WrappedTokenModule: #[endpoint(unsetTransferRoleWrappedToken)] fn unset_transfer_role(&self, address: ManagedAddress) { let wrapped_token_id = self.wrapped_token().get_token_id(); + + #[allow(deprecated)] let system_sc_proxy = ESDTSystemSmartContractProxy::new_proxy_obj(); system_sc_proxy .unset_special_roles( diff --git a/locked-asset/locked-token-wrapper/wasm/Cargo.lock b/locked-asset/locked-token-wrapper/wasm/Cargo.lock index eb6ca7c6e..ca891a8cd 100644 --- a/locked-asset/locked-token-wrapper/wasm/Cargo.lock +++ b/locked-asset/locked-token-wrapper/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common_errors" @@ -158,32 +158,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -193,9 +195,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -206,18 +208,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -233,9 +235,9 @@ dependencies = [ [[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", ] @@ -251,18 +253,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -302,9 +304,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -317,6 +319,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/locked-asset/locked-token-wrapper/wasm/Cargo.toml b/locked-asset/locked-token-wrapper/wasm/Cargo.toml index 0d10a2666..32d3b3f11 100644 --- a/locked-asset/locked-token-wrapper/wasm/Cargo.toml +++ b/locked-asset/locked-token-wrapper/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.locked-token-wrapper] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/locked-asset/locked-token-wrapper/wasm/src/lib.rs b/locked-asset/locked-token-wrapper/wasm/src/lib.rs index 6c59af09c..97c8b9704 100644 --- a/locked-asset/locked-token-wrapper/wasm/src/lib.rs +++ b/locked-asset/locked-token-wrapper/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 9 +// Upgrade: 1 +// Endpoints: 8 // Async Callback: 1 // Total number of exported functions: 11 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/locked-asset/proxy_dex/Cargo.toml b/locked-asset/proxy_dex/Cargo.toml index 5c52745d9..e5023a79d 100644 --- a/locked-asset/proxy_dex/Cargo.toml +++ b/locked-asset/proxy_dex/Cargo.toml @@ -45,11 +45,11 @@ path = "../../common/traits/mergeable" path = "../../common/traits/fixed-supply-token" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dependencies.energy-factory] path = "../energy-factory" @@ -69,7 +69,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.pausable] path = "../../common/modules/pausable" diff --git a/locked-asset/proxy_dex/meta/Cargo.toml b/locked-asset/proxy_dex/meta/Cargo.toml index 41fea1fc8..6ceff01ef 100644 --- a/locked-asset/proxy_dex/meta/Cargo.toml +++ b/locked-asset/proxy_dex/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.proxy_dex] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/locked-asset/proxy_dex/meta/src/main.rs b/locked-asset/proxy_dex/meta/src/main.rs index a07d23de1..528567935 100644 --- a/locked-asset/proxy_dex/meta/src/main.rs +++ b/locked-asset/proxy_dex/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/locked-asset/proxy_dex/src/external_merging.rs b/locked-asset/proxy_dex/src/external_merging.rs index 30ef3eb88..38757f108 100644 --- a/locked-asset/proxy_dex/src/external_merging.rs +++ b/locked-asset/proxy_dex/src/external_merging.rs @@ -38,6 +38,7 @@ fn merge_common( endpoint_name: &[u8], tokens: PaymentsVec, ) -> EsdtTokenPayment { + #[allow(deprecated)] let mut contract_call = ContractCallWithMultiEsdt::>::new( sc_address, ManagedBuffer::new_from_bytes(endpoint_name), diff --git a/locked-asset/proxy_dex/src/farm_interactions.rs b/locked-asset/proxy_dex/src/farm_interactions.rs index dab9a7825..cabd55f8d 100644 --- a/locked-asset/proxy_dex/src/farm_interactions.rs +++ b/locked-asset/proxy_dex/src/farm_interactions.rs @@ -27,7 +27,7 @@ pub trait FarmInteractionsModule { ) -> EnterFarmResultWrapper { let enter_farm_result: EnterFarmResultType = self .farm_contract_proxy(farm_address) - .enter_farm_endpoint(user) + .enter_farm_endpoint(OptionalValue::Some(user)) .with_esdt_transfer((farming_token_id, 0, farming_token_amount)) .execute_on_dest_context(); @@ -47,7 +47,7 @@ pub trait FarmInteractionsModule { ) -> ExitFarmResultWrapper { let raw_result: ExitFarmWithPartialPosResultType = self .farm_contract_proxy(farm_address) - .exit_farm_endpoint(user) + .exit_farm_endpoint(OptionalValue::Some(user)) .with_esdt_transfer(farm_token) .execute_on_dest_context(); let (farming_tokens, reward_tokens) = raw_result.into_tuple(); @@ -66,7 +66,7 @@ pub trait FarmInteractionsModule { ) -> ClaimRewardsResultWrapper { let raw_result: ClaimRewardsResultType = self .farm_contract_proxy(farm_address) - .claim_rewards_endpoint(user) + .claim_rewards_endpoint(OptionalValue::Some(user)) .with_esdt_transfer(farm_token) .execute_on_dest_context(); let (new_farm_token, rewards) = raw_result.into_tuple(); diff --git a/locked-asset/proxy_dex/src/lib.rs b/locked-asset/proxy_dex/src/lib.rs index 810cd3640..4990a8c05 100644 --- a/locked-asset/proxy_dex/src/lib.rs +++ b/locked-asset/proxy_dex/src/lib.rs @@ -1,6 +1,5 @@ #![no_std] #![allow(clippy::too_many_arguments)] -#![feature(exact_size_is_empty)] multiversx_sc::imports!(); multiversx_sc::derive_imports!(); @@ -58,7 +57,7 @@ pub trait ProxyDexImpl: .set_if_empty(&energy_factory_address); } - #[endpoint] + #[upgrade] fn upgrade(&self, old_locked_token_id: TokenIdentifier, old_factory_address: ManagedAddress) { require!( old_locked_token_id.is_valid_esdt_identifier(), diff --git a/locked-asset/proxy_dex/tests/proxy_dex_test_setup/mod.rs b/locked-asset/proxy_dex/tests/proxy_dex_test_setup/mod.rs index 2ab0326d4..31fa6f6d4 100644 --- a/locked-asset/proxy_dex/tests/proxy_dex_test_setup/mod.rs +++ b/locked-asset/proxy_dex/tests/proxy_dex_test_setup/mod.rs @@ -64,11 +64,14 @@ where SimpleLockObjBuilder: 'static + Copy + Fn() -> energy_factory::ContractObj, { pub b_mock: BlockchainStateWrapper, + #[allow(dead_code)] pub owner: Address, pub first_user: Address, + #[allow(dead_code)] pub second_user: Address, pub proxy_wrapper: ContractObjWrapper, ProxyObjBuilder>, pub pair_wrapper: ContractObjWrapper, PairObjBuilder>, + #[allow(dead_code)] pub farm_locked_wrapper: ContractObjWrapper, FarmLockedObjBuilder>, pub simple_lock_wrapper: diff --git a/locked-asset/proxy_dex/wasm/Cargo.lock b/locked-asset/proxy_dex/wasm/Cargo.lock index cc815b6fd..f352f019a 100644 --- a/locked-asset/proxy_dex/wasm/Cargo.lock +++ b/locked-asset/proxy_dex/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -24,9 +24,9 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -315,32 +315,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -350,9 +352,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -363,18 +365,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -390,9 +392,9 @@ dependencies = [ [[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", ] @@ -433,9 +435,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -474,9 +476,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -531,9 +533,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -563,6 +565,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/locked-asset/proxy_dex/wasm/Cargo.toml b/locked-asset/proxy_dex/wasm/Cargo.toml index b0753d94f..e7d8de4c3 100644 --- a/locked-asset/proxy_dex/wasm/Cargo.toml +++ b/locked-asset/proxy_dex/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.proxy_dex] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/locked-asset/proxy_dex/wasm/src/lib.rs b/locked-asset/proxy_dex/wasm/src/lib.rs index 29b3ab709..c04d97990 100644 --- a/locked-asset/proxy_dex/wasm/src/lib.rs +++ b/locked-asset/proxy_dex/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 31 +// Upgrade: 1 +// Endpoints: 30 // Async Callback: 1 // Total number of exported functions: 33 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/locked-asset/simple-lock-whitelist/Cargo.toml b/locked-asset/simple-lock-whitelist/Cargo.toml index a8d637a5c..4acd1f831 100644 --- a/locked-asset/simple-lock-whitelist/Cargo.toml +++ b/locked-asset/simple-lock-whitelist/Cargo.toml @@ -15,11 +15,11 @@ path = "../simple-lock" path = "../../common/modules/utils" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies] num-bigint = "0.4.2" @@ -27,4 +27,4 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/locked-asset/simple-lock-whitelist/meta/Cargo.toml b/locked-asset/simple-lock-whitelist/meta/Cargo.toml index 8b95c8a50..1ef54d1cc 100644 --- a/locked-asset/simple-lock-whitelist/meta/Cargo.toml +++ b/locked-asset/simple-lock-whitelist/meta/Cargo.toml @@ -8,6 +8,6 @@ authors = ["Dorin Iancu "] [dependencies.simple-lock-whitelist] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/locked-asset/simple-lock-whitelist/meta/src/main.rs b/locked-asset/simple-lock-whitelist/meta/src/main.rs index c58ebf7a8..f85faea3f 100644 --- a/locked-asset/simple-lock-whitelist/meta/src/main.rs +++ b/locked-asset/simple-lock-whitelist/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/locked-asset/simple-lock-whitelist/src/lib.rs b/locked-asset/simple-lock-whitelist/src/lib.rs index 48192fb15..7f7c1a4a6 100644 --- a/locked-asset/simple-lock-whitelist/src/lib.rs +++ b/locked-asset/simple-lock-whitelist/src/lib.rs @@ -28,7 +28,7 @@ pub trait SimpleLockWhitelist: } } - #[endpoint] + #[upgrade] fn upgrade(&self) {} /// Sets the transfer role for the given address. Defaults to own address. diff --git a/locked-asset/simple-lock-whitelist/wasm/Cargo.lock b/locked-asset/simple-lock-whitelist/wasm/Cargo.lock index e6300116a..2a05c389a 100644 --- a/locked-asset/simple-lock-whitelist/wasm/Cargo.lock +++ b/locked-asset/simple-lock-whitelist/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common_structs" @@ -72,32 +72,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -107,9 +109,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -120,18 +122,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -147,27 +149,27 @@ dependencies = [ [[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 = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -217,9 +219,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -232,6 +234,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/locked-asset/simple-lock-whitelist/wasm/Cargo.toml b/locked-asset/simple-lock-whitelist/wasm/Cargo.toml index 068857df3..340a372a7 100644 --- a/locked-asset/simple-lock-whitelist/wasm/Cargo.toml +++ b/locked-asset/simple-lock-whitelist/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.simple-lock-whitelist] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/locked-asset/simple-lock-whitelist/wasm/src/lib.rs b/locked-asset/simple-lock-whitelist/wasm/src/lib.rs index d82101ff8..86ad07564 100644 --- a/locked-asset/simple-lock-whitelist/wasm/src/lib.rs +++ b/locked-asset/simple-lock-whitelist/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 25 +// Upgrade: 1 +// Endpoints: 24 // Async Callback: 1 // Total number of exported functions: 27 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/locked-asset/simple-lock/Cargo.toml b/locked-asset/simple-lock/Cargo.toml index 8f6b5bd1d..b867f2aa3 100644 --- a/locked-asset/simple-lock/Cargo.toml +++ b/locked-asset/simple-lock/Cargo.toml @@ -9,11 +9,11 @@ publish = false path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dependencies.common_structs] path = "../../common/common_structs" @@ -24,4 +24,4 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" diff --git a/locked-asset/simple-lock/meta/Cargo.toml b/locked-asset/simple-lock/meta/Cargo.toml index 889dce931..390737bda 100644 --- a/locked-asset/simple-lock/meta/Cargo.toml +++ b/locked-asset/simple-lock/meta/Cargo.toml @@ -8,6 +8,6 @@ authors = ["Dorin Iancu "] [dependencies.simple-lock] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/locked-asset/simple-lock/meta/src/main.rs b/locked-asset/simple-lock/meta/src/main.rs index d1db27a97..15afadd8a 100644 --- a/locked-asset/simple-lock/meta/src/main.rs +++ b/locked-asset/simple-lock/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/locked-asset/simple-lock/src/farm_interactions.rs b/locked-asset/simple-lock/src/farm_interactions.rs index 2579a7531..58ea1ae0d 100644 --- a/locked-asset/simple-lock/src/farm_interactions.rs +++ b/locked-asset/simple-lock/src/farm_interactions.rs @@ -74,7 +74,7 @@ pub trait FarmInteractionsModule { ) -> EnterFarmResultWrapper { let mut contract_call = self .farm_proxy(farm_address) - .enter_farm(caller) + .enter_farm(OptionalValue::Some(caller)) .with_esdt_transfer(EsdtTokenPayment::new( farming_token, 0, @@ -108,7 +108,7 @@ pub trait FarmInteractionsModule { ) -> ExitFarmResultWrapper { let raw_results: RawResultsType = self .farm_proxy(farm_address) - .exit_farm(caller) + .exit_farm(OptionalValue::Some(caller)) .with_esdt_transfer(EsdtTokenPayment::new( farm_token, farm_token_nonce, @@ -138,7 +138,7 @@ pub trait FarmInteractionsModule { ) -> FarmClaimRewardsResultWrapper { let raw_results: RawResultsType = self .farm_proxy(farm_address) - .claim_rewards(caller) + .claim_rewards(OptionalValue::Some(caller)) .with_esdt_transfer(EsdtTokenPayment::new( farm_token, farm_token_nonce, diff --git a/locked-asset/simple-lock/src/lib.rs b/locked-asset/simple-lock/src/lib.rs index 5db24f38e..fb59b792c 100644 --- a/locked-asset/simple-lock/src/lib.rs +++ b/locked-asset/simple-lock/src/lib.rs @@ -25,7 +25,7 @@ pub trait SimpleLock: #[init] fn init(&self) {} - #[endpoint] + #[upgrade] fn upgrade(&self) {} /// Locks any token (including EGLD) until `unlock_epoch` and receive meta ESDT LOCKED tokens. diff --git a/locked-asset/simple-lock/wasm/Cargo.lock b/locked-asset/simple-lock/wasm/Cargo.lock index e5957696c..3233c5367 100644 --- a/locked-asset/simple-lock/wasm/Cargo.lock +++ b/locked-asset/simple-lock/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common_structs" @@ -72,32 +72,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -107,9 +109,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -120,18 +122,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -147,27 +149,27 @@ dependencies = [ [[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 = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -207,9 +209,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -222,6 +224,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/locked-asset/simple-lock/wasm/Cargo.toml b/locked-asset/simple-lock/wasm/Cargo.toml index cc2cf0244..1fba97b63 100644 --- a/locked-asset/simple-lock/wasm/Cargo.toml +++ b/locked-asset/simple-lock/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.simple-lock] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/locked-asset/simple-lock/wasm/src/lib.rs b/locked-asset/simple-lock/wasm/src/lib.rs index 4e1b87c7d..eeafb6cb1 100644 --- a/locked-asset/simple-lock/wasm/src/lib.rs +++ b/locked-asset/simple-lock/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 20 +// Upgrade: 1 +// Endpoints: 19 // Async Callback: 1 // Total number of exported functions: 22 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/locked-asset/token-unstake/Cargo.toml b/locked-asset/token-unstake/Cargo.toml index da727566e..c196d7267 100644 --- a/locked-asset/token-unstake/Cargo.toml +++ b/locked-asset/token-unstake/Cargo.toml @@ -9,7 +9,7 @@ publish = false path = "src/lib.rs" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.mergeable] @@ -39,7 +39,7 @@ num-traits = "0.2" hex = "0.4" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" diff --git a/locked-asset/token-unstake/meta/Cargo.toml b/locked-asset/token-unstake/meta/Cargo.toml index fb4914c3d..ae328f839 100644 --- a/locked-asset/token-unstake/meta/Cargo.toml +++ b/locked-asset/token-unstake/meta/Cargo.toml @@ -8,6 +8,6 @@ publish = false [dependencies.token-unstake] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/locked-asset/token-unstake/meta/src/main.rs b/locked-asset/token-unstake/meta/src/main.rs index 06c11e497..874c422c1 100644 --- a/locked-asset/token-unstake/meta/src/main.rs +++ b/locked-asset/token-unstake/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/locked-asset/token-unstake/src/lib.rs b/locked-asset/token-unstake/src/lib.rs index 6295d46a2..985e91be9 100644 --- a/locked-asset/token-unstake/src/lib.rs +++ b/locked-asset/token-unstake/src/lib.rs @@ -42,6 +42,6 @@ pub trait TokenUnstakeModule: self.fees_burn_percentage().set(fees_burn_percentage); } - #[endpoint] + #[upgrade] fn upgrade(&self) {} } diff --git a/locked-asset/token-unstake/wasm/Cargo.lock b/locked-asset/token-unstake/wasm/Cargo.lock index d74f133fa..5d2d45e2c 100644 --- a/locked-asset/token-unstake/wasm/Cargo.lock +++ b/locked-asset/token-unstake/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common-types" @@ -119,32 +119,34 @@ dependencies = [ [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -154,9 +156,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -167,18 +169,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -194,27 +196,27 @@ dependencies = [ [[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 = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -254,9 +256,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -291,6 +293,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" + [[package]] name = "unwrappable" version = "0.0.0" diff --git a/locked-asset/token-unstake/wasm/Cargo.toml b/locked-asset/token-unstake/wasm/Cargo.toml index f3e21bb9b..11bdee610 100644 --- a/locked-asset/token-unstake/wasm/Cargo.toml +++ b/locked-asset/token-unstake/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.token-unstake] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/locked-asset/token-unstake/wasm/src/lib.rs b/locked-asset/token-unstake/wasm/src/lib.rs index 396d02ba0..ea93ce423 100644 --- a/locked-asset/token-unstake/wasm/src/lib.rs +++ b/locked-asset/token-unstake/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 11 +// Upgrade: 1 +// Endpoints: 10 // Async Callback (empty): 1 // Total number of exported functions: 13 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!(); diff --git a/pause-all/Cargo.toml b/pause-all/Cargo.toml index 30046978d..6f03bfb68 100644 --- a/pause-all/Cargo.toml +++ b/pause-all/Cargo.toml @@ -12,14 +12,14 @@ path = "src/lib.rs" path = "../common/modules/pausable" [dependencies.multiversx-sc] -version = "=0.46.1" +version = "=0.53.2" features = ["esdt-token-payment-legacy-decode"] [dependencies.multiversx-sc-modules] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.multiversx-sc-scenario] -version = "=0.46.1" +version = "=0.53.2" [dev-dependencies.farm] path = "../dex/farm" diff --git a/pause-all/meta/Cargo.toml b/pause-all/meta/Cargo.toml index f6be6643e..0dbb64a9e 100644 --- a/pause-all/meta/Cargo.toml +++ b/pause-all/meta/Cargo.toml @@ -10,6 +10,6 @@ authors = ["MultiversX "] [dependencies.pause-all] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.46.1" +[dependencies.multiversx-sc-meta-lib] +version = "0.53.2" default-features = false diff --git a/pause-all/meta/src/main.rs b/pause-all/meta/src/main.rs index b23720203..38584f572 100644 --- a/pause-all/meta/src/main.rs +++ b/pause-all/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/pause-all/src/lib.rs b/pause-all/src/lib.rs index 6e9bcd823..05f7fe541 100644 --- a/pause-all/src/lib.rs +++ b/pause-all/src/lib.rs @@ -28,7 +28,7 @@ pub trait PauseAll: #[init] fn init(&self) {} - #[endpoint] + #[upgrade] fn upgrade(&self) {} #[only_owner] diff --git a/pause-all/wasm/Cargo.lock b/pause-all/wasm/Cargo.lock index d1b8021d6..0c7bd2804 100644 --- a/pause-all/wasm/Cargo.lock +++ b/pause-all/wasm/Cargo.lock @@ -1,12 +1,12 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "arrayvec" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "autocfg" @@ -16,9 +16,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "bitflags" -version = "2.4.1" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" [[package]] name = "common_errors" @@ -47,32 +47,34 @@ checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "multiversx-sc" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c94b173dc5ff0e157f767275fe6b7a1b4d2ad343bef7b66cd22a6353e016b93" +checksum = "75ea89a26f0aacda21437a8ae5ccfbefab99d8191942b3d2eddbcbf84f9866d7" dependencies = [ "bitflags", "hex-literal", "multiversx-sc-codec", "multiversx-sc-derive", "num-traits", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19908153158c03df4582af08f47c0eb39fb52a7dff4736b301a66acbbb9955d3" +checksum = "007d7a5a8534e5dc9128cb8f15a65a21dd378e135c6016c7cd1491cd012bc8cb" dependencies = [ "arrayvec", "multiversx-sc-codec-derive", + "unwrap-infallible", ] [[package]] name = "multiversx-sc-codec-derive" -version = "0.18.3" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3b03b43f9cad320992f54ed162de2ed63e3ec83ed01361e57ee9c1865fba5a2" +checksum = "dffba1dce273ed5b61ee1b90aeea5c8c744617d0f12624f620768c144d83e753" dependencies = [ "hex", "proc-macro2", @@ -82,9 +84,9 @@ dependencies = [ [[package]] name = "multiversx-sc-derive" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b78945957036c281ad6ee21bb5120dcefa2017688adf43ec94e3e7c982efb09" +checksum = "4c17fdf90fafca2f19085ae67b0502d9f71bf8ab1be3c83808eb88e02a8c18b9" dependencies = [ "hex", "proc-macro2", @@ -95,18 +97,18 @@ dependencies = [ [[package]] name = "multiversx-sc-modules" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63ffaba95e630ff75981e2f5f50da64f523219b52f484234c66f3adc248885f" +checksum = "daeb48acbd39255868a3241798df2f85050f0ae8d82d6417bd2cd0e30a241855" dependencies = [ "multiversx-sc", ] [[package]] name = "multiversx-sc-wasm-adapter" -version = "0.46.1" +version = "0.53.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9579f40c00da56a5a68e010ff851fa48ac7b9c6a16ad4314795cb32d889d9e78" +checksum = "20659915a4377d375c46d7f237e810053a03f7e084fad6362dd5748a7233defb" dependencies = [ "multiversx-sc", ] @@ -122,9 +124,9 @@ dependencies = [ [[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", ] @@ -165,18 +167,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.75" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "907a61bd0f64c2f29cd1cf1dc34d05176426a3f504a78010f08416ddb7b13708" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.35" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -199,9 +201,9 @@ checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" [[package]] name = "syn" -version = "2.0.48" +version = "2.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "9f35bcdf61fd8e7be6caf75f429fdca8beb3ed76584befb503b1569faee373ed" dependencies = [ "proc-macro2", "quote", @@ -213,3 +215,9 @@ name = "unicode-ident" version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" + +[[package]] +name = "unwrap-infallible" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "151ac09978d3c2862c4e39b557f4eceee2cc72150bc4cb4f16abf061b6e381fb" diff --git a/pause-all/wasm/Cargo.toml b/pause-all/wasm/Cargo.toml index ccffee39c..b0301f784 100644 --- a/pause-all/wasm/Cargo.toml +++ b/pause-all/wasm/Cargo.toml @@ -21,11 +21,14 @@ debug = false panic = "abort" overflow-checks = false +[profile.dev] +panic = "abort" + [dependencies.pause-all] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "=0.46.1" +version = "=0.53.2" [workspace] members = ["."] diff --git a/pause-all/wasm/src/lib.rs b/pause-all/wasm/src/lib.rs index 2302b1e6a..88f01cb87 100644 --- a/pause-all/wasm/src/lib.rs +++ b/pause-all/wasm/src/lib.rs @@ -5,13 +5,12 @@ //////////////////////////////////////////////////// // Init: 1 -// Endpoints: 8 +// Upgrade: 1 +// Endpoints: 7 // Async Callback (empty): 1 // Total number of exported functions: 10 #![no_std] -#![allow(internal_features)] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!();