From f17780856ffcd05e073b3d73140cb3e19e1eb479 Mon Sep 17 00:00:00 2001 From: yj Date: Thu, 22 Apr 2021 12:46:44 -0500 Subject: [PATCH] fix: add new protocl script --- scripts/add_new_protocol.sh | 11 ++++++++++- types.d.ts | 30 ++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 types.d.ts diff --git a/scripts/add_new_protocol.sh b/scripts/add_new_protocol.sh index c65b5b9..b79dde5 100755 --- a/scripts/add_new_protocol.sh +++ b/scripts/add_new_protocol.sh @@ -8,7 +8,16 @@ do 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 ./$arg/calls + + mkdir -p ./$arg/resources + mkdir -p ./$arg/resources/calls + mkdir -p ./$arg/resources/Gov Weekly + + mkdir -p ./$arg/contracts + touch ./$arg/contracts/governance.json + touch ./$arg/contracts/token.json + + touch ./$arg/index.json touch ./$arg/events.json touch ./$arg/overview.md touch ./$arg/logo.png diff --git a/types.d.ts b/types.d.ts new file mode 100644 index 0000000..91e322f --- /dev/null +++ b/types.d.ts @@ -0,0 +1,30 @@ +import * as t from "io-ts"; +export declare const ProtocolIo: t.TypeC<{ + cname: t.StringC; + name: t.StringC; + description: t.StringC; + path: t.StringC; + previousPaths: t.UnionC<[t.ArrayC, t.UndefinedC]>; + folder: t.StringC; + type: t.UnionC<[t.LiteralC<"snapshot">, t.LiteralC<"compoundish">]>; + suffix: t.StringC; + coinGeckoPriceString: t.StringC; + tokenContractAddress: t.StringC; + governanceContractAddress: t.UnionC<[t.StringC, t.UndefinedC]>; + isEnabled: t.BooleanC; + hasOnchain: t.BooleanC; + isHybrid: t.BooleanC; + hasDelegation: t.BooleanC; + snapshotSpaceName: t.UnionC<[t.StringC, t.UndefinedC]>; + invalidSnapshots: t.UnionC<[t.ArrayC, t.UndefinedC]>; + branding: t.UnionC<[t.PartialC<{ + primaryColor: t.StringC; + accentColor: t.StringC; + }>, t.UndefinedC]>; + discourseForum: t.UnionC<[t.PartialC<{ + url: t.StringC; + categoryId: t.StringC; + }>, t.UndefinedC]>; + safeAddress: t.UnionC<[t.StringC, t.NullC]>; +}>; +export declare type Protocol = t.TypeOf;