[−][src]Enum spl_feature_proposal::instruction::FeatureProposalInstruction
Instructions supported by the Feature Proposal program
Variants
Propose a new feature.
This instruction will create a variety of accounts to support the feature proposal, all funded by account 0:
- A new token mint with a supply of
tokens_to_mint
, owned by the program and never modified again - A new "distributor" token account that holds the total supply, owned by account 0.
- A new "acceptance" token account that holds 0 tokens, owned by the program. Tokens transfers to this address are irrevocable and permanent.
- A new feature id account that has been funded and allocated (as described in
solana_program::feature
)
On successful execution of the instruction, the feature proposer is expected to distribute the tokens in the distributor token account out to all participating parties.
Based on the provided acceptance criteria, if AcceptanceCriteria::tokens_required
tokens are transferred into the acceptance token account before
AcceptanceCriteria::deadline
then the proposal is eligible to be accepted.
The FeatureProposalInstruction::Tally
instruction must be executed, by any party, to
complete the feature acceptance process.
Accounts expected by this instruction:
[writeable,signer]
Funding account (must be a system account)[writeable,signer]
Unallocated feature proposal account to create[writeable]
Token mint address fromget_mint_address
[writeable]
Distributor token account address fromget_distributor_token_address
[writeable]
Acceptance token account address fromget_acceptance_token_address
[writeable]
Feature id account address fromget_feature_id_address
[]
System program[]
SPL Token program[]
Rent sysvar
Fields of Propose
tokens_to_mint: u64
Total number of tokens to mint for this proposal
acceptance_criteria: AcceptanceCriteria
Criteria for how this proposal may be activated
Tally
is a permission-less instruction to check the acceptance criteria for the feature
proposal, which may result in:
- No action
- Feature proposal acceptance
- Feature proposal expiration
Accounts expected by this instruction:
[writeable]
Feature proposal account[]
Acceptance token account address fromget_acceptance_token_address
[writeable]
Derived feature id account address fromget_feature_id_address
[]
System program[]
Clock sysvar
Trait Implementations
impl BorshDeserialize for FeatureProposalInstruction where
u64: BorshDeserialize,
AcceptanceCriteria: BorshDeserialize,
[src]
u64: BorshDeserialize,
AcceptanceCriteria: BorshDeserialize,
pub fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
[src]
pub fn try_from_slice(v: &[u8]) -> Result<Self, Error>
[src]
pub fn is_u8() -> bool
[src]
impl BorshSchema for FeatureProposalInstruction
[src]
pub fn declaration() -> Declaration
[src]
pub fn add_definitions_recursively(
definitions: &mut HashMap<Declaration, Definition>
)
[src]
definitions: &mut HashMap<Declaration, Definition>
)
pub fn add_definition(
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
[src]
declaration: String,
definition: Definition,
definitions: &mut HashMap<String, Definition, RandomState>
)
pub fn schema_container() -> BorshSchemaContainer
[src]
impl BorshSerialize for FeatureProposalInstruction where
u64: BorshSerialize,
AcceptanceCriteria: BorshSerialize,
[src]
u64: BorshSerialize,
AcceptanceCriteria: BorshSerialize,
pub fn serialize<W: Write>(&self, writer: &mut W) -> Result<(), Error>
[src]
pub fn try_to_vec(&self) -> Result<Vec<u8>, Error>
[src]
pub fn is_u8() -> bool
[src]
impl Clone for FeatureProposalInstruction
[src]
pub fn clone(&self) -> FeatureProposalInstruction
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for FeatureProposalInstruction
[src]
impl Pack for FeatureProposalInstruction
[src]
pub const LEN: usize
[src]
pub fn pack_into_slice(&self, dst: &mut [u8])
[src]
pub fn unpack_from_slice(src: &[u8]) -> Result<Self, ProgramError>
[src]
pub fn get_packed_len() -> usize
[src]
pub fn unpack(input: &[u8]) -> Result<Self, ProgramError> where
Self: IsInitialized,
[src]
Self: IsInitialized,
pub fn unpack_unchecked(input: &[u8]) -> Result<Self, ProgramError>
[src]
pub fn pack(src: Self, dst: &mut [u8]) -> Result<(), ProgramError>
[src]
impl PartialEq<FeatureProposalInstruction> for FeatureProposalInstruction
[src]
pub fn eq(&self, other: &FeatureProposalInstruction) -> bool
[src]
pub fn ne(&self, other: &FeatureProposalInstruction) -> bool
[src]
impl Sealed for FeatureProposalInstruction
[src]
impl StructuralPartialEq for FeatureProposalInstruction
[src]
Auto Trait Implementations
impl RefUnwindSafe for FeatureProposalInstruction
impl Send for FeatureProposalInstruction
impl Sync for FeatureProposalInstruction
impl Unpin for FeatureProposalInstruction
impl UnwindSafe for FeatureProposalInstruction
Blanket Implementations
impl<T> AbiExample for T
pub default fn example() -> T
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,