Skip to content

Commit

Permalink
fix: auto populate index.json skeleton
Browse files Browse the repository at this point in the history
  • Loading branch information
pmespresso committed Apr 22, 2021
1 parent f177808 commit 327184f
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 12 deletions.
Empty file.
Empty file.
Empty file.
Empty file added protocols/ampleforth/header.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions protocols/ampleforth/index.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@


Empty file added protocols/ampleforth/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file.
45 changes: 33 additions & 12 deletions scripts/add_new_protocol.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,42 @@ do
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 ./$arg
mkdir -p ./protocols/$arg

mkdir -p ./$arg/resources
mkdir -p ./$arg/resources/calls
mkdir -p ./$arg/resources/Gov Weekly
mkdir -p ./protocols/$arg/resources
mkdir -p ./protocols/$arg/resources/calls
mkdir -p ./protocols/$arg/resources/Gov Weekly

mkdir -p ./$arg/contracts
touch ./$arg/contracts/governance.json
touch ./$arg/contracts/token.json
mkdir -p ./protocols/$arg/contracts
touch ./protocols/$arg/contracts/governance.json
touch ./protocols/$arg/contracts/token.json

touch ./$arg/index.json
touch ./$arg/events.json
touch ./$arg/overview.md
touch ./$arg/logo.png
touch ./$arg/header.png
touch ./protocols/$arg/index.json
touch ./protocols/$arg/events.json
touch ./protocols/$arg/overview.md
touch ./protocols/$arg/logo.png
touch ./protocols/$arg/header.png

echo `{
"cname": $arg,
"name": $arg,
"description": "",
"path": $arg,
"previousPaths": [],
"folder": $arg,
"type": "snapshot",
"suffix": "",
"coinGeckoPriceString": "",
"tokenContractAddress": "",
"isEnabled": false,
"hasOnchain": false,
"isHybrid": false,
"hasDelegation": false,
"snapshotSpaceName": "",
"invalidSnapshots": [],
"branding": {},
"discourseForum": {},
"safeAddress": null }` >> ./protocols/$arg/index.json
fi
done

Expand Down

0 comments on commit 327184f

Please sign in to comment.