Skip to content

Instantly share code, notes, and snippets.

@renexdev
Last active January 5, 2018 13:39
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 renexdev/a7e62128fc62d042820f9c7057d38547 to your computer and use it in GitHub Desktop.
Save renexdev/a7e62128fc62d042820f9c7057d38547 to your computer and use it in GitHub Desktop.
Steps on getting started with aragon

#Disclamer: this tut is not yet completed, I'm writting at the time I'm making several tests and learning on how to use the Aragon code

Getting started with aragon example

Notes on setting up your dev tools for running the basic aragon sample. The idea is helping to build a basic guide tutorial for newbies. Please note that these notes are in continuous review.

General dev tools

For this tutorial I'm using npm 9.2.0

Aragon tools & sample

git clone https://github.com/aragon/aragon-core //Aragon-core repo - not sure if needed

git clone https://github.com/aragon/apm-contracts //apm-contracts repo

git clone https://github.com/aragon/aragon-example-application//sample repo

npm install -g git+https://github.com/aragon/aragon-dev-cli.git//cli tool needed for the sample

Setting up the aragon dev and aragon sample

1- Compile and run core (aragon-core)

npm install

ON-GOING

2- Compile and run APM (apm-contracts)

npm install

ON-GOING

3- Compile and run the example (aragon-example-application)

npm install

ON-GOING

Some encountered issues:

a) Truffle versioning problem. Error: $LOCALWORKSPACE/apm-contracts/node_modules/ethereumjs-testrpc/build/lib.node.js:58296 var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null) [...] abort(5) at Error

Upgrading truffle to the system version (in package.json ) seems to solve the problem. In case you have truffle 4.0.1, change "truffle": "^3.2.5" to "truffle": "^4.0.1" if you have some issues with solc compiler go to issue c)

Or try to uninstall your current truffle system version: npm uninstall truffle

b) (apm-contracts) In prepublish script I've got the error: & compile 16227 info lifecycle @aragon/apm-contracts@1.0.5~prepublish: Failed to exec prepublish script

It seems that there is some problems trying to adding new paths into my local $PATH system env variable. I've added it manually (.bashrc):

export PATH="$HOME/.nvm/versions/node/v9.2.0/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:$LOCALWORKSPACE/apm-contracts/node_modules/.bin:$PATH" Then update the env with source ~/.bashrc

c) Solidity compiler version: SyntaxError: Source file requires different compiler version (current compiler is 0.4.18 [...] Follow the solution at https://ethereum.stackexchange.com/questions/17551/how-to-upgrade-solidity-compiler-in-truffle/26485#26485

I've just modified the following contracts: (aragon-core) $LOCALWORKSPACE/aragon-core/contracts/kernel/IKernel.sol $LOCALWORKSPACE/aragon-core/contracts/apps/AppStorage.sol:1:1: $LOCALWORKSPACE/aragon-core/contracts/apps/App.sol $LOCALWORKSPACE/aragon-core/contracts/common/DelegateProxy.sol $LOCALWORKSPACE/aragon-core/contracts/apps/AppProxy.sol $LOCALWORKSPACE/aragon-core/contracts/common/EVMCallScript $LOCALWORKSPACE/aragon-core/contracts/common/erc677/ERC677Receiver.sol $LOCALWORKSPACE/aragon-core/contracts/common/erc677/ERC677Token.sol $LOCALWORKSPACE/aragon-core/contracts/common/EtherToken.sol $LOCALWORKSPACE/aragon-core/contracts/common/IForwarder.sol $LOCALWORKSPACE/aragon-core/contracts/common/Initializable.sol $LOCALWORKSPACE/aragon-core/contracts/common/TokenController.sol $LOCALWORKSPACE/aragon-core/contracts/kernel/KernelStorage.sol $LOCALWORKSPACE/aragon-core/contracts/kernel/Kernel.sol $LOCALWORKSPACE/aragon-core/contracts/kernel/KernelProxy.sol

(apm-contracts) $LOCALWORKSPACE/apm-contracts/node_modules/@aragon/core/contracts/common/DelegateProxy.sol

(aragon-example-application) $LOCALWORKSPACE/aragon-example-application/node_modules/@aragon/core/contracts/kernel/IKernel.sol $LOCALWORKSPACE/aragon-example-application/node_modules/@aragon/core/contracts/apps/AppStorage.sol $LOCALWORKSPACE/aragon-example-application/node_modules/@aragon/core/contracts/apps/App.sol

adding a ^ in the solidity compiler version, i.e pragma solidity ^0.4.15;

4- Testing aragon-dev-cli

aragon-dev-cli init poll.aragonpm.eth

cd poll

npm i truffle -g //install truffle

npm run build

Issues:

a) Solc version

$LOCALWORKSPACE/poll/node_modules/@aragon/core/contracts/kernel/IKernel.sol

$LOCALWORKSPACE/poll/node_modules/@aragon/core/contracts/apps/AppStorage.sol

$LOCALWORKSPACE/poll/node_modules/@aragon/core/contracts/apps/App.sol

$LOCALWORKSPACE/poll/node_modules/@aragon/core/contracts/common/Initializable.sol:

a) Import libs path In App.sol import "../node_modules/@aragon/core/contracts/apps/App.sol"; import "../node_modules/@aragon/core/contracts/common/Initializable.sol";

Notes: I appreciate any help on improving this basic tutorial on Aragon

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