Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate Redemptions to buidler #135

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ package-lock.json
coverage.json
coverage
.DS_Store
artifacts
cache
26 changes: 11 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ We have a [Redemptions demo DAO live on Rinkeby!](https://rinkeby.aragon.org/#/t

## How to run Redemptions locally

First make sure that you have node, npm, and the Aragon CLI installed and working. Instructions on how to set that up can be found [here](https://hack.aragon.org/docs/cli-intro.html). You'll also need to have [Metamask](https://metamask.io) or some kind of web wallet enabled to sign transactions in the browser.
First make sure that you have node and yarn installed and working. You'll also need to have [Metamask](https://metamask.io) or some kind of web wallet enabled to sign transactions in the browser.

Git clone this repo.

Expand All @@ -35,13 +35,13 @@ cd redemptions-app
Install npm dependencies.

```sh
npm i
yarn
```

Deploy a dao with Redemptions installed on your local environment.

```sh
npm run start:template
yarn start
```

If everything is working correctly, your new DAO will be deployed and your browser will open http://localhost:3000/#/YOUR-DAO-ADDRESS. It should look something like this:
Expand All @@ -51,19 +51,15 @@ If everything is working correctly, your new DAO will be deployed and your brows
You will also see the configuration for your local deployment in the terminal. It should look something like this:

```sh
Ethereum Node: ws://localhost:8545
ENS registry: 0x5f6f7e8cc7346a11ca2def8f827b7a0b612c56a1
APM registry: aragonpm.eth
DAO address: YOUR-DAO-ADDRESS
```

Currently the only thing deployed on your local testnet is an Aragon DAO with the Redemptions app. In a new terminal navigate to the `redemptions-app` directory. Then run this script to deploy some token contracts on your local testnet to interact with.
backend | ENS deployed: 0x5f6F7E8cc7346a11ca2dEf8f827b7a0b612c56a1
backend | DAO factory deployed: 0x8EEaea23686c319133a7cC110b840d1591d9AeE0
backend | APM deployed: 0xA53dE0b8e08b798f975D57f48384C177D410d170
backend | Deploying DAO and app repository...
backend | DAO deployed: YOUR-DAO-ADDRESS

```sh
npm run deploy-tokens YOUR-DAO-ADDRESS
```

If successful, you will have deployed contracts for ANT, DAI, OMG, and ETH to your local testnet. The terminal will then display the names of the tokens and their addresses on your local testnet. It should look something like this:
You will also have deployed contracts for ANT, DAI, OMG, and ETH to your local testnet. The terminal will display the names of the tokens and their addresses on your local testnet. It should look something like this:

```sh
Token Address Balance
Expand All @@ -78,7 +74,7 @@ Now if you navigate back to your browser (http://localhost:3000/#/YOUR-DAO-ADDRE

## How to deploy Redemptions to an organization

Redemptions has been published to APM on Mainnet and Rinkeby at `redemptions.aragonpm.eth`
Redemptions has been published to APM on Mainnet, Rinkeby, and xDAI at `redemptions.aragonpm.eth`

To deploy to an organization you can use the [Aragon CLI](https://hack.aragon.org/docs/cli-intro.html).

Expand All @@ -94,4 +90,4 @@ We welcome community contributions!

Please check out our [open Issues](https://github.com/1Hive/redemptions-app/issues) to get started.

If you discover something that could potentially impact security, please notify us immediately. The quickest way to reach us is via the #dev channel in our [team Keybase chat](https://keybase.io/team/1hive). Just say hi and that you discovered a potential security vulnerability and we'll DM you to discuss details.
If you discover something that could potentially impact security, please notify us immediately. The quickest way to reach us is via the #dev channel in our [Discord chat](https://discord.gg/mP75t4n). Just say hi and that you discovered a potential security vulnerability and we'll DM you to discuss details.
7 changes: 4 additions & 3 deletions app/.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,18 @@
"android >= 4.2"
]
},
"useBuiltIns": false
"useBuiltIns": "entry",
"corejs": 3,
"shippedProposals": true
}
]
],
"plugins": [
"@babel/plugin-proposal-class-properties",
[
"styled-components",
{
"displayName": true
}
]
]
}
}
28 changes: 14 additions & 14 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,30 @@
"dependencies": {
"@aragon/api": "^2.0.0-beta.9",
"@aragon/api-react": "^2.0.0-beta.9",
"@aragon/ui": "^1.3.0",
"@aragon/ui": "^1.4.2",
"components": "^0.1.0",
"core-js": "^3.1.4",
"react": "^16.8.6",
"react-dom": "^16.8.6",
"regenerator-runtime": "^0.13.2",
"core-js": "^3.6.5",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"regenerator-runtime": "^0.13.5",
"rxjs": "^6.5.2",
"styled-components": "^4.3.2",
"styled-components": "^5.1.1",
"web3-utils": "^1.2.1"
},
"devDependencies": {
"@babel/core": "^7.5.4",
"@babel/plugin-proposal-class-properties": "^7.5.0",
"@babel/preset-env": "^7.5.4",
"copyfiles": "^2.1.1",
"parcel-bundler": "^1.12.3"
"@babel/core": "^7.10.2",
"@babel/preset-env": "^7.10.2",
"copyfiles": "^2.2.0",
"parcel-bundler": "^1.12.4"
},
"scripts": {
"build": "npm run sync-assets && npm run build:app && npm run build:script",
"build:app": "parcel build index.html -d ../dist/ --public-url \".\" --no-cache",
"build:script": "parcel build src/script.js --out-dir ../dist/ --no-cache",
"watch:script": "parcel watch src/script.js --out-dir ../dist/ --no-hmr",
"devserver": "parcel serve index.html -p 8001 --out-dir ../dist/ --no-cache",
"start": "npm run sync-assets && npm run build:script -- --no-minify && npm run devserver",
"sync-assets": "copy-aragon-ui-assets ../dist && rsync -rtu ./public/ ../dist"
"serve": "parcel serve index.html --out-dir ../dist/ --no-cache",
"watch": "npm run watch:script",
"sync-assets": "copy-aragon-ui-assets ../dist && copyfiles -u 1 './public/**/*' ../dist",
"start": "npm run sync-assets && npm run watch:script & npm run serve"
}
}
Loading