Deploying Aragon Client in new Chains
Last updated
Was this helpful?
Last updated
Was this helpful?
This deployment is self-sufficient and does not pose a requirement on other contracts already deployed to the target chain.
Before you begin, make sure that there are no official deployments to the network you will be targeting.
Ethereum Mainnet
0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e
Official
Ethereum Rinkeby
0x98df287b6c145399aaa709692c8d308357bc085d
Official
Ethereum Ropsten
0x6afe2cacee211ea9179992f89dc61ff25c61e923
Official
Polygon Mumbai
0x431f0eed904590b176f9ff8c36a1c4ff0ee9b982
Official
Polygon Mainnet
0x3c70a0190d09f34519e6e218364451add21b7d4b
Official
Harmony Testnet
0xbc7828fa8665c637901ad5abd5c7e647c9ab140f
Official
xDAI
0xaafca6b0c89521752e559650206d7c925fd0e530
Trusted Partner
Harmony
0x843ddfab8406e752d03fa75dbb275070f368658d
Official
BSC Testnet
0x843ddfab8406e752d03fa75dbb275070f368658d
Official
Please verify all contracts that you have deployed with the target network scanner unless they are automatically verified.
Notify the Aragon team about your plans to deploy to the target network.
Keep the team in close loops about the issues you encounter as well as any ambiguity during the process.
Do not change the smart contract code.
Any automation and new scripts are welcome. Create a PR for the respective Github repository.
We will use notation <target network>
to represent the network we are deploying to. It should be consistent throughout this tutorial.
Make sure that you use one account thought the tutorial. You will need Private key and some network tokens to pay for gas.
Description: Provide an account that will be used to deploy contracts as well as rpc connection to the target network.
This account will be the owner of the deployed Aragon infrastructure. To be considered an official deployment we will need to transfer all permissions from this account to an official Aragon account.
To provide access to an account using a Private Key:
Create a file nano ~/.aragon/<target network>_key.json
Add the following inside the file
To provide access to an account using a Seed Phrase:
Create a file nano ~/.aragon/mnemonic.json
Add the following inside the file
Checkout to master
branch instead of default next
branch.
The master
branch contains AragonOS v4.4.0 latest stable version. Whereas the next
has more features, but we don’t want a disputable feature for now.
Run yarn
Run yarn add @aragon/truffle-config-v4
Update node_modules/@aragon/truffle-config-v4/truffle-config.js
with the new network information
Example:
Run yarn compile
Deploy ENS
to the target network
In case the network does not have an official ENS registry, one should deploy it themselves using provided ENSFactory
.
If there is an official ENS deployment, you can use it or deploy a new ENS. If you decide on using an official ENS, make sure to purchase the aragonpm.eth
domain with the key provided in step 1.
Run the command below in AragonOS repo, substituting placeholder values:
Deploy DaoFactory
DAO factory will already include other contracts that are necessary for the contract deployment. It is a very large contract, and we are aware that some networks do not offer enough gas per block to deploying it.
You might encounter RPC failing due to making too many calls in a short period of time. As a solution split the deployment script into several subparts or use a more reliable RPC in step 1.
Run the command below in AragonOS repo, substituting placeholder values:
Deploy APM
(Aragon Package Manager) to the target network
As a workaround, you should deploy the APM in the AragonOS repository.
Run the command below in AragonOS repo, substituting placeholder values:
Clone the repo master branch.
Run yarn
to install packages
Setup truffle-config on node_modules/@aragon/truffle-config-v4/truffle-config.js
as previous step
Update the truffle.js
to point to the right truffle-config. Basically replace its contents with
run yarn compile
to build the contracts
Run the following script:
Provide your Private Key
Update node_modules/@aragon/hardhat-config/hardhat.config.js
with the new network information. Ex:
Deploy an app
Repeat this for each app inside the \\apps
directory. We will use the Finance app here as an example.
IMPORTANT: Do not try to deploy voting-disputable
and agreement
apps they require Aragon Court instance present on the target network.
Navigate to the apps directory (\\apps\\finance
)
Change arapp.json
In the environment
part add information about your target network.
For the registry
variable specify ENS address that we have obtained in step 2.
Run yarn
Run yarn compile
to generate contracts
Run yarn build
to build the UI App part
Start a local version of IPFS with ipfs daemon
Publish the App to APM
Download the files that were uploaded to IPFS with ipfs get <CID>
. The CID is available from previous step
Provide your Private Key
Go to /shared
directory and run yarn
and then yarn link
If you have problems with node version on installing dependencies, add --ignore-engines
to the command
Deploy a template
Repeat this for each template inside the /templates
directory. We will use the Company template here as an example.
IMPORTANT: Please only try to deploy company
, reputation
and membership
templates, as other templates do not contain all required components.
Navigate to the templates directory (/templates/company
)
Run yarn link @aragon/templates-shared
Run yarn
to install dependencies
setup truffle-config on node_modules/@aragon/truffle-config-v4/truffle-config.js
as previous step
Change arapp.json
In the environment
part add information about your target network.
For the registry
variable specify ENS address that we have obtained in step 2.
switch to node 10
Run yarn compile
switch to node 12
Change package.json
Add a new script below to the scripts
section.
Please note that if you are using the official ENS, then you should also acquire the aragonid.eth
domain for the step below to work.
Run yarn deploy:<target network>
to deploy the Template
Start a local version of IPFS with ipfs daemon
Publish the Template to APM
Description: Deploy , which contains all main contracts, to the target network. This will allow creating new DAOs as well as publish apps to APM.
Clone repository
You should be able to deploy in its own repository. However, currently, it does not work due to an unknown issue. If you could fix it, it would be greatly appreciated and you will get rewarded!
Description: Deploy .
Description: Deploy standard to the AragonPM.
Clone repository
Create .env
file in the root directory of the repository with the following content:
If you don't have IPFS installed, check here how to install it
Compress the folders that were downloaded and send to so they can be pinned.
Description: Deploy standard to the AragonPM.
Clone repository
Create .env
file in the root directory of the repository with the following content:
This should deploy additionally and . Copy the address and when deploying the next template add it to the script in step 7:
If you don't have IPFS installed, check here how to install it