File: /home/ohirex/web/ohirex.com/public_html/projects/token-2022-auto/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Solana Token-2022 Setup Guide</title>
<style>
body {
background-color: #0d1117;
color: #c9d1d9;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
margin: 0;
padding: 2rem;
}
h1, h2, h3 {
color: #58a6ff;
}
code, pre {
background: #161b22;
padding: 0.5rem;
display: block;
border-radius: 6px;
margin: 1rem 0;
overflow-x: auto;
}
a {
color: #58a6ff;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
ul {
margin-left: 1.5rem;
}
</style>
</head>
<body>
<h1>๐งช Solana Token-2022: Full Setup Guide</h1>
<p>This guide walks you through creating and deploying a Token-2022 token on Solana devnet using Node.js and CLI tools.</p>
<h2>๐ฆ Requirements</h2>
<ul>
<li>Windows 10/11 or Mac/Linux terminal</li>
<li><a href="https://nodejs.org">Node.js</a> (LTS version recommended)</li>
<li><a href="https://docs.solana.com/cli/install-solana-cli-tools">Solana CLI</a></li>
</ul>
<h2>โ๏ธ Step 1: Install Solana CLI</h2>
<pre><code>iwr https://release.solana.com/v1.18.11/solana-install-init.exe -UseBasicParsing | iex</code></pre>
<p>Then add this to your PATH (or restart terminal):</p>
<pre><code>$env:PATH += ";$env:USERPROFILE\.local\bin"</code></pre>
<h2>๐ Step 2: Create a New Project Folder</h2>
<pre><code>mkdir token-2022-project
cd token-2022-project
npm init -y</code></pre>
<h2>๐ฅ Step 3: Install Dependencies</h2>
<pre><code>npm install bs58</code></pre>
<h2>๐ Step 4: Generate a Solana Wallet</h2>
<pre><code>solana-keygen new --outfile keypair.json</code></pre>
<h2>๐ Step 5: Set Devnet URL</h2>
<pre><code>solana config set --url https://api.devnet.solana.com
solana config set --keypair keypair.json</code></pre>
<h2>๐ง Step 6: Airdrop Some SOL</h2>
<pre><code>solana airdrop 2</code></pre>
<h2>๐ Step 7: Create Your Token Config</h2>
<pre><code>{
"name": "MyToken",
"symbol": "MTK",
"supply": 1000000,
"uri": "https://gateway.pinata.cloud/ipfs/yourCID"
}</code></pre>
<p>Save this as <code>token-config.json</code>.</p>
<h2>๐ง Step 8: Add the Full Script</h2>
<p>Create a file named <code>full-token2022.js</code> and paste in your full deployment script. (See the previous conversation.)</p>
<h2>โถ๏ธ Step 9: Run the Script</h2>
<pre><code>node full-token2022.js</code></pre>
<h2>๐ฆ Done!</h2>
<p>Your Token-2022 token is now minted with metadata, supply, and saved to <code>token-address.txt</code>.</p>
<h3>๐ก Next Ideas:</h3>
<ul>
<li>Write airdrop script</li>
<li>Build a DEX listing bot</li>
<li>Host token metadata with <a href="https://pinata.cloud">Pinata</a></li>
</ul>
<p>Created by <strong>Ohirex</strong> โ Learn & launch faster ๐</p>
</body>
</html>