-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
17 changed files
with
161 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
use anchor_lang::prelude::*; | ||
|
||
// Admin events | ||
#[event] | ||
pub struct SetXDomainAdmin { | ||
pub new_admin: Pubkey, | ||
} | ||
|
||
#[event] | ||
pub struct PausedDeposits { | ||
pub is_paused: bool, | ||
} | ||
|
||
#[event] | ||
pub struct PausedFills { | ||
pub is_paused: bool, | ||
} | ||
|
||
#[event] | ||
pub struct EnabledDepositRoute { | ||
pub origin_token: Pubkey, | ||
pub destination_chain_id: u64, | ||
pub enabled: bool, | ||
} | ||
|
||
// Deposit events | ||
#[event] | ||
pub struct V3FundsDeposited { | ||
pub input_token: Pubkey, | ||
pub output_token: Pubkey, | ||
pub input_amount: u64, | ||
pub output_amount: u64, | ||
pub destination_chain_id: u64, | ||
pub deposit_id: u32, | ||
pub quote_timestamp: u32, | ||
pub fill_deadline: u32, | ||
pub exclusivity_deadline: u32, | ||
pub depositor: Pubkey, | ||
pub recipient: Pubkey, | ||
pub exclusive_relayer: Pubkey, | ||
pub message: Vec<u8>, | ||
} | ||
|
||
// Fill events | ||
#[derive(AnchorSerialize, AnchorDeserialize, Clone, PartialEq)] | ||
pub enum FillType { | ||
FastFill, | ||
ReplacedSlowFill, | ||
SlowFill, | ||
} | ||
|
||
#[derive(AnchorSerialize, AnchorDeserialize, Clone)] | ||
pub struct V3RelayExecutionEventInfo { | ||
pub updated_recipient: Pubkey, | ||
pub updated_message: Vec<u8>, | ||
pub updated_output_amount: u64, | ||
pub fill_type: FillType, | ||
} | ||
|
||
#[event] | ||
pub struct FilledV3Relay { | ||
pub input_token: Pubkey, | ||
pub output_token: Pubkey, | ||
pub input_amount: u64, | ||
pub output_amount: u64, | ||
pub repayment_chain_id: u64, | ||
pub origin_chain_id: u64, | ||
pub deposit_id: u32, | ||
pub fill_deadline: u32, | ||
pub exclusivity_deadline: u32, | ||
pub exclusive_relayer: Pubkey, | ||
pub relayer: Pubkey, | ||
pub depositor: Pubkey, | ||
pub recipient: Pubkey, | ||
pub message: Vec<u8>, | ||
pub relay_execution_info: V3RelayExecutionEventInfo, | ||
} | ||
|
||
// Slow fill events | ||
#[event] | ||
pub struct RequestedV3SlowFill { | ||
pub input_token: Pubkey, | ||
pub output_token: Pubkey, | ||
pub input_amount: u64, | ||
pub output_amount: u64, | ||
pub origin_chain_id: u64, | ||
pub deposit_id: u32, | ||
pub fill_deadline: u32, | ||
pub exclusivity_deadline: u32, | ||
pub exclusive_relayer: Pubkey, | ||
pub depositor: Pubkey, | ||
pub recipient: Pubkey, | ||
pub message: Vec<u8>, | ||
} | ||
|
||
// Relayer refund events | ||
#[event] | ||
pub struct ExecutedRelayerRefundRoot { | ||
pub amount_to_return: u64, | ||
pub chain_id: u64, | ||
pub refund_amounts: Vec<u64>, | ||
pub root_bundle_id: u32, | ||
pub leaf_id: u32, | ||
pub l2_token_address: Pubkey, | ||
pub refund_addresses: Vec<Pubkey>, | ||
pub caller: Pubkey, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.