boardroom-inc-protocol-Info/scripts/add_new_protocol.sh

48 lines
1.2 KiB
Bash
Raw Normal View History

#!/bin/bash
# A bash script to add protocol info directory skeleton
2021-04-23 19:53:02 +00:00
if [ "$arg" == "--help" ] || [ "$arg" == "-h" ]
then
echo "Pass in the name of the protocol whose info you want to add. e.g: ./add_new_protocol.sh rarible"
else
mkdir -p ./protocols/$1
mkdir -p ./protocols/$1/resources
mkdir -p ./protocols/$1/resources
mkdir -p ./protocols/$1/resources/calls
mkdir -p ./protocols/$1/resources/Gov Weekly
mkdir -p ./protocols/$1/contracts
touch ./protocols/$1/contracts/governance.json
touch ./protocols/$1/contracts/token.json
2021-04-22 17:46:44 +00:00
2021-04-23 19:53:02 +00:00
touch ./protocols/$1/index.json
touch ./protocols/$1/events.json
touch ./protocols/$1/overview.md
touch ./protocols/$1/logo.png
touch ./protocols/$1/header.png
2021-04-22 18:06:42 +00:00
2021-04-23 19:53:02 +00:00
printf '{
"cname": "'"$1"'",
"name": "'"$1"'",
2021-04-22 18:19:28 +00:00
"description": "",
"path": "",
"previousPaths": [],
2021-04-23 19:53:02 +00:00
"folder": "'"$1"'",
2021-04-22 18:19:28 +00:00
"type": "snapshot",
"suffix": "",
"coinGeckoPriceString": "",
2021-04-23 19:53:02 +00:00
"tokenContractAddress": "'"$2"'",
2021-04-22 18:19:28 +00:00
"isEnabled": false,
"hasOnchain": false,
"isHybrid": false,
"hasDelegation": false,
"snapshotSpaceName": "",
"invalidSnapshots": [],
"branding": {},
"discourseForum": {},
"safeAddress": null
2021-04-23 19:53:02 +00:00
}' >| ./protocols/$1/index.json
fi
2021-04-22 18:19:28 +00:00
echo "Arg 1: $1"