pub enum ProgramInstruction {
Show 36 variants
CreateCentralState,
CreateStakePool,
ActivateStakePool,
CreateStakeAccount,
Stake,
Unstake,
ClaimPoolRewards,
ClaimRewards,
Crank,
CloseStakePool,
CloseStakeAccount,
ChangeInflation,
CreateBond,
SignBond,
UnlockBondTokens,
ClaimBond,
ClaimBondRewards,
ChangePoolMinimum,
AdminMint,
AdminFreeze,
ChangePoolMultiplier,
ChangeCentralStateAuthority,
EditMetadata,
CreateBondV2,
AddToBondV2,
ClaimBondV2Rewards,
UnlockBondV2,
AdminSetupFeeSplit,
DistributeFees,
AdminSetProtocolFee,
MigrateCentralStateV2,
AdminProgramFreeze,
AdminRenounce,
AdminChangeFreezeAuthority,
CreateRoyaltyAccount,
CloseRoyaltyAccount,
}
Variants§
CreateCentralState
Create central state
| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ❌ | The system program account | | 2 | ✅ | ✅ | The fee payer account | | 3 | ❌ | ❌ | The mint of the ACCESS token |
CreateStakePool
Create stake pool
| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ❌ | ❌ | The system program account | | 2 | ✅ | ✅ | The fee payer account | | 3 | ❌ | ❌ | The stake pool vault account | | 4 | ❌ | ❌ | The central state account |
ActivateStakePool
Activate a stake pool
| Index | Writable | Signer | Description | | —————————————————— | | 0 | ✅ | ❌ | The stake pool to activate | | 1 | ❌ | ❌ | The central state account |
CreateStakeAccount
Create stake account
| Index | Writable | Signer | Description | | —————————————————— | | 0 | ✅ | ❌ | The stake account | | 1 | ❌ | ❌ | The system program account | | 2 | ❌ | ❌ | The stake pool account | | 3 | ✅ | ✅ | The fee payer account | | 4 | ❌ | ❌ | The central state account |
Stake
Stake
| Index | Writable | Signer | Description | | ———————————————————————————– | | 0 | ✅ | ❌ | The central state account | | 1 | ✅ | ❌ | The destination stake account - can be owned by anyone | | 2 | ✅ | ❌ | The stake pool account | | 3 | ❌ | ✅ | The owner of the token account - staker | | 4 | ✅ | ❌ | The source account of the stake tokens | | 5 | ❌ | ❌ | The SPL token program account | | 6 | ✅ | ❌ | The stake pool vault account | | 7 | ✅ | ❌ | The central state ATA |
Unstake
Unstake
| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The central state account | | 1 | ✅ | ❌ | The stake account | | 2 | ✅ | ❌ | The stake pool account | | 3 | ❌ | ✅ | The owner of the stake account | | 4 | ✅ | ❌ | The destination of the staked tokens | | 5 | ❌ | ❌ | The SPL token program account | | 6 | ✅ | ❌ | The stake pool vault |
ClaimPoolRewards
Claim rewards of a stake pool This instruction is used by stake pool owner for claiming their staking rewards
| Index | Writable | Signer | Description | | ————————————————————————————————— | | 0 | ✅ | ❌ | The stake pool account | | 1 | ❌ | ✅ | The stake pool owner account | | 2 | ✅ | ❌ | The rewards destination | | 3 | ❌ | ❌ | The central state account | | 4 | ✅ | ❌ | The mint address of the ACCESS token | | 5 | ❌ | ❌ | The SPL token program account | | 6 | ❌ | ❌ | The owner’s royalty split account to check if royalties need to be paid | | 7 | ✅ | ❌ | The royalty ATA account |
ClaimRewards
Claim rewards of a stake account This instruction can be used by stakers to claim their staking rewards
| Index | Writable | Signer | Description | | ————————————————————————————————— | | 0 | ✅ | ❌ | The stake pool account | | 1 | ✅ | ❌ | The stake account | | 2 | ❌ | ✅ | The owner of the Stake account | | 3 | ✅ | ❌ | The rewards destination | | 4 | ❌ | ❌ | The central state account | | 5 | ✅ | ❌ | The mint address of the ACS token | | 6 | ❌ | ❌ | The Access NFT program signer - to handle different royalty account | | 7 | ❌ | ❌ | The SPL token program account | | 8 | ❌ | ❌ | The owner’s royalty split account to check if royalties need to be paid | | 9 | ✅ | ❌ | The royalty ATA account |
Crank
Permissionless crank to update the stake pool rewards This instructions updates the circular buffer with the pool balances multiplied by the current inflation
| Index | Writable | Signer | Description | | —————————————————– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ✅ | ❌ | The central state account |
CloseStakePool
Close a stake pool This instruction can be used to close an empty stake pool and collect the lamports
| Index | Writable | Signer | Description | | ——————————————————— | | 0 | ✅ | ❌ | The account of the stake pool | | 1 | ❌ | ❌ | Pool vault | | 2 | ✅ | ✅ | The owner of the stake pool | | 3 | ❌ | ❌ | The central state account |
CloseStakeAccount
Close a stake account This instruction can be used to close an empty stake account and collect the lamports
| Index | Writable | Signer | Description | | ––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake account | | 1 | ✅ | ✅ | The owner of the stake account | | 2 | ❌ | ❌ | The central state account |
ChangeInflation
Change central state inflation
| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority | | 2 | ❌ | ❌ | The mint address of the ACCESS token |
CreateBond
Create a bond This instruction can be used by authorized sellers to create a bond
| Index | Writable | Signer | Description | | —————————————————— | | 0 | ✅ | ✅ | The bond seller account | | 1 | ✅ | ❌ | The bond account | | 2 | ❌ | ❌ | | | 3 | ❌ | ❌ | The system program account | | 4 | ✅ | ✅ | The fee account | | 5 | ❌ | ❌ | The central state account |
SignBond
Sign a bond This instruction is used by authorized sellers to approve the creation of a bond
| Index | Writable | Signer | Description | | ————————————— | | 0 | ❌ | ✅ | | | 1 | ✅ | ❌ | | | 2 | ❌ | ❌ | |
UnlockBondTokens
Unlock ACCESS tokens bought through a bond account When tokens are unlocked they are withdrawn from the pool and are not considered staked anymore
| Index | Writable | Signer | Description | | ———————————————————– | | 0 | ✅ | ❌ | The bond account | | 1 | ❌ | ✅ | The account of the bond owner | | 2 | ❌ | ❌ | The ACCESS mint token | | 3 | ✅ | ❌ | The ACCESS token destination | | 4 | ✅ | ❌ | The central state account | | 5 | ✅ | ❌ | The account of the staking pool | | 6 | ✅ | ❌ | The vault of the staking pool | | 7 | ❌ | ❌ | The SPL token program account |
ClaimBond
Claim bond This instruction allows a buyer to claim a bond once it has been signed by enough DAO members.
| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The bond account | | 1 | ❌ | ✅ | The account of the bond buyer | | 2 | ✅ | ❌ | The token account used to purchase the bond | | 3 | ✅ | ❌ | The token account where the sell proceed is sent | | 4 | ✅ | ❌ | The stake pool account | | 5 | ✅ | ❌ | The mint of the ACCESS token | | 6 | ✅ | ❌ | The vault of the stake pool | | 7 | ✅ | ❌ | The central state account | | 8 | ❌ | ❌ | The SPL token program account |
ClaimBondRewards
Claim bond rewards This Instruction allows bond owners to claim their staking rewards
| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ✅ | ❌ | The bond account | | 2 | ❌ | ✅ | The bond account owner | | 3 | ✅ | ❌ | The rewards destination | | 4 | ❌ | ❌ | The central state account | | 5 | ✅ | ❌ | The mint address of the ACCESS token | | 6 | ❌ | ❌ | The SPL token program account |
ChangePoolMinimum
Change the minimum stakeable amount of a pool This instruction allows a pool owner to adjust the price of its subscription for new joiners without impacting people who already subscribed
| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ❌ | ✅ | The stake pool owner account | | 2 | ❌ | ❌ | The central state account |
AdminMint
Allows central state authority to mint ACCESS tokens
| Index | Writable | Signer | Description | | ——————————————————— | | 0 | ❌ | ✅ | The central state authority | | 1 | ✅ | ❌ | The ACCESS mint token | | 2 | ✅ | ❌ | The ACCESS token destination | | 3 | ❌ | ❌ | The central state account | | 4 | ❌ | ❌ | The SPL token program account |
AdminFreeze
Freeze and unfreeze a program account This admin instruction can be dangereous 💀
| Index | Writable | Signer | Description | | ————————————————————— | | 0 | ❌ | ✅ | The central state authority | | 1 | ✅ | ❌ | The account to freeze (or unfreeze) | | 2 | ❌ | ❌ | The central state account |
ChangePoolMultiplier
| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The stake pool account | | 1 | ❌ | ✅ | The stake pool owner account | | 2 | ❌ | ❌ | The central state account |
ChangeCentralStateAuthority
Change central state authority
| Index | Writable | Signer | Description | | ————————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority |
EditMetadata
Edit metadata
| Index | Writable | Signer | Description | | ————————————————————— | | 0 | ❌ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority | | 2 | ✅ | ❌ | The metadata account | | 3 | ❌ | ❌ | The metadata program account |
CreateBondV2
Create a Bond V2
| Index | Writable | Signer | Description | | —————————————————— | | 0 | ✅ | ❌ | The bond account | | 1 | ❌ | ❌ | The system program account | | 2 | ❌ | ❌ | The pool account | | 3 | ✅ | ✅ | The fee account | | 4 | ❌ | ❌ | Central state |
AddToBondV2
Add more tokens to an existing Bond V2
| Index | Writable | Signer | Description | | ———————————————————–– | | 0 | ✅ | ✅ | The bond seller account | | 1 | ✅ | ❌ | From ATA | | 2 | ✅ | ❌ | The bond account | | 3 | ✅ | ❌ | Central state | | 4 | ✅ | ❌ | The vault of the central state | | 5 | ✅ | ❌ | The pool account | | 6 | ✅ | ❌ | The vault of the pool | | 7 | ✅ | ❌ | The mint address of the ACS token | | 8 | ❌ | ❌ | The SPL token program account | | 9 | ❌ | ❌ | The system program account |
ClaimBondV2Rewards
Claim rewards of a bond V2 from the Access NFT Program
| Index | Writable | Signer | Description | | ————————————————————————————————— | | 0 | ✅ | ❌ | The stake pool account | | 1 | ✅ | ❌ | The Bond V2 account | | 2 | ❌ | ✅ | The owner of the Bond V2 account | | 3 | ✅ | ❌ | The rewards destination | | 4 | ❌ | ❌ | The central state account | | 5 | ✅ | ❌ | The mint address of the ACS token | | 6 | ❌ | ❌ | The Access NFT program signer - to handle different royalty account | | 7 | ❌ | ❌ | The SPL token program account | | 8 | ❌ | ❌ | The owner’s royalty split account to check if royalties need to be paid | | 9 | ✅ | ❌ | The royalty ATA account |
UnlockBondV2
Unlock bond v2
| Index | Writable | Signer | Description | | –––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The central state account | | 1 | ✅ | ❌ | The bond account | | 2 | ❌ | ✅ | The owner of the bond V2 account | | 3 | ✅ | ❌ | The destination of the locked tokens | | 4 | ✅ | ❌ | The pool account | | 5 | ✅ | ❌ | The pool vault | | 6 | ❌ | ❌ | The SPL token program account |
AdminSetupFeeSplit
Setup fee split
| Index | Writable | Signer | Description | | —————————————————–– | | 0 | ❌ | ✅ | The central state authority | | 1 | ✅ | ❌ | The central state account |
DistributeFees
Distribute fees to the recipients
| Index | Writable | Signer | Description | | ————————————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ✅ | ❌ | The central state ATA | | 2 | ❌ | ❌ | The SPL token program account | | 3 | ✅ | ❌ | The mint address of the ACS token | | 4..4 + N | ✅ | ❌ | The token accounts to distribute the fees to |
AdminSetProtocolFee
Admin set protocol fee
| Index | Writable | Signer | Description | | —————————————————–– | | 0 | ❌ | ✅ | The central state authority | | 1 | ✅ | ❌ | The central state account |
MigrateCentralStateV2
Migrate the central state to the v2 format
| Index | Writable | Signer | Description | | —————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ❌ | The system program account | | 2 | ✅ | ✅ | The fee payer account |
AdminProgramFreeze
Admin program freeze instruction.
| Index | Writable | Signer | Description | | ———————————————————————————– | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority or freeze authority |
AdminRenounce
Admin renounce functionality
| Index | Writable | Signer | Description | | ————————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority |
AdminChangeFreezeAuthority
Change freeze authority
| Index | Writable | Signer | Description | | ————————————————————— | | 0 | ✅ | ❌ | The central state account | | 1 | ❌ | ✅ | The central state account authority |
CreateRoyaltyAccount
Create royalty account
| Index | Writable | Signer | Description | | ———————————————————–– | | 0 | ✅ | ❌ | The royalty account to be created | | 1 | ✅ | ✅ | The fee payer account | | 2 | ❌ | ✅ | The royalty payer | | 3 | ❌ | ❌ | The system program account | | 4 | ❌ | ❌ | The central state account |
CloseRoyaltyAccount
Close a royalty account This instruction can be used to close a royalty account. The laports will be sent to the original fee payer
| Index | Writable | Signer | Description | | ––––––––––––––––––––––––––––––––––––– | | 0 | ✅ | ❌ | The royalty account | | 1 | ❌ | ✅ | The royalty payer of the royalty account | | 2 | ✅ | ❌ | The account where the funds should be returned | | 3 | ❌ | ❌ | The central state account |
Trait Implementations§
source§impl BorshDeserialize for ProgramInstruction
impl BorshDeserialize for ProgramInstruction
fn deserialize_reader<R: Read>(reader: &mut R) -> Result<Self, Error>
source§fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
fn deserialize(buf: &mut &[u8]) -> Result<Self, Error>
source§fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_slice(v: &[u8]) -> Result<Self, Error>
fn try_from_reader<R>(reader: &mut R) -> Result<Self, Error>where
R: Read,
source§impl BorshSerialize for ProgramInstruction
impl BorshSerialize for ProgramInstruction
source§impl Clone for ProgramInstruction
impl Clone for ProgramInstruction
source§fn clone(&self) -> ProgramInstruction
fn clone(&self) -> ProgramInstruction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl EnumExt for ProgramInstruction
impl EnumExt for ProgramInstruction
source§impl FromPrimitive for ProgramInstruction
impl FromPrimitive for ProgramInstruction
source§fn from_i64(n: i64) -> Option<Self>
fn from_i64(n: i64) -> Option<Self>
i64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u64(n: u64) -> Option<Self>
fn from_u64(n: u64) -> Option<Self>
u64
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_isize(n: isize) -> Option<Self>
fn from_isize(n: isize) -> Option<Self>
isize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i8(n: i8) -> Option<Self>
fn from_i8(n: i8) -> Option<Self>
i8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i16(n: i16) -> Option<Self>
fn from_i16(n: i16) -> Option<Self>
i16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i32(n: i32) -> Option<Self>
fn from_i32(n: i32) -> Option<Self>
i32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_i128(n: i128) -> Option<Self>
fn from_i128(n: i128) -> Option<Self>
i128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read moresource§fn from_usize(n: usize) -> Option<Self>
fn from_usize(n: usize) -> Option<Self>
usize
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u8(n: u8) -> Option<Self>
fn from_u8(n: u8) -> Option<Self>
u8
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u16(n: u16) -> Option<Self>
fn from_u16(n: u16) -> Option<Self>
u16
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u32(n: u32) -> Option<Self>
fn from_u32(n: u32) -> Option<Self>
u32
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned.source§fn from_u128(n: u128) -> Option<Self>
fn from_u128(n: u128) -> Option<Self>
u128
to return an optional value of this type. If the
value cannot be represented by this type, then None
is returned. Read more