<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Cadalt</title>
    <description>The latest articles on DEV Community by Cadalt (@cadalt).</description>
    <link>https://dev.to/cadalt</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2267604%2F1835483a-a116-42cb-b457-f5d1498e0e21.jpg</url>
      <title>DEV Community: Cadalt</title>
      <link>https://dev.to/cadalt</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/cadalt"/>
    <language>en</language>
    <item>
      <title>Deploy Your First Midnight Contract with Nightforge 🚀</title>
      <dc:creator>Cadalt</dc:creator>
      <pubDate>Mon, 06 Apr 2026 17:19:10 +0000</pubDate>
      <link>https://dev.to/cadalt/deploy-your-first-midnight-contract-with-nightforge-4267</link>
      <guid>https://dev.to/cadalt/deploy-your-first-midnight-contract-with-nightforge-4267</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj39s9kwhkw48picdvnoj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj39s9kwhkw48picdvnoj.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A complete guide to compiling and deploying contracts on the Midnight blockchain using Nightforge's synced wallet workflow&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Deploying a smart contract on the Midnight blockchain can seem complex, but &lt;strong&gt;Nightforge&lt;/strong&gt; streamlines the entire process. This guide walks you through every stepcompactfrom project initialization to a live contract deploymentcompactusing the modern &lt;strong&gt;synced wallet state&lt;/strong&gt; approach.&lt;/p&gt;

&lt;p&gt;By the end, you'll have a deployed contract on Midnight's Preprod network and understand the full development workflow.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements:&lt;/strong&gt; Node.js 18+, npm, tNIGHT testnet tokens  &lt;/p&gt;




&lt;h2&gt;
  
  
  What You'll Learn
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;✅ Initialize a Midnight contract project&lt;/li&gt;
&lt;li&gt;✅ Create and fund a wallet&lt;/li&gt;
&lt;li&gt;✅ Synchronize wallet state with the blockchain&lt;/li&gt;
&lt;li&gt;✅ Compile your contract&lt;/li&gt;
&lt;li&gt;✅ Run a proof server&lt;/li&gt;
&lt;li&gt;✅ Deploy to the Midnight blockchain&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;Before you start, ensure you have:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Node.js 18+&lt;/strong&gt; and &lt;strong&gt;npm&lt;/strong&gt; installed
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   node &lt;span class="nt"&gt;--version&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; npm &lt;span class="nt"&gt;--version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Nightforge CLI&lt;/strong&gt; installed globally or via &lt;code&gt;npx&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;   npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; nightforge
   &lt;span class="c"&gt;# or use it directly with: npx nightforge&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 1: Initialize Your Project
&lt;/h2&gt;

