difftreelog
Merge pull request #330 from UniqueNetwork/release-v918001
in: master
Release v918001
9 files changed
Cargo.lockdiffbeforeafterboth8706 "derivative",8706 "derivative",8707 "fp-rpc",8707 "fp-rpc",8708 "fp-self-contained",8708 "fp-self-contained",8709 "frame-benchmarking",8710 "frame-executive",8709 "frame-executive",8711 "frame-support",8710 "frame-support",8712 "frame-system",8711 "frame-system",8713 "frame-system-benchmarking",8714 "frame-system-rpc-runtime-api",8712 "frame-system-rpc-runtime-api",8715 "hex-literal",8716 "orml-vesting",8713 "orml-vesting",8717 "pallet-aura",8714 "pallet-aura",8718 "pallet-balances",8715 "pallet-balances",Cargo.tomldiffbeforeafterboth5 'pallets/*',5 'pallets/*',6 'client/*',6 'client/*',7 'primitives/*',7 'primitives/*',8 'runtime/*',9 'crates/*',8 'crates/*',10]9]10exclude = [11 "runtime/unique",12 "runtime/quartz"13]11[profile.release]14[profile.release]12panic = 'unwind'15panic = 'unwind'1316Dockerfile-parachaindiffbeforeafterboth1# ===== Rust builder =====1# ===== Rust builder =====2FROM phusion/baseimage:focal-1.0.0 as rust-builder2FROM phusion/baseimage:focal-1.1.0 as rust-builder3LABEL maintainer="Unique.Network"3LABEL maintainer="Unique.Network"445ARG RUST_TOOLCHAIN=nightly-2021-11-115ARG RUST_TOOLCHAIN=nightly-2021-11-11777778# ===== RUN ======78# ===== RUN ======797980FROM phusion/baseimage:focal-1.0.080FROM phusion/baseimage:focal-1.1.0818182ARG PROFILE=release82ARG PROFILE=release8383node/cli/src/chain_spec.rsdiffbeforeafterboth72impl RuntimeIdentification for Box<dyn sc_service::ChainSpec> {72impl RuntimeIdentification for Box<dyn sc_service::ChainSpec> {73 fn runtime_id(&self) -> RuntimeId {73 fn runtime_id(&self) -> RuntimeId {74 #[cfg(feature = "unique-runtime")]74 #[cfg(feature = "unique-runtime")]75 if self.id().starts_with("unique") {75 if self.id().starts_with("unique") || self.id().starts_with("unq") {76 return RuntimeId::Unique;76 return RuntimeId::Unique;77 }77 }787879 #[cfg(feature = "quartz-runtime")]79 #[cfg(feature = "quartz-runtime")]80 if self.id().starts_with("quartz") {80 if self.id().starts_with("quartz") || self.id().starts_with("qtz") {81 return RuntimeId::Quartz;81 return RuntimeId::Quartz;82 }82 }8383pallets/unique/src/eth/sponsoring.rsdiffbeforeafterboth24use up_sponsorship::SponsorshipHandler;24use up_sponsorship::SponsorshipHandler;25use core::marker::PhantomData;25use core::marker::PhantomData;26use core::convert::TryInto;26use core::convert::TryInto;27use up_data_structs::TokenId;27use up_data_structs::{TokenId, CreateItemData, CreateNftData};28use up_evm_mapping::EvmBackwardsAddressMapping;28use up_evm_mapping::EvmBackwardsAddressMapping;29use pallet_common::account::CrossAccountId;29use pallet_common::account::CrossAccountId;303031use pallet_nonfungible::erc::{UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721Call};31use pallet_nonfungible::erc::{32 UniqueNFTCall, ERC721UniqueExtensionsCall, ERC721MintableCall, ERC721Call,33};32use pallet_fungible::erc::{UniqueFungibleCall, ERC20Call};34use pallet_fungible::erc::{UniqueFungibleCall, ERC20Call};333551 let token_id: TokenId = token_id.try_into().ok()?;53 let token_id: TokenId = token_id.try_into().ok()?;52 withdraw_transfer::<T>(&collection, &who, &token_id).map(|()| sponsor)54 withdraw_transfer::<T>(&collection, &who, &token_id).map(|()| sponsor)53 }55 }56 UniqueNFTCall::ERC721Mintable(57 ERC721MintableCall::Mint { token_id, .. }58 | ERC721MintableCall::MintWithTokenUri { token_id, .. },59 ) => {60 let _token_id: TokenId = token_id.try_into().ok()?;61 withdraw_create_item::<T>(62 &collection,63 &who,64 &CreateItemData::NFT(CreateNftData::default()),65 )66 .map(|()| sponsor)67 }54 UniqueNFTCall::ERC721(ERC721Call::TransferFrom { token_id, from, .. }) => {68 UniqueNFTCall::ERC721(ERC721Call::TransferFrom { token_id, from, .. }) => {55 let token_id: TokenId = token_id.try_into().ok()?;69 let token_id: TokenId = token_id.try_into().ok()?;56 let from = T::CrossAccountId::from_eth(from);70 let from = T::CrossAccountId::from_eth(from);pallets/unique/src/sponsorship.rsdiffbeforeafterboth103103104pub fn withdraw_create_item<T: Config>(104pub fn withdraw_create_item<T: Config>(105 collection: &CollectionHandle<T>,105 collection: &CollectionHandle<T>,106 who: &T::AccountId,106 who: &T::CrossAccountId,107 _properties: &CreateItemData,107 _properties: &CreateItemData,108) -> Option<()> {108) -> Option<()> {109 if _properties.data_size() as u32 > collection.limits.sponsored_data_size() {109 if _properties.data_size() as u32 > collection.limits.sponsored_data_size() {120 CreateItemData::ReFungible(_) => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,120 CreateItemData::ReFungible(_) => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,121 });121 });122122123 if let Some(last_tx_block) = <CreateItemBasket<T>>::get((collection.id, &who)) {123 if let Some(last_tx_block) = <CreateItemBasket<T>>::get((collection.id, who.as_sub())) {124 let timeout = last_tx_block + limit.into();124 let timeout = last_tx_block + limit.into();125 if block_number < timeout {125 if block_number < timeout {126 return None;126 return None;127 }127 }128 }128 }129129130 CreateItemBasket::<T>::insert((collection.id, who.clone()), block_number);130 CreateItemBasket::<T>::insert((collection.id, who.as_sub()), block_number);131131132 Some(())132 Some(())133}133}248 let (sponsor, collection) = load(*collection_id)?;248 let (sponsor, collection) = load(*collection_id)?;249 withdraw_create_item::<T>(&collection, who, data).map(|()| sponsor)249 withdraw_create_item::<T>(250 &collection,251 &T::CrossAccountId::from_sub(who.clone()),252 data,253 )254 .map(|()| sponsor)250 }255 }runtime/opal/src/lib.rsdiffbeforeafterboth152 spec_name: create_runtime_str!(RUNTIME_NAME),152 spec_name: create_runtime_str!(RUNTIME_NAME),153 impl_name: create_runtime_str!(RUNTIME_NAME),153 impl_name: create_runtime_str!(RUNTIME_NAME),154 authoring_version: 1,154 authoring_version: 1,155 spec_version: 918000,155 spec_version: 918001,156 impl_version: 0,156 impl_version: 0,157 apis: RUNTIME_API_VERSIONS,157 apis: RUNTIME_API_VERSIONS,158 transaction_version: 1,158 transaction_version: 1,runtime/quartz/src/lib.rsdiffbeforeafterboth152 spec_name: create_runtime_str!(RUNTIME_NAME),152 spec_name: create_runtime_str!(RUNTIME_NAME),153 impl_name: create_runtime_str!(RUNTIME_NAME),153 impl_name: create_runtime_str!(RUNTIME_NAME),154 authoring_version: 1,154 authoring_version: 1,155 spec_version: 918000,155 spec_version: 918001,156 impl_version: 0,156 impl_version: 0,157 apis: RUNTIME_API_VERSIONS,157 apis: RUNTIME_API_VERSIONS,158 transaction_version: 1,158 transaction_version: 1,runtime/unique/src/lib.rsdiffbeforeafterboth151 spec_name: create_runtime_str!(RUNTIME_NAME),151 spec_name: create_runtime_str!(RUNTIME_NAME),152 impl_name: create_runtime_str!(RUNTIME_NAME),152 impl_name: create_runtime_str!(RUNTIME_NAME),153 authoring_version: 1,153 authoring_version: 1,154 spec_version: 918000,154 spec_version: 918001,155 impl_version: 0,155 impl_version: 0,156 apis: RUNTIME_API_VERSIONS,156 apis: RUNTIME_API_VERSIONS,157 transaction_version: 1,157 transaction_version: 1,