Skip to content

Commit

Permalink
Merge pull request #169 from multiversx/feat/next
Browse files Browse the repository at this point in the history
Beta Update
  • Loading branch information
andreiblt1304 authored Nov 13, 2024
2 parents bad12ca + 1e2a779 commit 829251a
Show file tree
Hide file tree
Showing 107 changed files with 7,990 additions and 2,094 deletions.
1,665 changes: 1,575 additions & 90 deletions Cargo.lock

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,10 @@ members = [
"chain-factory",
"chain-factory/meta",
"esdt-safe",
"esdt-safe/interactor",
"esdt-safe/meta",
"fee-market",
"fee-market/meta",
"pair-mock",
"pair-mock/meta",
"router-mock",
"router-mock/meta",
"header-verifier",
"header-verifier/meta",
]
6 changes: 3 additions & 3 deletions chain-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ path = "src/lib.rs"
num-bigint = "0.4.2"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.2"
version = "=0.54.0"

[dependencies.multiversx-sc]
version = "=0.53.2"
version = "=0.54.0"

[dependencies.multiversx-sc-modules]
version = "=0.53.2"
version = "=0.54.0"
2 changes: 1 addition & 1 deletion chain-config/meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ authors = ["you"]
path = ".."

[dependencies.multiversx-sc-meta-lib]
version = "=0.53.2"
version = "=0.54.0"
27 changes: 19 additions & 8 deletions chain-config/wasm/Cargo.lock

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

2 changes: 1 addition & 1 deletion chain-config/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ panic = "abort"
path = ".."

[dependencies.multiversx-sc-wasm-adapter]
version = "=0.53.2"
version = "=0.54.0"

[workspace]
members = ["."]
4 changes: 2 additions & 2 deletions chain-factory/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ path = "src/lib.rs"
num-bigint = "0.4.2"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.2"
version = "=0.54.0"

[dependencies.multiversx-sc]
version = "=0.53.2"
version = "=0.54.0"

[dependencies.utils]
path = "../common/utils"
Expand Down
2 changes: 1 addition & 1 deletion chain-factory/meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ authors = ["you"]
path = ".."

[dependencies.multiversx-sc-meta-lib]
version = "=0.53.2"
version = "=0.54.0"
27 changes: 19 additions & 8 deletions chain-factory/wasm/Cargo.lock

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

2 changes: 1 addition & 1 deletion chain-factory/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ panic = "abort"
path = ".."

[dependencies.multiversx-sc-wasm-adapter]
version = "=0.53.2"
version = "=0.54.0"

[workspace]
members = ["."]
4 changes: 2 additions & 2 deletions common/bls-signature/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ authors = ["dorin-iancu <[email protected]>"]
edition = "2018"

[dependencies.multiversx-sc]
version = "=0.53.2"
version = "=0.54.0"

[dependencies.transaction]
path = "../transaction"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.2"
version = "=0.54.0"
4 changes: 2 additions & 2 deletions common/max-bridged-amount-module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["dorin-iancu <[email protected]>"]
edition = "2018"

[dependencies.multiversx-sc]
version = "=0.53.2"
version = "=0.54.0"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.2"
version = "=0.54.0"
4 changes: 2 additions & 2 deletions common/setup-phase/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["dorin-iancu <[email protected]>"]
edition = "2018"

[dependencies.multiversx-sc]
version = "=0.53.2"
version = "=0.54.0"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.2"
version = "=0.54.0"
4 changes: 2 additions & 2 deletions common/token-whitelist/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ path = "../setup-phase"
path = "../utils"

[dependencies.multiversx-sc]
version = "=0.53.2"
version = "=0.54.0"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.53.2"
version = "=0.54.0"
38 changes: 8 additions & 30 deletions common/token-whitelist/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![no_std]

use bls_signature::BlsSignature;

multiversx_sc::imports!();

#[multiversx_sc::module]
Expand All @@ -10,37 +8,27 @@ pub trait TokenWhitelistModule:
{
/// Tokens in the whitelist can be transferred without fees
#[endpoint(addTokensToWhitelist)]
fn add_tokens_to_whitelist(
&self,
opt_signature: Option<BlsSignature<Self::Api>>,
tokens: MultiValueEncoded<TokenIdentifier>,
) {
fn add_tokens_to_whitelist(&self, tokens: MultiValueEncoded<TokenIdentifier>) {
if !self.is_setup_phase_complete() {
self.require_caller_initiator();
self.token_whitelist().extend(tokens);

return;
}

let token_list = self.verify_items_signature(opt_signature, tokens);
self.token_whitelist().extend(&token_list);
self.token_whitelist().extend(tokens);
}

#[endpoint(removeTokensFromWhitelist)]
fn remove_tokens_from_whitelist(
&self,
opt_signature: Option<BlsSignature<Self::Api>>,
tokens: MultiValueEncoded<TokenIdentifier>,
) {
fn remove_tokens_from_whitelist(&self, tokens: MultiValueEncoded<TokenIdentifier>) {
if !self.is_setup_phase_complete() {
self.require_caller_initiator();
self.remove_items(&mut self.token_whitelist(), tokens);

return;
}

let token_list = self.verify_items_signature(opt_signature, tokens);
self.remove_items(&mut self.token_whitelist(), &token_list);
self.remove_items(&mut self.token_whitelist(), tokens);
}

fn require_token_not_blacklisted(&self, token_id: &TokenIdentifier) {
Expand All @@ -52,37 +40,27 @@ pub trait TokenWhitelistModule:

/// Tokens in blacklist cannot be transferred
#[endpoint(addTokensToBlacklist)]
fn add_tokens_to_blacklist(
&self,
opt_signature: Option<BlsSignature<Self::Api>>,
tokens: MultiValueEncoded<TokenIdentifier>,
) {
fn add_tokens_to_blacklist(&self, tokens: MultiValueEncoded<TokenIdentifier>) {
if !self.is_setup_phase_complete() {
self.require_caller_initiator();
self.token_blacklist().extend(tokens);

return;
}

let token_list = self.verify_items_signature(opt_signature, tokens);
self.token_blacklist().extend(&token_list);
self.token_blacklist().extend(tokens);
}

#[endpoint(removeTokensFromBlacklist)]
fn remove_tokens_from_blacklist(
&self,
opt_signature: Option<BlsSignature<Self::Api>>,
tokens: MultiValueEncoded<TokenIdentifier>,
) {
fn remove_tokens_from_blacklist(&self, tokens: MultiValueEncoded<TokenIdentifier>) {
if !self.is_setup_phase_complete() {
self.require_caller_initiator();
self.remove_items(&mut self.token_blacklist(), tokens);

return;
}

let token_list = self.verify_items_signature(opt_signature, tokens);
self.remove_items(&mut self.token_blacklist(), &token_list);
self.remove_items(&mut self.token_blacklist(), tokens);
}

#[view(getTokenWhitelist)]
Expand Down
2 changes: 1 addition & 1 deletion common/transaction/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2018"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.53.2"
version = "=0.54.0"
Loading

0 comments on commit 829251a

Please sign in to comment.