From 1c5bb22a594c94df6c755b7f79c57a39374c68ce Mon Sep 17 00:00:00 2001 From: katspaugh Date: Fri, 4 Jun 2021 16:20:25 +0200 Subject: [PATCH] Update readme, remove truffle and ganache instructions (#2398) * Update readme, remove truffle and ganache instructions * Rm exchange rate constants * Move env vars info higher --- readme.md | 54 +++++++++--------------------------------- src/utils/constants.ts | 2 -- truffle.js | 16 ------------- 3 files changed, 11 insertions(+), 61 deletions(-) delete mode 100644 truffle.js diff --git a/readme.md b/readme.md index 246e8e99..c75f653f 100644 --- a/readme.md +++ b/readme.md @@ -21,13 +21,20 @@ These instructions will get you a copy of the project up and running on your loc ### 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 @@ -46,18 +53,6 @@ If you prefer using the Mainnet ones: 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 For Rinkeby: ``` @@ -72,31 +67,7 @@ yarn build-mainnet ## Running the tests -1. Run `transaction-history-service` -``` -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: +To run the tests: ``` yarn test ``` @@ -105,7 +76,6 @@ yarn test ESLint will be run automatically before you commit. To run it manually: - ``` yarn lint:fix ``` @@ -134,8 +104,6 @@ We prepare a new release every sprint. Sprints are two weeks long. ## 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 * [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 diff --git a/src/utils/constants.ts b/src/utils/constants.ts index b595eda6..cebef648 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -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 ETHERSCAN_API_KEY = process.env.REACT_APP_ETHERSCAN_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 = process.env.REACT_APP_SAFE_APPS_LIST_URL || 'https://raw.githubusercontent.com/gnosis/safe-apps-list/main/public/gnosis-default.applist.json' diff --git a/truffle.js b/truffle.js deleted file mode 100644 index 3c7cf333..00000000 --- a/truffle.js +++ /dev/null @@ -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, - }, - }, -}