mirror of
https://github.com/Instadapp/boardroom-inc-protocol-Info.git
synced 2024-07-29 22:37:02 +00:00
58 lines
1.3 KiB
Bash
Executable File
58 lines
1.3 KiB
Bash
Executable File
#!/bin/bash
|
|
# A bash script to add protocol info directory skeleton
|
|
|
|
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/token.json
|
|
|
|
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
|
|
|
|
printf '{
|
|
"cname": "'"$1"'",
|
|
"name": "'"$4"''"$5"''"$6"'",
|
|
"description": "",
|
|
"path": "'"$1"'",
|
|
"previousPaths": [],
|
|
"folder": "'"$1"'",
|
|
"type": "snapshot",
|
|
"suffix": "'"$3"'",
|
|
"coinGeckoPriceString": "",
|
|
"tokenContractAddress": "'"$2"'",
|
|
"isEnabled": false,
|
|
"hasOnchain": false,
|
|
"claim": {
|
|
"isClaimed": false,
|
|
"claimer": "",
|
|
"signature": ""
|
|
},
|
|
"isHybrid": false,
|
|
"hasDelegation": false,
|
|
"snapshotSpaceName": "'"$1"'",
|
|
"invalidSnapshots": [],
|
|
"branding": {
|
|
"primaryColor": "",
|
|
"accentColor": ""
|
|
},
|
|
"discourseForum": {
|
|
"url": "",
|
|
"categoryId": ""
|
|
},
|
|
"safeAddress": null
|
|
}' >| ./protocols/$1/index.json
|
|
fi
|
|
|
|
echo "Arg 1: $1" |