Skip to content

Commit

Permalink
Merge pull request #13 from multiversx/upgrade-0.43.5
Browse files Browse the repository at this point in the history
Upgrade 0.43.5
  • Loading branch information
dorin-iancu authored Oct 18, 2023
2 parents ac5fc80 + ba2a3ec commit f9c654b
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 66 deletions.
52 changes: 42 additions & 10 deletions Cargo.lock

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

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.43.4"
version = "=0.43.5"

[dev-dependencies.multiversx-sc-scenario]
version = "0.43.4"
version = "=0.43.5"

[dependencies.transaction]
path = "../transaction"
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 @@ -4,6 +4,6 @@ version = "0.0.0"
authors = ["dorin-iancu <[email protected]>"]
edition = "2018"
[dependencies.multiversx-sc]
version = "0.43.4"
version = "=0.43.5"
[dev-dependencies.multiversx-sc-scenario]
version = "0.43.4"
version = "=0.43.5"
4 changes: 2 additions & 2 deletions common/token-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.43.4"
version = "=0.43.5"

[dev-dependencies.multiversx-sc-scenario]
version = "0.43.4"
version = "=0.43.5"
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.43.4"
version = "=0.43.5"
46 changes: 4 additions & 42 deletions common/transaction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,50 +35,12 @@ pub struct TransferData<M: ManagedTypeApi> {
pub args: ManagedVec<M, ManagedBuffer<M>>,
}

#[derive(
TopDecode,
TopEncode,
NestedDecode,
NestedEncode,
Clone,
PartialEq,
Eq,
Debug,
TypeAbi,
ManagedVecItem,
)]
pub enum StolenFromFrameworkEsdtTokenType {
Fungible,
NonFungible,
SemiFungible,
Meta,
Invalid,
}

impl Default for StolenFromFrameworkEsdtTokenType {
#[inline]
fn default() -> Self {
Self::Fungible
}
}

impl From<EsdtTokenType> for StolenFromFrameworkEsdtTokenType {
fn from(value: EsdtTokenType) -> Self {
match value {
EsdtTokenType::Fungible => StolenFromFrameworkEsdtTokenType::Fungible,
EsdtTokenType::NonFungible => StolenFromFrameworkEsdtTokenType::NonFungible,
EsdtTokenType::SemiFungible => StolenFromFrameworkEsdtTokenType::SemiFungible,
EsdtTokenType::Meta => StolenFromFrameworkEsdtTokenType::Meta,
EsdtTokenType::Invalid => StolenFromFrameworkEsdtTokenType::Invalid,
}
}
}

// Temporary until Clone is implemented for EsdtTokenData
#[derive(
TopDecode, TopEncode, NestedDecode, NestedEncode, TypeAbi, Debug, ManagedVecItem, Clone,
)]
pub struct StolenFromFrameworkEsdtTokenData<M: ManagedTypeApi> {
pub token_type: StolenFromFrameworkEsdtTokenType,
pub token_type: EsdtTokenType,
pub amount: BigUint<M>,
pub frozen: bool,
pub hash: ManagedBuffer<M>,
Expand All @@ -92,7 +54,7 @@ pub struct StolenFromFrameworkEsdtTokenData<M: ManagedTypeApi> {
impl<M: ManagedTypeApi> Default for StolenFromFrameworkEsdtTokenData<M> {
fn default() -> Self {
StolenFromFrameworkEsdtTokenData {
token_type: StolenFromFrameworkEsdtTokenType::Fungible,
token_type: EsdtTokenType::Fungible,
amount: BigUint::zero(),
frozen: false,
hash: ManagedBuffer::new(),
Expand All @@ -108,7 +70,7 @@ impl<M: ManagedTypeApi> Default for StolenFromFrameworkEsdtTokenData<M> {
impl<M: ManagedTypeApi> From<EsdtTokenData<M>> for StolenFromFrameworkEsdtTokenData<M> {
fn from(value: EsdtTokenData<M>) -> Self {
StolenFromFrameworkEsdtTokenData {
token_type: value.token_type.into(),
token_type: value.token_type,
amount: value.amount,
frozen: value.frozen,
hash: value.hash,
Expand Down
4 changes: 2 additions & 2 deletions common/tx-batch-module/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ version = "0.0.0"
authors = ["dorin-iancu <[email protected]>"]
edition = "2018"
[dependencies.multiversx-sc]
version = "0.43.4"
version = "=0.43.5"

[dependencies.transaction]
path = "../transaction"
[dev-dependencies.multiversx-sc-scenario]
version = "0.43.4"
version = "=0.43.5"
6 changes: 3 additions & 3 deletions esdt-safe/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ path = "../common/max-bridged-amount-module"
path = "../common/bls-signature"

[dependencies.multiversx-sc]
version = "0.43.4"
version = "=0.43.5"
features = [ "promises" ]

[dependencies.multiversx-sc-modules]
version = "0.43.4"
version = "=0.43.5"

[dev-dependencies.multiversx-sc-scenario]
version = "0.43.4"
version = "=0.43.5"
2 changes: 1 addition & 1 deletion esdt-safe/meta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ publish = false
path = ".."

[dependencies.multiversx-sc-meta]
version = "0.43.4"
version = "=0.43.5"
2 changes: 1 addition & 1 deletion esdt-safe/wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ panic = "abort"
path = ".."

[dependencies.multiversx-sc-wasm-adapter]
version = "0.43.4"
version = "=0.43.5"

0 comments on commit f9c654b

Please sign in to comment.