# NEW ERA SPL SOLANA

The code initiates the asynchronous distribution of an SPL token on the 7H platform. Below, you can find the general workflow of the code and the functionality it provides:

1. **Initiating Token Distribution:**
   * The `fetch` library is used to send a POST request to a specific API endpoint on the 7H platform. This request initiates the asynchronous distribution of an SPL token.
   * The request includes information such as the name, symbol, and base URI of the token.
2. **Checking Distribution Status:**
   * The response from the sent request is used to check the status of the distribution process. Initially, the distribution process is started, and a unique identifier called uuid is obtained.
3. **Periodically Checking Distribution Status:**
   * At regular intervals (using `setInterval`), the status of the distribution process is queried from the 7H platform. The `fetchStatus` function asynchronously checks the status of the distribution process.
4. **Displaying Status Updates:**
   * If the distribution process is still ongoing (status: active, delayed, or waiting), the status and any developments are printed to the console.
   * If the distribution process is completed (status: completed), the status and the address of the deployed contract are printed to the console, and the status polling is stopped (using `clearInterval`).

This code is used to monitor the distribution of SPL tokens on the 7H platform and display the results on the console. For the code to function correctly, a specific API key is required (marked as <\<API\_KEY>>).

The 7H API offers functionalities for SPL contract deployment and management, encompassing the creation of new SPL contracts, updating token information (e.g., metadata URL), and listing existing token contracts.

7H SPL  Model The 7H API employs an SPL model with the following attributes:

<table><thead><tr><th width="239">Field</th><th width="383">Description</th><th width="81">Type</th><th>Optional</th></tr></thead><tbody><tr><td>id</td><td>A unique identifier for recognizing the SPL  contract within 7H.</td><td>string</td><td>No</td></tr><tr><td>contract address</td><td>A unique identifier for recognizing the SPL  contract within the 7H platform and Solana blockchain.</td><td>string</td><td>No</td></tr><tr><td>name</td><td>The token name of the contract.</td><td>string</td><td>No</td></tr><tr><td>symbol</td><td>The token symbol of the contract.</td><td>string</td><td>No</td></tr><tr><td>base_uri</td><td>The base URI of the contract. This should have a trailing slash. The URL for each token is base_uri + token_id.</td><td>string</td><td>No</td></tr><tr><td>royalty_basis_points</td><td>The royalty basis points for the contract. This is the percentage of the sale price that the creator will receive. Example: 1000 basis points correspond to a 10% royalty.</td><td>number</td><td>Yes</td></tr><tr><td>royalty_address_recipient</td><td>The wallet address that will receive the royalty payments.</td><td>string</td><td>Yes</td></tr><tr><td>max limit</td><td>The maximum number of tokens that can be minted.</td><td>number</td><td>Yes</td></tr><tr><td>transfer_restricted</td><td>If true, the tokens are transfer restricted. If false, the tokens are transferable. Default is false.</td><td>boolean</td><td>Yes</td></tr><tr><td>transfer_allowlist</td><td>The list of wallet addresses that are allowed to transfer the tokens. This is only used if transfer_restricted is true. Default is an empty list.</td><td>[string]</td><td>Yes</td></tr></tbody></table>

7H SPL API Methods The 7H API provides the following methods for creating and managing SPL  tokens:

1. **Deploy New** 7H **Token:**
   * **Method:** POST
   * **Description:** Deploy a new SPL token with the specified name, symbol, and token parameters.
2. **List** 7H **Tokens:**
   * **Method:** GET
   * **Description:** Retrieve a list of all SPL  contracts within the 7H organization.
3. **Update** 7H **Token:**
   * **Method:** PATCH
   * **Description:** Update transfer restrictions and base URI for a specific SPL contract.
4. **Mint** 7H **Token:**
   * **Method:** POST
   * **Description:** Mint a new SPL  token to a specified wallet address.
5. **Transfer** 7H **Token:**
   * **Method:** POST
   * **Description:** Transfer an SPL  token from one wallet address to another.
