This commit is contained in:
Hardhat Chad
2025-06-14 16:07:23 -07:00
parent b24883d8ff
commit 9d4c69c8f6
5 changed files with 120 additions and 0 deletions

View File

@@ -53,5 +53,15 @@ pub fn process_withdraw(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramRes
stake_info.close(signer_info)?;
}
// Emit event.
WithdrawEvent {
authority: *signer_info.key,
block_id: stake.block_id,
amount,
capacity: stake.capacity,
ts: clock.unix_timestamp,
}
.log_return();
Ok(())
}