> For the complete documentation index, see [llms.txt](https://erc-cash.gitbook.io/erc-cash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://erc-cash.gitbook.io/erc-cash/erc-cash.md).

# ERC-CASH

{% hint style="info" %}
Ethscriptions:

<https://docs.ethscriptions.com/overview/introducing-ethscriptions>

ORC-CASH

<https://docs.orc.cash/>
{% endhint %}

## Index Rules

* content must be a valid Data URI starting with "**data:**"
* duplicate content is invalid
* using the **Compressed JSON format,** any spaces  or other special characters are invalid
* the order of the parameters in the content does not affect the validity

## Deploy

This is a sample **Compressed** JSON syntax for deploying an ERC-CASH token ticker & specs

```
data:,{"p":"erc-cash","op":"deploy","tick":"ESH","max":"21000000","lim":"1000","msg":"A cash token system native to Ethscriptions"}
```

JSON expanded view

```
{ 
  "p": "erc-cash",
  "op": "deploy",
  "tick": "ESH",
  "max": "21000000",
  "lim": "1000",
  "msg": "A cash token system native to Ethscriptions"
}
```

<table><thead><tr><th>Key</th><th>Required</th><th width="352">Description</th></tr></thead><tbody><tr><td>p</td><td>Yes</td><td><p>Protocol:  erc-cash, erc-20, esc-20, brc-20</p><p><strong>Case-insensitive</strong></p></td></tr><tr><td>op</td><td>Yes</td><td>Operation: deploy</td></tr><tr><td>tick</td><td>Yes</td><td><p>Ticker: token identifier in any size</p><p><strong>Case-insensitive</strong>, eg. CASH = cash</p></td></tr><tr><td>max</td><td>no</td><td><p>Max Supply: set max token supply, </p><p>default to infinite if not specified, limited to uint256</p></td></tr><tr><td>lim</td><td>no</td><td><p>Limit: max amount can be minted per ordinal, </p><p>default to 1 if not specified</p></td></tr><tr><td>ug</td><td>no</td><td>Upgradable: true or false, whether the deployer can upgrade deployed token specs, default to true</td></tr><tr><td>v</td><td>no</td><td>Version: helpful information when the deployer upgrades deployed token</td></tr><tr><td>msg</td><td>no</td><td>Message: custom text, message, description in any size</td></tr></tbody></table>

##

## Mint

This is a sample  **Compressed** JSON syntax for minting ERC-CASH tokens

```
data:,{"p":"erc-cash","op":"mint","tick":"ESH","amt":"1000","id":"0x426ac80514be0ed683bbef595920d6355b19d56006fc14ce78f21c2c929ee1d0"}
```

JSON expanded view

```
{ 
  "p": "erc-cash",
  "op": "mint",
  "tick": "ESH",
  "amt": "1000",
  "id": "0x426ac80514be0ed683bbef595920d6355b19d56006fc14ce78f21c2c929ee1d0"
  //or "id": "22" (this format only valid for erc-20｜esc-20｜brc-20, not for erc-cash)
}
```

<table><thead><tr><th width="113">Key</th><th width="107.33333333333331">Required</th><th>Description</th></tr></thead><tbody><tr><td>p</td><td>Yes</td><td><p>Protocol:  erc-cash, erc-20, esc-20, brc-20</p><p><strong>Case-insensitive</strong></p></td></tr><tr><td>op</td><td>Yes</td><td>Operation: mint</td></tr><tr><td>tick</td><td>Yes</td><td><p>Ticker: specify the ticker of the token to mint</p><p><strong>Case-insensitive</strong>, eg. CASH = cash</p></td></tr><tr><td>amt</td><td>Yes</td><td>Mint Amount: specify the amount of token to mint, cannot exceed the mint limit set in deploy event</td></tr><tr><td>id</td><td>Yes</td><td><p>1) erc-cash</p><p>Generated using the SHA-256 algorithm, sha256(address + nonce) or sha256(address + timestamp), starts with '0x' and has a length of 66</p><p>2) erc-20,  esc-20, brc-20</p><p>positive integer number, range: 1- lim</p></td></tr></tbody></table>

##

## Send

This is a sample **Compressed** JSON syntax for sending ERC-CASH token credit

```
data:,{"p":"erc-cash","op":"send","tick":"ESH","amt":"1000","id":"0x3ed40ec717ac3d5bb46b5b02a34c9c07dda3431d32d1b8e2f5c40143653cea72"}
```

JSON expanded view

```
{ 
  "p": "erc-cash",
  "op": "send",
  "tick": "ESH",
  "amt": "1000",
  "id": "0x3ed40ec717ac3d5bb46b5b02a34c9c07dda3431d32d1b8e2f5c40143653cea72"
}
```

