diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml index 9b9aa83..3d651c9 100644 --- a/.github/workflows/actions.yml +++ b/.github/workflows/actions.yml @@ -3,7 +3,7 @@ name: CI on: push: branches: - - master + - main pull_request: permissions: @@ -13,10 +13,9 @@ permissions: jobs: contracts: name: Contracts - uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v2 + uses: multiversx/mx-sc-actions/.github/workflows/contracts.yml@v3.2.0 with: - rust-toolchain: nightly-2023-02-09 - vmtools-version: v1.4.60 - install-libtinfo5: true + rust-toolchain: stable + enable-contracts-size-report: false secrets: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/ping-pong/Cargo.toml b/ping-pong/Cargo.toml index 598d7df..b2f7724 100644 --- a/ping-pong/Cargo.toml +++ b/ping-pong/Cargo.toml @@ -2,12 +2,14 @@ name = "ping-pong" version = "0.0.2" authors = ["Bruda Claudiu-Marcel "] -edition = "2018" +edition = "2021" publish = false [lib] path = "src/ping_pong.rs" + [dependencies.multiversx-sc] -version = "0.42.0" +version = "0.52.3" + [dev-dependencies.multiversx-sc-scenario] -version = "0.42.0" +version = "0.52.3" diff --git a/ping-pong/meta/Cargo.toml b/ping-pong/meta/Cargo.toml index 77d6721..dd9e623 100644 --- a/ping-pong/meta/Cargo.toml +++ b/ping-pong/meta/Cargo.toml @@ -2,10 +2,10 @@ name = "ping-pong-meta" version = "0.0.0" authors = ["Bruda Claudiu-Marcel "] -edition = "2018" +edition = "2021" publish = false [dependencies.ping-pong] path = ".." -[dependencies.multiversx-sc-meta] -version = "0.42.0" +[dependencies.multiversx-sc-meta-lib] +version = "0.52.3" diff --git a/ping-pong/meta/src/main.rs b/ping-pong/meta/src/main.rs index 8c91df8..39742bb 100644 --- a/ping-pong/meta/src/main.rs +++ b/ping-pong/meta/src/main.rs @@ -1,3 +1,3 @@ fn main() { - multiversx_sc_meta::cli_main::(); + multiversx_sc_meta_lib::cli_main::(); } diff --git a/ping-pong/src/ping_pong.rs b/ping-pong/src/ping_pong.rs index e136629..686995f 100644 --- a/ping-pong/src/ping_pong.rs +++ b/ping-pong/src/ping_pong.rs @@ -1,6 +1,6 @@ #![no_std] -multiversx_sc::imports!(); +use multiversx_sc::imports::*; /// A contract that allows anyone to send a fixed sum, locks it for a while and then allows users to take it back. /// Sending funds to the contract is called "ping". diff --git a/ping-pong/tests/ping_pong_egld_scenario_rs_test.rs b/ping-pong/tests/ping_pong_egld_scenario_rs_test.rs index a693da3..99b1f2f 100644 --- a/ping-pong/tests/ping_pong_egld_scenario_rs_test.rs +++ b/ping-pong/tests/ping_pong_egld_scenario_rs_test.rs @@ -2,7 +2,6 @@ use multiversx_sc_scenario::*; fn world() -> ScenarioWorld { let mut blockchain = ScenarioWorld::new(); - blockchain.set_current_dir_from_workspace("ping-pong"); blockchain.register_contract("file:output/ping-pong.wasm", ping_pong::ContractBuilder); blockchain diff --git a/ping-pong/wasm/Cargo.toml b/ping-pong/wasm/Cargo.toml index 0b65009..2aea6fc 100644 --- a/ping-pong/wasm/Cargo.toml +++ b/ping-pong/wasm/Cargo.toml @@ -1,22 +1,34 @@ +# Code generated by the multiversx-sc build system. DO NOT EDIT. + +# ########################################## +# ############## AUTO-GENERATED ############# +# ########################################## + [package] name = "ping-pong-wasm" -version = "0.0.1" -authors = ["Bruda Claudiu-Marcel "] -edition = "2018" +version = "0.0.0" +edition = "2021" publish = false [lib] crate-type = ["cdylib"] -[workspace] [profile.release] codegen-units = 1 opt-level = "z" lto = true debug = false panic = "abort" +overflow-checks = false + +[profile.dev] +panic = "abort" + [dependencies.ping-pong] path = ".." [dependencies.multiversx-sc-wasm-adapter] -version = "0.42.0" +version = "0.52.3" + +[workspace] +members = ["."] diff --git a/ping-pong/wasm/src/lib.rs b/ping-pong/wasm/src/lib.rs index c5efc18..69a0c04 100644 --- a/ping-pong/wasm/src/lib.rs +++ b/ping-pong/wasm/src/lib.rs @@ -1,4 +1,4 @@ -// Code generated by the multiversx-sc multi-contract system. DO NOT EDIT. +// Code generated by the multiversx-sc build system. DO NOT EDIT. //////////////////////////////////////////////////// ////////////////// AUTO-GENERATED ////////////////// @@ -10,7 +10,6 @@ // Total number of exported functions: 11 #![no_std] -#![feature(lang_items)] multiversx_sc_wasm_adapter::allocator!(); multiversx_sc_wasm_adapter::panic_handler!();