⚙️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"
}

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"
}

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"
}

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!"
}

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"
}

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"]
}

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"
}

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"
}

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"
}

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"
}

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"
}

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"
}

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