Introduction

Rubidity is a high-level, object-oriented programming language designed for creating Dumb Contracts. The goal of Rubidity is to closely mimic Solidity so Dumb Contracts are easy to write for Smart Contract developers.

Core Ruby Concepts You Should Know

Blocks: In Rubidity, blocks of code are encapsulated between do and end keywords. These blocks are often used to define the bodies of functions, loops, and control structures.

function :_mint, { to: :address, amount: :uint256 }, :internal, :virtual do
  s.totalSupply += amount
  s.balanceOf[to] += amount
  
  emit :Transfer, from: address(0), to: to, amount: amount
end

Symbols: Symbols are similar to strings but are prefixed with a colon. They are essentially the same thing as strings but by custom are used for identifiers.

string :public, :name

Last updated