⚙️Operations

Deploy / Mint / Send / Upgrade / Sell / Airdrop / Propose / Vote / Lock / Burn / Swap / Buy

Indexers should use the Official JSON Format Version RFC 8259

https://datatracker.ietf.org/doc/html/rfc8259

As there are some slight differences in dealing with trailing commas and other edge cases in JSON5, that could change the final results of the indexing logic.

Deploy

This is a sample JSON syntax for deploying an ORC-CASH token ticker & specs

{ 
  "p": "orc-cash",
  "tick": "OSH",
  "id": "1",
  "op": "deploy",
  "max": "21000000",
  "lim": "1000",
  "dec": "18"
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

tick

Yes

Ticker: token identifier in any size

Case-insensitive, eg. CASH = cash

id

No

Token ID: any positive integer number,

default to 1 if not specified

op

Yes

Operation: deploy

max

No

Max Supply: set max token supply,

default to infinite if not specified, limited to uint256

lim

No

Limit: max amount can be minted per ordinal, or self

default to 1 if not specified

dec

No

Decimal: decimal precision, must be <=18,

default to 18 if not specified

ug

No

Upgradable: true or false, whether the deployer can upgrade deployed token specs, default to true

v

No

Version: helpful information when the deployer upgrades deployed token

msg

No

Message: custom text, message, description in any size

Deploy Operation Guidelines

This operation can be used to deploy a token ticker with different specs.

Here are some guidelines to follow when using/indexing this operation:

  1. The same ticker name can be deployed multiple times, each time with a different Token ID

  2. If the deployer has the same ticker and the same Token ID as a previous valid deployer, it will fail

  3. Upgradable can be permanently switched off when deploying by setting ug = false

  4. The wallet that holds the Deployer will have the right to upgrade the specs if ug = true

  5. If lim = self, only the wallet address holding the valid deploy inscription can mint the token supply

Mint

This is a sample JSON syntax for minting ORC-CASH tokens

{ 
  "p": "orc-cash",
  "tick": "OSH",
  "id": "1",
  "op": "mint",
  "amt": "1000"
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

tick

Yes

Ticker: specify the ticker of the token to mint

Case-insensitive, eg. CASH = cash

id

No

Token ID: specify the ID of the token to mint,

default to 1 if not specified

op

Yes

Operation: mint

amt

Yes

Mint Amount: specify the amount of token to mint, cannot exceed the mint limit set in deploy event

Mint Operation Guidelines

This operation can be used to mint a token balance of an existing deployed token.

Here are some guidelines to follow when using/indexing this operation:

  1. If the mint amount exceeds the mint limit, it will fail

  2. If the mint amount exceeds the remaining unclaimed max supply, it will fail

  3. Valid Mint Inscriptions/Ordinals will always carry the token balance minted and can be directly transferred or traded as the token balance represented, until burned

  4. No valid mint inscription/Ordinal can carry less than the amount specified

  5. The same wallet can mint multiple times by inscribing multiple Mint Inscriptions/Ordinals

  6. Valid Mint Inscriptions/Ordinals can be sent to designated Burn Wallet to create Token Credits to the sender's wallet address

Send

This is a sample JSON syntax for sending ORC-CASH token credit

{ 
  "p": "orc-cash",
  "tick": "OSH",
  "id": "1",
  "op": "send",
  "amt": "1000"
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

tick

Yes

Ticker: specify the ticker of the token to be sent

Case-insensitive, eg. CASH = cash

id

Yes

Token ID: specify the ID of the token to be sent

op

Yes

Operation: send

amt

Yes

Amount: specify the amount of token to send, cannot exceed the credit balance in holder's wallet

Send Operation Guidelines

This operation can be used to send a token balance to a wallet address.

Here are some guidelines to follow when using/indexing this operation:

  1. Valid Send Inscriptions/Ordinals can be created by any wallet with enough Token Credits until it runs out

  2. Token Credits are created by sending valid mint or send Inscriptions/Ordinals to the designated Burn Wallet

  3. Valid send Inscriptions/Ordinals will always carry the token balance minted and can be directly transferred or traded as the token balance represented, until burned

  4. No valid send inscription/Ordinal can carry less than the amount specified

Upgrade

This is a sample JSON syntax for upgrading ORC-CASH token specs

{ 
  "p": "orc-cash",
  "tick": "OSH",
  "id": "1",
  "op": "upgrade",
  "max": "21000000",
  "lim": "500",
  "dec": "18",
  "ug": "false",
  "v": "2",
  "msg": "Limit halving, final upgrade!"
}
KeyRequiredUpgradableDescription

p

Yes

No

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

tick

Yes

No

Ticker: specify the ticker of the token to upgrade

Case-insensitive, eg. CASH = cash

id

Yes

No

Token ID: specify the ID of the token to upgrade

op

Yes

No

Operation: upgrade

max

No

Yes

Max Supply: set max token supply,

default to infinite if not specified, limited to uint256

lim

No

Yes

Limit: max amount can be minted per ordinal,

default to 1 if not specified

dec

No

Yes

Decimal: decimal precision, must be <=18,

default to 18 if not specified

ug

No

Yes

Upgradable: true or false, whether the deployer can upgrade deployed token specs, default to true

v

No

Yes

Version: helpful information when the deployer upgrades deployed token

msg

No

Yes

Message: custom text, message, description in any size

Upgrade Operation Guidelines

This operation can be used to upgrade a token ticker to different specs.

Here are some guidelines to follow when using/indexing this operation:

  1. The wallet that holds the Deployer will have the right to upgrade the specs if ug = true

  2. Upgradable can be permanently switched off when upgrading by setting ug = false

  3. If max is lowered below the current supply already minted, it will fail

  4. If lim = 0, minting is stopped

  5. If dec is reduced below the current smallest decimal amount already divided in a valid mint/send inscription, it will fail

Sell

This is a sample JSON syntax for selling ORC-CASH token credits

{ 
  "p": "orc-cash",
  "tick": "OSH",
  "id": "1",
  "op": "sell",
  "amt": "100000",
  "lim": "10000",
  "price": "1000",
  "expire": "100",
  "seller": "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "buyer": "anyone"
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

tick

Yes

Ticker: specify the ticker of the token to sell

Case-insensitive, eg. CASH = cash

id

Yes

Token ID: specify the ID of the token to sell

op

Yes

Operation: sell

amt

Yes

Amount: specify the amount of token to sell, cannot exceed the credit balance in holder's wallet

lim

No

Limit: max amount can be bought per wallet address,

default to total sell amount if not specified

price

Yes

Price: price in sats (Satoshi) per token

expire

Yes

Expiration Time: when will the sell order expire or Never, based on the number of blocks confirmed after order activation

seller

Yes

Seller Address: the wallet address to receive the payment for the sell order

buyer

Yes

Buyer Address/es: can be One or Multiple wallet addresses or Anyone

Sell Operation Guidelines

This operation can be used to offer Token Credits in the sender's wallet to sell to a single wallet or an equal amount of tokens to multiple designated or any wallet addresses. Valid buyers only need to send the native coin (e.g. BTC) to the seller's address while the sell order is active to make a valid purchase of the Token Credits on sale.

Here are some guidelines to follow when using/indexing this operation:

  1. This operation needs to be inscribed to the holder's wallet first, then sent to the designated Burn Wallet to be activated

  2. Once activated, it can not be canceled

  3. Activated sell orders will auto-expire when the specified number of blocks gets confirmed on-chain after activation, all remaining unsold token balances will be auto-returned to the seller's address as token credits

  4. Purchases are only considered valid when the purchase transactions are confirmed on-chain

  5. The first come first serve rule applies to purchases made for all sell orders

  6. If multiple purchases are made in the same block, the order of the transactions in the block will be considered

  7. If a purchase transaction contains multiple inputs or outputs, only the amount of sats having the seller address as output will be considered valid purchases, only the address in the 1st input will be considered the valid buyer

  8. If the amt exceeds the token credits currently in the holder's wallet, it will fail

  9. If lim > amt, default to amt

  10. If the number of valid Buyer Addresses on the list doesn't = amt / lim, the first come first serve rule applies, until amt left runs out or all wallet addresses on the buyer list are fully filled to the lim.

  11. Any remaining balances after all wallet addresses on the buyer list are filled to the lim will be auto-returned to the sender's address as token credits

  12. Duplicate addresses are allowed and will be granted multiple purchase lim based on the number of times they appear on the buyer list

Airdrop

This is a sample JSON syntax for Airdropping ORC-CASH token credits to multiple wallets

{ 
  "p": "orc-cash",
  "tick": "OSH",
  "id": "1",
  "op": "airdrop",
  "amt": "100000",
  "lim": "10000",
  "to": 
  ["bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f"]
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

tick

Yes

Ticker: specify the ticker of the token to airdrop

Case-insensitive, eg. CASH = cash

id

Yes

Token ID: specify the ID of the token to airdrop

op

Yes

Operation: airdrop

amt

Yes

Amount: specify the total amount of token to be airdropped, cannot exceed the credit balance in holder's wallet

lim

Yes

Limit: amount to be airdropped to each wallet address,

cannot exceed the total amount to be airdropped

to

Yes

Receiving Addresses: the wallet addresses to send the airdrops to

Airdrop Operation Guidelines

This operation can be used to spend Token Credits in the sender's wallet to send an equal amount of tokens to multiple wallet addresses.

Here are some guidelines to follow when using/indexing this operation:

  1. This operation needs to be inscribed to the holder's wallet first, then sent to the designated Burn Wallet to be activated

  2. If the amount exceeds the total credits currently in the holder's wallet, it will fail

  3. If the limit exceeds the total amount to be airdropped, it will fail

  4. If the number of valid Receiving Addresses on the list doesn't = amt / lim, the 1st wallet address on the list will be fully credited with lim, then moving down on the list, until amt left < lim or all wallet addresses on the list are fully credited with lim

  5. A wallet can only be credited with the full lim or nothing, no wallet will receive the remainder

  6. Any remaining credits after all wallet addresses on the list are filled with lim, or any remainder < lim, will be auto-returned to the sender's address

  7. Duplicate addresses are allowed and will be credited multiple times

Propose (Proposal #1 - Passed)

This is a sample JSON syntax for Proposing a vote for any ORC-CASH token deployed

{ 
  "p": "orc-cash",
  "tick": "OSH",
  "id": "1",
  "op": "propose",
  "v": "1",  
  "quo": "30",
  "pass": "16",
  "expire": "100",
  "msg": "Proposing the Voting System for ORC-CASH Protocol"
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

tick

Yes

Ticker: specify the ticker of the token to add a proposal

Case-insensitive, eg. CASH = cash

id

Yes

Token ID: specify the ID of the token to add a proposal

op

Yes

Operation: propose

v

Yes

Version: a unique version number within each token to identify the proposal, must be positive integer numbers

quo

No

Quorum: specify the percentage (%) for the minimum quorum of the token to be polled, ranging between 10 to 100 Default to 100 if not specified

pass

Yes

Pass: specify the total percentage (%) of the token required to pass the proposal, ranging between 5 to 100

expire

No

Expiration Time: when will the voting of this proposal expire or Never, based on the number of blocks confirmed after proposal activation Default to Never if not specified

msg

No

Message: custom text, message, description in any size

Propose Operation Guidelines

This operation can be used to propose a vote to be polled from token holders of any token deployed.

Here are some guidelines to follow when using/indexing this operation:

  1. This operation needs to be inscribed to the holder's wallet first, then sent to the designated Burn Wallet to be activated

  2. Only token holders of each deployed token can propose a vote for that token, proposals by non-holders will be invalid and checked at the time of sending the proposal to Burn Wallet

  3. Quorum needs to be at least 10% for the proposal to be valid

  4. Pass needs to be at least 5%, which is half (50%) of the minimum quorum for the proposal to be valid

  5. Pass needs to be <= Quorum for the proposal to be valid

  6. v needs to be a unique positive integer number within the proposed token to be valid

  7. A version number of a token is only considered taken when the proposal is activated

  8. Proposals will auto-conclude when the minimum quorum is reached

  9. Proposals will auto-conclude when the expiration block height is reached

  10. Proposals will auto-conclude when 100% of the total token supply has voted

  11. Each wallet address is limited to 10 active proposals at once for any token holdings, to avoid spamming

Vote (Proposal #1 - Passed)

This is a sample JSON syntax for Voting for a proposal from any ORC-CASH token deployed

{ 
  "p": "orc-cash",
  "tick": "OSH",
  "id": "1",
  "op": "vote",
  "v": "1",
  "amt": "1000",
  "vote": "yes",
  "msg": "Agrees to the proposing of the Voting System for ORC-CASH Protocol"
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

tick

Yes

Ticker: specify the ticker of the token to vote

Case-insensitive, eg. CASH = cash

id

Yes

Token ID: specify the ID of the token to vote

op

Yes

Operation: vote

v

Yes

Version: a unique version number within each token to identify the proposal, must be positive integer numbers

amt

Yes

Amount: specify the amount of tokens to vote, can not exceed total holdings

vote

Yes

Vote: yes or no

msg

No

Message: custom text, message, description in any size

Vote Operation Guidelines

This operation can be used to vote for a proposal from any token deployed as a token holder.

Here are some guidelines to follow when using/indexing this operation:

  1. This operation needs to be inscribed to the holder's wallet first, then sent to the designated Burn Wallet to be activated

  2. Only token holders of each deployed token can vote for proposals from that token, vote by non-holders will be invalid, checked at the time of sending the vote to Burn Wallet

  3. v needs to be a unique positive integer number that matches an active proposal of that token for the vote to be valid

  4. Amount needs to be <= Total Balance of the proposed token in that wallet for the vote to be valid, the vote will become invalid if the total balance is reduced to lower than the voted amount while the proposal is still active

  5. Each wallet address can only vote once for each active proposal from each token

Lock (Proposal #2 - Passed)

This is a sample JSON syntax for locking ORC-CASH token credits for a given amount of blocks

{ 
  "p": "orc-cash",
  "tick": "OSH",
  "id": "1",
  "op": "lock",
  "amt": "1000",
  "expire": "100",
  "to": "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f"
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

tick

Yes

Ticker: specify the ticker of the token to lock

Case-insensitive, eg. CASH = cash

id

Yes

Token ID: specify the ID of the token to lock

op

Yes

Operation: lock

amt

Yes

Amount: specify the amount of token to lock, cannot exceed the credit balance in holder's wallet

expire

Yes

Expiration Time: when will the lock expire or Never, based on the number of blocks confirmed after lock activation

to

Yes

To: the wallet address to receive the credits after the lock expires

Lock Operation Guidelines

This operation can be used to lock Token Credits for a given number of blocks and unlock the credit to a specified wallet address after the lock expires.

Here are some guidelines to follow when using/indexing this operation:

  1. This operation needs to be inscribed to the holder's wallet first, then sent to the designated Burn Wallet to be activated

  2. Once activated, it can not be canceled

  3. Activated locks will auto-expire when the specified number of blocks gets confirmed on-chain after activation, then unlock the credit to a specified wallet address after the lock expires

  4. If the amt exceeds the token credits currently in the holder's wallet, it will fail

  5. Expire can be positive integers or never

Burn (Proposal #2 - Passed)

This is a sample JSON syntax for burning ORC-CASH token credits

{ 
  "p": "orc-cash",
  "tick": "OSH",
  "id": "1",
  "op": "burn",
  "amt": "1000"
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

tick

Yes

Ticker: specify the ticker of the token to burn

Case-insensitive, eg. CASH = cash

id

Yes

Token ID: specify the ID of the token to burn

op

Yes

Operation: burn

amt

Yes

Amount: specify the amount of token to burn, cannot exceed the credit balance in holder's wallet

to

No

To: an address on any other chain that supports the ORC-CASH Protocol

Burn Operation Guidelines

This operation can be used to burn Token Credits and reduce the total supply of the token, or burn to bridge to another chain that supports the ORC-CASH Protocol.

Here are some guidelines to follow when using/indexing this operation:

  1. This operation needs to be inscribed to the holder's wallet first, then sent to the designated Burn Wallet to be activated

  2. Once activated, it can not be reverted

  3. If the amt exceeds the token credits currently in the holder's wallet, it will fail

  4. Burning token credits will reduce the total supply of the token

  5. Burning tokens to another chain will require the target chain to support ORC-CASH Protocol and multi-chain indexing to recognize the incoming tokens and the source origin of the tokens

Swap (Proposal #3 - Pending)

This is a sample JSON syntax for swapping ORC-CASH token credits for another token

{ 
  "p": "orc-cash",
  "op": "swap",
  "from": ["OSH","1"],
  "to": ["BURN","69"],
  "amt": "100000",
  "lim": "1000",
  "price": "10000",
  "expire": "100",
  "seller": "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f",
  "buyer": "anyone"
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

op

Yes

Operation: swap

from

Yes

Ticker, TokenID: specify the ticker and the TokenID of the token to offer for swap

Case-insensitive, eg. CASH = cash

to

Yes

Ticker, TokenID: specify the ticker and the TokenID of the token to receive for the swap

Case-insensitive, eg. CASH = cash

amt

Yes

Amount: specify the amount of token to offer for swap, cannot exceed the credit balance in holder's wallet

lim

No

Limit: max amount can be swapped per wallet address,

default to total swap amount if not specified

price

Yes

Price: price in amount of tokens(to) per token(from), price can be in decimals up to 18 decimals

e.g.: 10000 BURN / OSH

expire

Yes

Expiration Time: when will the swap order expire or Never, based on the number of blocks confirmed after order activation

seller

Yes

Seller Address: the wallet address to receive the payment for the swap order

buyer

Yes

Buyer Address/es: can be One or Multiple wallet addresses or Anyone

Swap Operation Guidelines

This operation can be used to offer Token Credits in the sender's wallet to swap for another token either in Credit or Cash form, from a single wallet or multiple designated wallets or any wallet addresses. Valid buyers only need to send the tokens the seller wants to swap for, either in Cash or Credit, to the seller's address while the sell order is still active to make a valid purchase of the Token Credits on sale.

Here are some guidelines to follow when using/indexing this operation:

  1. This operation needs to be inscribed to the holder's wallet first, then sent to the designated Burn Wallet to be activated

  2. Once activated, it can not be canceled

  3. Activated swap orders will auto-expire when the specified number of blocks gets confirmed on-chain after activation, all remaining unsold token balances will be auto-returned to the seller's address as token credits

  4. if from or to doesn't match an existing token deployed, it will fail

  5. if from or to doesn't include a TokenID, it will fail

  6. Ticker and TokenID can not be in the wrong order within the array

  7. Purchases are only considered valid when the purchase transactions are confirmed on-chain

  8. The first come first serve rule applies to purchases made for all swap orders

  9. If multiple purchases are made in the same block, the order of the transactions in the block will be considered

  10. If a purchase transaction contains multiple inputs or outputs, only the amount of tokens having the seller address as output will be considered valid purchases for that order, the source of the token transferred will be considered the valid buyer

  11. If the amt exceeds the token credits currently in the holder's wallet, it will fail

  12. If lim > amt, default to amt

  13. If the number of valid Buyer Addresses on the list doesn't = amt / lim, the first come first serve rule applies, until amt left runs out or all wallet addresses on the buyer list are fully filled to the lim.

  14. Any remaining balances after all wallet addresses on the buyer list are filled to the lim will be auto-returned to the sender's address as token credits

  15. Duplicate addresses are allowed and will be granted multiple purchase lim based on the number of times they appear on the buyer list

Buy (Proposal #3 - Pending)

This is a sample JSON syntax for buying ORC-CASH token credits with another token

{ 
  "p": "orc-cash",
  "op": "buy",
  "buy": ["OSH","1"],
  "with": ["BURN","69"],
  "amt": "10000000",
  "price": "10000",
  "seller": "bc1pwhxpeuvauge29rrhjeyjq6y3489tw86nssl0s8lpvgn2exhntyjquctx6f"
}
KeyRequiredDescription

p

Yes

Protocol: orc-cash, brc-20, orc-20 or orc20

Case-insensitive.

op

Yes

Operation: buy

buy

Yes

Ticker, TokenID: specify the ticker and the TokenID of the token to buy

Case-insensitive, eg. CASH = cash

with

Yes

Ticker, TokenID: specify the ticker and the TokenID of the token to pay with

Case-insensitive, eg. CASH = cash

amt

Yes

Amount: specify the amount of token willing to pay with for the buy order, cannot exceed the credit balance in holder's wallet

price

Yes

Price: specify the price in amount of tokens(with) per token(buy) willing to pay, price can be in decimals up to 18 decimals

e.g.: 10000 BURN / OSH

Seller

Yes

Seller Address/es: can be One or Multiple wallet addresses or Anyone

Buy Operation Guidelines

This operation can be used to pay Token Credits in the sender's wallet to buy another token in matching swap orders, from a single wallet or multiple designated wallets or any wallet addresses. Buy orders will be matched with one or multiple or any wallet addresses with active swap orders, and only transfer the token when there are enough targeted tokens left in the swap orders.

Here are some guidelines to follow when using/indexing this operation:

  1. This operation needs to be inscribed to the holder's wallet first, then sent to the designated Burn Wallet to be activated

  2. Once activated, it can not be canceled

  3. Activated buy orders will be matched with one or multiple or any active swap orders with the matching token pairs, and fill those orders if there are tokens still left in those swap orders, all remaining unspent token credits will be auto-returned to the buyer's address immediately

  4. Only swap orders with equal or lower prices will be matched if those orders allow the buyer or anyone to buy, buyers will pay the prices specified in each matching order accordingly for the purchase

  5. Lower priced swap orders will be filled first until all amt is spent

  6. If buy or with doesn't match an existing token deployed, it will fail

  7. If buy or with doesn't include a TokenID, it will fail

  8. Ticker and TokenID can not be in the wrong order within the array

  9. If the buy order doesn't match any active swap order, it will fail

  10. If the amt exceeds the token credits currently in the holder's wallet, it will fail

Last updated