<table><thead><tr><th width="113">Key</th><th width="101.33333333333331">Required</th><th>Description</th></tr></thead><tbody><tr><td>p</td><td>Yes</td><td><p>Protocol:  erc-cash, erc-20, esc-20, brc-20</p><p><strong>Case-insensitive</strong></p></td></tr><tr><td>op</td><td>Yes</td><td>Operation: send</td></tr><tr><td>tick</td><td>Yes</td><td><p>Ticker: specify the ticker of the token to be sent</p><p><strong>Case-insensitive</strong>, eg. CASH = cash</p></td></tr><tr><td>amt</td><td>Yes</td><td>Amount: specify the amount of token to send, cannot exceed the credit balance in holder's wallet</td></tr><tr><td>id</td><td>Yes</td><td>Generated using the SHA-256 algorithm, sha256(address + nonce) or sha256(address + timestamp),starts with '0x' and has a length of 66</td></tr></tbody></table>

### 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 Ethscriptions 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 Ethscriptions** to the designated **Burn Wallet**
3. Valid send Ethscriptions 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 Ethscriptions can carry less than the amount specified

##

## Upgrade

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

```
data:,{"p":"erc-cash","op":"upgrade","tick":"ESH","max":"21000000","lim":"500","dec":"18","ug":"false","v":"2","msg":"Limit halving, final upgrade!","id":"0x39fdd000d75b4f2d49326afcccc3fca1f04d5f996495de2bfb458661e2b0a6be"}
```

JSON expanded view

```
{ 
  "p": "erc-cash",
  "op": "upgrade",
  "tick": "ESH",
  "max": "21000000",
  "lim": "500",
  "ug": "false",
  "v": "2",
  "msg": "Limit halving, final upgrade!",
  "id": "0x39fdd000d75b4f2d49326afcccc3fca1f04d5f996495de2bfb458661e2b0a6be"
}
```

<table><thead><tr><th width="113">Key</th><th width="106.33333333333331">Required</th><th width="124">Upgradable</th><th>Description</th></tr></thead><tbody><tr><td>p</td><td>Yes</td><td>no</td><td><p>Protocol:  erc-cash, erc-20, esc-20, brc-20</p><p><strong>Case-insensitive</strong></p></td></tr><tr><td>op</td><td>Yes</td><td>no</td><td>Operation: upgrade</td></tr><tr><td>tick</td><td>Yes</td><td>no</td><td><p>Ticker: specify the ticker of the token to upgrade</p><p><strong>Case-insensitive</strong>, eg. CASH = cash</p></td></tr><tr><td>max</td><td>no</td><td>yes</td><td><p>Max Supply: set max token supply, </p><p>default to infinite if not specified, limited to uint256</p></td></tr><tr><td>lim</td><td>no</td><td>yes</td><td><p>Limit: max amount can be minted per ordinal, </p><p>default to 1 if not specified</p></td></tr><tr><td>ug</td><td>no</td><td>yes</td><td>Upgradable: true or false, whether the deployer can upgrade deployed token specs, default to true</td></tr><tr><td>v</td><td>no</td><td>yes</td><td>Version: helpful information when the deployer upgrades deployed token</td></tr><tr><td>msg</td><td>no</td><td>yes</td><td>Message: custom text, message, description in any size</td></tr><tr><td>id</td><td>Yes</td><td>no</td><td>Generated using the SHA-256 algorithm, sha256(address + nonce) or sha256(address + timestamp), starts with '0x' and has a length of 66</td></tr></tbody></table>

### 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  **Compressed** JSON syntax for selling ERC-CASH token credits

```
data:,{"p":"erc-cash","op":"sell","tick":"ESH","amt":"100000","lim":"10000","price":"1000","expire":"100","seller":"0x54324540F098cB18a9aD8f6DAF54602bf469C397","buyer":"anyone","id":"0xbd3d7ee8e33dfea7c4626812f516c96a87a7aa0b405daa554050e50cb0a7394c"}
```

JSON expanded view

```
{ 
  "p": "erc-cash",
  "op": "sell",
  "tick": "ESH",
  "amt": "100000",
  "lim": "10000",
  "price": "1000",
  "expire": "100",
  "seller": "0x54324540F098cB18a9aD8f6DAF54602bf469C397",
  "buyer": "anyone",
  "id": "0xbd3d7ee8e33dfea7c4626812f516c96a87a7aa0b405daa554050e50cb0a7394c"
}
```

