This commit is contained in:
Hardhat Chad
2025-06-25 16:26:54 -05:00
parent 27c956c7b4
commit 470cca04c4
4 changed files with 19 additions and 7 deletions

View File

@@ -44,7 +44,13 @@ pub fn open(signer: Pubkey, id: u64) -> Instruction {
}
}
pub fn close(signer: Pubkey, fee_collector: Pubkey, recipient: Pubkey, id: u64) -> Instruction {
pub fn close(
signer: Pubkey,
fee_collector: Pubkey,
opener: Pubkey,
recipient: Pubkey,
id: u64,
) -> Instruction {
let block_adddress = block_pda(id).0;
let config_address = config_pda().0;
let collateral_address = collateral_pda(id).0;
@@ -66,6 +72,7 @@ pub fn close(signer: Pubkey, fee_collector: Pubkey, recipient: Pubkey, id: u64)
AccountMeta::new(market_address, false),
AccountMeta::new(base_mint_address, false),
AccountMeta::new(MINT_ADDRESS, false),
AccountMeta::new(opener, false),
AccountMeta::new(recipient, false),
AccountMeta::new_readonly(TREASURY_ADDRESS, false),
AccountMeta::new(vault_base, false),

View File

@@ -16,6 +16,9 @@ pub struct Block {
/// The block number.
pub id: u64,
/// The party that opened the block.
pub opener: Pubkey,
/// The reward configuration.
pub reward: RewardConfig,