event disc

This commit is contained in:
Hardhat Chad
2025-06-18 08:02:27 -07:00
parent e5f5cd6537
commit fbcbd865b4
12 changed files with 47 additions and 4 deletions

View File

@@ -72,6 +72,7 @@ pub fn process_close(accounts: &[AccountInfo<'_>], _data: &[u8]) -> ProgramResul
// Emit event.
RewardEvent {
disc: OreEvent::Reward as u64,
amount: block.reward.lode_reward,
authority: block.reward.lode_authority,
block_id: block.id,

View File

@@ -96,6 +96,7 @@ pub fn process_commit(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResul
// Emit event.
CommitEvent {
disc: OreEvent::Commit as u64,
authority: *signer_info.key,
block_id: block.id,
amount,

View File

@@ -65,6 +65,7 @@ pub fn process_deposit(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResu
// Emit event.
DepositEvent {
disc: OreEvent::Deposit as u64,
authority: *signer_info.key,
block_id: block.id,
amount,

View File

@@ -133,6 +133,7 @@ pub fn process_mine(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult
// Emit event.
RewardEvent {
disc: OreEvent::Reward as u64,
amount: motherlode_amount,
authority: miner.authority,
block_id: block.id,
@@ -161,6 +162,7 @@ pub fn process_mine(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult
// Emit event.
RewardEvent {
disc: OreEvent::Reward as u64,
amount: nugget_reward,
authority: miner.authority,
block_id: block.id,

View File

@@ -225,6 +225,7 @@ pub fn process_open(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramResult
// Emit event.
OpenEvent {
disc: OreEvent::Open as u64,
id,
start_slot,
signer: *signer_info.key,

View File

@@ -61,6 +61,7 @@ pub fn process_uncommit(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramRes
// Emit event.
UncommitEvent {
disc: OreEvent::Uncommit as u64,
authority: *signer_info.key,
block_id: block.id,
commitment: permit.amount,

View File

@@ -55,6 +55,7 @@ pub fn process_withdraw(accounts: &[AccountInfo<'_>], data: &[u8]) -> ProgramRes
// Emit event.
WithdrawEvent {
disc: OreEvent::Withdraw as u64,
authority: *signer_info.key,
block_id: stake.block_id,
amount,