1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
use ZeroCopy;
use crate::;
/// Action to compress and close a Mint Solana account.
/// The compressed mint state is always preserved.
///
/// ## Requirements
/// - Mint must exist (mint_decompressed = true) - unless idempotent is set
/// - is_compressible() must return true (rent expired)
/// - Cannot be combined with DecompressMint in same instruction
///
/// ## Note
/// CompressAndCloseMint is **permissionless** - anyone can compress and close a Mint
/// provided is_compressible() returns true. All lamports are returned to rent_sponsor.