pub type Module<T, I = ()> = Pallet<T, I>;
Pallet
insteadExpand description
Type alias to Pallet
, to be used by construct_runtime
.
Generated by pallet
attribute macro.
Aliased Type§
struct Module<T, I = ()>(/* private fields */);
Implementations
Source§impl<T: Config<I>, I: 'static> Pallet<T, I>
impl<T: Config<I>, I: 'static> Pallet<T, I>
Sourcepub fn propose(
origin: OriginFor<T>,
threshold: u32,
proposal: Box<<T as Config<I>>::Proposal>,
length_bound: u32,
) -> DispatchResult
pub fn propose( origin: OriginFor<T>, threshold: u32, proposal: Box<<T as Config<I>>::Proposal>, length_bound: u32, ) -> DispatchResult
Add a new proposal to be voted on.
Must be called by a Fellow.
Sourcepub fn vote(
origin: OriginFor<T>,
proposal: T::Hash,
index: ProposalIndex,
approve: bool,
) -> DispatchResult
pub fn vote( origin: OriginFor<T>, proposal: T::Hash, index: ProposalIndex, approve: bool, ) -> DispatchResult
Add an aye or nay vote for the sender to the given proposal.
Must be called by a Fellow.
Sourcepub fn init_members(
origin: OriginFor<T>,
fellows: Vec<T::AccountId>,
allies: Vec<T::AccountId>,
) -> DispatchResult
pub fn init_members( origin: OriginFor<T>, fellows: Vec<T::AccountId>, allies: Vec<T::AccountId>, ) -> DispatchResult
Initialize the Alliance, onboard fellows and allies.
The Alliance must be empty, and the call must provide some founding members.
Must be called by the Root origin.
Sourcepub fn disband(
origin: OriginFor<T>,
witness: DisbandWitness,
) -> DispatchResultWithPostInfo
pub fn disband( origin: OriginFor<T>, witness: DisbandWitness, ) -> DispatchResultWithPostInfo
Disband the Alliance, remove all active members and unreserve deposits.
Witness data must be set.
Sourcepub fn set_rule(origin: OriginFor<T>, rule: Cid) -> DispatchResult
pub fn set_rule(origin: OriginFor<T>, rule: Cid) -> DispatchResult
Set a new IPFS CID to the alliance rule.
Sourcepub fn announce(origin: OriginFor<T>, announcement: Cid) -> DispatchResult
pub fn announce(origin: OriginFor<T>, announcement: Cid) -> DispatchResult
Make an announcement of a new IPFS CID about alliance issues.
Sourcepub fn remove_announcement(
origin: OriginFor<T>,
announcement: Cid,
) -> DispatchResult
pub fn remove_announcement( origin: OriginFor<T>, announcement: Cid, ) -> DispatchResult
Remove an announcement.
Sourcepub fn join_alliance(origin: OriginFor<T>) -> DispatchResult
pub fn join_alliance(origin: OriginFor<T>) -> DispatchResult
Submit oneself for candidacy. A fixed deposit is reserved.
Sourcepub fn nominate_ally(
origin: OriginFor<T>,
who: <<T as Config>::Lookup as StaticLookup>::Source,
) -> DispatchResult
pub fn nominate_ally( origin: OriginFor<T>, who: <<T as Config>::Lookup as StaticLookup>::Source, ) -> DispatchResult
A Fellow can nominate someone to join the alliance as an Ally. There is no deposit required from the nominator or nominee.
Sourcepub fn elevate_ally(
origin: OriginFor<T>,
ally: <<T as Config>::Lookup as StaticLookup>::Source,
) -> DispatchResult
pub fn elevate_ally( origin: OriginFor<T>, ally: <<T as Config>::Lookup as StaticLookup>::Source, ) -> DispatchResult
Elevate an Ally to Fellow.
Sourcepub fn give_retirement_notice(origin: OriginFor<T>) -> DispatchResult
pub fn give_retirement_notice(origin: OriginFor<T>) -> DispatchResult
As a member, give a retirement notice and start a retirement period required to pass in order to retire.
Sourcepub fn retire(origin: OriginFor<T>) -> DispatchResult
pub fn retire(origin: OriginFor<T>) -> DispatchResult
As a member, retire from the Alliance and unreserve the deposit.
This can only be done once you have called give_retirement_notice
and the
RetirementPeriod
has passed.
Sourcepub fn kick_member(
origin: OriginFor<T>,
who: <<T as Config>::Lookup as StaticLookup>::Source,
) -> DispatchResult
pub fn kick_member( origin: OriginFor<T>, who: <<T as Config>::Lookup as StaticLookup>::Source, ) -> DispatchResult
Kick a member from the Alliance and slash its deposit.
Sourcepub fn add_unscrupulous_items(
origin: OriginFor<T>,
items: Vec<UnscrupulousItem<<T as Config>::AccountId, BoundedVec<u8, <T as Config<I>>::MaxWebsiteUrlLength>>>,
) -> DispatchResult
pub fn add_unscrupulous_items( origin: OriginFor<T>, items: Vec<UnscrupulousItem<<T as Config>::AccountId, BoundedVec<u8, <T as Config<I>>::MaxWebsiteUrlLength>>>, ) -> DispatchResult
Add accounts or websites to the list of unscrupulous items.
Sourcepub fn remove_unscrupulous_items(
origin: OriginFor<T>,
items: Vec<UnscrupulousItem<<T as Config>::AccountId, BoundedVec<u8, <T as Config<I>>::MaxWebsiteUrlLength>>>,
) -> DispatchResult
pub fn remove_unscrupulous_items( origin: OriginFor<T>, items: Vec<UnscrupulousItem<<T as Config>::AccountId, BoundedVec<u8, <T as Config<I>>::MaxWebsiteUrlLength>>>, ) -> DispatchResult
Deem some items no longer unscrupulous.
Sourcepub fn close(
origin: OriginFor<T>,
proposal_hash: T::Hash,
index: ProposalIndex,
proposal_weight_bound: Weight,
length_bound: u32,
) -> DispatchResultWithPostInfo
pub fn close( origin: OriginFor<T>, proposal_hash: T::Hash, index: ProposalIndex, proposal_weight_bound: Weight, length_bound: u32, ) -> DispatchResultWithPostInfo
Close a vote that is either approved, disapproved, or whose voting period has ended.
Must be called by a Fellow.
Sourcepub fn abdicate_fellow_status(origin: OriginFor<T>) -> DispatchResult
pub fn abdicate_fellow_status(origin: OriginFor<T>) -> DispatchResult
Abdicate one’s position as a voting member and just be an Ally. May be used by Fellows who do not want to leave the Alliance but do not have the capacity to participate operationally for some time.
Trait Implementations
Source§impl<T: Config<I>, I: 'static> BeforeAllRuntimeMigrations for Pallet<T, I>
impl<T: Config<I>, I: 'static> BeforeAllRuntimeMigrations for Pallet<T, I>
Source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
Source§impl<T, I> Benchmarking for Pallet<T, I>where
T: Config + Config<I>,
I: 'static,
impl<T, I> Benchmarking for Pallet<T, I>where
T: Config + Config<I>,
I: 'static,
Source§impl<T: Config<I>, I: 'static> Callable<T> for Pallet<T, I>
impl<T: Config<I>, I: 'static> Callable<T> for Pallet<T, I>
type RuntimeCall = Call<T, I>
Source§impl<T: Config<I>, I: 'static> GetStorageVersion for Pallet<T, I>
impl<T: Config<I>, I: 'static> GetStorageVersion for Pallet<T, I>
Source§type InCodeStorageVersion = StorageVersion
type InCodeStorageVersion = StorageVersion
Source§fn in_code_storage_version() -> Self::InCodeStorageVersion
fn in_code_storage_version() -> Self::InCodeStorageVersion
storage_version
attribute, or
[NoStorageVersionSet
] if the attribute is missing.Source§fn on_chain_storage_version() -> StorageVersion
fn on_chain_storage_version() -> StorageVersion
§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: Config<I>, I: 'static> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
§fn on_finalize(_n: BlockNumber)
fn on_finalize(_n: BlockNumber)
§fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
fn on_idle(_n: BlockNumber, _remaining_weight: Weight) -> Weight
Hooks::on_finalize
]). Read more§fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
fn on_poll(_n: BlockNumber, _weight: &mut WeightMeter)
§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Executive
pallet. Read more§fn try_state(_n: BlockNumber) -> Result<(), DispatchError>
fn try_state(_n: BlockNumber) -> Result<(), DispatchError>
§fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
fn pre_upgrade() -> Result<Vec<u8>, DispatchError>
§fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
fn post_upgrade(_state: Vec<u8>) -> Result<(), DispatchError>
§fn offchain_worker(_n: BlockNumber)
fn offchain_worker(_n: BlockNumber)
§fn integrity_test()
fn integrity_test()
Source§impl<T: Config<I>, I: 'static> IntegrityTest for Pallet<T, I>
impl<T: Config<I>, I: 'static> IntegrityTest for Pallet<T, I>
Source§fn integrity_test()
fn integrity_test()
Hooks::integrity_test
].Source§impl<T: Config<I>, I: 'static> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§fn offchain_worker(n: BlockNumberFor<T>)
fn offchain_worker(n: BlockNumberFor<T>)
Source§impl<T: Config<I>, I: 'static> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§fn on_finalize(n: BlockNumberFor<T>)
fn on_finalize(n: BlockNumberFor<T>)
Hooks::on_finalize
].Source§impl<T: Config<I>, I: 'static> OnGenesis for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnGenesis for Pallet<T, I>
Source§fn on_genesis()
fn on_genesis()
Source§impl<T: Config<I>, I: 'static> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§impl<T: Config<I>, I: 'static> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§fn on_initialize(n: BlockNumberFor<T>) -> Weight
fn on_initialize(n: BlockNumberFor<T>) -> Weight
Hooks::on_initialize
].Source§impl<T: Config<I>, I: 'static> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§impl<T: Config<I>, I: 'static> OnRuntimeUpgrade for Pallet<T, I>
impl<T: Config<I>, I: 'static> OnRuntimeUpgrade for Pallet<T, I>
Source§fn on_runtime_upgrade() -> Weight
fn on_runtime_upgrade() -> Weight
Hooks::on_runtime_upgrade
].§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: Config<I>, I: 'static> PalletInfoAccess for Pallet<T, I>
impl<T: Config<I>, I: 'static> PalletInfoAccess for Pallet<T, I>
Source§fn module_name() -> &'static str
fn module_name() -> &'static str
Source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
Source§impl<T: Config<I>, I: 'static> StorageInfoTrait for Pallet<T, I>
impl<T: Config<I>, I: 'static> StorageInfoTrait for Pallet<T, I>
fn storage_info() -> Vec<StorageInfo>
Source§impl<T: Config<I>, I: 'static> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
impl<T: Config<I>, I: 'static> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>
Source§impl<T: Config<I>, I: 'static> WhitelistedStorageKeys for Pallet<T, I>
impl<T: Config<I>, I: 'static> WhitelistedStorageKeys for Pallet<T, I>
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.