Skip to content

Commit

Permalink
Add configuration file build helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Sanchez committed Apr 6, 2021
1 parent d0260ad commit 25c18c0
Show file tree
Hide file tree
Showing 6 changed files with 2,171 additions and 3 deletions.
11 changes: 8 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"name": "safe-apps-list",
"version": "0.1.0",
"description": "",
"main": "index.js",
"description": "Gnosis Safe default apps list",
"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"
},
Expand All @@ -15,6 +16,10 @@
},
"devDependencies": {
"cors": "^2.8.5",
"nodemon": "^2.0.7"
"cross-env": "^7.0.3",
"dotenv": "^8.2.0",
"eslint": "^7.23.0",
"nodemon": "^2.0.7",
"rimraf": "^3.0.2"
}
}
160 changes: 160 additions & 0 deletions public/gnosis-default.applist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
{
"name": "Gnosis Safe default app list",
"timestamp": "2021-04-06T07:47:42.271Z",
"version": {
"major": 0,
"minor": 1,
"patch": 0
},
"logoUri": "logo-uri",
"keywords": [
"gnosis",
"safe",
"default",
"app",
"list"
],
"apps": [
{
"url": "https://cloudflare-ipfs.com/ipfs/QmUXF1yVGdqUfMbhNyfM3jpP6Bw66cYnKPoWq6iHkhd3Aw",
"disabled": false,
"networks": [
1
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmQ3w2ezp2zx3u2LYQHyuNzMrLDJFjyL1rjAFTjNMcQ4cK",
"disabled": false,
"networks": [
1
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmRb2VfPVYBrv6gi2zDywgVgTg3A19ZCRMqwL13Ez5f5AS",
"disabled": false,
"networks": [
1
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmVaxypk2FTyfcTS9oZKxmpQziPUTu2VRhhW7sso1mGysf",
"disabled": false,
"networks": [
1
]
},
{
"url": "https://safe-cmm.gnosis.io",
"disabled": false,
"networks": [
4,
100
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmX31xCdhFDmJzoVG33Y6kJtJ5Ujw8r5EJJBrsp8Fbjm7k",
"disabled": false,
"networks": [
1,
4
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmaiemnumMaaK9wE1pbMfm3YSBUpcFNgDh3Bf6VZCZq57Q",
"disabled": false,
"networks": [
1
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmTvrLwJtyjG8QFHgvqdPhcV5DBMQ7oZceSU4uvPw9vQaj",
"disabled": false,
"networks": [
1,
4
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/Qmde8dsa9r8bB59CNGww6LRiaZABuKaJfuzvu94hFkatJC",
"disabled": false,
"networks": [
1
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmT96aES2YA9BssByc6DVizQDkofmKRErs8gJyqWipjyS8",
"disabled": false,
"networks": [
1
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmTa21pi77hiT1sLCGy5BeVwcyzExUSp2z7byxZukye8hr",
"disabled": false,
"networks": [
1,
4
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmTBBaiDQyGa17DJ7DdviyHbc51fTVgf6Z5PW5w2YUTkgR",
"disabled": false,
"networks": [
1
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/Qmb1Xpfu9mnX4A3trpoVeBZ9sTiNtEuRoFKEiaVXWntDxB",
"disabled": false,
"networks": [
1,
4
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmXLxxczMH4MBEYDeeN9zoiHDzVkeBmB5rBjA3UniPEFcA",
"disabled": false,
"networks": [
1,
4
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmQovvfYYMUXjZfNbysQDUEXR8nr55iJRwcYgJQGJR7KEA",
"disabled": false,
"networks": [
1,
4
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmZBgEvjqi9Jg8xATr9uUgNUVmnfYiECNxZv9Taux7mzgV",
"disabled": false,
"networks": [
1,
4,
246,
73799,
100
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/QmX9B982ZAaBzbm6yBoZUS3uLgcizYA6wW65RCXVRZkG6f",
"disabled": false,
"networks": [
1,
4,
246,
73799,
100
]
},
{
"url": "https://cloudflare-ipfs.com/ipfs/Qme9HuPPhgCtgfj1CktvaDKhTesMueGCV2Kui1Sqna3Xs9",
"disabled": false,
"networks": [
1
]
}
]
}
151 changes: 151 additions & 0 deletions src/apps.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
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`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Aave
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmQ3w2ezp2zx3u2LYQHyuNzMrLDJFjyL1rjAFTjNMcQ4cK`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET],
},
//Balancer Exchange
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmRb2VfPVYBrv6gi2zDywgVgTg3A19ZCRMqwL13Ez5f5AS`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Balancer Pool
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmVaxypk2FTyfcTS9oZKxmpQziPUTu2VRhhW7sso1mGysf`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// CMM
// Point to a static server to allow app update without Safe deployment
{
url: `https://safe-cmm.gnosis.io`,
disabled: false,
networks: [ETHEREUM_NETWORK.RINKEBY, ETHEREUM_NETWORK.XDAI],
},
// Compound
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmX31xCdhFDmJzoVG33Y6kJtJ5Ujw8r5EJJBrsp8Fbjm7k`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY],
},
// dHedge
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmaiemnumMaaK9wE1pbMfm3YSBUpcFNgDh3Bf6VZCZq57Q`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Idle
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmTvrLwJtyjG8QFHgvqdPhcV5DBMQ7oZceSU4uvPw9vQaj`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY],
},
// Lido finance
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/Qmde8dsa9r8bB59CNGww6LRiaZABuKaJfuzvu94hFkatJC`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Mushrooms finance
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmT96aES2YA9BssByc6DVizQDkofmKRErs8gJyqWipjyS8`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Pooltogether
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmTa21pi77hiT1sLCGy5BeVwcyzExUSp2z7byxZukye8hr`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY],
},
// Request
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmTBBaiDQyGa17DJ7DdviyHbc51fTVgf6Z5PW5w2YUTkgR`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET],
},
// Sablier
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/Qmb1Xpfu9mnX4A3trpoVeBZ9sTiNtEuRoFKEiaVXWntDxB`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY],
},
// Synthetix
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmXLxxczMH4MBEYDeeN9zoiHDzVkeBmB5rBjA3UniPEFcA`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET, ETHEREUM_NETWORK.RINKEBY],
},
// OpenZeppelin
{
url: `${process.env.REACT_APP_IPFS_GATEWAY}/QmQovvfYYMUXjZfNbysQDUEXR8nr55iJRwcYgJQGJR7KEA`,
disabled: false,
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`,
disabled: false,
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`,
disabled: false,
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`,
disabled: false,
networks: [ETHEREUM_NETWORK.MAINNET],
},
]

module.exports = function apps() {
if (!process.env.REACT_APP_IPFS_GATEWAY) {
throw Error('REACT_APP_IPFS_GATEWAY should be defined')
}

return safeAppsConfig
}
19 changes: 19 additions & 0 deletions src/buildList.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const { version } = require('../package.json')
const staticAppsList = require('./apps.js')

module.exports = function buildList () {
const parsed = version.split('.')

return {
name: "Gnosis Safe default app list",
timestamp: new Date().toISOString(),
version: {
major: +parsed[0],
minor: +parsed[1],
patch: +parsed[2],
},
logoUri: 'logo-uri',
keywords: ['gnosis', 'safe', 'default', 'app', 'list'],
apps: [...staticAppsList()]
}
}
3 changes: 3 additions & 0 deletions src/write.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const config = require('dotenv').config()
const buildList = require('./buildList')
console.log(JSON.stringify(buildList(), null, 2))
Loading

0 comments on commit 25c18c0

Please sign in to comment.