Skip to content

Gnosis Safe App for interacting with yearn.finance vaults

License

Notifications You must be signed in to change notification settings

miguel567/yearn-safe-app

 
 

Repository files navigation

Styled with Prettier Commitizen Friendly License: MIT


yearn.finance Vaults Safe App

The yearn.finance Vaults Safe App allows Gnosis Safes to interact with yearn.finance vaults.

Read more about Safe Apps here.

Contributing 🙋‍♀️

If you are interested in contributing or have any questions, ping me on Twitter.

Getting set up

To start developing on the Yearn Finance Safe app, first clone this repository and enter the new directory.

git clone https:/TomAFrench/yearn-safe-app.git
cd yearn-safe-app

Before getting started you will need to create a .env file. We have provided .env.example as a template.

cp .env.example .env

Finally install any dependencies and start the dev server

yarn install
yarn start

The app will then be hosted on http://localhost:3002. By default the app will expect an injected web3 provider such as metamask; if you want to interact with the app through the Gnosis UI you'll need to set the REACT_APP_LOCAL_WEB3_PROVIDER environment variable to false.

react-app-rewired

In order to allow the Gnosis Safe UI to access the app while it's running on localhost we need to edit the headers on the dev server (node_modules/react-scripts/config/webpackDevServer.config.js) to avoid CORS issues:

headers: {
    "Access-Control-Allow-Origin": "\*",
    "Access-Control-Allow-Methods": "GET",
    "Access-Control-Allow-Headers": "X-Requested-With, content-type, Authorization"
},

We automate injecting these headers in to the server config through react-app-rewired.

About

Gnosis Safe App for interacting with yearn.finance vaults

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 92.6%
  • HTML 3.6%
  • JavaScript 3.6%
  • Shell 0.2%