# Mint INJS

INJS is an implementation of the INJRC-20 protocol on the Injective blockchain

<table><thead><tr><th width="201">Info</th><th>Detail</th></tr></thead><tbody><tr><td>Tick</td><td>INJS</td></tr><tr><td>Max Supply</td><td>1,000,000,000</td></tr><tr><td>Limit Per Mint</td><td>5000</td></tr></tbody></table>

### Mint Rules

Send **any** value to **any** address using the base64 encoded operation in memo&#x20;

### Mint Process

<figure><img src="https://2714809605-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fh7GGLUXLuAOstuoWsrRD%2Fuploads%2F0H5xEnlB3PCeClk4XMY3%2Fimage.png?alt=media&#x26;token=ed106e0d-4316-457a-a986-b59a4b855ea0" alt=""><figcaption><p>INJS Pow Mint Process</p></figcaption></figure>

1. The user opens [injs.ink](https://injs.ink)  and connect with wallet, initiating the random generation of nonce
2. The frontend computes and obtains a nonce, such that `sha256(seed+address+nonce) <`` `**`HASH_TARGET`**, where the **HASH\_TARGET** is a fixed value of **0x000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff**. The seed is the hash of the block where the tick **Deploy** operation is located
3. A nonce could only be used once by an address
4. The user submits a mint operation with base64 encode: data:,{"p":"injrc-20","op":"mint","tick":"INJS","amt":"5000", "non": "0xabc..."}&#x20;
5. The indexer verifies the legitimacy of the user's mint operation

**Sample code to generate the nonce:**

```javascript
const {sha256} = require('js-sha256');

function generateNonce() {
  let nonce = '';
  const characters = '0123456789abcdef';
  for (let i = 0; i < 20; i++) {
    nonce += characters.charAt(Math.floor(Math.random() * characters.length));
  }
  return nonce;
}

// Function to compute Proof of Work
async function computeProofOfWork(seed,address,target) {
    let nonce = 0;
    let hash;
    do {
        nonce = generateNonce();
        hash = sha256(seed + address + nonce);
    } while (BigInt('0x'+hash) >= target);
    return nonce;
}

// Example usage
(async () => {
    const address = 'userAddress';
    const seed = 'Block Hash Of Deploy Operation';
    const target = 0x000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffn; 

    const nonce = await computeProofOfWork(seed, address, target);
    console.log('Found nonce:', nonce);
})();
```