<table><thead><tr><th width="96">Key</th><th width="103.33333333333331">Required</th><th>Description</th></tr></thead><tbody><tr><td>p</td><td>Yes</td><td><p>Protocol:  erc-cash, erc-20, esc-20, brc-20</p><p><strong>Case-insensitive</strong></p></td></tr><tr><td>op</td><td>Yes</td><td>Operation: sell</td></tr><tr><td>tick</td><td>Yes</td><td><p>Ticker: specify the ticker of the token to sell</p><p><strong>Case-insensitive</strong>, eg. CASH = cash</p></td></tr><tr><td>amt</td><td>Yes</td><td>Amount: specify the amount of token to sell, cannot exceed the credit balance in holder's wallet</td></tr><tr><td>lim</td><td>no</td><td><p>Limit: max amount can be bought per wallet address, </p><p>default to total sell amount if not specified</p></td></tr><tr><td>price</td><td>Yes</td><td>Price: price in sats (Satoshi) per token</td></tr><tr><td>expire</td><td>Yes</td><td>Expiration Time: when will the sell order expire or Never, based on the number of blocks confirmed after order activation</td></tr><tr><td>seller</td><td>Yes</td><td>Seller Address: the wallet address to receive the payment for the sell order</td></tr><tr><td>buyer</td><td>Yes</td><td>Buyer Address/es: can be One or Multiple wallet addresses or Anyone</td></tr><tr><td>id</td><td>Yes</td><td>Generated using the SHA-256 algorithm, sha256(address + nonce) or sha256(address + timestamp), starts with '0x' and has a length of 66</td></tr></tbody></table>

### Sell Operation Guidelines

This operation can be used to spend 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.

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 send 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. If the amt exceeds the token credits currently in the holder's wallet, it will fail
5. If lim > amt, default to amt
6. 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.
7. 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
8. Duplicate addresses are allowed and will be granted multiple purchase lim based on the number of times it appears on the buyer list

## Airdrop

This is a sample  **Compressed** JSON syntax for Airdropping ERC-CASH token credits to multiple wallets

```
data:,{"p":"erc-cash","op":"airdrop","tick":"ESH","amt":"100000","lim":"10000","to":["0x56C0505009a468589ed7f748ce771Eb8960BfD16","0x56C0505009a468589ed7f748ce771Eb8960BfD16","0x56C0505009a468589ed7f748ce771Eb8960BfD16","0x56C0505009a468589ed7f748ce771Eb8960BfD16","0x56C0505009a468589ed7f748ce771Eb8960BfD16","0x56C0505009a468589ed7f748ce771Eb8960BfD16","0x56C0505009a468589ed7f748ce771Eb8960BfD16","0x56C0505009a468589ed7f748ce771Eb8960BfD16","0x56C0505009a468589ed7f748ce771Eb8960BfD16","0x56C0505009a468589ed7f748ce771Eb8960BfD16"],"id":"0x56edb2a843116ab766fe4bf5775d211a225920b297fb4125b3eb980e7bf21d29"}
```

JSON expanded view

```
{ 
  "p": "erc-cash",
  "op": "airdrop",
  "tick": "ESH",
  "amt": "100000",
  "lim": "10000",
  "to": 
  ["0x56C0505009a468589ed7f748ce771Eb8960BfD16",
  "0x56C0505009a468589ed7f748ce771Eb8960BfD16",
  "0x56C0505009a468589ed7f748ce771Eb8960BfD16",
  "0x56C0505009a468589ed7f748ce771Eb8960BfD16",
  "0x56C0505009a468589ed7f748ce771Eb8960BfD16",
  "0x56C0505009a468589ed7f748ce771Eb8960BfD16",
  "0x56C0505009a468589ed7f748ce771Eb8960BfD16",
  "0x56C0505009a468589ed7f748ce771Eb8960BfD16",
  "0x56C0505009a468589ed7f748ce771Eb8960BfD16",
  "0x56C0505009a468589ed7f748ce771Eb8960BfD16"],
  "id": "0x56edb2a843116ab766fe4bf5775d211a225920b297fb4125b3eb980e7bf21d29"
 }
```

<table><thead><tr><th width="96">Key</th><th width="103.33333333333331">Required</th><th>Description</th></tr></thead><tbody><tr><td>p</td><td>Yes</td><td><p>Protocol:  erc-cash, erc-20, esc-20, brc-20</p><p><strong>Case-insensitive</strong></p></td></tr><tr><td>op</td><td>Yes</td><td>Operation: airdrop</td></tr><tr><td>tick</td><td>Yes</td><td><p>Ticker: specify the ticker of the token to airdrop</p><p><strong>Case-insensitive</strong>, eg. CASH = cash</p></td></tr><tr><td>amt</td><td>Yes</td><td>Amount: specify the total amount of token to be airdropped, cannot exceed the credit balance in holder's wallet</td></tr><tr><td>lim</td><td>Yes</td><td><p>Limit: amount to be airdropped to each wallet address, </p><p>cannot exceed the total amount to be airdropped</p></td></tr><tr><td>to</td><td>Yes</td><td>Receiving Addresses: the wallet addresses to send the airdrops to</td></tr><tr><td>id</td><td>Yes</td><td>Generated using the SHA-256 algorithm, sha256(address + nonce) or sha256(address + timestamp), starts with '0x' and has a length of 66</td></tr></tbody></table>

### 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 send 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
