Mint Manager

A Mint Manager is a PDA that maps one-to-one with token mint. Every token mint that implements the Creator Standard has a corresponding mint manager that holds its mint and freeze authority. An already existing token can implement the Creator Standard by surrendering these authorities to its Mint Manager.
Mint Manager State
1
let mut seeds = ['mint-manager'.as_bytes(), mint.as_ref()];
2
pub struct MintManager {
3
// version for potential future versioning
4
pub version: u8,
5
// mint address of this NFT that this mint-manager corresponds to
6
pub mint: Pubkey,
7
// authority who can update the ruleset of this mint-manager
8
pub authority: Pubkey,
9
// ruleset to be checked when transferring
10
pub ruleset: Pubkey,
11
// optional address currently using this NFT meaning it cannot be transferred while in-use
12
pub in_use_by: Option<Pubkey>,
13
}
When a mint manager is created, it's corresponding mint is frozen and remains so in perpetuity. The mint manager can simply be thought of as a "wrapper" around the current SPL-Token + Metaplex metadata standards. Every mint manager has an associated ruleset, which specifies the allowlist/denylist of program owned/derived addresses (PDAs) that can interact with and transfer the mint's token.
in_use_by specifies an optional public key that can control the mint by preventing a transfer or delegate approval/revocation while the token is "in use". This can be useful in the contexts of lending and staking, for example, where a program takes control of the token for a finite period of time.

Instructions

Last modified 11d ago