mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-14 07:26:51 +00:00
config
This commit is contained in:
@@ -14,9 +14,10 @@ pub enum OreInstruction {
|
||||
Withdraw = 7,
|
||||
|
||||
// Admin
|
||||
SetAdmin = 10,
|
||||
SetFeeCollector = 9,
|
||||
SetFeeRate = 8,
|
||||
SetAdmin = 8,
|
||||
SetBlockLimit = 9,
|
||||
SetFeeCollector = 10,
|
||||
SetFeeRate = 11,
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
@@ -76,6 +77,12 @@ pub struct SetAdmin {
|
||||
pub admin: [u8; 32],
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
|
||||
pub struct SetBlockLimit {
|
||||
pub block_limit: [u8; 8],
|
||||
}
|
||||
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, Pod, Zeroable)]
|
||||
pub struct SetFeeCollector {
|
||||
@@ -97,5 +104,6 @@ instruction!(OreInstruction, Swap);
|
||||
instruction!(OreInstruction, Uncommit);
|
||||
instruction!(OreInstruction, Withdraw);
|
||||
instruction!(OreInstruction, SetAdmin);
|
||||
instruction!(OreInstruction, SetBlockLimit);
|
||||
instruction!(OreInstruction, SetFeeCollector);
|
||||
instruction!(OreInstruction, SetFeeRate);
|
||||
|
||||
@@ -7,9 +7,17 @@ use super::OreAccount;
|
||||
#[repr(C)]
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
|
||||
pub struct Config {
|
||||
// The address that can set the admin.
|
||||
pub admin: Pubkey,
|
||||
|
||||
// The address that receives fees.
|
||||
pub fee_collector: Pubkey,
|
||||
|
||||
// The fee rate taken for each swap.
|
||||
pub fee_rate: u64,
|
||||
|
||||
/// Number of blocks that can be open for trading at one time.
|
||||
pub block_limit: u64,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
|
||||
Reference in New Issue
Block a user