Skip to content

Commit

Permalink
Merge pull request #1238 from multiversx/rc/v0.44
Browse files Browse the repository at this point in the history
Release candidate: v0.44
  • Loading branch information
andrei-marinica authored Nov 3, 2023
2 parents a584423 + b097a18 commit 58a9b23
Show file tree
Hide file tree
Showing 157 changed files with 2,600 additions and 502 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ permissions:
jobs:
contracts:
name: Contracts
uses: multiversx/mx-sc-actions/.github/workflows/[email protected].0
uses: multiversx/mx-sc-actions/.github/workflows/[email protected].3
with:
rust-toolchain: nightly-2023-05-26
vmtools-version: v1.4.60
vmtools-repository: "https://github.com/multiversx/mx-chain-vm-v1_4-go/archive/{TAG}.tar.gz"
vmtools-version: v1.4.89
secrets:
token: ${{ secrets.GITHUB_TOKEN }}
102 changes: 2 additions & 100 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ main = "str-repeat"

# the only purpose of this config is to specify the allocator
[contracts.str-repeat]
add-unlabelled = true
allocator = "leaking"
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ use random::*;

#[multiversx_sc::contract]
pub trait KittyOwnership {
#[allow_multiple_var_args]
#[init]
fn init(
&self,
Expand Down
3 changes: 3 additions & 0 deletions contracts/examples/lottery-esdt/src/lottery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ pub trait Lottery {
#[init]
fn init(&self) {}

#[allow_multiple_var_args]
#[endpoint]
fn start(
&self,
Expand All @@ -43,6 +44,7 @@ pub trait Lottery {
);
}

#[allow_multiple_var_args]
#[endpoint(createLotteryPool)]
fn create_lottery_pool(
&self,
Expand All @@ -69,6 +71,7 @@ pub trait Lottery {
);
}

#[allow_multiple_var_args]
#[allow(clippy::too_many_arguments)]
fn start_lottery(
&self,
Expand Down
94 changes: 48 additions & 46 deletions contracts/examples/multisig/interact/src/multisig_interact_nfts.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use std::time::Duration;

use multiversx_sc_scenario::multiversx_sc::codec::multi_types::IgnoreValue;
use multiversx_sc_snippets::multiversx_sc::codec::test_util::top_encode_to_vec_u8_or_panic;
use multiversx_sc_scenario::multiversx_sc::{
codec::{multi_types::IgnoreValue, Empty},
types::FunctionCall,
};

use super::*;

Expand Down Expand Up @@ -39,17 +41,17 @@ impl MultisigInteract {
.interactor
.sc_call_get_result(
ScCallStep::new()
.call(self.state.multisig().propose_async_call(
system_sc_address,
ISSUE_COST,
"registerAndSetAllRoles".to_string(),
MultiValueVec::from([
COLLECTION_NAME.as_bytes(),
COLLECTION_TICKER.as_bytes(),
TOKEN_TYPE.as_bytes(),
top_encode_to_vec_u8_or_panic(&0u32).as_slice(),
]),
))
.call(
self.state.multisig().propose_async_call(
system_sc_address,
ISSUE_COST,
FunctionCall::new("registerAndSetAllRoles")
.argument(&COLLECTION_NAME)
.argument(&COLLECTION_TICKER)
.argument(&TOKEN_TYPE)
.argument(&0u32),
),
)
.from(&self.wallet_address)
.gas_limit("10,000,000")
.expect(TxExpect::ok().additional_error_message("failed to issue collection")),
Expand Down Expand Up @@ -100,15 +102,15 @@ impl MultisigInteract {
.interactor
.sc_call_get_result(
ScCallStep::new()
.call(self.state.multisig().propose_async_call(
system_sc_address,
ISSUE_COST,
"issueNonFungible".to_string(),
MultiValueVec::from([
COLLECTION_NAME.to_string(),
COLLECTION_TICKER.to_string(),
]),
))
.call(
self.state.multisig().propose_async_call(
system_sc_address,
ISSUE_COST,
FunctionCall::new("issueNonFungible")
.argument(&COLLECTION_NAME)
.argument(&COLLECTION_TICKER),
),
)
.from(&self.wallet_address)
.gas_limit("10,000,000"),
)
Expand Down Expand Up @@ -158,16 +160,16 @@ impl MultisigInteract {
.interactor
.sc_call_get_result(
ScCallStep::new()
.call(self.state.multisig().propose_async_call(
&self.system_sc_address,
0u64,
"setSpecialRole".to_string(),
MultiValueVec::from([
self.collection_token_identifier.as_bytes(),
multisig_address.as_bytes(),
"ESDTRoleNFTCreate".as_bytes(),
]),
))
.call(
self.state.multisig().propose_async_call(
&self.system_sc_address,
0u64,
FunctionCall::new("setSpecialRole")
.argument(&self.collection_token_identifier)
.argument(&multisig_address)
.argument(&"ESDTRoleNFTCreate"),
),
)
.from(&self.wallet_address)
.gas_limit("10,000,000"),
)
Expand Down Expand Up @@ -200,20 +202,20 @@ impl MultisigInteract {
);

let typed_sc_call = ScCallStep::new()
.call(self.state.multisig().propose_async_call(
&multisig_address,
0u64,
"ESDTNFTCreate".to_string(),
MultiValueVec::from([
self.collection_token_identifier.as_bytes(),
top_encode_to_vec_u8_or_panic(&1u32).as_slice(),
item_name.as_bytes(),
top_encode_to_vec_u8_or_panic(&ROYALTIES).as_slice(),
&[][..],
METADATA.as_bytes(),
image_cid.as_bytes(),
]),
))
.call(
self.state.multisig().propose_async_call(
&multisig_address,
0u64,
FunctionCall::new("ESDTNFTCreate")
.argument(&self.collection_token_identifier)
.argument(&1u32)
.argument(&item_name)
.argument(&ROYALTIES)
.argument(&Empty)
.argument(&METADATA)
.argument(&image_cid),
),
)
.from(&self.wallet_address)
.gas_limit("10,000,000");

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use std::time::Duration;

use multiversx_sc_scenario::multiversx_sc::types::FunctionCall;
#[allow(unused_imports)]
use multiversx_sc_snippets::multiversx_sc::types::{
EsdtTokenPayment, MultiValueEncoded, TokenIdentifier,
Expand Down Expand Up @@ -66,8 +67,7 @@ impl MultisigInteract {
.call(self.state.multisig().propose_async_call(
bech32::decode(WEGLD_SWAP_SC_BECH32),
WRAP_AMOUNT,
"wrapEgld".to_string(),
MultiValueEncoded::new(),
FunctionCall::new("wrapEgld"),
))
.from(&self.wallet_address)
.gas_limit("10,000,000"),
Expand Down Expand Up @@ -99,8 +99,7 @@ impl MultisigInteract {
.call(self.state.multisig().propose_async_call(
contract_call.basic.to,
0u64,
contract_call.basic.endpoint_name,
contract_call.basic.arg_buffer.into_multi_value_encoded(),
contract_call.basic.function_call,
))
.from(&self.wallet_address)
.gas_limit("10,000,000"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ main = "main"

[contracts.main]
name = "multisig"
add-unlabelled = true

[contracts.full]
name = "multisig-full"
Expand All @@ -13,4 +12,5 @@ add-labels = ["multisig-external-view"]
[contracts.view]
name = "multisig-view"
external-view = true
add-unlabelled = false
add-labels = ["multisig-external-view"]
Loading

0 comments on commit 58a9b23

Please sign in to comment.