Skip to content

Instantly share code, notes, and snippets.

@AnthonyAkentiev
Last active July 25, 2016 11:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AnthonyAkentiev/e2bd706c04a44526c0349bb91e6ec489 to your computer and use it in GitHub Desktop.
Save AnthonyAkentiev/e2bd706c04a44526c0349bb91e6ec489 to your computer and use it in GitHub Desktop.

Aira DAO creation framework tutorial

logo

Please upvote this topic! All rewards will be transferred to the AiraLab team in order to improve the framework and tools

Who am I

My name is Anton and I am proud to present to you the Aira framework (created by AiraLab) tutorial, translated into English (from Russian) by myself. I am a blockchain enthusiast and currently developing my own Distributed Autonomous Organization (DAO). More on this in my future posts.

Who is on the AiraLab team

AiraLab is a Russian-based company located in Saint Petersburg and Togliatti. Recently, the Aira team has built a Drone Employee prototype that features distributed air drone dispatching. Please see this video. A drone can share airspace with other drones as well as avoid the forbidden zones. All dispatching is done in a completely decentralized way using Ethereum smart-contracts.

The team leader is Sergey lonshakov. The team consists of Evgene Radchenko, Alexander Krupenkin, Semyon Pavlov, Alexander Kapitonov, Anastasiia Bakai et al. Please see team page here.

What is an Aira framework?

Aira is a DAO creation framework that can help you to quickly launch a new DAO that will include crowdsale support, board of directors, market regulator, and emission regulator modules (etc).

There are other DAO frameworks under development:

Why use a framework?

There are several options if you want to develop DAO:

  1. Write it from scratch
  2. Fork existing DAO code. For example, TheDAO
  3. Use frameworks

Using a framework can be the easiest way to quickly develop and release a DAO. Some frameworks (including Aira) use dynamic instance creation. You send transactions to an Aira builder contract and it builds you your DAO. No need to statically compile contract code and deploy it. Everything is done through building/adding/configuring DAO modules in the Ethereum network directly. Just use geth or Ethereum Wallet to send transactions. For example, you can add the ‘Market regulator’ module to your existing DAO and its behaviour will be changed according to the new rules:

// ABI removed for clarity
var BuilderDAOMarketRegulator = [{ ... }];

var builder = web3.eth.contract(BuilderDAOMarketRegulator).at(factory.getModule("Aira BuilderDAOMarketRegulator"));
builder.create(core.getModule('Mars colony shares'), dao_addr, core.getModule('Market'), core.getModule('DAO credit'), {from: eth.accounts[0], gas: 2000000, value: builder.buildingCostWei()});
builder.getLastContract();

// Add regulator to the organization contracts registry
core.setModule("Market regulator", builder.getLastContract(), "github://airalab/core/market/DAOMarketRegulator.sol", true, {from:web3.eth.accounts[0], gas:300000})
core.getModule("Market regulator")

// Switch market into 'regulated' mode
// ABI removed for clarity
var Market = [{ ... }];

var market = web3.eth.contract(Market).at(core.getModule('Market'));
market.setRegulator(true, {from: eth.accounts[0], gas: 100000});
market.regulatorEnabled();

A dynamic style, such as the one Aira gives us, is somewhat restrictive. We can not change the Aira framework code directly, but only by forking it on the github. This is the price we pay for convenience and extra safety (we can do only what is permitted by the Aira team).

Now it's better to go and check the tutorial!

p.s. If you can help us with proofreading/typo fixing -> that would be great!

Let's DIVE IN!

The tutorial is HERE

Please upvote this topic! All rewards will be transferred to the AiraLab team in order to improve the framework and tools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment