Quick Start

Transactions of ORC-20 made simple

You can quickly get started with ORC-20 by inscribing deploy, mint, send and cancel events.

1. Deploy ORC-20

Example: deploy token ORC (the 1st ORC-20, already deployed) with identifier of 1 has the maximum supply of 21,000,000. Each minter is allowed to mint up to 10,000.

{ 
  "p": "orc-20",
  "tick": "orc",
  "id": "1",
  "op": "deploy",
  "max": "21000000",
  "lim": "10000"
}

2. Mint ORC-20

Example: mint 10,000 ORC (inscription number #2504160). Mint event maintains the initial balance. You must keep the mint inscription until the first succeeding send transaction is made.

Old Format: Deprecated after OIP-3 (Mints before OIP-3 are still valid)

{ 
  "p": "orc-20",
  "tick": "orc",
  "id": "1",
  "op": "mint",
  "amt": "10000"
}

New Format: Amended in OIP-3

{ 
  "p": "orc-20",
  "tick": "orc",
  "id": "2504160",
  "op": "mint",
  "amt": "10000"
}

3. Send ORC-20

Example: send 1000 $ORC (inscription number #2504160) in two partial transactions. Each transaction must have unique nonce.

Step 1: sender inscribes 1,000 $ORC (nonce 5) on "send inscription" to sender's address

{ 
  "p": "orc-20",
  "tick": "orc",
  "id": "2504160",
  "op": "send",
  "n": "5",
  "amt": "1000"
}

Step 2: sender inscribes the "send remaining balance" back to sender

{ 
  "p": "orc-20",
  "tick": "orc",
  "id": "2504160",
  "op": "send",
  "n": "6"
}

A transaction is only complete after the remaining balance is sent.

Step 3: Sender sends satoshis which contain the "send inscription" created in Step 1 to receiver

Important: you can now reuse the "mint" or "send" inscription in a transaction now

  • Reusing "send inscription" as long as the balance is not spent - Instead of inscribing "send event" each time when you transfer ORC-20 funds, you can pass the previously received "send ordinal" to the receiver's address to transfer the full amount on the "send ordinal", as long as the amount is not spent. The full amount will be added to the remaining balance of the receiver.

  • The goal is to reuse the one-time "send" inscription and reduce massive wastage on Bitcoin, and ultimately save block space and transaction fees.

4. Cancel ORC-20 Transaction

Example: cancel the partial transaction with nonce 5. You can only cancel a partial transaction.

{ 
  "p": "orc-20",
  "tick": "orc",
  "id": "2504160",
  "op": "cancel",
  "n": "[5]"
}

Last updated