Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade #929

Merged
merged 2 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions 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 common/common_errors/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
2 changes: 1 addition & 1 deletion common/common_structs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dependencies.mergeable]
Expand Down
2 changes: 1 addition & 1 deletion common/modules/farm/config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ path = "../../pausable"
path = "../../permissions_module"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
4 changes: 2 additions & 2 deletions common/modules/farm/contexts/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ path = "../../pausable"
path = "../../permissions_module"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dependencies.multiversx-sc-modules]
version = "=0.50.4"
version = "=0.50.5"
1 change: 0 additions & 1 deletion common/modules/farm/contexts/src/mod.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![no_std]
#![feature(trait_alias)]

pub mod claim_rewards_context;
pub mod enter_farm_context;
Expand Down
11 changes: 9 additions & 2 deletions common/modules/farm/contexts/src/storage_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> FarmContracTraitBounds for T where
T: config::ConfigModule + rewards::RewardsModule + farm_token::FarmTokenModule
{
}

pub struct StorageCache<'a, C: FarmContracTraitBounds> {
sc_ref: &'a C,
Expand Down
2 changes: 1 addition & 1 deletion common/modules/farm/events/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ path = "../../../common_structs"
path = "../contexts"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
6 changes: 3 additions & 3 deletions common/modules/farm/farm_base_impl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ path = "../../../traits/mergeable"
path = "../../../traits/fixed-supply-token"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dependencies.multiversx-sc-modules]
version = "=0.50.4"
version = "=0.50.5"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.50.4"
version = "=0.50.5"
21 changes: 17 additions & 4 deletions common/modules/farm/farm_base_impl/src/base_traits_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> 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;
Expand All @@ -30,8 +43,7 @@ pub trait FarmContract {
+ FixedSupplyToken<<Self::FarmSc as ContractBase>::Api>
+ FarmToken<<Self::FarmSc as ContractBase>::Api>
+ From<FarmTokenAttributes<<Self::FarmSc as ContractBase>::Api>>
+ Into<FarmTokenAttributes<<Self::FarmSc as ContractBase>::Api>> =
FarmTokenAttributes<<Self::FarmSc as ContractBase>::Api>;
+ Into<FarmTokenAttributes<<Self::FarmSc as ContractBase>::Api>>;

#[inline]
fn mint_rewards(
Expand Down Expand Up @@ -259,4 +271,5 @@ where
T: AllBaseFarmImplTraits,
{
type FarmSc = T;
type AttributesType = FarmTokenAttributes<<Self::FarmSc as ContractBase>::Api>;
}
4 changes: 0 additions & 4 deletions common/modules/farm/farm_base_impl/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#![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!();
Expand Down
4 changes: 2 additions & 2 deletions common/modules/farm/farm_token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ path = "../../pausable"
path = "../../permissions_module"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dependencies.multiversx-sc-modules]
version = "=0.50.4"
version = "=0.50.5"
4 changes: 2 additions & 2 deletions common/modules/farm/farm_token_merge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ path = "../../token_merge_helper"
path = "../farm_token"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dependencies.multiversx-sc-modules]
version = "=0.50.4"
version = "=0.50.5"

[workspace]
members = ["."]
4 changes: 2 additions & 2 deletions common/modules/farm/rewards/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ path = "../../pausable"
path = "../../permissions_module"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dependencies.multiversx-sc-modules]
version = "=0.50.4"
version = "=0.50.5"
2 changes: 1 addition & 1 deletion common/modules/legacy_token_decode_module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2018"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dependencies.common_structs]
Expand Down
2 changes: 1 addition & 1 deletion common/modules/locking_module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dependencies.simple-lock]
Expand Down
2 changes: 1 addition & 1 deletion common/modules/math/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
2 changes: 1 addition & 1 deletion common/modules/pausable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ path = "src/pausable.rs"
path = "../permissions_module"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
2 changes: 1 addition & 1 deletion common/modules/permissions_module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ bitflags = "2.4.1"
path = "../../common_errors"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
2 changes: 1 addition & 1 deletion common/modules/sc_whitelist_module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ path = "src/sc_whitelist_module.rs"
path = "../../common_errors"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
2 changes: 1 addition & 1 deletion common/modules/token_merge_helper/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ path = "src/lib.rs"
path = "../../common_errors"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
2 changes: 1 addition & 1 deletion common/modules/token_send/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ path = "../../common_structs"
path = "../../common_errors"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
2 changes: 1 addition & 1 deletion common/modules/utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ edition = "2021"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dependencies.common_structs]
Expand Down
2 changes: 1 addition & 1 deletion common/traits/fixed-supply-token/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ edition = "2021"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
2 changes: 1 addition & 1 deletion common/traits/mergeable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
2 changes: 1 addition & 1 deletion common/traits/unwrappable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ edition = "2021"
path = "src/lib.rs"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]
6 changes: 3 additions & 3 deletions dex/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ edition = "2021"
publish = false

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dev-dependencies]
num-bigint = "0.4.2"

[dev-dependencies.multiversx-sc-modules]
version = "=0.50.4"
version = "=0.50.5"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.50.4"
version = "=0.50.5"

[dev-dependencies.config]
path = "../common/modules/farm/config"
Expand Down
6 changes: 3 additions & 3 deletions dex/farm-with-locked-rewards/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ path = "../../locked-asset/energy-factory"
path = "../../energy-integration/common-modules/energy-query"

[dependencies.multiversx-sc]
version = "=0.50.4"
version = "=0.50.5"
features = ["esdt-token-payment-legacy-decode"]

[dependencies.multiversx-sc-modules]
version = "=0.50.4"
version = "=0.50.5"

[dev-dependencies]
num-bigint = "0.4.2"

[dev-dependencies.multiversx-sc-scenario]
version = "=0.50.4"
version = "=0.50.5"

[dev-dependencies.simple-lock]
path = "../../locked-asset/simple-lock"
2 changes: 1 addition & 1 deletion dex/farm-with-locked-rewards/meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ publish = false
path = ".."

[dependencies.multiversx-sc-meta]
version = "0.50.4"
version = "0.50.5"
default-features = false
2 changes: 0 additions & 2 deletions dex/farm-with-locked-rewards/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
#![no_std]
#![allow(clippy::too_many_arguments)]
#![feature(exact_size_is_empty)]

multiversx_sc::imports!();
multiversx_sc::derive_imports!();
Expand Down
Loading
Loading