Indexing

Balance

Users have two types of balances and the sum of two types constitutes the user's total balance.

  1. Available Balance:

    1. When a user executes mint or receives a transfer, the received balance becomes the available balance.

  2. Transferable Balance:

    1. When a user mints a transfer inscription, the available balance transforms into a transferable balance.

    2. When a user transfers a transfer inscription, the transferable balance follows the inscription to the receiver, becoming the receiver's available balance.

Indexing rules

  1. Inscriptions must have a MIME Type of "text/plain" or "application/json". To check this, split the mime type from ";" and check the first part without strip/trim etc.

  2. A token is considered invalid and excluded from the snapshot if its parameters do not meet the new protocol requirements (e.g., max value exceeding max(uint_64)) and the token's holder count is 0. Both conditions must be met.

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

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

  5. JSON must have "p", "op", "params" fields where "p"="orc-20", "op" in [”deploy”, “upgrade”, “mint”, “burn”, “transfer”, “order-make”, “order-take”, “otc-create”, “otc-buy”, “otc-execute”]. The sub fields in params are filled in according to different operation regulations. The extra fields or subfields do not affect the validity of the inscription. (The content of the op may increase with the proposal).

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

  7. ALL NECESSARY JSON FIELDS MUST BE STRINGS. Numbers at max, lim, amt, dec etc. are not accepted.

  8. All keys and subkeys and string values are case insensitive.

  9. Numeric fields are not stripped/trimmed. "dec" field must have only digits, other numeric fields may have a single dot(".") for decimal representation (+,- etc. are not accepted). Decimal fields cannot start or end with dot (e.g. ".99" and "99." are invalid).

  10. Empty string for numeric field is invalid.

  11. If any decimal representation have more decimal digits than "dec" of ticker, the inscription will be counted as invalid (even if the extra digits are 0)

  12. The Maximum value of "dec" is 18.

  13. Max value of any numeric field is uint64_max.

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

  15. If any ORC-20 operation is sent as fee to miner while inscribing, it must be ignored.

  16. If a transfer is sent as fee in its first transfer, its amount must be returned to the sender immediately (instead of after all events in the block).

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

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

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

  20. A transfer/burn/upgrade/order-take/otc-create/otc-buy inscription will become invalid/used after its first transfer. order-make inscription will become invalid/used after its second transfer to another one.

  21. Cursed inscriptions including ORC-20 data are not recognized as valid. ORC-20 employs the ord client version 0.9 definition of an inscription.

  22. Do not use int/float conversion directly on numeric fields. For example some languages may accept "123asd" as valid integer with 123 value but this inscription is invalid.

Last updated