difftreelog
ci fix clippy warnings
in: master
13 files changed
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -5996,34 +5996,34 @@
[[package]]
name = "pallet-scheduler"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"log",
"parity-scale-codec 2.1.3",
+ "serde",
+ "sp-core",
"sp-io",
"sp-runtime",
"sp-std",
+ "substrate-test-utils",
+ "up-sponsorship",
]
[[package]]
name = "pallet-scheduler"
version = "3.0.0"
+source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.3#c94e0cdfe5556680dca1996004751eeb114755d7"
dependencies = [
"frame-benchmarking",
"frame-support",
"frame-system",
"log",
"parity-scale-codec 2.1.3",
- "serde",
- "sp-core",
"sp-io",
"sp-runtime",
"sp-std",
- "substrate-test-utils",
- "up-sponsorship",
]
[[package]]
crates/evm-coder-macros/src/solidity_interface.rsdiffbeforeafterboth--- a/crates/evm-coder-macros/src/solidity_interface.rs
+++ b/crates/evm-coder-macros/src/solidity_interface.rs
@@ -264,7 +264,7 @@
ReturnType::Type(_, ty) => ty,
_ => return Err(syn::Error::new(value.sig.output.span(), "interface method should return Result<value>\nif there is no value to return - specify void (which is alias to unit)")),
};
- let result = parse_result_ok(&result)?;
+ let result = parse_result_ok(result)?;
let camel_name = info
.rename_selector
@@ -285,8 +285,8 @@
Ok(Self {
name: ident.clone(),
camel_name,
- pascal_name: snake_ident_to_pascal(&ident),
- screaming_name: snake_ident_to_screaming(&ident),
+ pascal_name: snake_ident_to_pascal(ident),
+ screaming_name: snake_ident_to_screaming(ident),
selector_str,
selector,
args,
@@ -433,7 +433,7 @@
found_error = true;
}
}
- TraitItem::Method(method) => methods.push(Method::try_from(&method)?),
+ TraitItem::Method(method) => methods.push(Method::try_from(method)?),
_ => {}
}
}
crates/evm-coder-macros/src/to_log.rsdiffbeforeafterboth--- a/crates/evm-coder-macros/src/to_log.rs
+++ b/crates/evm-coder-macros/src/to_log.rs
@@ -41,7 +41,7 @@
impl Event {
fn try_from(variant: &Variant) -> syn::Result<Self> {
let name = &variant.ident;
- let name_screaming = snake_ident_to_screaming(&name);
+ let name_screaming = snake_ident_to_screaming(name);
let named = match &variant.fields {
Fields::Named(named) => named,
@@ -54,7 +54,7 @@
};
let mut fields = Vec::new();
for field in &named.named {
- fields.push(EventField::try_from(&field)?);
+ fields.push(EventField::try_from(field)?);
}
let mut selector_str = format!("{}(", name);
for (i, arg) in fields.iter().enumerate() {
crates/evm-coder/src/abi.rsdiffbeforeafterboth--- a/crates/evm-coder/src/abi.rs
+++ b/crates/evm-coder/src/abi.rs
@@ -104,7 +104,7 @@
fn subresult(&mut self) -> Result<AbiReader<'i>> {
let offset = self.read_usize()?;
Ok(AbiReader {
- buf: &self.buf,
+ buf: self.buf,
offset: offset + self.offset,
})
}
@@ -252,7 +252,7 @@
impl_abi_writeable!(&str, string);
impl AbiWrite for &string {
fn abi_write(&self, writer: &mut AbiWriter) {
- writer.string(&self)
+ writer.string(self)
}
}
node/cli/src/cli.rsdiffbeforeafterboth1use crate::chain_spec;2use cumulus_client_cli;3use sc_cli;4use std::path::PathBuf;5use structopt::StructOpt;67/// Sub-commands supported by the collator.8#[derive(Debug, StructOpt)]9pub enum Subcommand {10 /// Export the genesis state of the parachain.11 #[structopt(name = "export-genesis-state")]12 ExportGenesisState(ExportGenesisStateCommand),1314 /// Export the genesis wasm of the parachain.15 #[structopt(name = "export-genesis-wasm")]16 ExportGenesisWasm(ExportGenesisWasmCommand),1718 /// Build a chain specification.19 BuildSpec(sc_cli::BuildSpecCmd),2021 /// Validate blocks.22 CheckBlock(sc_cli::CheckBlockCmd),2324 /// Export blocks.25 ExportBlocks(sc_cli::ExportBlocksCmd),2627 /// Export the state of a given block into a chain spec.28 ExportState(sc_cli::ExportStateCmd),2930 /// Import blocks.31 ImportBlocks(sc_cli::ImportBlocksCmd),3233 /// Remove the whole chain.34 PurgeChain(cumulus_client_cli::PurgeChainCmd),3536 /// Revert the chain to a previous state.37 Revert(sc_cli::RevertCmd),3839 /// The custom benchmark subcommmand benchmarking runtime pallets.40 #[structopt(name = "benchmark", about = "Benchmark runtime pallets.")]41 Benchmark(frame_benchmarking_cli::BenchmarkCmd),42}4344/// Command for exporting the genesis state of the parachain45#[derive(Debug, StructOpt)]46pub struct ExportGenesisStateCommand {47 /// Output file name or stdout if unspecified.48 #[structopt(parse(from_os_str))]49 pub output: Option<PathBuf>,5051 /// Id of the parachain this state is for.52 ///53 /// Default: 10054 #[structopt(long, conflicts_with = "chain")]55 pub parachain_id: Option<u32>,5657 /// Write output in binary. Default is to write in hex.58 #[structopt(short, long)]59 pub raw: bool,6061 /// The name of the chain for that the genesis state should be exported.62 #[structopt(long, conflicts_with = "parachain-id")]63 pub chain: Option<String>,64}6566/// Command for exporting the genesis wasm file.67#[derive(Debug, StructOpt)]68pub struct ExportGenesisWasmCommand {69 /// Output file name or stdout if unspecified.70 #[structopt(parse(from_os_str))]71 pub output: Option<PathBuf>,7273 /// Write output in binary. Default is to write in hex.74 #[structopt(short, long)]75 pub raw: bool,7677 /// The name of the chain for that the genesis wasm file should be exported.78 #[structopt(long)]79 pub chain: Option<String>,80}8182#[derive(Debug, StructOpt)]83#[structopt(settings = &[84 structopt::clap::AppSettings::GlobalVersion,85 structopt::clap::AppSettings::ArgsNegateSubcommands,86 structopt::clap::AppSettings::SubcommandsNegateReqs,87])]88pub struct Cli {89 #[structopt(subcommand)]90 pub subcommand: Option<Subcommand>,9192 #[structopt(flatten)]93 pub run: cumulus_client_cli::RunCmd,9495 /// Relaychain arguments96 #[structopt(raw = true)]97 pub relaychain_args: Vec<String>,98}99100#[derive(Debug)]101pub struct RelayChainCli {102 /// The actual relay chain cli object.103 pub base: polkadot_cli::RunCmd,104105 /// Optional chain id that should be passed to the relay chain.106 pub chain_id: Option<String>,107108 /// The base path that should be used by the relay chain.109 pub base_path: Option<PathBuf>,110}111112impl RelayChainCli {113 /// Parse the relay chain CLI parameters using the para chain `Configuration`.114 pub fn new<'a>(115 para_config: &sc_service::Configuration,116 relay_chain_args: impl Iterator<Item = &'a String>,117 ) -> Self {118 let extension = chain_spec::Extensions::try_get(&*para_config.chain_spec);119 let chain_id = extension.map(|e| e.relay_chain.clone());120 let base_path = para_config121 .base_path122 .as_ref()123 .map(|x| x.path().join("polkadot"));124 Self {125 base_path,126 chain_id,127 base: polkadot_cli::RunCmd::from_iter(relay_chain_args),128 }129 }130}node/cli/src/command.rsdiffbeforeafterboth--- a/node/cli/src/command.rs
+++ b/node/cli/src/command.rs
@@ -120,8 +120,7 @@
}
fn load_spec(&self, id: &str) -> std::result::Result<Box<dyn sc_service::ChainSpec>, String> {
- polkadot_cli::Cli::from_iter([RelayChainCli::executable_name().to_string()].iter())
- .load_spec(id)
+ polkadot_cli::Cli::from_iter([RelayChainCli::executable_name()].iter()).load_spec(id)
}
fn native_runtime_version(chain_spec: &Box<dyn ChainSpec>) -> &'static RuntimeVersion {
@@ -129,6 +128,7 @@
}
}
+#[allow(clippy::borrowed_box)]
fn extract_genesis_wasm(chain_spec: &Box<dyn sc_service::ChainSpec>) -> Result<Vec<u8>> {
let mut storage = chain_spec.build_storage()?;
@@ -189,7 +189,7 @@
runner.sync_run(|config| {
let polkadot_cli = RelayChainCli::new(
&config,
- [RelayChainCli::executable_name().to_string()]
+ [RelayChainCli::executable_name()]
.iter()
.chain(cli.relaychain_args.iter()),
);
@@ -275,7 +275,7 @@
let polkadot_cli = RelayChainCli::new(
&config,
- [RelayChainCli::executable_name().to_string()]
+ [RelayChainCli::executable_name()]
.iter()
.chain(cli.relaychain_args.iter()),
);
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -141,7 +141,7 @@
let (client, backend, keystore_container, task_manager) =
sc_service::new_full_parts::<Block, RuntimeApi, Executor>(
- &config,
+ config,
telemetry.as_ref().map(|(_, telemetry)| telemetry.handle()),
)?;
let client = Arc::new(client);
pallets/contract-helpers/src/lib.rsdiffbeforeafterboth--- a/pallets/contract-helpers/src/lib.rs
+++ b/pallets/contract-helpers/src/lib.rs
@@ -213,7 +213,7 @@
Ok(Some((who.clone(), *code_hash, salt.clone())))
}
Some(pallet_contracts::Call::instantiate_with_code(_, _, code, _, salt)) => {
- let code_hash = &T::Hashing::hash(&code);
+ let code_hash = &T::Hashing::hash(code);
Ok(Some((who.clone(), *code_hash, salt.clone())))
}
_ => Ok(None),
pallets/nft/src/eth/erc_impl.rsdiffbeforeafterboth--- a/pallets/nft/src/eth/erc_impl.rs
+++ b/pallets/nft/src/eth/erc_impl.rs
@@ -114,7 +114,7 @@
let to = T::CrossAccountId::from_eth(to);
let token_id = token_id.try_into().map_err(|_| "token_id overflow")?;
- <Module<T>>::transfer_from_internal(&caller, &from, &to, &self, token_id, 1)
+ <Module<T>>::transfer_from_internal(&caller, &from, &to, self, token_id, 1)
.map_err(|_| "transferFrom error")?;
Ok(())
}
@@ -130,7 +130,7 @@
let approved = T::CrossAccountId::from_eth(approved);
let token_id = token_id.try_into().map_err(|_| "token_id overflow")?;
- <Module<T>>::approve_internal(&caller, &approved, &self, token_id, 1)
+ <Module<T>>::approve_internal(&caller, &approved, self, token_id, 1)
.map_err(|_| "approve internal")?;
Ok(())
}
@@ -176,7 +176,7 @@
let to = T::CrossAccountId::from_eth(to);
let token_id = token_id.try_into().map_err(|_| "amount overflow")?;
- <Module<T>>::transfer_internal(&caller, &to, &self, token_id, 1)
+ <Module<T>>::transfer_internal(&caller, &to, self, token_id, 1)
.map_err(|_| "transfer error")?;
Ok(())
}
@@ -226,7 +226,7 @@
let to = T::CrossAccountId::from_eth(to);
let amount = amount.try_into().map_err(|_| "amount overflow")?;
- <Module<T>>::transfer_internal(&caller, &to, &self, 1, amount)
+ <Module<T>>::transfer_internal(&caller, &to, self, 1, amount)
.map_err(|_| "transfer error")?;
Ok(true)
}
@@ -242,7 +242,7 @@
let to = T::CrossAccountId::from_eth(to);
let amount = amount.try_into().map_err(|_| "amount overflow")?;
- <Module<T>>::transfer_from_internal(&caller, &from, &to, &self, 1, amount)
+ <Module<T>>::transfer_from_internal(&caller, &from, &to, self, 1, amount)
.map_err(|_| "transferFrom error")?;
Ok(true)
}
@@ -251,7 +251,7 @@
let spender = T::CrossAccountId::from_eth(spender);
let amount = amount.try_into().map_err(|_| "amount overflow")?;
- <Module<T>>::approve_internal(&caller, &spender, &self, 1, amount)
+ <Module<T>>::approve_internal(&caller, &spender, self, 1, amount)
.map_err(|_| "approve internal")?;
Ok(true)
}
pallets/nft/src/eth/mod.rsdiffbeforeafterboth--- a/pallets/nft/src/eth/mod.rs
+++ b/pallets/nft/src/eth/mod.rs
@@ -108,7 +108,7 @@
.unwrap_or(false)
}
fn get_code(target: &H160) -> Option<Vec<u8>> {
- map_eth_to_id(&target)
+ map_eth_to_id(target)
.and_then(<CollectionById<T>>::get)
.map(|collection| {
match collection.mode {
@@ -127,7 +127,7 @@
input: &[u8],
value: U256,
) -> Option<PrecompileOutput> {
- let mut collection = map_eth_to_id(&target)
+ let mut collection = map_eth_to_id(target)
.and_then(|id| <CollectionHandle<T>>::get_with_gas_limit(id, gas_limit))?;
let (method_id, input) = AbiReader::new_call(input).unwrap();
let result = call_internal(&mut collection, *source, method_id, input, value);
pallets/nft/src/eth/sponsoring.rsdiffbeforeafterboth--- a/pallets/nft/src/eth/sponsoring.rs
+++ b/pallets/nft/src/eth/sponsoring.rs
@@ -132,10 +132,10 @@
) -> Result<Self::LiquidityInfo, pallet_evm::Error<T>> {
let mut who_pays_fee = *who;
if let WithdrawReason::Call { target, input } = &reason {
- if let Some(collection_id) = crate::eth::map_eth_to_id(&target) {
+ if let Some(collection_id) = crate::eth::map_eth_to_id(target) {
if let Some(collection) = <CollectionById<T>>::get(collection_id) {
if let Some(sponsor) = collection.sponsorship.sponsor() {
- if try_sponsor(who, collection_id, &collection, &input).is_ok() {
+ if try_sponsor(who, collection_id, &collection, input).is_ok() {
who_pays_fee =
T::EvmBackwardsAddressMapping::from_account_id(sponsor.clone());
}
pallets/nft/src/lib.rsdiffbeforeafterboth--- a/pallets/nft/src/lib.rs
+++ b/pallets/nft/src/lib.rs
@@ -1232,7 +1232,7 @@
) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let mut target_collection = Self::get_collection(collection_id)?;
- Self::check_owner_permissions(&target_collection, &sender.as_sub())?;
+ Self::check_owner_permissions(&target_collection, sender.as_sub())?;
let old_limits = &target_collection.limits;
let chain_limits = ChainLimit::get();
@@ -1267,9 +1267,9 @@
owner: &T::CrossAccountId,
data: CreateItemData,
) -> DispatchResult {
- Self::can_create_items_in_collection(&collection, &sender, &owner, 1)?;
- Self::validate_create_item_args(&collection, &data)?;
- Self::create_item_no_validation(&collection, owner, data)?;
+ Self::can_create_items_in_collection(collection, sender, owner, 1)?;
+ Self::validate_create_item_args(collection, &data)?;
+ Self::create_item_no_validation(collection, owner, data)?;
Ok(())
}
@@ -1283,18 +1283,18 @@
) -> DispatchResult {
target_collection.consume_gas(2000000)?;
// Limits check
- Self::is_correct_transfer(target_collection, &recipient)?;
+ Self::is_correct_transfer(target_collection, recipient)?;
// Transfer permissions check
ensure!(
- Self::is_item_owner(&sender, target_collection, item_id)
- || Self::is_owner_or_admin_permissions(target_collection, &sender),
+ Self::is_item_owner(sender, target_collection, item_id)
+ || Self::is_owner_or_admin_permissions(target_collection, sender),
Error::<T>::NoPermission
);
if target_collection.access == AccessMode::WhiteList {
- Self::check_white_list(target_collection, &sender)?;
- Self::check_white_list(target_collection, &recipient)?;
+ Self::check_white_list(target_collection, sender)?;
+ Self::check_white_list(target_collection, recipient)?;
}
match target_collection.mode {
@@ -1305,7 +1305,7 @@
recipient.clone(),
)?,
CollectionMode::Fungible(_) => {
- Self::transfer_fungible(target_collection, value, &sender, &recipient)?
+ Self::transfer_fungible(target_collection, value, sender, recipient)?
}
CollectionMode::ReFungible => Self::transfer_refungible(
target_collection,
@@ -1336,23 +1336,23 @@
amount: u128,
) -> DispatchResult {
collection.consume_gas(2000000)?;
- Self::token_exists(&collection, item_id)?;
+ Self::token_exists(collection, item_id)?;
// Transfer permissions check
let bypasses_limits = collection.limits.owner_can_transfer
- && Self::is_owner_or_admin_permissions(&collection, &sender);
+ && Self::is_owner_or_admin_permissions(collection, sender);
let allowance_limit = if bypasses_limits {
None
- } else if let Some(amount) = Self::owned_amount(&sender, &collection, item_id) {
+ } else if let Some(amount) = Self::owned_amount(sender, collection, item_id) {
Some(amount)
} else {
fail!(Error::<T>::NoPermission);
};
if collection.access == AccessMode::WhiteList {
- Self::check_white_list(&collection, &sender)?;
- Self::check_white_list(&collection, &spender)?;
+ Self::check_white_list(collection, sender)?;
+ Self::check_white_list(collection, spender)?;
}
let allowance: u128 = amount
@@ -1412,19 +1412,19 @@
<Allowances<T>>::get(collection.id, (item_id, from.as_sub(), sender.as_sub()));
// Limits check
- Self::is_correct_transfer(&collection, &recipient)?;
+ Self::is_correct_transfer(collection, recipient)?;
// Transfer permissions check
ensure!(
approval >= amount
|| (collection.limits.owner_can_transfer
- && Self::is_owner_or_admin_permissions(&collection, &sender)),
+ && Self::is_owner_or_admin_permissions(collection, sender)),
Error::<T>::NoPermission
);
if collection.access == AccessMode::WhiteList {
- Self::check_white_list(&collection, &sender)?;
- Self::check_white_list(&collection, &recipient)?;
+ Self::check_white_list(collection, sender)?;
+ Self::check_white_list(collection, recipient)?;
}
// Reduce approval by transferred amount or remove if remaining approval drops to 0
@@ -1441,13 +1441,13 @@
match collection.mode {
CollectionMode::NFT => {
- Self::transfer_nft(&collection, item_id, from.clone(), recipient.clone())?
+ Self::transfer_nft(collection, item_id, from.clone(), recipient.clone())?
}
CollectionMode::Fungible(_) => {
- Self::transfer_fungible(&collection, amount, &from, &recipient)?
+ Self::transfer_fungible(collection, amount, from, recipient)?
}
CollectionMode::ReFungible => Self::transfer_refungible(
- &collection,
+ collection,
item_id,
amount,
from.clone(),
@@ -1473,7 +1473,7 @@
item_id: TokenId,
data: Vec<u8>,
) -> DispatchResult {
- Self::token_exists(&collection, item_id)?;
+ Self::token_exists(collection, item_id)?;
ensure!(
ChainLimit::get().custom_data_limit >= data.len() as u32,
@@ -1482,15 +1482,15 @@
// Modify permissions check
ensure!(
- Self::is_item_owner(&sender, &collection, item_id)
- || Self::is_owner_or_admin_permissions(&collection, &sender),
+ Self::is_item_owner(sender, collection, item_id)
+ || Self::is_owner_or_admin_permissions(collection, sender),
Error::<T>::NoPermission
);
match collection.mode {
- CollectionMode::NFT => Self::set_nft_variable_data(&collection, item_id, data)?,
+ CollectionMode::NFT => Self::set_nft_variable_data(collection, item_id, data)?,
CollectionMode::ReFungible => {
- Self::set_re_fungible_variable_data(&collection, item_id, data)?
+ Self::set_re_fungible_variable_data(collection, item_id, data)?
}
CollectionMode::Fungible(_) => fail!(Error::<T>::CantStoreMetadataInFungibleTokens),
_ => fail!(Error::<T>::UnexpectedCollectionType),
@@ -1505,18 +1505,13 @@
owner: &T::CrossAccountId,
items_data: Vec<CreateItemData>,
) -> DispatchResult {
- Self::can_create_items_in_collection(
- &collection,
- &sender,
- &owner,
- items_data.len() as u32,
- )?;
+ Self::can_create_items_in_collection(collection, sender, owner, items_data.len() as u32)?;
for data in &items_data {
- Self::validate_create_item_args(&collection, data)?;
+ Self::validate_create_item_args(collection, data)?;
}
for data in &items_data {
- Self::create_item_no_validation(&collection, owner, data.clone())?;
+ Self::create_item_no_validation(collection, owner, data.clone())?;
}
Ok(())
@@ -1529,22 +1524,20 @@
value: u128,
) -> DispatchResult {
ensure!(
- Self::is_item_owner(&sender, &collection, item_id)
+ Self::is_item_owner(sender, collection, item_id)
|| (collection.limits.owner_can_transfer
- && Self::is_owner_or_admin_permissions(&collection, &sender)),
+ && Self::is_owner_or_admin_permissions(collection, sender)),
Error::<T>::NoPermission
);
if collection.access == AccessMode::WhiteList {
- Self::check_white_list(&collection, &sender)?;
+ Self::check_white_list(collection, sender)?;
}
match collection.mode {
- CollectionMode::NFT => Self::burn_nft_item(&collection, item_id)?,
- CollectionMode::Fungible(_) => Self::burn_fungible_item(&sender, &collection, value)?,
- CollectionMode::ReFungible => {
- Self::burn_refungible_item(&collection, item_id, &sender)?
- }
+ CollectionMode::NFT => Self::burn_nft_item(collection, item_id)?,
+ CollectionMode::Fungible(_) => Self::burn_fungible_item(sender, collection, value)?,
+ CollectionMode::ReFungible => Self::burn_refungible_item(collection, item_id, sender)?,
_ => (),
};
@@ -1557,7 +1550,7 @@
address: &T::CrossAccountId,
whitelisted: bool,
) -> DispatchResult {
- Self::check_owner_or_admin_permissions(&collection, &sender)?;
+ Self::check_owner_or_admin_permissions(collection, sender)?;
if whitelisted {
<WhiteList<T>>::insert(collection.id, address.as_sub(), true);
@@ -1610,7 +1603,7 @@
Error::<T>::AccountTokenLimitExceeded
);
- if !Self::is_owner_or_admin_permissions(collection, &sender) {
+ if !Self::is_owner_or_admin_permissions(collection, sender) {
ensure!(collection.mint_mode, Error::<T>::PublicMintingNotAllowed);
Self::check_white_list(collection, owner)?;
Self::check_white_list(collection, sender)?;
@@ -1691,7 +1684,7 @@
Self::add_nft_item(collection, item)?;
}
CreateItemData::Fungible(data) => {
- Self::add_fungible_item(collection, &owner, data.value)?;
+ Self::add_fungible_item(collection, owner, data.value)?;
}
CreateItemData::ReFungible(data) => {
let owner_list = vec![Ownership {
@@ -1934,7 +1927,7 @@
subject: &T::CrossAccountId,
) -> bool {
*subject.as_sub() == collection.owner
- || <AdminList<T>>::get(collection.id).contains(&subject)
+ || <AdminList<T>>::get(collection.id).contains(subject)
}
fn check_owner_or_admin_permissions(
@@ -1979,7 +1972,7 @@
) -> bool {
match target_collection.mode {
CollectionMode::Fungible(_) => true,
- _ => Self::owned_amount(&subject, target_collection, item_id).is_some(),
+ _ => Self::owned_amount(subject, target_collection, item_id).is_some(),
}
}
pallets/nft/src/sponsorship.rsdiffbeforeafterboth--- a/pallets/nft/src/sponsorship.rs
+++ b/pallets/nft/src/sponsorship.rs
@@ -179,14 +179,14 @@
{
fn get_sponsor(who: &T::AccountId, call: &C) -> Option<T::AccountId> {
match IsSubType::<Call<T>>::is_sub_type(call)? {
- Call::create_item(collection_id, _owner, _properties) => {
- Self::withdraw_create_item(who, collection_id, &_properties)
+ Call::create_item(collection_id, _owner, properties) => {
+ Self::withdraw_create_item(who, collection_id, properties)
}
Call::transfer(_new_owner, collection_id, item_id, _value) => {
Self::withdraw_transfer(who, collection_id, item_id)
}
Call::set_variable_meta_data(collection_id, item_id, data) => {
- Self::withdraw_set_variable_meta_data(collection_id, item_id, &data)
+ Self::withdraw_set_variable_meta_data(collection_id, item_id, data)
}
_ => None,
}