EOSIO contracts for managing a decentralized autonomous organization on EOSIO chains.
git clone https://github.com/hypha-dao/dao-contracts
cd dao-contracts
git submodule init
git submodule update
#Use dev for testnet or prod for mainnet
./setup.sh prod|dev
mkdir build && cd build
cmake ..
make
Run unit tests with Hydra framework like this
yarn install
yarn test
Example deploys to "dao.hypha"
cd build
cleos set contract dao.hypha dao dao.wasm dao.abi
Some EOSIO chains have size limite for uploading WASM files - seems around 512KB. The error messages when uploading larger WASM files are misleading and confusing. (http error...).
If there is an unexpected problem uploading, check the size of the WASM file.
It is possible to shrink the file prior to upload using wasm-opt
Version 105 works fine Version 112 and 114 produce invalid opcode errors when uploading
# Optimize for size.
wasm-opt -Os -o output.wasm input.wasm
# Optimize aggressively for size.
wasm-opt -Oz -o output.wasm input.wasm
# Optimize for speed.
wasm-opt -O -o output.wasm input.wasm
# Optimize aggressively for speed.
wasm-opt -O3 -o output.wasm input.wasm
dao.hypha@eosio.code
permission must be added to both active and owner
The repo at https://github.com/hypha-dao/daoctl features a CLI that can be used to interact with the contracts.
The script at scripts/dao.js can interacts with the contracts.
Unit and some integrations tests at https://github.com/hypha-dao/dao-contracts/dao-go
Every OS update breaks the build. Use this command to clean directory when there are build errors:
git clean -xdf