Indexing

Rules

Primarily, the indexing guidelines are pertinent to users who intend to independently index SEI-20 state data. Nevertheless, individuals encountering challenges may find this information useful for troubleshooting. The content herein has largely been provided by the SEIS team. These directives will form the foundation for future SEI-20 projects, the reference implementation client, and all ensuing updates to the protocol.

  • Inscription must be a valid JSON (not JSON5). Trailing commas invalidate the function.

  • Leading or trailing spaces/tabs/newlines are allowed (and stripped/trimmed).

  • JSON must have "p", "op", "tick" fields where "p"="sei-20", "op" in ["deploy", "mint", "transfer", "burn"]

  • If op is deploy, JSON must have a "max" field and "lim" fields are optional. If "lim" is not set it will be equal to "max".

  • If op is mint or transfer, JSON must have an "amt" field.

  • All op and field names must be in lower case.

  • ALL NECESSARY JSON FIELDS MUST BE STRINGS. Extra fields which haven't been discussed here can be of any type.

  • The numerical value MUST be in the form of an integer string.(e.g. “1000000000”, “2100000”, or “1e9”, “21e5” for short)

  • Empty string for numeric field is invalid.

  • Max value of any numeric field is uint64_max.

  • "tick'' must be 4 bytes wide (UTF-8 is accepted). "tick" is case insensitive, we use lowercase letters to track tickers (convert tick to lowercase before processing).

  • If a deploy, mint, transfer or burn is sent as fee to miner while inscribing, it must be ignored

  • If a mint has been deployed with more amt than lim, it will be ignored.

  • If a transfer has been deployed with more amt than the available balance of that wallet, it will be ignored.

  • If a burn has been depolyed with more amt than the the available balance of that wallet, it will be ignored.

  • First a deploy inscription is inscribed. This will set the rules for this sei-20 ticker. If the same ticker (case insensitive) has already been deployed, the second deployment will be invalid.

  • Then anyone can inscribe mint inscriptions with the limits set in deploy inscription until the minted balance reaches to "max" set in deploy inscription.

  • When a wallet mints a sei-20 token (inscribes a mint inscription to its address), its balance will increase.

  • When this transfer inscription is transferred the original wallet's balance will decrease. The receiver's balance will increase.

  • When this burn inscription is burnt the original wallet's balance will decrease.

  • Deploy inscriptions will not change anyone's balance.

  • “fee” and “to” keys were for demo indexing purposes only. Inclusions have no effect on the function nor do they invalidate it.

Last updated