Introduction
A new approach to create and manage digital assets on Sui
Understanding inscriptions
Inscriptions are an innovative approach to decentralized storage and computing that stand apart from traditional contracts. They offer a fairer way to issue assets by using simple rules for data representation and processing. This not only makes the system more accessible but also opens up new possibilities for the growth of blockchain technology.
Sui’s advanced object model is able to support inscriptions seamlessly, by adding a dedicated field to an object for efficient management.
Sui Inscription Objects
The design of Sui’s object model is very adaptable, allowing each object to include various fields. This flexibility makes it easy and efficient to implement inscriptions with three key guidelines:
- An inscription object should have a specific ‘inscriptions’ field. This helps in better indexing and identifying the data.
- The data for an inscription includes a content type (known as a MIME type) and the actual content, which is a series of bytes. This format allows for supporting diverse types of data.
- Sui’s object model has different kinds of objects, like owned objects, immutable objects, and shared objects. To make sure there is agreement on the order that inscriptions are created, every inscription needs to be a shared object.
The ID for any created object is designated as the Sui inscription’s ID. Those objects that meet these guidelines are recognized as inscriptions. When such an object is created, it becomes easier for indexers to identify and work with it.
To provide a clearer understanding of the suirc-20 standard, especially regarding the minting process and transaction limits, here are the additional preface explanations:
-
Object Type: When minting suirc-20 tokens, the object store in package should be named
SUIRC20Action
. This naming convention ensures consistency and ease of identification within the Sui ecosystem. -
Inscription Limit Per Transaction: Each transaction within the suirc-20 protocol can generate at most one inscription. This restriction is designed to maintain transaction simplicity and network efficiency.
-
Shared Object: All inscriptions created through the process in suirc-20 must be shared objects. This requirement is crucial to ensure the proper execution order of transactions. By using shared objects, the protocol can effectively maintain the sequence and consistency of mint operations across the network. This approach is key in managing concurrent transactions and preserving the integrity of the minting process in the Sui ecosystem.
-
String Format for Inscription Data: The JSON data for each inscription must be converted into a string format and stored within the ‘fields.inscription’ field of the shared object.
Operations in suirc-20
suic-20, as the first experimental application of Sui Inscriptions, has been created by referencing the brc-20 standard. suirc-20 similarly defines the following operations:
Deploy Function
Key | Required | Description | Example |
---|---|---|---|
p | Yes | Protocol: Identifies compliance with suirc-20 | "p": "suirc-20" |
op | Yes | Operation: Type of event (Deploy, Mint, Transfer) | "op": "deploy" |
tick | Yes | Ticker: 4-letter identifier for suirc-20 | "tick": "suis" |
max | Yes | Max Supply: Sets the maximum supply of suirc-20 | "max": "21000000" |
lim | No | Mint Limit: Limits the number per inscription if users are allowed to mint | "lim": "1000" |
dec | No | Decimals: set decimal precision, default to 18, max to 18 | "dec": "18" |
fee | Yes | Fee: define the mint fee of every mint action | "fee": "1000000000" |
Example:
Mint Function
Key | Required | Description | Example |
---|---|---|---|
p | Yes | Protocol: Identifies compliance with suirc-20 | "p": "suirc-20" |
op | Yes | Operation: Type of event (Deploy, Mint, Transfer) | "op": "mint" |
tick | Yes | Ticker: 4-letter identifier for suirc-20 | "tick": "suis" |
amt | Yes | Amount to Mint: Specifies the amount of suirc-20 to mint | "amt": "1000" |
Example:
Transfer Function
Key | Required | Description | Example |
---|---|---|---|
p | Yes | Protocol: Identifies compliance with suirc-20 | "p": "suirc-20" |
op | Yes | Operation: Type of event (Deploy, Mint, Transfer) | "op": "transfer" |
tick | Yes | Ticker: 4-letter identifier for suirc-20 | "tick": "suis" |
amt | Yes | Amount to Transfer: Specifies the amount of suirc-20 to transfer | "amt": "100" |
to | Yes | Address to Send To: Specifies the recipient’s address for the transfer | "to": "0x0418c3918bd47a8b74a495861f8cd89e2e50adf3bfa54861dbf5d9e725101573" |
Example: