pub type Nis = Pallet<Runtime>;
Aliased Type§
struct Nis(/* private fields */);
Implementations
Source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
Sourcepub fn place_bid(
origin: <T as Config>::RuntimeOrigin,
amount: <<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance,
duration: u32,
) -> Result<(), DispatchError>
pub fn place_bid( origin: <T as Config>::RuntimeOrigin, amount: <<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance, duration: u32, ) -> Result<(), DispatchError>
Place a bid.
Origin must be Signed, and account must have at least amount
in free balance.
amount
: The amount of the bid; these funds will be reserved, and if/when consolidated, removed. Must be at leastMinBid
.duration
: The number of periods before which the newly consolidated bid may be thawed. Must be greater than 1 and no more thanQueueCount
.
Complexities:
Queues[duration].len()
(just take max).
Sourcepub fn retract_bid(
origin: <T as Config>::RuntimeOrigin,
amount: <<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance,
duration: u32,
) -> Result<(), DispatchError>
pub fn retract_bid( origin: <T as Config>::RuntimeOrigin, amount: <<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance, duration: u32, ) -> Result<(), DispatchError>
Retract a previously placed bid.
Origin must be Signed, and the account should have previously issued a still-active bid
of amount
for duration
.
amount
: The amount of the previous bid.duration
: The duration of the previous bid.
Sourcepub fn fund_deficit(
origin: <T as Config>::RuntimeOrigin,
) -> Result<(), DispatchError>
pub fn fund_deficit( origin: <T as Config>::RuntimeOrigin, ) -> Result<(), DispatchError>
Ensure we have sufficient funding for all potential payouts.
origin
: Must be accepted byFundOrigin
.
Sourcepub fn thaw_private(
origin: <T as Config>::RuntimeOrigin,
index: u32,
maybe_proportion: Option<Perquintill>,
) -> Result<(), DispatchError>
pub fn thaw_private( origin: <T as Config>::RuntimeOrigin, index: u32, maybe_proportion: Option<Perquintill>, ) -> Result<(), DispatchError>
Reduce or remove an outstanding receipt, placing the according proportion of funds into the account of the owner.
origin
: Must be Signed and the account must be the owner of the receiptindex
as well as any fungible counterpart.index
: The index of the receipt.portion
: IfSome
, then only the given portion of the receipt should be thawed. IfNone
, then all of it should be.
Sourcepub fn thaw_communal(
origin: <T as Config>::RuntimeOrigin,
index: u32,
) -> Result<(), DispatchError>
pub fn thaw_communal( origin: <T as Config>::RuntimeOrigin, index: u32, ) -> Result<(), DispatchError>
Reduce or remove an outstanding receipt, placing the according proportion of funds into the account of the owner.
origin
: Must be Signed and the account must be the owner of the fungible counterpart for receiptindex
.index
: The index of the receipt.
Sourcepub fn communify(
origin: <T as Config>::RuntimeOrigin,
index: u32,
) -> Result<(), DispatchError>
pub fn communify( origin: <T as Config>::RuntimeOrigin, index: u32, ) -> Result<(), DispatchError>
Make a private receipt communal and create fungible counterparts for its owner.
Sourcepub fn privatize(
origin: <T as Config>::RuntimeOrigin,
index: u32,
) -> Result<(), DispatchError>
pub fn privatize( origin: <T as Config>::RuntimeOrigin, index: u32, ) -> Result<(), DispatchError>
Make a communal receipt private and burn fungible counterparts from its owner.
Source§impl<T> Pallet<T>where
T: Config,
impl<T> Pallet<T>where
T: Config,
Sourcepub fn account_id() -> <T as Config>::AccountId
pub fn account_id() -> <T as Config>::AccountId
The account ID of the reserves.
This actually does computation. If you need to keep using it, then make sure you cache the value and only call this once.
Sourcepub fn issuance() -> IssuanceInfo<<<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance>
pub fn issuance() -> IssuanceInfo<<<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance>
Returns information on the issuance within the system.
Sourcepub fn issuance_with(
our_account: &<T as Config>::AccountId,
summary: &SummaryRecord<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, <<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance>,
) -> IssuanceInfo<<<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance>
pub fn issuance_with( our_account: &<T as Config>::AccountId, summary: &SummaryRecord<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, <<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance>, ) -> IssuanceInfo<<<T as Config>::Currency as Inspect<<T as Config>::AccountId>>::Balance>
Returns information on the issuance within the system
This function is equivalent to issuance
, except that it accepts arguments rather than
queries state. If the arguments are already known, then this may be slightly more
performant.
our_account
: The value returned bySelf::account_id()
.summary
: The value returned bySummary::<T>::get()
.
Trait Implementations
Source§impl<T> BeforeAllRuntimeMigrations for Pallet<T>where
T: Config,
impl<T> BeforeAllRuntimeMigrations for Pallet<T>where
T: Config,
Source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
Source§impl<T> Benchmarking for Pallet<T>
impl<T> Benchmarking for Pallet<T>
Source§fn benchmarks(extra: bool) -> Vec<BenchmarkMetadata>
fn benchmarks(extra: bool) -> Vec<BenchmarkMetadata>
Source§fn run_benchmark(
extrinsic: &[u8],
c: &[(BenchmarkParameter, u32)],
whitelist: &[TrackedStorageKey],
verify: bool,
internal_repeats: u32,
) -> Result<Vec<BenchmarkResult>, BenchmarkError>
fn run_benchmark( extrinsic: &[u8], c: &[(BenchmarkParameter, u32)], whitelist: &[TrackedStorageKey], verify: bool, internal_repeats: u32, ) -> Result<Vec<BenchmarkResult>, BenchmarkError>
Source§impl<T> DispatchViewFunction for Pallet<T>where
T: Config,
impl<T> DispatchViewFunction for Pallet<T>where
T: Config,
fn dispatch_view_function<O>(
id: &ViewFunctionId,
input: &mut &[u8],
output: &mut O,
) -> Result<(), ViewFunctionDispatchError>where
O: Output,
Source§impl<T> GetStorageVersion for Pallet<T>where
T: Config,
impl<T> GetStorageVersion for Pallet<T>where
T: Config,
Source§fn in_code_storage_version() -> <Pallet<T> as GetStorageVersion>::InCodeStorageVersion
fn in_code_storage_version() -> <Pallet<T> as GetStorageVersion>::InCodeStorageVersion
storage_version
attribute, or
NoStorageVersionSet
if the attribute is missing.Source§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
Source§fn current_storage_version() -> Self::InCodeStorageVersion
fn current_storage_version() -> Self::InCodeStorageVersion
in_code_storage_version
and will be removed after March 2024.Self::current_storage_version
instead. Read moreSource§impl<T> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§fn on_initialize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
) -> Weight
fn on_initialize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Weight
Source§fn integrity_test()
fn integrity_test()
Source§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
Source§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
). Read moreSource§fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
Source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Executive
pallet. Read moreSource§fn try_state(_n: BlockNumber) -> Result<(), DispatchError>
fn try_state(_n: BlockNumber) -> Result<(), DispatchError>
Source§fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
Source§fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
Source§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
Source§impl<T> Inspect<<T as Config>::AccountId> for Pallet<T>where
T: Config,
impl<T> Inspect<<T as Config>::AccountId> for Pallet<T>where
T: Config,
Source§fn owner(item: &u32) -> Option<<T as Config>::AccountId>
fn owner(item: &u32) -> Option<<T as Config>::AccountId>
item
, or None
if the item doesn’t exist or has no
owner.Source§fn attribute(
item: &<Pallet<T> as Inspect<<T as Config>::AccountId>>::ItemId,
key: &[u8],
) -> Option<Vec<u8>>
fn attribute( item: &<Pallet<T> as Inspect<<T as Config>::AccountId>>::ItemId, key: &[u8], ) -> Option<Vec<u8>>
Source§impl<T> IntegrityTest for Pallet<T>where
T: Config,
impl<T> IntegrityTest for Pallet<T>where
T: Config,
Source§impl<T> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§impl<T> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§fn on_finalize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
)
fn on_finalize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, )
Hooks::on_finalize
.Source§impl<T> OnGenesis for Pallet<T>where
T: Config,
impl<T> OnGenesis for Pallet<T>where
T: Config,
Source§fn on_genesis()
fn on_genesis()
Source§impl<T> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§impl<T> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§fn on_initialize(
n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number,
) -> Weight
fn on_initialize( n: <<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number, ) -> Weight
Hooks::on_initialize
.Source§impl<T> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§impl<T> OnRuntimeUpgrade for Pallet<T>where
T: Config,
impl<T> OnRuntimeUpgrade for Pallet<T>where
T: Config,
Source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Source§fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
Hooks::pre_upgrade
.Source§fn post_upgrade(state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(state: Vec<u8>) -> Result<(), DispatchError>
Hooks::post_upgrade
.Source§fn try_on_runtime_upgrade(checks: bool) -> Result<Weight, DispatchError>
fn try_on_runtime_upgrade(checks: bool) -> Result<Weight, DispatchError>
pre_upgrade
->
on_runtime_upgrade
-> post_upgrade
hooks for a migration. Read moreSource§impl<T> PalletInfoAccess for Pallet<T>where
T: Config,
impl<T> PalletInfoAccess for Pallet<T>where
T: Config,
Source§fn module_name() -> &'static str
fn module_name() -> &'static str
Source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
Source§impl<T> PalletsInfoAccess for Pallet<T>where
T: Config,
impl<T> PalletsInfoAccess for Pallet<T>where
T: Config,
Source§impl<T> StorageInfoTrait for Pallet<T>where
T: Config,
impl<T> StorageInfoTrait for Pallet<T>where
T: Config,
fn storage_info() -> Vec<StorageInfo>
Source§impl<T> TryDecodeEntireStorage for Pallet<T>where
T: Config,
impl<T> TryDecodeEntireStorage for Pallet<T>where
T: Config,
Source§fn try_decode_entire_state() -> Result<usize, Vec<TryDecodeEntireStorageError>>
fn try_decode_entire_state() -> Result<usize, Vec<TryDecodeEntireStorageError>>
Ok(bytes_decoded)
if success.Source§impl<T> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
impl<T> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T>where
T: Config,
Source§impl<T> WhitelistedStorageKeys for Pallet<T>where
T: Config,
impl<T> WhitelistedStorageKeys for Pallet<T>where
T: Config,
Source§fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
fn whitelisted_storage_keys() -> Vec<TrackedStorageKey>
Vec<TrackedStorageKey>
indicating the storage keys that
should be whitelisted during benchmarking. This means that those keys
will be excluded from the benchmarking performance calculation.