difftreelog
Contract address fix
in: master
2 files changed
pallets/nft/src/lib.rsdiffbeforeafterboth34use sp_runtime::sp_std::prelude::Vec;34use sp_runtime::sp_std::prelude::Vec;35use sp_runtime::{35use sp_runtime::{36 traits::{36 traits::{37 DispatchInfoOf, Dispatchable, PostDispatchInfoOf, Saturating, SaturatedConversion, SignedExtension, Zero,37 Hash, DispatchInfoOf, Dispatchable, PostDispatchInfoOf, Saturating, SaturatedConversion, SignedExtension, Zero,38 },38 },39 transaction_validity::{39 transaction_validity::{40 TransactionPriority, InvalidTransaction, TransactionValidity, TransactionValidityError, ValidTransaction,40 TransactionPriority, InvalidTransaction, TransactionValidity, TransactionValidityError, ValidTransaction,43};43};44use sp_runtime::traits::StaticLookup;44use sp_runtime::traits::StaticLookup;45use pallet_contracts::chain_extension::UncheckedFrom;45use pallet_contracts::chain_extension::UncheckedFrom;46use pallet_contracts::*;46use pallet_transaction_payment::OnChargeTransaction;47use pallet_transaction_payment::OnChargeTransaction;474848#[cfg(test)]49#[cfg(test)]2581 T::AccountId::default()2582 T::AccountId::default()2582 },2583 },25842585 // On instantiation with code: set the contract owner2586 Some(pallet_contracts::Call::instantiate_with_code(_endowment, _gas_limit, _code, _data, _salt)) => {25872588 let new_contract_address = <pallet_contracts::Module<T>>::contract_address(2589 &who,2590 &T::Hashing::hash(&_code),2591 _salt,2592 );25932594 <ContractOwner<T>>::insert(new_contract_address.clone(), who.clone());25952596 T::AccountId::default()2597 }258325982584 // When the contract is called, check if the sponsoring is enabled and pay fees from contract endowment if it is2599 // When the contract is called, check if the sponsoring is enabled and pay fees from contract endowment if it is2585 Some(pallet_contracts::Call::call(dest, _value, _gas_limit, _data)) => {2600 Some(pallet_contracts::Call::call(dest, _value, _gas_limit, _data)) => {runtime/src/lib.rsdiffbeforeafterboth565 system::CheckEra<Runtime>,565 system::CheckEra<Runtime>,566 system::CheckNonce<Runtime>,566 system::CheckNonce<Runtime>,567 system::CheckWeight<Runtime>,567 system::CheckWeight<Runtime>,568 // pallet_nft::ChargeTransactionPayment<Runtime>,568 pallet_nft::ChargeTransactionPayment<Runtime>,569);569);570/// Unchecked extrinsic type as expected by this runtime.570/// Unchecked extrinsic type as expected by this runtime.571pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;571pub type UncheckedExtrinsic = generic::UncheckedExtrinsic<Address, Call, Signature, SignedExtra>;