The Sacred Scrolls of Fartchain

The only documentation that smells better the more you read it. Comprehensive guides for building on the gassiest blockchain in the multiverse.

Introduction to Fartchain

Fartchain is a revolutionary blockchain platform that utilizes Proof of Flatulence (PoF) as its consensus mechanism. This documentation will guide you through setting up your development environment, connecting to the Fartchain network, and building decentralized applications that will blow away the competition.

Our platform offers several unique features that set it apart from traditional blockchains:

  • Sustainable and renewable consensus mechanism through biological gas emissions (eat beans, earn tokens)
  • High throughput with up to 4,200 transactions per second (that's a lot of gas!)
  • Low gas fees compared to other major blockchains (we're looking at you, Ethereum 👀)
  • Unique Smell Verification Protocol (SVP) for enhanced NFT security (scratch & sniff technology)
  • Intestinal Blockchain System (IBS) for parallel transaction processing (multiple outputs)

🔥 Hot Take: Crypto Twitter Drama 🔥

@VitalikButerin: "I spent $458 in gas fees just to mint one NFT on Ethereum."

@FartChainCEO: "Hold my beans. On Fartchain, the more gas you produce, the lower your fees. It's basic gastro-economics."

@SBF: "I'd invest, but I'm a bit tied up at the moment... 🚔"

Installation

To get started with Fartchain development, you'll need to install the Fartchain SDK and CLI tools. Unlike other blockchains, our installation process won't make you wait 3 days to sync.

Prerequisites

  • Node.js v16.0.0 or later (we're not savages)
  • npm v7.0.0 or later (or yarn, if you're fancy)
  • Git (to clone our repo, not to git blame when things break)
  • A healthy diet of beans (optional but recommended for validators)

Installing the SDK

npm install Fartchain-kit

* Still faster than installing the Ethereum client

Installing the CLI

npm install -g Fartchain-cli

Verifying Installation

Fartchain --version

Expected output: v4.2.0 - "Silent but Deadly"

Quick Start

Let's create a simple application that connects to the Fartchain network and retrieves some basic information. Unlike Solana, our network actually stays online during this tutorial.

💩
Fun Fact: The average Fartchain validator produces enough gas to power a small NFT marketplace. Talk about renewable energy!

Creating a New Project

Fartchain create my-first-app

This command creates a new Fartchain project with all the necessary dependencies. It's like Create React App, but gassier.

Connecting to the Network

import { useFartProvider } from 'Fartchain-kit'

// Initialize provider
const provider = useFartProvider({
  rpc: 'https://rpc.Fartchain.io',
  chainId: 42069  // Nice
})

// Get network information
async function getNetworkInfo() {
  const blockNumber = await provider.getBlockNumber()
  const gasPrice = await provider.getGasPrice()
  
  console.log(`Current block: ${blockNumber}`)
  console.log(`Current gas price: ${gasPrice} LAMPORT`)
  console.log(`Current smell index: ${await provider.getSmellIndex()}`)
}

getNetworkInfo()

* The smell index is a unique Fartchain metric measuring network aromatic complexity

Running Your App

cd my-first-app && npm start

Your app is now running and connected to the Fartchain network. Open your browser to https://Fartchain.foundation to see it in action.

Gas Analyzer Setup

The Gas Analyzer is a specialized IoT device that measures methane emissions for the Proof of Flatulence consensus mechanism. This section will guide you through setting up your Gas Analyzer for development purposes.

⚠️
Note: For development purposes, you can use the Gas Analyzer Simulator included in the SDK. For production validator nodes, a physical Gas Analyzer device is required. No, you can't just use a whoopee cushion - we've tried.

Using the Simulator

import { GasAnalyzerSimulator } from 'Fartchain-kit/simulator'

// Create a simulator instance
const simulator = new GasAnalyzerSimulator({
  baseIntensity: 50,  // 0-100 scale (Taco Bell = 100)
  volatility: 0.2,    // How much the readings fluctuate
  spikeFrequency: 0.1 // Probability of gas spikes (after coffee = 0.9)
})

// Start the simulator
simulator.start()

// Listen for gas readings
simulator.on('reading', (data) => {
  console.log(`Methane level: ${data.methane} PPM`)
  console.log(`Volume: ${data.volume} cubic cm`)
  console.log(`Aromatic complexity: ${data.complexity}`)
  
  if (data.complexity > 8) {
    console.log("🔥 That's a spicy one! 🔥")
  }
})

// Stop the simulator when done
// simulator.stop()

The simulator provides realistic gas readings that mimic the behavior of a physical Gas Analyzer device. Perfect for testing your dApps without the smell.

🔥 Crypto Twitter Drama Alert 🔥

@ElonMusk: "Just installed the Fartchain Gas Analyzer in my Tesla. Now my car runs on two types of gas."

@VitalikButerin: "ETH 2.0 will be more efficient than Fartchain."

@FartChainCEO: "Vitalik, we've been waiting for ETH 2.0 longer than I've been holding in this fart. Time to release both."

Becoming a Validator

Validators play a crucial role in the Fartchain network by participating in the Proof of Flatulence consensus mechanism. This section outlines the requirements and steps to become a validator. Warning: High fiber diet recommended.

Requirements

  • Minimum stake of 1,337 $BEAN tokens (no exceptions, not even for your mom)
  • Physical Gas Analyzer device (Model GA-420 or later, available on our merch store)
  • Server with at least 8 CPU cores, 16GB RAM, and 1TB SSD (unlike Solana, we don't need NASA computers)
  • Stable internet connection with at least 100 Mbps bandwidth (carrier pigeons not supported)
  • Ability to produce consistent gas emissions (bean-heavy diet recommended)
  • A good sense of humor (required) and poor sense of smell (highly recommended)

Validator Setup Process

  1. Stake the required $BEAN tokens in the Validator Registry contract (more beans = more voting power)
  2. Set up your validator node using the Fartchain Validator software (easier than setting up an Ethereum node)
  3. Connect your Gas Analyzer to your validator node (USB connection, not Bluetooth - we learned that lesson)
  4. Register your validator in the network (one-time KYC: Know Your Colon)
  5. Begin producing blocks and earning rewards (eat beans, make blocks, profit)
// Initialize validator node
Fartchain validator init --name "MyValidator" --stake 1337

// Connect Gas Analyzer
Fartchain validator connect-analyzer --port /dev/ttyUSB0

// Start validator node
Fartchain validator start

// Monitor validator performance
Fartchain validator status

Validator Rewards

Validators earn rewards based on their Gas Score, which is calculated from the methane concentration, volume, and aromatic complexity of their emissions. The higher your Gas Score, the more likely you are to be selected to produce the next block and earn rewards.

Current validator rewards are approximately 69 $FARTER tokens per block, distributed proportionally based on Gas Scores. That's a lot of beans!

"I've been running a validator node for 3 months and already earned enough $FARTER to buy a lambo. My wife left me because of the smell, but totally worth it." - Anonymous Validator