pub type Alliance = Pallet<Runtime>;
Aliased Type§
struct Alliance(/* private fields */);
Implementations
Source§impl<T, I> Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> Pallet<T, I>where
T: Config<I>,
I: 'static,
Sourcepub fn propose(
origin: <T as Config>::RuntimeOrigin,
threshold: u32,
proposal: Box<<T as Config<I>>::Proposal>,
length_bound: u32,
) -> Result<(), DispatchError>
pub fn propose( origin: <T as Config>::RuntimeOrigin, threshold: u32, proposal: Box<<T as Config<I>>::Proposal>, length_bound: u32, ) -> Result<(), DispatchError>
Add a new proposal to be voted on.
Must be called by a Fellow.
Sourcepub fn vote(
origin: <T as Config>::RuntimeOrigin,
proposal: <T as Config>::Hash,
index: u32,
approve: bool,
) -> Result<(), DispatchError>
pub fn vote( origin: <T as Config>::RuntimeOrigin, proposal: <T as Config>::Hash, index: u32, approve: bool, ) -> Result<(), DispatchError>
Add an aye or nay vote for the sender to the given proposal.
Must be called by a Fellow.
Sourcepub fn init_members(
origin: <T as Config>::RuntimeOrigin,
fellows: Vec<<T as Config>::AccountId>,
allies: Vec<<T as Config>::AccountId>,
) -> Result<(), DispatchError>
pub fn init_members( origin: <T as Config>::RuntimeOrigin, fellows: Vec<<T as Config>::AccountId>, allies: Vec<<T as Config>::AccountId>, ) -> Result<(), DispatchError>
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: <T as Config>::RuntimeOrigin,
witness: DisbandWitness,
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn disband( origin: <T as Config>::RuntimeOrigin, witness: DisbandWitness, ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
Disband the Alliance, remove all active members and unreserve deposits.
Witness data must be set.
Sourcepub fn set_rule(
origin: <T as Config>::RuntimeOrigin,
rule: Cid,
) -> Result<(), DispatchError>
pub fn set_rule( origin: <T as Config>::RuntimeOrigin, rule: Cid, ) -> Result<(), DispatchError>
Set a new IPFS CID to the alliance rule.
Sourcepub fn announce(
origin: <T as Config>::RuntimeOrigin,
announcement: Cid,
) -> Result<(), DispatchError>
pub fn announce( origin: <T as Config>::RuntimeOrigin, announcement: Cid, ) -> Result<(), DispatchError>
Make an announcement of a new IPFS CID about alliance issues.
Sourcepub fn remove_announcement(
origin: <T as Config>::RuntimeOrigin,
announcement: Cid,
) -> Result<(), DispatchError>
pub fn remove_announcement( origin: <T as Config>::RuntimeOrigin, announcement: Cid, ) -> Result<(), DispatchError>
Remove an announcement.
Sourcepub fn join_alliance(
origin: <T as Config>::RuntimeOrigin,
) -> Result<(), DispatchError>
pub fn join_alliance( origin: <T as Config>::RuntimeOrigin, ) -> Result<(), DispatchError>
Submit oneself for candidacy. A fixed deposit is reserved.
Sourcepub fn nominate_ally(
origin: <T as Config>::RuntimeOrigin,
who: <<T as Config>::Lookup as StaticLookup>::Source,
) -> Result<(), DispatchError>
pub fn nominate_ally( origin: <T as Config>::RuntimeOrigin, who: <<T as Config>::Lookup as StaticLookup>::Source, ) -> Result<(), DispatchError>
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: <T as Config>::RuntimeOrigin,
ally: <<T as Config>::Lookup as StaticLookup>::Source,
) -> Result<(), DispatchError>
pub fn elevate_ally( origin: <T as Config>::RuntimeOrigin, ally: <<T as Config>::Lookup as StaticLookup>::Source, ) -> Result<(), DispatchError>
Elevate an Ally to Fellow.
Sourcepub fn give_retirement_notice(
origin: <T as Config>::RuntimeOrigin,
) -> Result<(), DispatchError>
pub fn give_retirement_notice( origin: <T as Config>::RuntimeOrigin, ) -> Result<(), DispatchError>
As a member, give a retirement notice and start a retirement period required to pass in order to retire.
Sourcepub fn retire(origin: <T as Config>::RuntimeOrigin) -> Result<(), DispatchError>
pub fn retire(origin: <T as Config>::RuntimeOrigin) -> Result<(), DispatchError>
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: <T as Config>::RuntimeOrigin,
who: <<T as Config>::Lookup as StaticLookup>::Source,
) -> Result<(), DispatchError>
pub fn kick_member( origin: <T as Config>::RuntimeOrigin, who: <<T as Config>::Lookup as StaticLookup>::Source, ) -> Result<(), DispatchError>
Kick a member from the Alliance and slash its deposit.
Sourcepub fn add_unscrupulous_items(
origin: <T as Config>::RuntimeOrigin,
items: Vec<UnscrupulousItem<<T as Config>::AccountId, BoundedVec<u8, <T as Config<I>>::MaxWebsiteUrlLength>>>,
) -> Result<(), DispatchError>
pub fn add_unscrupulous_items( origin: <T as Config>::RuntimeOrigin, items: Vec<UnscrupulousItem<<T as Config>::AccountId, BoundedVec<u8, <T as Config<I>>::MaxWebsiteUrlLength>>>, ) -> Result<(), DispatchError>
Add accounts or websites to the list of unscrupulous items.
Sourcepub fn remove_unscrupulous_items(
origin: <T as Config>::RuntimeOrigin,
items: Vec<UnscrupulousItem<<T as Config>::AccountId, BoundedVec<u8, <T as Config<I>>::MaxWebsiteUrlLength>>>,
) -> Result<(), DispatchError>
pub fn remove_unscrupulous_items( origin: <T as Config>::RuntimeOrigin, items: Vec<UnscrupulousItem<<T as Config>::AccountId, BoundedVec<u8, <T as Config<I>>::MaxWebsiteUrlLength>>>, ) -> Result<(), DispatchError>
Deem some items no longer unscrupulous.
Sourcepub fn close(
origin: <T as Config>::RuntimeOrigin,
proposal_hash: <T as Config>::Hash,
index: u32,
proposal_weight_bound: Weight,
length_bound: u32,
) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
pub fn close( origin: <T as Config>::RuntimeOrigin, proposal_hash: <T as Config>::Hash, index: u32, proposal_weight_bound: Weight, length_bound: u32, ) -> Result<PostDispatchInfo, DispatchErrorWithPostInfo<PostDispatchInfo>>
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: <T as Config>::RuntimeOrigin,
) -> Result<(), DispatchError>
pub fn abdicate_fellow_status( origin: <T as Config>::RuntimeOrigin, ) -> Result<(), DispatchError>
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, I> BeforeAllRuntimeMigrations for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> BeforeAllRuntimeMigrations for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn before_all_runtime_migrations() -> Weight
fn before_all_runtime_migrations() -> Weight
Source§impl<T, I> Benchmarking for Pallet<T, I>
impl<T, I> Benchmarking for Pallet<T, I>
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, I> Callable<T> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> Callable<T> for Pallet<T, I>where
T: Config<I>,
I: 'static,
type RuntimeCall = Call<T, I>
Source§impl<T, I> DispatchViewFunction for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> DispatchViewFunction for Pallet<T, I>where
T: Config<I>,
I: 'static,
fn dispatch_view_function<O>(
id: &ViewFunctionId,
input: &mut &[u8],
output: &mut O,
) -> Result<(), ViewFunctionDispatchError>where
O: Output,
Source§impl<T, I> GetStorageVersion for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> GetStorageVersion for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn in_code_storage_version() -> <Pallet<T, I> as GetStorageVersion>::InCodeStorageVersion
fn in_code_storage_version() -> <Pallet<T, I> 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, I> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> Hooks<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn on_initialize(_n: BlockNumber) -> Weight
fn on_initialize(_n: BlockNumber) -> Weight
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§fn integrity_test()
fn integrity_test()
Source§impl<T, I> IntegrityTest for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> IntegrityTest for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OffchainWorker<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnFinalize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
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, I> OnGenesis for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnGenesis for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn on_genesis()
fn on_genesis()
Source§impl<T, I> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnIdle<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnInitialize<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
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, I> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnPoll<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> OnRuntimeUpgrade for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> OnRuntimeUpgrade for Pallet<T, I>where
T: Config<I>,
I: 'static,
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, I> PalletInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> PalletInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§fn module_name() -> &'static str
fn module_name() -> &'static str
Source§fn crate_version() -> CrateVersion
fn crate_version() -> CrateVersion
Source§impl<T, I> PalletsInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> PalletsInfoAccess for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> StorageInfoTrait for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> StorageInfoTrait for Pallet<T, I>where
T: Config<I>,
I: 'static,
fn storage_info() -> Vec<StorageInfo>
Source§impl<T, I> TryDecodeEntireStorage for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> TryDecodeEntireStorage for Pallet<T, I>where
T: Config<I>,
I: 'static,
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, I> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> TryState<<<<T as Config>::Block as HeaderProvider>::HeaderT as Header>::Number> for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> ViewFunctionIdPrefix for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> ViewFunctionIdPrefix for Pallet<T, I>where
T: Config<I>,
I: 'static,
Source§impl<T, I> WhitelistedStorageKeys for Pallet<T, I>where
T: Config<I>,
I: 'static,
impl<T, I> WhitelistedStorageKeys for Pallet<T, I>where
T: Config<I>,
I: 'static,
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.