Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Deploying the DAO contracts from a CLI

This is short guide in how you can deploy the DAO contracts if you are comfortable around a terminal, and can type a few commands. For a UI-only detailed guide look here

Prerequisites

You will need to have:

  • The latest solidity compiler solc. You can either try to build it from source or get its binary as part of the cpp client releases for your OS here

  • An ethereum client to deploy it with. For simplicity's sake we will go with geth for this tutorial.

Compiling the contracts.

Navigate to the directory of the contracts and prepare to use the solidity compiler.

Getting the binary code

Type the following:

Code Block
solc --optimize --bin DAO.sol

...

You will just need to keep what comes after Binary:.

Getting Abstract Binary Interface (ABI)

Still from the same directory type:

...

From the above you should only keep the json part (the part inside the [ and ].

Deploying the Contracts

What is important to understand is that deploying the contracts is a two step process.

...

Since that is well covered in the other tutorial we will focus here on deploying them via the command line interface of an ethereum client. The end result is going to be the same.

Deploying DAO_Creator

In the geth cli type the following in order, substituting CREATOR_ABI and CREATOR_BIN for the json ABI and binary you generated with solc as per the above steps.

...

The address after 'created:' is the address of your new DAO_Creator contract. Remember it.

Deploying The DAO

The DAO has several constructor parameters which are very important and we are going to explain here:

curator Address of the curator (typical a multisig account)
daoCreator Address of the DAO creator which was just created in the previous step
proposalDeposit The amount (in wei) to be paid as a deposit for a proposal. After a vote in the community slack channel, it was decided that 2 Ether (2 * 10^18 Wei) would be a reasonable number.
minTokensToCreate The minimum number of tokens (in its base unit) which need to be created during the creation phase (e.g. 5.000.000 DAO = 5 * 10^22 base unit DAO) -closingTime The unix time at which the creation phase ends.
privateCreationThe only address which is allowed to create tokens. For a public DAO creation, this field is left empty.

After you decide what values you want for you DAO then you can proceed with the CLI as before. Type the following in order substituting DAO_ABI and DAO_BIN for the json ABI and binary you generated with solc,creator_address with the address of the DAO creator contract generated in the previous step and all the variables of the constructor as mentioned above.

...