mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 02:21:14 +00:00
Mandate weight annotation (#5357)
* Disallow default weight * Fix build and test * Fix tests * Fix another beloved ui test. * fix beloved trybuild tests * fix treasury? * Final test fix * Fix build * Fix another one * Fix * More doctest fix
This commit is contained in:
@@ -548,6 +548,7 @@ decl_module! {
|
||||
/// Updates the schedule for metering contracts.
|
||||
///
|
||||
/// The schedule must have a greater version than the stored schedule.
|
||||
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
|
||||
pub fn update_schedule(origin, schedule: Schedule) -> DispatchResult {
|
||||
ensure_root(origin)?;
|
||||
if <Module<T>>::current_schedule().version >= schedule.version {
|
||||
@@ -562,6 +563,7 @@ decl_module! {
|
||||
|
||||
/// Stores the given binary Wasm code into the chain's storage and returns its `codehash`.
|
||||
/// You can instantiate contracts only with stored code.
|
||||
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
|
||||
pub fn put_code(
|
||||
origin,
|
||||
#[compact] gas_limit: Gas,
|
||||
@@ -589,6 +591,7 @@ decl_module! {
|
||||
/// * If the account is a regular account, any value will be transferred.
|
||||
/// * If no account exists and the call value is not less than `existential_deposit`,
|
||||
/// a regular account will be created and any value will be transferred.
|
||||
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
|
||||
pub fn call(
|
||||
origin,
|
||||
dest: <T::Lookup as StaticLookup>::Source,
|
||||
@@ -614,6 +617,7 @@ decl_module! {
|
||||
/// after the execution is saved as the `code` of the account. That code will be invoked
|
||||
/// upon any call received by this account.
|
||||
/// - The contract is initialized.
|
||||
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
|
||||
pub fn instantiate(
|
||||
origin,
|
||||
#[compact] endowment: BalanceOf<T>,
|
||||
@@ -636,6 +640,7 @@ decl_module! {
|
||||
///
|
||||
/// If contract is not evicted as a result of this call, no actions are taken and
|
||||
/// the sender is not eligible for the reward.
|
||||
#[weight = frame_support::weights::SimpleDispatchInfo::default()]
|
||||
fn claim_surcharge(origin, dest: T::AccountId, aux_sender: Option<T::AccountId>) {
|
||||
let origin = origin.into();
|
||||
let (signed, rewarded) = match (origin, aux_sender) {
|
||||
|
||||
Reference in New Issue
Block a user