-
Notifications
You must be signed in to change notification settings - Fork 361
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0e24165
commit 7aebbd7
Showing
4 changed files
with
42 additions
and
30 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
packages/layerzero-v2/solana/programs/programs/uln/src/instructions/dvn/close_verify.rs
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,33 @@ | ||
use crate::*; | ||
|
||
#[derive(Accounts)] | ||
#[instruction(params: CloseVerifyParams)] | ||
pub struct CloseVerify<'info> { | ||
pub dvn: Signer<'info>, | ||
#[account(mut)] | ||
pub receiver: AccountInfo<'info>, | ||
#[account( | ||
mut, | ||
seeds = [ | ||
CONFIRMATIONS_SEED, | ||
¶ms.packet_header_hash[..], | ||
¶ms.payload_hash[..], | ||
dvn.key.as_ref() | ||
], | ||
bump = confirmations.bump, | ||
close = receiver | ||
)] | ||
pub confirmations: Account<'info, Confirmations>, | ||
} | ||
|
||
impl CloseVerify<'_> { | ||
pub fn apply() -> Result<()> { | ||
Ok(()) | ||
} | ||
} | ||
|
||
#[derive(Clone, AnchorSerialize, AnchorDeserialize)] | ||
pub struct CloseVerifyParams { | ||
pub packet_header_hash: [u8; 32], | ||
pub payload_hash: [u8; 32], | ||
} |
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
2 changes: 2 additions & 0 deletions
2
packages/layerzero-v2/solana/programs/programs/uln/src/instructions/dvn/mod.rs
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 |
---|---|---|
@@ -1,7 +1,9 @@ | ||
pub mod close_verify; | ||
pub mod commit_verification; | ||
pub mod init_verify; | ||
pub mod verify; | ||
|
||
pub use close_verify::*; | ||
pub use commit_verification::*; | ||
pub use init_verify::*; | ||
pub use verify::*; |
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