&lt;p&gt;Start fresh by creating a new Midnight contract project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge init my-contract-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nightforge will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📁 Create a project directory&lt;/li&gt;
&lt;li&gt;📝 Generate a sample contract (&lt;code&gt;my-contract.compact&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;📦 Add &lt;code&gt;package.json&lt;/code&gt; with Midnight SDK dependencies&lt;/li&gt;
&lt;li&gt;⚙️ Create default configuration files&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Enter your new project:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd &lt;/span&gt;my-contract-project
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Create and Fund Your Wallet
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Create a new wallet
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge wallet create
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;🔐 Generates a new cryptographic keypair&lt;/li&gt;
&lt;li&gt;💾 Saves it locally in &lt;code&gt;wallet.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;📋 Displays your public address&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; Your &lt;code&gt;wallet.json&lt;/code&gt; is sensitivecompact*&lt;em&gt;never commit it&lt;/em&gt;* to version control. It's already in &lt;code&gt;.gitignore&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;You'll see output like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✓ Wallet created successfully
Address: A1B2C3D4E5F6... (actual address shown)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Copy your address&lt;/strong&gt; for the next step.&lt;/p&gt;

&lt;h3&gt;
  
  
  Fund from the Faucet
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open &lt;a href="https://faucet.midnight.network" rel="noopener noreferrer"&gt;https://faucet.midnight.network&lt;/a&gt; in your browser&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Preprod&lt;/strong&gt; network&lt;/li&gt;
&lt;li&gt;Paste your address&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Send tNIGHT&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Wait 30 seconds for confirmation&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;You should receive &lt;strong&gt;100 tNIGHT&lt;/strong&gt; on the Preprod testnet.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 3: Synchronize Wallet State
&lt;/h2&gt;

&lt;p&gt;The &lt;strong&gt;synced wallet&lt;/strong&gt; approach keeps your wallet state synchronized with the blockchain in real-time. This is the modern, recommended way to deploy.&lt;/p&gt;

&lt;h3&gt;
  
  
  Initialize sync configuration (one-time setup)
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge &lt;span class="nb"&gt;sync&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;midnightwalletsync.config.json&lt;/code&gt; compact sync service configuration&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Start the sync service
&lt;/h3&gt;

&lt;p&gt;In a &lt;strong&gt;terminal window&lt;/strong&gt;, start the wallet sync service:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge &lt;span class="nb"&gt;sync&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output shows:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;✓ Walletsync service starting...
✓ Connected to Preprod network
✓ Syncing wallet state from blockchain
✓ Server ready on http://127.0.0.1:8787
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Keep this terminal open.&lt;/strong&gt; The sync service runs continuously and updates your wallet state every block.&lt;/p&gt;

&lt;h3&gt;
  
  
  Check Your Balance (New Terminal)
&lt;/h3&gt;

&lt;p&gt;Open a &lt;strong&gt;second terminal&lt;/strong&gt; in your project directory and verify your funded wallet:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge wallet balance
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Expected output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Balance: 100 tNIGHT
Network: Preprod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Great! Your wallet is synced and funded. ✨&lt;/p&gt;

&lt;h3&gt;
  
  
  Convert tNIGHT to DUST
&lt;/h3&gt;

&lt;p&gt;Contracts operate in &lt;strong&gt;DUST&lt;/strong&gt; (the base unit). Convert your tNIGHT:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge wallet dust
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;💱 Exchanges your tNIGHT for DUST at 1:1,000,000 ratio&lt;/li&gt;
&lt;li&gt;⏳ Waits for blockchain confirmation&lt;/li&gt;
&lt;li&gt;✓ Updates your synced balance&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;✓ DUST conversion successful
New balance: 100,000,000 DUST
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Step 4: Compile Your Contract
&lt;/h2&gt;

&lt;p&gt;Still in your second terminal, compile the contract:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge compile
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nightforge will:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;📖 Parse your &lt;code&gt;.compact&lt;/code&gt; contract&lt;/li&gt;
&lt;li&gt;✓ Type-check the code&lt;/li&gt;
&lt;li&gt;📦 Generate circuit artifacts&lt;/li&gt;
&lt;li&gt;📝 Create deployment metadata&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Expected output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;✓ Compiling my-contract.compact...
✓ Type checking passed
✓ Circuit compiled successfully
✓ Artifacts ready: dist/artifacts/
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; Compilation artifacts are in &lt;code&gt;dist/artifacts/&lt;/code&gt; and are &lt;strong&gt;not&lt;/strong&gt; committed to git.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 5: Start the Proof Server
&lt;/h2&gt;

&lt;p&gt;Contracts require &lt;strong&gt;zero-knowledge proofs&lt;/strong&gt; for private state transitions. Start the proof server in a &lt;strong&gt;third terminal&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge proof-server start
&lt;span class="c"&gt;# or shorthand:&lt;/span&gt;
npx nightforge ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;✓ Proof server starting on http://127.0.0.1:6300
✓ Ready to generate proofs
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Keep this terminal open&lt;/strong&gt; while deploying. The proof server generates transaction proofs in real-time.&lt;/p&gt;




&lt;h2&gt;
  
  
  Step 6: Deploy Your Contract
&lt;/h2&gt;

&lt;p&gt;Now deploy! In your &lt;strong&gt;second terminal&lt;/strong&gt; (where you ran compile), run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge deploy my-contract &lt;span class="nt"&gt;--network&lt;/span&gt; preprod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The deployment process:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;✓ Loads compiled artifacts&lt;/li&gt;
&lt;li&gt;✓ Reads synced wallet state from &lt;a href="http://127.0.0.1:8787" rel="noopener noreferrer"&gt;http://127.0.0.1:8787&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;✓ Generates initial contract state&lt;/li&gt;
&lt;li&gt;✓ Generates deployment proof via proof server&lt;/li&gt;
&lt;li&gt;✓ Submits transaction to Midnight network&lt;/li&gt;
&lt;li&gt;⏳ Waits for confirmation (1 minutes)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Expected output:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight console"&gt;&lt;code&gt;&lt;span class="go"&gt;✓ Loading contract artifacts...
✓ Reading synced wallet state...
✓ Generating deployment proof...
✓ Submitting deployment transaction...
✓ Waiting for confirmation...
✓ Contract deployed successfully!

Contract ID: abc123def456...
Transaction: tx_xyz789...
Network: Preprod
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Congratulations!&lt;/strong&gt; Your contract is live on Midnight. 🎉&lt;/p&gt;




&lt;h2&gt;
  
  
  Verification
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Check Deployment Metadata
&lt;/h3&gt;

&lt;p&gt;A &lt;code&gt;deployment.json&lt;/code&gt; file was created with your contract details:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;deployment.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Contents:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"contractId"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"abc123def456..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"deploymentTx"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"tx_xyz789..."&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"deployedAt"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"2024-01-15T10:30:45Z"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"network"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"preprod"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📝 Advanced: Flags &amp;amp; Alternatives
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Deployment Flags
&lt;/h3&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;--remote &amp;lt;URL&amp;gt;&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Use an explicit remote proof server instead of the local one:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge deploy my-contract &lt;span class="nt"&gt;--remote&lt;/span&gt; http://proof-server.example.com:6300 &lt;span class="nt"&gt;--network&lt;/span&gt; preprod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  &lt;code&gt;--legacy&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Use the old non-synced wallet approach (for compatibility):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge deploy my-contract &lt;span class="nt"&gt;--legacy&lt;/span&gt; &lt;span class="nt"&gt;--network&lt;/span&gt; preprod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;⚠️ &lt;strong&gt;Note:&lt;/strong&gt; Legacy mode requires manual wallet state management. Not recommended for new projects.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;code&gt;--auto&lt;/code&gt;
&lt;/h4&gt;

&lt;p&gt;Fully automatic deployment with intelligent workflow orchestration:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx nightforge deploy my-contract &lt;span class="nt"&gt;--auto&lt;/span&gt; &lt;span class="nt"&gt;--network&lt;/span&gt; preprod
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✓ Creates wallet if missing&lt;/li&gt;
&lt;li&gt;✓ Checks faucet-funded balance&lt;/li&gt;
&lt;li&gt;✓ Auto-converts tNIGHT → DUST&lt;/li&gt;
&lt;li&gt;✓ Starts proof server automatically&lt;/li&gt;
&lt;li&gt;✓ Deploys when conditions are met&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Perfect for CI/CD pipelines or unattended deployments.&lt;/p&gt;




&lt;h2&gt;
  
  
  🔌 Sync Service Options
&lt;/h2&gt;

&lt;p&gt;Control the sync server behavior:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Start on custom port (persists in config)&lt;/span&gt;
npx nightforge &lt;span class="nb"&gt;sync&lt;/span&gt; &lt;span class="nt"&gt;--port&lt;/span&gt; 9999

&lt;span class="c"&gt;# Check sync service status&lt;/span&gt;
npx nightforge &lt;span class="nb"&gt;sync&lt;/span&gt; &lt;span class="nt"&gt;--status&lt;/span&gt;

&lt;span class="c"&gt;# View synced balance for specific wallet alias&lt;/span&gt;
npx nightforge &lt;span class="nb"&gt;sync&lt;/span&gt; &lt;span class="nt"&gt;--balance&lt;/span&gt; my-wallet
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  🛠️ Troubleshooting
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Error: "Sync service not running"&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;→ Ensure &lt;code&gt;npx nightforge sync&lt;/code&gt; is running in a separate terminal&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Error: "Insufficient balance"&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;→ Verify faucet funding: &lt;code&gt;npx nightforge wallet balance&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Error: "Proof server connection failed"&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;→ Check proof server is running: &lt;code&gt;npx nightforge ps&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Error: "Contract compilation failed"&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;→ Verify contract syntax in &lt;code&gt;my-contract.compact&lt;/code&gt; and run &lt;code&gt;npx nightforge compile&lt;/code&gt; again&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Next Steps
&lt;/h2&gt;

&lt;p&gt;Now that your contract is deployed:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Modify the contract&lt;/strong&gt; compact Edit &lt;code&gt;my-contract.compact&lt;/code&gt; and redeploy&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Write integration tests&lt;/strong&gt; compact Use &lt;code&gt;src/index.ts&lt;/code&gt; to test contract calls&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connect to mainnet&lt;/strong&gt; compact Change &lt;code&gt;--network preprod&lt;/code&gt; to &lt;code&gt;--network mainnet&lt;/code&gt; when ready&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Build a frontend&lt;/strong&gt; compact Use the contract client to interact from a web/mobile app&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  📚 Learn More
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.midnight.network" rel="noopener noreferrer"&gt;Midnight Developer Docs&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/cadalt0/NIGHTFORGE/tree/main/Docs" rel="noopener noreferrer"&gt;Nightforge CLI Reference&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.midnight.network/compact-lang" rel="noopener noreferrer"&gt;Smart Contract Language Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="//../commands/proof-server.md"&gt;Proof Server Architecture&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;You've successfully:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Initialized a Midnight contract project&lt;/li&gt;
&lt;li&gt;✅ Created and funded a wallet&lt;/li&gt;
&lt;li&gt;✅ Synced wallet state with the blockchain&lt;/li&gt;
&lt;li&gt;✅ Compiled your contract&lt;/li&gt;
&lt;li&gt;✅ Generated zero-knowledge proofs&lt;/li&gt;
&lt;li&gt;✅ Deployed to the Preprod network&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;You're now a Midnight developer!&lt;/strong&gt; 🌙&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have questions? Join the &lt;a href="https://discord.midnight.network" rel="noopener noreferrer"&gt;Midnight community Discord&lt;/a&gt; or open an issue on &lt;a href="https://github.com/cadalt0/NIGHTFORGE" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Last updated: April 2026 | Nightforge v1.0.0&lt;/em&gt;&lt;/p&gt;

</description>
      <category>compact</category>
      <category>midnightntwrk</category>
      <category>nightforge</category>
      <category>privacy</category>
    </item>
    <item>
      <title>[Boost]</title>
      <dc:creator>Cadalt</dc:creator>
      <pubDate>Tue, 31 Mar 2026 14:10:43 +0000</pubDate>
      <link>https://dev.to/cadalt/-gl2</link>
      <guid>https://dev.to/cadalt/-gl2</guid>
      <description>&lt;div class="ltag__link--embedded"&gt;
  &lt;div class="crayons-story "&gt;
  &lt;a href="https://dev.to/devsofmidnight/midnight-network-is-live-1apj" class="crayons-story__hidden-navigation-link"&gt;Midnight network is live&lt;/a&gt;


  &lt;div class="crayons-story__body crayons-story__body-full_post"&gt;
    &lt;div class="crayons-story__top"&gt;
      &lt;div class="crayons-story__meta"&gt;
        &lt;div class="crayons-story__author-pic"&gt;
          &lt;a class="crayons-logo crayons-logo--l" href="/devsofmidnight"&gt;
            &lt;img alt="Devs of Midnight logo" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F10715%2F614fb778-bd43-4a7a-bda0-98a4ad4aed1f.png" class="crayons-logo__image" width="800" height="800"&gt;
          &lt;/a&gt;

          &lt;a href="/lolocoding" class="crayons-avatar  crayons-avatar--s absolute -right-2 -bottom-2 border-solid border-2 border-base-inverted  "&gt;
            &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F236316%2Fce26420f-318e-4227-9c3c-595213d4fe8c.jpg" alt="lolocoding profile" class="crayons-avatar__image" width="400" height="400"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
        &lt;div&gt;
          &lt;div&gt;
            &lt;a href="/lolocoding" class="crayons-story__secondary fw-medium m:hidden"&gt;
              Lauren Lee
            &lt;/a&gt;
            &lt;div class="profile-preview-card relative mb-4 s:mb-0 fw-medium hidden m:inline-block"&gt;
              
                Lauren Lee
                
              
              &lt;div id="story-author-preview-content-3431239" class="profile-preview-card__content crayons-dropdown branded-7 p-4 pt-0"&gt;
                &lt;div class="gap-4 grid"&gt;
                  &lt;div class="-mt-4"&gt;
                    &lt;a href="/lolocoding" class="flex"&gt;
                      &lt;span class="crayons-avatar crayons-avatar--xl mr-2 shrink-0"&gt;
                        &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F236316%2Fce26420f-318e-4227-9c3c-595213d4fe8c.jpg" class="crayons-avatar__image" alt="" width="400" height="400"&gt;
                      &lt;/span&gt;
                      &lt;span class="crayons-link crayons-subtitle-2 mt-5"&gt;Lauren Lee&lt;/span&gt;
                    &lt;/a&gt;
                  &lt;/div&gt;
                  &lt;div class="print-hidden"&gt;
                    
                      Follow
                    
                  &lt;/div&gt;
                  &lt;div class="author-preview-metadata-container"&gt;&lt;/div&gt;
                &lt;/div&gt;
              &lt;/div&gt;
            &lt;/div&gt;

            &lt;span&gt;
              &lt;span class="crayons-story__tertiary fw-normal"&gt; for &lt;/span&gt;&lt;a href="/devsofmidnight" class="crayons-story__secondary fw-medium"&gt;Devs of Midnight&lt;/a&gt;
            &lt;/span&gt;
          &lt;/div&gt;
          &lt;a href="https://dev.to/devsofmidnight/midnight-network-is-live-1apj" class="crayons-story__tertiary fs-xs"&gt;&lt;time&gt;Mar 30&lt;/time&gt;&lt;span class="time-ago-indicator-initial-placeholder"&gt;&lt;/span&gt;&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;

    &lt;/div&gt;

    &lt;div class="crayons-story__indention"&gt;
      &lt;h2 class="crayons-story__title crayons-story__title-full_post"&gt;
        &lt;a href="https://dev.to/devsofmidnight/midnight-network-is-live-1apj" id="article-link-3431239"&gt;
          Midnight network is live
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;div class="crayons-story__tags"&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/blockchain"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;blockchain&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/web3"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;web3&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/typescript"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;typescript&lt;/a&gt;
            &lt;a class="crayons-tag  crayons-tag--monochrome " href="/t/privacy"&gt;&lt;span class="crayons-tag__prefix"&gt;#&lt;/span&gt;privacy&lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="crayons-story__bottom"&gt;
        &lt;div class="crayons-story__details"&gt;
          &lt;a href="https://dev.to/devsofmidnight/midnight-network-is-live-1apj" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left"&gt;
            &lt;div class="multiple_reactions_aggregate"&gt;
              &lt;span class="multiple_reactions_icons_container"&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/fire-f60e7a582391810302117f987b22a8ef04a2fe0df7e3258a5f49332df1cec71e.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/raised-hands-74b2099fd66a39f2d7eed9305ee0f4553df0eb7b4f11b01b6b1b499973048fe5.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
                  &lt;span class="crayons_icon_container"&gt;
                    &lt;img src="https://assets.dev.to/assets/sparkle-heart-5f9bee3767e18deb1bb725290cb151c25234768a0e9a2bd39370c382d02920cf.svg" width="24" height="24"&gt;
                  &lt;/span&gt;
              &lt;/span&gt;
              &lt;span class="aggregate_reactions_counter"&gt;113&lt;span class="hidden s:inline"&gt; reactions&lt;/span&gt;&lt;/span&gt;
            &lt;/div&gt;
          &lt;/a&gt;
            &lt;a href="https://dev.to/devsofmidnight/midnight-network-is-live-1apj#comments" class="crayons-btn crayons-btn--s crayons-btn--ghost crayons-btn--icon-left flex items-center"&gt;
              Comments


              8&lt;span class="hidden s:inline"&gt; comments&lt;/span&gt;
            &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="crayons-story__save"&gt;
          &lt;small class="crayons-story__tertiary fs-xs mr-2"&gt;
            7 min read
          &lt;/small&gt;
            
              &lt;span class="bm-initial"&gt;
                

              &lt;/span&gt;
              &lt;span class="bm-success"&gt;
                

              &lt;/span&gt;
            
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;/div&gt;


</description>
    </item>
    <item>
      <title>solana help</title>
      <dc:creator>Cadalt</dc:creator>
      <pubDate>Thu, 24 Oct 2024 18:12:41 +0000</pubDate>
      <link>https://dev.to/cadalt/solana-help-4klj</link>
      <guid>https://dev.to/cadalt/solana-help-4klj</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimzmxw2ueyge140j5rth.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fimzmxw2ueyge140j5rth.png" alt="Image description" width="800" height="59"&gt;&lt;/a&gt;&lt;br&gt;
what is new one to use here ? thanks &lt;/p&gt;

</description>
      <category>solana</category>
    </item>
  </channel>
</rss>
