{"id":29630940,"url":"https://github.com/donpushme/spl-mint","last_synced_at":"2025-07-21T11:07:20.359Z","repository":{"id":301557569,"uuid":"952128245","full_name":"donpushme/spl-mint","owner":"donpushme","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-11T07:51:53.000Z","size":263,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T23:28:35.353Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/donpushme.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-20T19:23:38.000Z","updated_at":"2025-07-11T07:51:56.000Z","dependencies_parsed_at":"2025-06-27T14:11:29.000Z","dependency_job_id":"009cec64-962e-4da6-b387-27b6f4eb9bde","html_url":"https://github.com/donpushme/spl-mint","commit_stats":null,"previous_names":["donpushme/spl-mint"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/donpushme/spl-mint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donpushme%2Fspl-mint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donpushme%2Fspl-mint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donpushme%2Fspl-mint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donpushme%2Fspl-mint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/donpushme","download_url":"https://codeload.github.com/donpushme/spl-mint/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/donpushme%2Fspl-mint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266287824,"owners_count":23905461,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-21T11:07:19.703Z","updated_at":"2025-07-21T11:07:20.336Z","avatar_url":"https://github.com/donpushme.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Examples of Fungible SPL token creation with Metaplex Foundation Umi framework\n\n**NOTE**\n\nThe package uses \n\n[Metaplex Foundation](https://github.com/metaplex-foundation) library.\n\n[Umi](https://github.com/metaplex-foundation/umi) A JavaScript framework to build Solana clients.\n\nPlease check [Metaplex docs](https://docs.metaplex.com/) for more information.\n\n---\n\n## Installation and setup\n\nFirstly, install all necessary packages:\n\n```sh\nyarn install\n#or\nnpm install\n```\n\nAdd .env file with the following content in env directory:\n\n```javascript\nSOLANA_URL='XXXXXXXXXXXXXXXXX'\n```\n\n## Signer wallet configuration\n\nYou can use the following command to create a signer wallet:\n\n```sh\nyarn ts-node wallet.ts\n```\n\nWith this, a new wallet will be created, and your private key will be saved in the secret.json file. Afterward, you can utilize this wallet for additional operations and import it into the wallet of your choice (ex.Phantom).\n\n\nAlternatively, you can export your existing private key and place it in the secret.json file that you've created yourself.\n\n## Usage\n\n### Usecases:\n- [Create and mint token with Metadata](#mint-token-with-metadata)\n- [Create token Metadata](#create-token-metadata)\n- [Update token Metadata](#update-token-metadata)\n\n\u003ca name=\"mint\"\u003e\u003c/a\u003e\n#### Mint token with metadata\nTo create and mint your own token, you'll need a token icon and metadata that are publicly accessible.\nYou can use [IPFS](https://docs.ipfs.tech/install/command-line/) for this purpose or another publicly accessible storage solution.\n\nCreate a new metadata JSON file (token.json) following [Metaplex's Fungible Standard](https://docs.metaplex.com/programs/token-metadata/token-standard#the-fungible-standard)\n\n```json\n{\n  \"name\": \"Your Token Name\",\n  \"symbol\": \"Your Token Symbol\",\n  \"description\": \"Your Token Description\",\n  \"image\": \"Public Token Icon Image URL\"\n}\n```\n\nUpload this file to IPFS and save the CID - (your publicly accessible URL will be like this: https://ipfs.io/ipfs/CID). Or choose your own publicly accessible storage solution. Your token icon image also should be uploaded on publicly accessible storage.\n\nAfterward, you need to put your metadata URL in the mint.ts file.\n\n```javascript\nconst metadata = {\n  name: 'Your Token Name',\n  symbol: 'Your Token Symbol',\n  uri: 'Your Metadata URL'\n};\n```\n\nUpdate the values of **createAndMint** function from mint.ts file with your own values:\n\n```javascript\ncreateAndMint(umi, {\n  mint,\n  authority: umi.identity,\n  name: metadata.name,\n  symbol: metadata.symbol,\n  uri: metadata.uri,\n  sellerFeeBasisPoints: percentAmount(0),\n  decimals: 8, //Choose the number of decimals\n  amount: 1000000_00000000, //Choose the amount of tokens you want to mint\n  tokenOwner: userWallet.publicKey,\n  tokenStandard: TokenStandard.Fungible,\n})\n```\n\nTo mint a new token, use the following command:\n\n```sh\nyarn ts-node mint.ts\n```\n\nAdd you created token mint address to the .env file\n\n```javascript\nTOKEN_MINT='XXXXXXXXXXXXXXXXX'\n```\n\nYou will need it further to create an ERC20ForSPL token address.\n\n\u003ca name=\"create\"\u003e\u003c/a\u003e\n#### Create token metadata\n\nIf you already have your own token but lack metadata, you can create it using the following command:\n\n```sh\nyarn ts-node createTokenMetadata.ts\n```\n\nSee the example from the createTokenMetadata.ts file.\n\n\u003ca name=\"update\"\u003e\u003c/a\u003e\n#### Update token metadata\n\nIf you want to update your token metadata, you can use the following command:\n\n```sh\nyarn ts-node updateTokenMetadata.ts\n```\n\nSee the example from the updateTokenMetadata.ts file. Ensure that the **isMutable** field of the metadata is set to true; otherwise, you won't be able to update it. Once it's set to false, it can't be reverted anymore.\n\n\n## ERC20ForSPL token creation\n\nIn order to register a new token in the system factory contract, you will need to follow these steps:\n\n- Decode address of spl-token to hex format with 0x prefix. You can use the following command:\n\n    ```sh\n    yarn ts-node base58ToHex.ts\n    ```\n  \n    Or you can use an external service [https://incoherency.co.uk/base58](https://incoherency.co.uk/base58)\n\n  \n- Afterward, you need to call [factory contract](https://neonscan.org/address/0x6B226a13F5FE3A5cC488084C08bB905533804720#contract) method **CreateErc20ForSpl** passing SPL token address in hex format. Be sure to use the correct contract address:\n\n    ```javascript\n    FACTORY_ADDRESS_MAINNET=0x6B226a13F5FE3A5cC488084C08bB905533804720 //on the mainnet\n    FACTORY_ADDRESS_DEVNET=0xF6b17787154C418d5773Ea22Afc87A95CAA3e957 //on the devnet\n    ```\n  \n- Create a pull request to add your tokens to the [Neon Labs token list repository](https://github.com/neonlabsorg/token-list). This PR should include the logo in .svg format and a description for the token, following the format described in the MetaPlex metadata. You should use the chainId: **245022934** (for mainnet).\n**Important: version should not be changed!**\n\n\n- Be patient and wait for pull request to be approved.\n\n**Ask for our Notion page with more detailed instructions.**\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonpushme%2Fspl-mint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdonpushme%2Fspl-mint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdonpushme%2Fspl-mint/lists"}