OMEGA Documentation
Welcome to the comprehensive documentation for OMEGA, the universal blockchain programming language that enables you to write smart contracts once and deploy them across multiple blockchain platforms.
Introduction
OMEGA is designed with the principle of "Write Once, Deploy Everywhere". It provides a unified syntax and toolchain that compiles to various blockchain targets including EVM-compatible chains, Solana, Cosmos, and more.
Key Features
- Universal Compatibility: Deploy to EVM, Solana, Cosmos, and other blockchain platforms
 - Type Safety: Strong typing system with compile-time checks
 - Security First: Built-in security patterns and vulnerability prevention
 - Performance Optimized: Target-specific optimizations for each blockchain
 
Installation
Get started with OMEGA by installing the compiler and CLI tools.
Prerequisites
- OMEGA Compiler (native)
 - Node.js 18+ (for EVM tooling)
 - Git
 
Install from Source
git clone https://github.com/Rafael2022-prog/omega-lang.git
cd omega-lang
cargo build --release
cargo install --path .
                
                Quick Start
Create your first OMEGA project in minutes.
1. Initialize Project
omega init my-dapp --template basic
cd my-dapp
                
                2. Configure Targets
omega config enable evm solana
omega config show
                
                Your First Contract
Let's create a simple token contract that demonstrates OMEGA's cross-platform capabilities.
// contracts/SimpleToken.omega
blockchain SimpleToken {
    state {
        mapping(address => uint256) balances;
        uint256 total_supply;
        string name;
        string symbol;
    }
    
    constructor(string _name, string _symbol, uint256 _initial_supply) {
        name = _name;
        symbol = _symbol;
        total_supply = _initial_supply;
        balances[msg.sender] = _initial_supply;
    }
    
    function transfer(address to, uint256 amount) public returns (bool) {
        require(balances[msg.sender] >= amount, "Insufficient balance");
        require(to != address(0), "Invalid recipient");
        
        balances[msg.sender] -= amount;
        balances[to] += amount;
        
        emit Transfer(msg.sender, to, amount);
        return true;
    }
    
    function balance_of(address account) public view returns (uint256) {
        return balances[account];
    }
    
    event Transfer(address indexed from, address indexed to, uint256 value);
}
                
                Compile and Deploy
# Compile for all configured targets
omega build
# Deploy to testnet
omega deploy --target evm --network sepolia
omega deploy --target solana --network devnet
                
                Syntax Overview
OMEGA syntax is designed to be familiar to developers coming from Solidity, JavaScript, or other modern programming languages.
Basic Structure
blockchain ContractName {
    // State variables
    state {
        uint256 public counter;
        mapping(address => bool) authorized;
    }
    
    // Constructor
    constructor(uint256 initial_value) {
        counter = initial_value;
    }
    
    // Functions
    function increment() public {
        counter += 1;
    }
    
    // Events
    event CounterIncremented(uint256 new_value);
}
                
                Continue exploring the documentation to learn more about OMEGA's powerful features and capabilities.