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:

  1. An inscription object should have a specific ‘inscriptions’ field. This helps in better indexing and identifying the data.
  2. 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.
  3. 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:

  1. 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.

  2. 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.

  3. 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.

  4. 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

KeyRequiredDescriptionExample
pYesProtocol: Identifies compliance with suirc-20"p": "suirc-20"
opYesOperation: Type of event (Deploy, Mint, Transfer)"op": "deploy"
tickYesTicker: 4-letter identifier for suirc-20"tick": "suis"
maxYesMax Supply: Sets the maximum supply of suirc-20"max": "21000000"
limNoMint Limit: Limits the number per inscription if users are allowed to mint"lim": "1000"
decNoDecimals: set decimal precision, default to 18, max to 18"dec": "18"
feeYesFee: define the mint fee of every mint action"fee": "1000000000"

Example:

{
  "p": "suirc-20",
  "op": "deploy",
  "tick": "suis",
  "max": "21000000",
  "lim": "1000",
  "fee": "1000000000",
}

Mint Function

KeyRequiredDescriptionExample
pYesProtocol: Identifies compliance with suirc-20"p": "suirc-20"
opYesOperation: Type of event (Deploy, Mint, Transfer)"op": "mint"
tickYesTicker: 4-letter identifier for suirc-20"tick": "suis"
amtYesAmount to Mint: Specifies the amount of suirc-20 to mint"amt": "1000"

Example:

{
  "p": "suirc-20",
  "op": "mint",
  "tick": "suis",
  "amt": "1000",
}

Transfer Function

KeyRequiredDescriptionExample
pYesProtocol: Identifies compliance with suirc-20"p": "suirc-20"
opYesOperation: Type of event (Deploy, Mint, Transfer)"op": "transfer"
tickYesTicker: 4-letter identifier for suirc-20"tick": "suis"
amtYesAmount to Transfer: Specifies the amount of suirc-20 to transfer"amt": "100"
toYesAddress to Send To: Specifies the recipient’s address for the transfer"to": "0x0418c3918bd47a8b74a495861f8cd89e2e50adf3bfa54861dbf5d9e725101573"

Example:

{
  "p": "suirc-20",
  "op": "transfer",
  "tick": "suis",
  "amt": "100",
  "to": "0x0418c3918bd47a8b74a495861f8cd89e2e50adf3bfa54861dbf5d9e725101573"
}