Skip to content

Commit

Permalink
Generate the list fetching info from manifest.json
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Sanchez committed Apr 6, 2021
1 parent 25c18c0 commit 9b50cf9
Show file tree
Hide file tree
Showing 12 changed files with 480 additions and 188 deletions.
7 changes: 7 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
extends: [
'eslint:recommended',
'prettier', // Add prettier rules to eslint
'plugin:prettier/recommended', // Plugin to use prettier rules with eslint
]
}
34 changes: 33 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,33 @@
# safe-apps-list
# Gnosis Safe default apps list

This is a small project to generate and build the default apps list for Gnosis Safe

## Getting started

These instructions will get you to get a valid apps list to load in Gnosis Safe

### Installing and running

Install dependencies for the project:
```
yarn install
```

To launch a local instance for dev purposes:
```
yarn start
```

### Building

Generate an instance of the list:
```
yarn build
```

### Configuring

To update the list configuration you have to modify the file at `config/appList.js`. To configure an app two parameters are mandatory:

- `url`: An URL to fetch the resource. If it's using an IPFS link the following pattern should be used: `${process.env.REACT_APP_IPFS_GATEWAY}/QmUXF1yVGdqUfMbhNyfM3jpP6Bw66cYnKPoWq6iHkhd3Aw`
- `networks`: An array of supported networks. For convenience the enumerated object can be used to set it in a more friendly way. ex: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY]
132 changes: 132 additions & 0 deletions config/appsList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
const ETHEREUM_NETWORK = {
MAINNET: 1,
MORDEN :2,
ROPSTEN: 3,
RINKEBY: 4,
GOERLI: 5,
KOVAN: 42,
XDAI: 100,
ENERGY_WEB_CHAIN: 246,
VOLTA: 73799,
UNKNOWN: 0,
LOCAL: 4447,
}

const safeAppsConfig = [
// 1inch
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmUXF1yVGdqUfMbhNyfM3jpP6Bw66cYnKPoWq6iHkhd3Aw`,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Aave
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmQ3w2ezp2zx3u2LYQHyuNzMrLDJFjyL1rjAFTjNMcQ4cK`,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Aave v2
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmVg7aXr5S8sT2iUdUwdkfTJNknmB7rcE3t92HiGoVsYDj`,
networks: [ETHEREUM_NETWORK.MAINNET],
},
//Balancer Exchange
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmRb2VfPVYBrv6gi2zDywgVgTg3A19ZCRMqwL13Ez5f5AS`,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Balancer Pool
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmVaxypk2FTyfcTS9oZKxmpQziPUTu2VRhhW7sso1mGysf`,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// CMM
// Point to a static server to allow app update without Safe deployment
{
url: `https://safe-cmm.gnosis.io`,
networks: [ETHEREUM_NETWORK.RINKEBY, ETHEREUM_NETWORK.XDAI],
},
// Compound
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmX31xCdhFDmJzoVG33Y6kJtJ5Ujw8r5EJJBrsp8Fbjm7k`,
networks: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY],
},
// dHedge
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmaiemnumMaaK9wE1pbMfm3YSBUpcFNgDh3Bf6VZCZq57Q`,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Idle
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmTvrLwJtyjG8QFHgvqdPhcV5DBMQ7oZceSU4uvPw9vQaj`,
networks: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY],
},
// Lido finance
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/Qmde8dsa9r8bB59CNGww6LRiaZABuKaJfuzvu94hFkatJC`,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Mushrooms finance
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmT96aES2YA9BssByc6DVizQDkofmKRErs8gJyqWipjyS8`,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Pooltogether
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmTa21pi77hiT1sLCGy5BeVwcyzExUSp2z7byxZukye8hr`,
networks: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY],
},
// Request
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmTBBaiDQyGa17DJ7DdviyHbc51fTVgf6Z5PW5w2YUTkgR`,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Sablier
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/Qmb1Xpfu9mnX4A3trpoVeBZ9sTiNtEuRoFKEiaVXWntDxB`,
networks: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY],
},
// Synthetix
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmXLxxczMH4MBEYDeeN9zoiHDzVkeBmB5rBjA3UniPEFcA`,
networks: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY],
},
// OpenZeppelin
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmQovvfYYMUXjZfNbysQDUEXR8nr55iJRwcYgJQGJR7KEA`,
networks: [
ETHEREUM_NETWORK.MAINNET,
ETHEREUM_NETWORK.RINKEBY,
//ETHEREUM_NETWORK.ENERGY_WEB_CHAIN,
//ETHEREUM_NETWORK.VOLTA,
// ETHEREUM_NETWORK.XDAI,
],
},
// TX-Builder
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmZBgEvjqi9Jg8xATr9uUgNUVmnfYiECNxZv9Taux7mzgV`,
networks: [
ETHEREUM_NETWORK.MAINNET,
ETHEREUM_NETWORK.RINKEBY,
ETHEREUM_NETWORK.ENERGY_WEB_CHAIN,
ETHEREUM_NETWORK.VOLTA,
ETHEREUM_NETWORK.XDAI,
],
},
// Wallet-Connect
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmX9B982ZAaBzbm6yBoZUS3uLgcizYA6wW65RCXVRZkG6f`,
networks: [
ETHEREUM_NETWORK.MAINNET,
ETHEREUM_NETWORK.RINKEBY,
ETHEREUM_NETWORK.ENERGY_WEB_CHAIN,
ETHEREUM_NETWORK.VOLTA,
ETHEREUM_NETWORK.XDAI,
],
},
// Yearn Vaults
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/Qme9HuPPhgCtgfj1CktvaDKhTesMueGCV2Kui1Sqna3Xs9`,
networks: [ETHEREUM_NETWORK.MAINNET],
},
]

module.exports = safeAppsConfig
9 changes: 4 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,20 @@
"main": "public/app-list.json",
"scripts": {
"build": "rimraf public && mkdir -p public && cross-env node src/write.js > public/gnosis-default.applist.json",
"start": "nodemon ./index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"eslintConfig": {
"extends": "react-app"
"start": "nodemon src/startDev.js"
},
"dependencies": {
"express": "^4.17.1"
},
"devDependencies": {
"axios": "^0.21.1",
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"dotenv": "^8.2.0",
"eslint": "^7.23.0",
"eslint-plugin-prettier": "^3.3.1",
"nodemon": "^2.0.7",
"prettier": "^2.2.1",
"rimraf": "^3.0.2"
}
}
Loading

0 comments on commit 9b50cf9

Please sign in to comment.