Update readme, remove truffle and ganache instructions (#2398)
* Update readme, remove truffle and ganache instructions * Rm exchange rate constants * Move env vars info higher
This commit is contained in:
parent
45205f8a77
commit
1c5bb22a59
54
readme.md
54
readme.md
|
@ -21,13 +21,20 @@ These instructions will get you a copy of the project up and running on your loc
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
What you need to install globally:
|
We use [yarn](https://yarnpkg.com) in our infrastructure, so we decided to go with yarn in the README.
|
||||||
|
Please install yarn globally if you haven't already.
|
||||||
|
|
||||||
|
### Environment variables
|
||||||
|
The app grabs environment variables from the `.env` file. Copy our template to your own local file:
|
||||||
```
|
```
|
||||||
yarn global add truffle ganache-cli
|
cp .env.example .env
|
||||||
```
|
```
|
||||||
|
|
||||||
We use [yarn](https://yarnpkg.com) in our infrastructure, so we decided to go with yarn in the README
|
To execute transactions, you'll need to create an [Infura](https://infura.io) project and set the project ID in the `.env` you've just created:
|
||||||
|
```
|
||||||
|
REACT_APP_INFURA_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
||||||
|
```
|
||||||
|
Once done, you'll need to restart the app if it's already running.
|
||||||
|
|
||||||
### Installing and running
|
### Installing and running
|
||||||
|
|
||||||
|
@ -46,18 +53,6 @@ If you prefer using the Mainnet ones:
|
||||||
yarn start-mainnet
|
yarn start-mainnet
|
||||||
```
|
```
|
||||||
|
|
||||||
### Environment variables
|
|
||||||
The app grabs environment variables from the `.env` file. Copy our template to your own local file:
|
|
||||||
```
|
|
||||||
cp .env.example .env
|
|
||||||
```
|
|
||||||
|
|
||||||
To execute transactions, you'll need to create an [Infura](https://infura.io) project and set the project ID in the `.env` you've just created:
|
|
||||||
```
|
|
||||||
REACT_APP_INFURA_TOKEN=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
|
|
||||||
```
|
|
||||||
Once done, you'll need to restart the app.
|
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
For Rinkeby:
|
For Rinkeby:
|
||||||
```
|
```
|
||||||
|
@ -72,31 +67,7 @@ yarn build-mainnet
|
||||||
|
|
||||||
## Running the tests
|
## Running the tests
|
||||||
|
|
||||||
1. Run `transaction-history-service`
|
To run the tests:
|
||||||
```
|
|
||||||
git clone https://github.com/gnosis/safe-transaction-service.git
|
|
||||||
cd safe-transaction-service
|
|
||||||
git checkout develop
|
|
||||||
docker-compose build
|
|
||||||
# it comes enabled by default in docker-compose
|
|
||||||
sudo service postgresql stop
|
|
||||||
docker-compose up -d
|
|
||||||
```
|
|
||||||
Check that the service is running at https://localhost:8000
|
|
||||||
|
|
||||||
2. Migrate Safe Contracts:
|
|
||||||
```
|
|
||||||
git clone https://github.com/gnosis/safe-contracts.git
|
|
||||||
cd safe-contracts
|
|
||||||
yarn
|
|
||||||
npx truffle migrate
|
|
||||||
```
|
|
||||||
3. Migrate Token Contracts for the tests:
|
|
||||||
Inside `safe-react` directory
|
|
||||||
```
|
|
||||||
npx truffle migrate
|
|
||||||
```
|
|
||||||
4. Run the tests:
|
|
||||||
```
|
```
|
||||||
yarn test
|
yarn test
|
||||||
```
|
```
|
||||||
|
@ -105,7 +76,6 @@ yarn test
|
||||||
|
|
||||||
ESLint will be run automatically before you commit. To run it manually:
|
ESLint will be run automatically before you commit. To run it manually:
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
yarn lint:fix
|
yarn lint:fix
|
||||||
```
|
```
|
||||||
|
@ -134,8 +104,6 @@ We prepare a new release every sprint. Sprints are two weeks long.
|
||||||
|
|
||||||
## Built With
|
## Built With
|
||||||
|
|
||||||
* [Truffle React Box](https://github.com/truffle-box/react-box) - The web framework used
|
|
||||||
* [Ganache](https://github.com/trufflesuite/ganache-cli) - Fast Ethereum RPC client
|
|
||||||
* [React](https://reactjs.org/) - A JS library for building user interfaces
|
* [React](https://reactjs.org/) - A JS library for building user interfaces
|
||||||
* [Material UI 4.X](https://material-ui.com/) - React components that implement Google's Material Design
|
* [Material UI 4.X](https://material-ui.com/) - React components that implement Google's Material Design
|
||||||
* [redux, immutable, reselect, final-form](https://redux.js.org/) - React ecosystem libraries
|
* [redux, immutable, reselect, final-form](https://redux.js.org/) - React ecosystem libraries
|
||||||
|
|
|
@ -24,8 +24,6 @@ export const COLLECTIBLES_SOURCE = process.env.REACT_APP_COLLECTIBLES_SOURCE ||
|
||||||
export const TIMEOUT = process.env.NODE_ENV === 'test' ? 1500 : 5000
|
export const TIMEOUT = process.env.NODE_ENV === 'test' ? 1500 : 5000
|
||||||
export const ETHERSCAN_API_KEY = process.env.REACT_APP_ETHERSCAN_API_KEY
|
export const ETHERSCAN_API_KEY = process.env.REACT_APP_ETHERSCAN_API_KEY
|
||||||
export const ETHGASSTATION_API_KEY = process.env.REACT_APP_ETHGASSTATION_API_KEY
|
export const ETHGASSTATION_API_KEY = process.env.REACT_APP_ETHGASSTATION_API_KEY
|
||||||
export const EXCHANGE_RATE_URL = 'https://api.exchangeratesapi.io/latest'
|
|
||||||
export const EXCHANGE_RATE_URL_FALLBACK = 'https://api.coinbase.com/v2/exchange-rates'
|
|
||||||
export const SAFE_APPS_LIST_URL =
|
export const SAFE_APPS_LIST_URL =
|
||||||
process.env.REACT_APP_SAFE_APPS_LIST_URL ||
|
process.env.REACT_APP_SAFE_APPS_LIST_URL ||
|
||||||
'https://raw.githubusercontent.com/gnosis/safe-apps-list/main/public/gnosis-default.applist.json'
|
'https://raw.githubusercontent.com/gnosis/safe-apps-list/main/public/gnosis-default.applist.json'
|
||||||
|
|
16
truffle.js
16
truffle.js
|
@ -1,16 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
migrations_directory: './migrations',
|
|
||||||
networks: {
|
|
||||||
development: {
|
|
||||||
host: 'localhost',
|
|
||||||
port: 8545,
|
|
||||||
network_id: '*', //* Match any network id
|
|
||||||
},
|
|
||||||
},
|
|
||||||
solc: {
|
|
||||||
optimizer: {
|
|
||||||
enabled: true,
|
|
||||||
runs: 500,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
Loading…
Reference in New Issue