红衣主教创建者标准
读取 Git 书
包含包括背景、拟议解决方案、定价和技术整合实例的整个端到端建议.
背景情况
"创建者标准"(Creator Standard)是解决特许使用费规避问题的智能合同级解决方案,允许创建者在不牺牲基本的钱包到Wallet传输的情况下,决定自己的NFT可以与哪些程序互动.
协议是建立在 SPL 令牌程序之上的,有选择地允许令牌传输来实现这一点. 每个信使都有一个相关的"薄荷经理"账户,该账户拥有冻结和薄荷的授权. 每个薄荷管理器都指定了一套规则,它只是一套"规则"(allowlist/denylist),规定哪些程序可以与NFT互动并进行传输. 规则由NFT的创作者指定,可以自行修改.
NFT 基础
NFT 有附加规则
NFT 规则集程序交互
规则可以是 1: 有很多NFT
规则可以扩展其他规则
方案状态
程序使用两种程序衍生账户.
规则
QQ 允许转让由该符号的创建者指定的符号的一套规则let mut seeds = ['ruleset'.as_bytes(), name.as_bytes()];
pub struct Ruleset {
// account discriminator
pub account_type: u8,
// version for potential future versioning
pub version: u8,
// authority who can update this ruleset
pub authority: Pubkey,
// name for this ruleset (also used to derive ruleset address)
pub name: String,
// vector of allowed programs that can interact with this nft
pub allowed_programs: Vec<Pubkey>,
// vector of disallowed addresses that cannot interact with this nft
pub disallowed_addresses: Vec<Pubkey>,
}
Mint 管理器
一对一关系, 执行CCS的代币薄荷有各自的薄荷经理,拥有薄荷并被冻结的权力. 已经存在的一个托克可以通过交出上述权力来执行CSS.let mut seeds = ['mint-manager'.as_bytes(), mint.as_ref()];
pub struct MintManager {
// account discriminator
pub account_type: u8,
// version for potential future versioning
pub version: u8,
// mint address of this NFT that this mint-manager corresponds to
pub mint: Pubkey,
// authority who can update the ruleset of this mint-manager
pub authority: Pubkey,
// ruleset to be checked when transferring
pub ruleset: Pubkey,
// optional address currently using this NFT meaning it cannot be transferred while in-use
pub in_use_by: Option<Pubkey>,
}
当薄荷管理器为薄荷所创建时,薄荷管理器将薄荷永久地冻结. 每个薄荷管理器都有规则,其中具体规定了一套规则
大多数字段不言自明,但 in_use_by 领域需要一些基本背景,将在下文讨论.