CRC-20 Specs

Operations

Deploy

{ 
  "p": "crc-20",
  "op": "deploy",
  "tick": "coss",
  "max": "21000000",
  "lim": "1000"
}

Key

Required ?

Description

p

Yes

Protocol: Helps other systems identify and process crc-20 events

op

Yes

Operation: Type of event (Deploy, Mint, Transfer)

tick

Yes

Ticker: 4 letter identifier of the crc-20

max

Yes

Max supply: set max supply of the crc-20

lim

No

Mint limit: If letting users mint to themsleves, limit per ordinal

Mint

{ 
  "p": "crc-20",
  "op": "mint",
  "tick": "coss",
  "amt": "1000"
}

Key

Required?

Description

p

Yes

Protocol: Helps other systems identify and process crc-20 events

op

Yes

Operation: Type of event (Deploy, Mint, Transfer)

tick

Yes

Ticker: 4 letter identifier of the crc-20

amt

Yes

Amount to mint: States the amount of the crc-20 to mint. Has to be less than "lim" above if stated

Transfer

{ 
  "p": "crc-20",
  "op": "transfer",
  "tick": "coss",
  "amt": "100"
}
Key
Required?
Description

p

Yes

Protocol: Helps other systems identify and process crc-20 events

op

Yes

Operation: Type of event (Deploy, Mint, Transfer)

tick

Yes

Ticker: 4 letter identifier of the crc-20

amt

Yes

Amount to transfer: States the amount of the crc-20 to transfer.

Approve

{
    "op": "aprv",
    "amt": "1000000",
    "tick": "coss",
    "p": "crc-20"
}
  • tx to_address: authorisation address

  • amt=0: cancellation of authorisation

  • amt>0: user's COSS will be frozen from the balance, and no other transfers can be made, or re-approved.

Proxy-trade

{
    "op": "ptrd",
    "tick": "coss",
    "amt": "110962",
    "p": "crc-20",
    "f": "cosmos1xxxxxxxxxxxx",
    "s": "sXAj67rdH7bh5i5hwG4RIw+F0kgQwGC0iaqTp0SH1KxA8xv2bl85kLTj+bp9AJLArCkLgTbbMf5Jx4gRfaQYNQ==",
    "msg": "ts:2024-01-27T12:19:14Z,price:27uatom"
}
  • f: the seller wallet address

  • s: msg’s signature by seller

  • msg: include expiry time, sell price, authorized wallet. Due to the limit size of Cosmos memo, to_address in tx is used as the authorized wallet in msg. For example, coss_market’s address is cosmos1yzwlf5c35e3ueevt7w6md3v8s4n40uczacxmzw. So the final msg which indexer will check signature is: ts:2024-01-27T12:19:14Z,price:27uatom,to:cosmos1yzwlf5c35e3ueevt7w6md3v8s4n40uczacxmzw

  • msg.ts: the UTC time at which the signature expires.

  • msg.price: the price of each tick (in this case, COSS)

  • indexer

    • check if the signature is OK, indexer collects seller's pub_key in advance

    • check if ts is expired

    • check amt x price == tx number of coins (ATOM in this case)

    • check amt quantity <=approve quantity

    • if all the above are OK, execute update the quantity of approve(decrease)

    • Execute transfer COSS to to_address

Notes

  • The first deployment of a ticker is the only one that has claim to the ticker. Tickers are not case sensitive (ATOM = atom).

  • If two events occur in the same block, prioritization is assigned via order they were confirmed in the block. (first to last).

  • The first mint to exceed the maximum supply will receive the fraction that is valid. (ex. 21,000,000 maximum supply, 20,999,242 circulating supply, and 1000 mint inscription will get 758 balance).

  • Maximum supply cannot exceed uint64_max.

Last updated