mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 10:31:03 +00:00
* update to use pub dispatchables * update Substrate * Update claims.rs * remove warning Co-authored-by: parity-processbot <>
This commit is contained in:
Generated
+155
-155
File diff suppressed because it is too large
Load Diff
@@ -281,7 +281,7 @@ pub mod pallet {
|
|||||||
/// Total Complexity: O(1)
|
/// Total Complexity: O(1)
|
||||||
/// </weight>
|
/// </weight>
|
||||||
#[pallet::weight(T::WeightInfo::claim())]
|
#[pallet::weight(T::WeightInfo::claim())]
|
||||||
pub(super) fn claim(
|
pub fn claim(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
dest: T::AccountId,
|
dest: T::AccountId,
|
||||||
ethereum_signature: EcdsaSignature
|
ethereum_signature: EcdsaSignature
|
||||||
@@ -313,7 +313,7 @@ pub mod pallet {
|
|||||||
/// Total Complexity: O(1)
|
/// Total Complexity: O(1)
|
||||||
/// </weight>
|
/// </weight>
|
||||||
#[pallet::weight(T::WeightInfo::mint_claim())]
|
#[pallet::weight(T::WeightInfo::mint_claim())]
|
||||||
pub(super) fn mint_claim(
|
pub fn mint_claim(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
who: EthereumAddress,
|
who: EthereumAddress,
|
||||||
value: BalanceOf<T>,
|
value: BalanceOf<T>,
|
||||||
@@ -360,7 +360,7 @@ pub mod pallet {
|
|||||||
/// Total Complexity: O(1)
|
/// Total Complexity: O(1)
|
||||||
/// </weight>
|
/// </weight>
|
||||||
#[pallet::weight(T::WeightInfo::claim_attest())]
|
#[pallet::weight(T::WeightInfo::claim_attest())]
|
||||||
pub(super) fn claim_attest(
|
pub fn claim_attest(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
dest: T::AccountId,
|
dest: T::AccountId,
|
||||||
ethereum_signature: EcdsaSignature,
|
ethereum_signature: EcdsaSignature,
|
||||||
@@ -400,7 +400,7 @@ pub mod pallet {
|
|||||||
DispatchClass::Normal,
|
DispatchClass::Normal,
|
||||||
Pays::No
|
Pays::No
|
||||||
))]
|
))]
|
||||||
pub(super) fn attest(origin: OriginFor<T>, statement: Vec<u8>) -> DispatchResult {
|
pub fn attest(origin: OriginFor<T>, statement: Vec<u8>) -> DispatchResult {
|
||||||
let who = ensure_signed(origin)?;
|
let who = ensure_signed(origin)?;
|
||||||
let signer = Preclaims::<T>::get(&who).ok_or(Error::<T>::SenderHasNoClaim)?;
|
let signer = Preclaims::<T>::get(&who).ok_or(Error::<T>::SenderHasNoClaim)?;
|
||||||
if let Some(s) = Signing::<T>::get(signer) {
|
if let Some(s) = Signing::<T>::get(signer) {
|
||||||
@@ -412,7 +412,7 @@ pub mod pallet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[pallet::weight(T::WeightInfo::move_claim())]
|
#[pallet::weight(T::WeightInfo::move_claim())]
|
||||||
pub(super) fn move_claim(
|
pub fn move_claim(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
old: EthereumAddress,
|
old: EthereumAddress,
|
||||||
new: EthereumAddress,
|
new: EthereumAddress,
|
||||||
|
|||||||
@@ -122,7 +122,6 @@ impl<T: Config + paras::Config> ParachainHeadsProvider for paras::Pallet<T> {
|
|||||||
#[frame_support::pallet]
|
#[frame_support::pallet]
|
||||||
pub mod pallet {
|
pub mod pallet {
|
||||||
use frame_support::pallet_prelude::*;
|
use frame_support::pallet_prelude::*;
|
||||||
use frame_system::pallet_prelude::*;
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
#[pallet::pallet]
|
#[pallet::pallet]
|
||||||
@@ -158,12 +157,6 @@ pub mod pallet {
|
|||||||
BeefyNextAuthoritySet<MerkleRootOf<T>>,
|
BeefyNextAuthoritySet<MerkleRootOf<T>>,
|
||||||
ValueQuery,
|
ValueQuery,
|
||||||
>;
|
>;
|
||||||
|
|
||||||
#[pallet::hooks]
|
|
||||||
impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {}
|
|
||||||
|
|
||||||
#[pallet::call]
|
|
||||||
impl<T: Config> Pallet<T> {}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<T: Config> LeafDataProvider for Pallet<T> where
|
impl<T: Config> LeafDataProvider for Pallet<T> where
|
||||||
|
|||||||
@@ -285,7 +285,7 @@ pub mod pallet {
|
|||||||
///
|
///
|
||||||
/// Can only be called by the Root origin.
|
/// Can only be called by the Root origin.
|
||||||
#[pallet::weight(T::DbWeight::get().reads_writes(1, 1))]
|
#[pallet::weight(T::DbWeight::get().reads_writes(1, 1))]
|
||||||
fn force_remove_lock(origin: OriginFor<T>, para: ParaId) -> DispatchResult {
|
pub fn force_remove_lock(origin: OriginFor<T>, para: ParaId) -> DispatchResult {
|
||||||
ensure_root(origin)?;
|
ensure_root(origin)?;
|
||||||
Self::remove_lock(para);
|
Self::remove_lock(para);
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ pub mod pallet {
|
|||||||
///
|
///
|
||||||
/// Origin must match the `ValidityOrigin`.
|
/// Origin must match the `ValidityOrigin`.
|
||||||
#[pallet::weight(200_000_000 + T::DbWeight::get().reads_writes(4, 1))]
|
#[pallet::weight(200_000_000 + T::DbWeight::get().reads_writes(4, 1))]
|
||||||
pub(super) fn create_account(
|
pub fn create_account(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
who: T::AccountId,
|
who: T::AccountId,
|
||||||
signature: Vec<u8>
|
signature: Vec<u8>
|
||||||
@@ -230,7 +230,7 @@ pub mod pallet {
|
|||||||
///
|
///
|
||||||
/// Origin must match the `ValidityOrigin`.
|
/// Origin must match the `ValidityOrigin`.
|
||||||
#[pallet::weight(T::DbWeight::get().reads_writes(1, 1))]
|
#[pallet::weight(T::DbWeight::get().reads_writes(1, 1))]
|
||||||
pub(super) fn update_validity_status(
|
pub fn update_validity_status(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
who: T::AccountId,
|
who: T::AccountId,
|
||||||
validity: AccountValidity
|
validity: AccountValidity
|
||||||
@@ -252,7 +252,7 @@ pub mod pallet {
|
|||||||
///
|
///
|
||||||
/// Origin must match the `ValidityOrigin`.
|
/// Origin must match the `ValidityOrigin`.
|
||||||
#[pallet::weight(T::DbWeight::get().reads_writes(2, 1))]
|
#[pallet::weight(T::DbWeight::get().reads_writes(2, 1))]
|
||||||
pub(super) fn update_balance(
|
pub fn update_balance(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
who: T::AccountId,
|
who: T::AccountId,
|
||||||
free_balance: BalanceOf<T>,
|
free_balance: BalanceOf<T>,
|
||||||
@@ -281,7 +281,7 @@ pub mod pallet {
|
|||||||
///
|
///
|
||||||
/// Origin must match the configured `PaymentAccount`.
|
/// Origin must match the configured `PaymentAccount`.
|
||||||
#[pallet::weight(T::DbWeight::get().reads_writes(4, 2))]
|
#[pallet::weight(T::DbWeight::get().reads_writes(4, 2))]
|
||||||
pub(super) fn payout(origin: OriginFor<T>, who: T::AccountId) -> DispatchResult {
|
pub fn payout(origin: OriginFor<T>, who: T::AccountId) -> DispatchResult {
|
||||||
// Payments must be made directly by the `PaymentAccount`.
|
// Payments must be made directly by the `PaymentAccount`.
|
||||||
let payment_account = ensure_signed(origin)?;
|
let payment_account = ensure_signed(origin)?;
|
||||||
ensure!(payment_account == PaymentAccount::<T>::get(), DispatchError::BadOrigin);
|
ensure!(payment_account == PaymentAccount::<T>::get(), DispatchError::BadOrigin);
|
||||||
@@ -334,7 +334,7 @@ pub mod pallet {
|
|||||||
///
|
///
|
||||||
/// Origin must match the `ConfigurationOrigin`
|
/// Origin must match the `ConfigurationOrigin`
|
||||||
#[pallet::weight(T::DbWeight::get().writes(1))]
|
#[pallet::weight(T::DbWeight::get().writes(1))]
|
||||||
pub(super) fn set_payment_account(origin: OriginFor<T>, who: T::AccountId) -> DispatchResult {
|
pub fn set_payment_account(origin: OriginFor<T>, who: T::AccountId) -> DispatchResult {
|
||||||
T::ConfigurationOrigin::ensure_origin(origin)?;
|
T::ConfigurationOrigin::ensure_origin(origin)?;
|
||||||
// Possibly this is worse than having the caller account be the payment account?
|
// Possibly this is worse than having the caller account be the payment account?
|
||||||
PaymentAccount::<T>::set(who.clone());
|
PaymentAccount::<T>::set(who.clone());
|
||||||
@@ -346,7 +346,7 @@ pub mod pallet {
|
|||||||
///
|
///
|
||||||
/// Origin must match the `ConfigurationOrigin`
|
/// Origin must match the `ConfigurationOrigin`
|
||||||
#[pallet::weight(T::DbWeight::get().writes(1))]
|
#[pallet::weight(T::DbWeight::get().writes(1))]
|
||||||
pub(super) fn set_statement(origin: OriginFor<T>, statement: Vec<u8>) -> DispatchResult {
|
pub fn set_statement(origin: OriginFor<T>, statement: Vec<u8>) -> DispatchResult {
|
||||||
T::ConfigurationOrigin::ensure_origin(origin)?;
|
T::ConfigurationOrigin::ensure_origin(origin)?;
|
||||||
ensure!((statement.len() as u32) < T::MaxStatementLength::get(), Error::<T>::InvalidStatement);
|
ensure!((statement.len() as u32) < T::MaxStatementLength::get(), Error::<T>::InvalidStatement);
|
||||||
// Possibly this is worse than having the caller account be the payment account?
|
// Possibly this is worse than having the caller account be the payment account?
|
||||||
@@ -359,7 +359,7 @@ pub mod pallet {
|
|||||||
///
|
///
|
||||||
/// Origin must match the `ConfigurationOrigin`
|
/// Origin must match the `ConfigurationOrigin`
|
||||||
#[pallet::weight(T::DbWeight::get().writes(1))]
|
#[pallet::weight(T::DbWeight::get().writes(1))]
|
||||||
pub(super) fn set_unlock_block(origin: OriginFor<T>, unlock_block: T::BlockNumber) -> DispatchResult {
|
pub fn set_unlock_block(origin: OriginFor<T>, unlock_block: T::BlockNumber) -> DispatchResult {
|
||||||
T::ConfigurationOrigin::ensure_origin(origin)?;
|
T::ConfigurationOrigin::ensure_origin(origin)?;
|
||||||
ensure!(unlock_block > frame_system::Pallet::<T>::block_number(), Error::<T>::InvalidUnlockBlock);
|
ensure!(unlock_block > frame_system::Pallet::<T>::block_number(), Error::<T>::InvalidUnlockBlock);
|
||||||
// Possibly this is worse than having the caller account be the payment account?
|
// Possibly this is worse than having the caller account be the payment account?
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ decl_module! {
|
|||||||
///
|
///
|
||||||
/// Can only be called by the Root origin.
|
/// Can only be called by the Root origin.
|
||||||
#[weight = T::WeightInfo::force_lease()]
|
#[weight = T::WeightInfo::force_lease()]
|
||||||
fn force_lease(origin,
|
pub fn force_lease(origin,
|
||||||
para: ParaId,
|
para: ParaId,
|
||||||
leaser: T::AccountId,
|
leaser: T::AccountId,
|
||||||
amount: BalanceOf<T>,
|
amount: BalanceOf<T>,
|
||||||
@@ -157,7 +157,7 @@ decl_module! {
|
|||||||
///
|
///
|
||||||
/// Can only be called by the Root origin.
|
/// Can only be called by the Root origin.
|
||||||
#[weight = T::WeightInfo::clear_all_leases()]
|
#[weight = T::WeightInfo::clear_all_leases()]
|
||||||
fn clear_all_leases(origin, para: ParaId) -> DispatchResult {
|
pub fn clear_all_leases(origin, para: ParaId) -> DispatchResult {
|
||||||
ensure_root(origin)?;
|
ensure_root(origin)?;
|
||||||
let deposits = Self::all_deposits_held(para);
|
let deposits = Self::all_deposits_held(para);
|
||||||
|
|
||||||
@@ -179,7 +179,7 @@ decl_module! {
|
|||||||
///
|
///
|
||||||
/// Origin must be signed, but can be called by anyone.
|
/// Origin must be signed, but can be called by anyone.
|
||||||
#[weight = T::WeightInfo::trigger_onboard()]
|
#[weight = T::WeightInfo::trigger_onboard()]
|
||||||
fn trigger_onboard(origin, para: ParaId) -> DispatchResult {
|
pub fn trigger_onboard(origin, para: ParaId) -> DispatchResult {
|
||||||
let _ = ensure_signed(origin)?;
|
let _ = ensure_signed(origin)?;
|
||||||
let leases = Leases::<T>::get(para);
|
let leases = Leases::<T>::get(para);
|
||||||
match leases.first() {
|
match leases.first() {
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ pub mod pallet {
|
|||||||
#[pallet::call]
|
#[pallet::call]
|
||||||
impl<T: Config> Pallet<T> {
|
impl<T: Config> Pallet<T> {
|
||||||
#[pallet::weight(100_000_000)]
|
#[pallet::weight(100_000_000)]
|
||||||
fn send(origin: OriginFor<T>, dest: MultiLocation, message: Xcm<()>) -> DispatchResult {
|
pub fn send(origin: OriginFor<T>, dest: MultiLocation, message: Xcm<()>) -> DispatchResult {
|
||||||
let origin_location = T::SendXcmOrigin::ensure_origin(origin)?;
|
let origin_location = T::SendXcmOrigin::ensure_origin(origin)?;
|
||||||
Self::send_xcm(origin_location.clone(), dest.clone(), message.clone())
|
Self::send_xcm(origin_location.clone(), dest.clone(), message.clone())
|
||||||
.map_err(|e| match e {
|
.map_err(|e| match e {
|
||||||
@@ -130,7 +130,7 @@ pub mod pallet {
|
|||||||
};
|
};
|
||||||
T::Weigher::weight(&mut message).map_or(Weight::max_value(), |w| 100_000_000 + w)
|
T::Weigher::weight(&mut message).map_or(Weight::max_value(), |w| 100_000_000 + w)
|
||||||
})]
|
})]
|
||||||
fn teleport_assets(
|
pub fn teleport_assets(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
dest: MultiLocation,
|
dest: MultiLocation,
|
||||||
beneficiary: MultiLocation,
|
beneficiary: MultiLocation,
|
||||||
@@ -188,7 +188,7 @@ pub mod pallet {
|
|||||||
};
|
};
|
||||||
T::Weigher::weight(&mut message).map_or(Weight::max_value(), |w| 100_000_000 + w)
|
T::Weigher::weight(&mut message).map_or(Weight::max_value(), |w| 100_000_000 + w)
|
||||||
})]
|
})]
|
||||||
fn reserve_transfer_assets(
|
pub fn reserve_transfer_assets(
|
||||||
origin: OriginFor<T>,
|
origin: OriginFor<T>,
|
||||||
dest: MultiLocation,
|
dest: MultiLocation,
|
||||||
beneficiary: MultiLocation,
|
beneficiary: MultiLocation,
|
||||||
@@ -233,7 +233,7 @@ pub mod pallet {
|
|||||||
/// NOTE: A successful return to this does *not* imply that the `msg` was executed successfully
|
/// NOTE: A successful return to this does *not* imply that the `msg` was executed successfully
|
||||||
/// to completion; only that *some* of it was executed.
|
/// to completion; only that *some* of it was executed.
|
||||||
#[pallet::weight(max_weight.saturating_add(100_000_000u64))]
|
#[pallet::weight(max_weight.saturating_add(100_000_000u64))]
|
||||||
fn execute(origin: OriginFor<T>, message: Box<Xcm<T::Call>>, max_weight: Weight)
|
pub fn execute(origin: OriginFor<T>, message: Box<Xcm<T::Call>>, max_weight: Weight)
|
||||||
-> DispatchResult
|
-> DispatchResult
|
||||||
{
|
{
|
||||||
let origin_location = T::ExecuteXcmOrigin::ensure_origin(origin)?;
|
let origin_location = T::ExecuteXcmOrigin::ensure_origin(origin)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user