Skip to content

[MIP-09] Movescription mint extended plugin #12

@jolestar

Description

@jolestar

Motivation

To provide an extension mechanism for third-party developers, enabling them to extend the minting methods of Movescription through custom plugins. We can refer to this type of extension as a "mint_factory".

Mint Factory Extension Requirements

  1. Require wrapping other assets during minting, such as MOVE.
  2. Allow random selection within a limited set, such as for issuing game props.
  3. Require users to hold a certain asset to mint.
  4. Minting can only be done through third-party application programs, such as generating Movescription through game actions within a game.

Mint Factory Solution

  1. Deploy Tick with a WITNESS parameter, recording the calling module name as mint_factory.
  2. Provide a mint_with_witness method. The caller also needs to pass the WITNESS, ensuring in the movescription that this WITNESS must come from mint_factory. This effectively opens up the construction method for Movescriptin, with the specific strategy implemented by the developer.

Built-in Mint Factories

  1. epoch_bus_factory: The minting mode used by MOVE movescription. Settle once every epoch, with addresses participating in minting during the epoch sharing the amount equally. If full (500), the bus departs immediately, starting the next epoch.
  2. mint_get_factory: Mine and Get, receiving a movescription with each mint. Supports participation in minting with SUI or MOVE.

Developers can implement other requirements in their own applications. If there is a demand common to multiple applications, it can be submitted to the protocol repository for joint maintenance.


动机

提供扩展机制给第三方开发者,开发者可以通过自定义插件来扩展 Movescription 的 mint 方式,我们可以把这种扩展叫做铸造工厂(mint_factory)。

铸造工厂扩展需求

  1. 铸造的时候可以要求包裹其他资产,比如 MOVE。比如 作为$MOVE的持有人,我希望其他mrc20的token在被mint时,能被要求包裹MOVE后才能mint mrc20#14
  2. 可以在有限的集合内随机抽取,比如用于发行游戏道具。
  3. 要求用户持有某种资产才可以铸造。
  4. 只能通过第三方应用的程序来 mint,比如某个游戏中通过游戏行为来产生铭文。

铸造工厂方案

  1. 部署 Tick 的时候传递一个 WITNESS 参数,记录下调用的 module 名,作为 mint_factory
  2. 提供 mint_with_witness 方法,调用方也需要传递 WITNESS,movescription 中确保该 WITNESS 必须来自 mint_factory。相当于开放了 Movescriptin 的构造方法,具体的策略由开发者自己实现。

内置的铸造工厂

  1. epoch_bus_factory:MOVE 铭文采用的铸造模式。每个 epoch 结算一次,epoch 内参与铸造的地址平分铭文。如果满员(500),则立刻发车,开启下一个 epoch。
  2. mint_get_factory: 即挖即得,每次铸造获取等额的铭文。支持用 SUI 或者 MOVE 来参与铸造。

其他需求开发者可以在自己的应用中实现,如果是多种应用通用的需求,可以提交到协议仓库,共同维护。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions