chore: regenerate umbrella crate, fix feature propagation
This commit is contained in:
@@ -218,8 +218,9 @@ where
|
||||
use pezframe_support::traits::fungibles::Inspect;
|
||||
env.charge(<Runtime as Config<Instance>>::WeightInfo::total_issuance())?;
|
||||
|
||||
let value =
|
||||
Self::to_u256(pezpallet_assets::Pezpallet::<Runtime, Instance>::total_issuance(asset_id))?;
|
||||
let value = Self::to_u256(
|
||||
pezpallet_assets::Pezpallet::<Runtime, Instance>::total_issuance(asset_id),
|
||||
)?;
|
||||
return Ok(IERC20::totalSupplyCall::abi_encode_returns(&value));
|
||||
}
|
||||
|
||||
@@ -232,8 +233,9 @@ where
|
||||
env.charge(<Runtime as Config<Instance>>::WeightInfo::balance())?;
|
||||
let account = call.account.into_array().into();
|
||||
let account = <Runtime as pezpallet_revive::Config>::AddressMapper::to_account_id(&account);
|
||||
let value =
|
||||
Self::to_u256(pezpallet_assets::Pezpallet::<Runtime, Instance>::balance(asset_id, account))?;
|
||||
let value = Self::to_u256(pezpallet_assets::Pezpallet::<Runtime, Instance>::balance(
|
||||
asset_id, account,
|
||||
))?;
|
||||
return Ok(IERC20::balanceOfCall::abi_encode_returns(&value));
|
||||
}
|
||||
|
||||
|
||||
@@ -141,7 +141,8 @@ fn balance_of_works() {
|
||||
assert_ok!(Assets::force_create(RuntimeOrigin::root(), asset_id, owner, true, 1));
|
||||
assert_ok!(Assets::mint(RuntimeOrigin::signed(owner), asset_id, owner, 1000));
|
||||
|
||||
let account = <Test as pezpallet_revive::Config>::AddressMapper::to_address(&owner).0.into();
|
||||
let account =
|
||||
<Test as pezpallet_revive::Config>::AddressMapper::to_address(&owner).0.into();
|
||||
let data = IERC20::balanceOfCall { account }.abi_encode();
|
||||
|
||||
let data = pezpallet_revive::Pezpallet::<Test>::bare_call(
|
||||
|
||||
@@ -21,9 +21,9 @@ use super::*;
|
||||
|
||||
/// A mutator type allowing inspection and possible modification of the extra "sidecar" data.
|
||||
///
|
||||
/// This may be used as a `Deref` for the pezpallet's extra data. If mutated (using `DerefMut`), then
|
||||
/// any uncommitted changes (see `commit` function) will be automatically committed to storage when
|
||||
/// dropped. Changes, even after committed, may be reverted to their original values with the
|
||||
/// This may be used as a `Deref` for the pezpallet's extra data. If mutated (using `DerefMut`),
|
||||
/// then any uncommitted changes (see `commit` function) will be automatically committed to storage
|
||||
/// when dropped. Changes, even after committed, may be reverted to their original values with the
|
||||
/// `revert` function.
|
||||
pub struct ExtraMutator<T: Config<I>, I: 'static = ()> {
|
||||
id: T::AssetId,
|
||||
|
||||
@@ -160,7 +160,9 @@ impl<T: Config<I>, I: 'static> Pezpallet<T, I> {
|
||||
if amount < details.min_balance {
|
||||
return DepositConsequence::BelowMinimum;
|
||||
}
|
||||
if !details.is_sufficient && !pezframe_system::Pezpallet::<T>::can_accrue_consumers(who, 2) {
|
||||
if !details.is_sufficient &&
|
||||
!pezframe_system::Pezpallet::<T>::can_accrue_consumers(who, 2)
|
||||
{
|
||||
return DepositConsequence::CannotCreate;
|
||||
}
|
||||
if details.is_sufficient && details.sufficients.checked_add(1).is_none() {
|
||||
|
||||
@@ -30,7 +30,9 @@ use pezframe_support::{
|
||||
|
||||
use super::*;
|
||||
|
||||
impl<T: Config<I>, I: 'static> fungibles::Inspect<<T as SystemConfig>::AccountId> for Pezpallet<T, I> {
|
||||
impl<T: Config<I>, I: 'static> fungibles::Inspect<<T as SystemConfig>::AccountId>
|
||||
for Pezpallet<T, I>
|
||||
{
|
||||
type AssetId = T::AssetId;
|
||||
type Balance = T::Balance;
|
||||
|
||||
@@ -83,7 +85,9 @@ impl<T: Config<I>, I: 'static> fungibles::Inspect<<T as SystemConfig>::AccountId
|
||||
}
|
||||
}
|
||||
|
||||
impl<T: Config<I>, I: 'static> fungibles::Mutate<<T as SystemConfig>::AccountId> for Pezpallet<T, I> {
|
||||
impl<T: Config<I>, I: 'static> fungibles::Mutate<<T as SystemConfig>::AccountId>
|
||||
for Pezpallet<T, I>
|
||||
{
|
||||
fn done_mint_into(
|
||||
asset_id: Self::AssetId,
|
||||
beneficiary: &<T as SystemConfig>::AccountId,
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
//! [`fungible`](pezframe_support::traits::fungible) traits, via [`fungibles`] traits.
|
||||
//!
|
||||
//! The pezpallet makes heavy use of concepts such as Holds and Freezes from the
|
||||
//! [`pezframe_support::traits::fungible`] traits, therefore you should read and understand those docs
|
||||
//! as a prerequisite to understanding this pezpallet.
|
||||
//! [`pezframe_support::traits::fungible`] traits, therefore you should read and understand those
|
||||
//! docs as a prerequisite to understanding this pezpallet.
|
||||
//!
|
||||
//! See the [`frame_tokens`] reference docs for more information about the place of the
|
||||
//! Assets pezpallet in FRAME.
|
||||
@@ -171,11 +171,11 @@ pub use types::*;
|
||||
extern crate alloc;
|
||||
extern crate core;
|
||||
|
||||
use scale_info::TypeInfo;
|
||||
use pezsp_runtime::{
|
||||
traits::{AtLeast32BitUnsigned, CheckedAdd, CheckedSub, Saturating, StaticLookup, Zero},
|
||||
ArithmeticError, DispatchError, TokenError,
|
||||
};
|
||||
use scale_info::TypeInfo;
|
||||
|
||||
use alloc::vec::Vec;
|
||||
use core::{fmt::Debug, marker::PhantomData};
|
||||
@@ -1951,7 +1951,9 @@ pub mod pezpallet {
|
||||
|
||||
/// Implements [`ProvideAssetReserves`] trait for getting the list of trusted reserves for a
|
||||
/// given asset.
|
||||
impl<T: Config<I>, I: 'static> ProvideAssetReserves<T::AssetId, T::ReserveData> for Pezpallet<T, I> {
|
||||
impl<T: Config<I>, I: 'static> ProvideAssetReserves<T::AssetId, T::ReserveData>
|
||||
for Pezpallet<T, I>
|
||||
{
|
||||
/// Provide the configured reserves for asset `id`.
|
||||
fn reserves(id: &T::AssetId) -> Vec<T::ReserveData> {
|
||||
Reserves::<T, I>::get(id).into_inner()
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
// limitations under the License.
|
||||
|
||||
use super::*;
|
||||
use pezframe_support::traits::OnRuntimeUpgrade;
|
||||
use log;
|
||||
use pezframe_support::traits::OnRuntimeUpgrade;
|
||||
|
||||
#[cfg(feature = "try-runtime")]
|
||||
use pezsp_runtime::TryRuntimeError;
|
||||
|
||||
Reference in New Issue
Block a user