You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: solana/programs/matching-engine/src/state/fast_market_order.rs
+46-48Lines changed: 46 additions & 48 deletions
Original file line number
Diff line number
Diff line change
@@ -1,52 +1,57 @@
1
-
use anchor_lang::prelude::*;
2
-
use anchor_lang::Discriminator;
1
+
use anchor_lang::{prelude::*,Discriminator};
3
2
use solana_program::keccak;
4
3
5
-
/// An account that represents a fast market order vaa. It is created by the signer of the transaction, and owned by the matching engine program.
6
-
/// The of the account is able to close this account and redeem the lamports deposited into the account (for rent)
4
+
/// An account that represents a fast market order VAA. It is created by the
5
+
/// payer of the transaction. This payer is the only authority that can close
6
+
/// this account and receive its rent.
7
7
#[account(zero_copy)]
8
8
#[derive(Debug)]
9
9
#[repr(C)]
10
10
pubstructFastMarketOrder{
11
-
/// The amount of tokens sent from the source chain via the fast transfer
11
+
/// The amount of tokens sent from the source chain via the fast transfer.
12
12
pubamount_in:u64,
13
-
/// The minimum amount of tokens to be received on the target chain via the fast transfer
13
+
/// The minimum amount of tokens to be received on the target chain via the
14
+
/// fast transfer.
14
15
pubmin_amount_out:u64,
15
-
/// The deadline of the auction
16
+
/// The deadline of the auction.
16
17
pubdeadline:u32,
17
-
/// The target chain (represented as a wormhole chain id)
18
+
/// The target chain (represented as a Wormhole chain ID).
18
19
pubtarget_chain:u16,
19
-
/// The length of the redeemer message
20
+
/// The length of the redeemer message.
20
21
pubredeemer_message_length:u16,
21
-
/// The redeemer of the fast transfer (on the destination chain)
22
+
/// The redeemer of the fast transfer (on the destination chain).
22
23
pubredeemer:[u8;32],
23
-
/// The sender of the fast transfer (on the source chain)
24
+
/// The sender of the fast transfer (on the source chain).
24
25
pubsender:[u8;32],
25
-
/// The refund address of the fast transfer
26
+
/// The refund address of the fast transfer.
26
27
pubrefund_address:[u8;32],
27
-
/// The maximum fee of the fast transfer
28
+
/// The maximum fee of the fast transfer.
28
29
pubmax_fee:u64,
29
-
/// The initial auction fee of the fast transfer
30
+
/// The initial auction fee of the fast transfer.
30
31
pubinit_auction_fee:u64,
31
-
/// The redeemer message of the fast transfer
32
-
/// NOTE: This value is based on the max redeemer length of 500 bytes that is specified in the token router program. If this changes in the future, this value must be updated.
32
+
/// The redeemer message of the fast transfer.
33
+
///
34
+
/// NOTE: This value is based on the max redeemer length of 500 bytes that
35
+
/// is specified in the token router program. If this changes in the future,
36
+
/// this value must be updated.
33
37
pubredeemer_message:[u8;512],
34
-
/// The refund recipient for the creator of the fast market order account
38
+
/// The refund recipient for the creator of the fast market order account.
35
39
pubclose_account_refund_recipient:Pubkey,
36
40
/// The emitter address of the fast transfer
37
41
pubvaa_emitter_address:[u8;32],
38
-
/// The sequence of the fast transfer vaa
42
+
/// The sequence of the fast transfer VAA.
39
43
pubvaa_sequence:u64,
40
-
/// The timestamp of the fast transfer vaa
44
+
/// The timestamp of the fast transfer VAA.
41
45
pubvaa_timestamp:u32,
42
-
/// The vaa nonce, which is not used and can be set to 0.
46
+
/// The VAA nonce, which is not used and can be set to 0.
43
47
// TODO: Can be taken out.
44
48
pubvaa_nonce:u32,
45
-
/// The source chain of the fast transfer vaa (represented as a wormhole chain id)
49
+
/// The source chain of the fast transfer VAA. (represented as a Wormhole
50
+
/// chain ID).
46
51
pubvaa_emitter_chain:u16,
47
-
/// The consistency level of the fast transfer vaa
52
+
/// The consistency level of the fast transfer VAA.
48
53
pubvaa_consistency_level:u8,
49
-
/// Not used, but required for bytemuck serialisation
54
+
/// Not used, but required for bytemuck serialization.
0 commit comments