2021-04-13 17:47:41 +00:00
|
|
|
import * as t from "io-ts";
|
|
|
|
|
|
|
|
export const ProtocolIo = t.type({
|
2021-04-15 18:04:23 +00:00
|
|
|
cname: t.string,
|
2021-04-13 17:47:41 +00:00
|
|
|
name: t.string,
|
|
|
|
description: t.string,
|
|
|
|
path: t.string,
|
2021-04-17 20:58:45 +00:00
|
|
|
previousPaths: t.union([t.array(t.string), t.undefined]),
|
2021-04-13 17:47:41 +00:00
|
|
|
folder: t.string,
|
2021-06-16 14:23:57 +00:00
|
|
|
type: t.union([t.literal("snapshot"), t.literal("compoundish"), t.literal("others")]),
|
2021-04-13 17:47:41 +00:00
|
|
|
suffix: t.string,
|
|
|
|
coinGeckoPriceString: t.string,
|
|
|
|
tokenContractAddress: t.string,
|
|
|
|
governanceContractAddress: t.union([t.string, t.undefined]),
|
|
|
|
isEnabled: t.boolean,
|
|
|
|
hasOnchain: t.boolean,
|
|
|
|
isHybrid: t.boolean,
|
|
|
|
hasDelegation: t.boolean,
|
|
|
|
snapshotSpaceName: t.union([t.string, t.undefined]),
|
|
|
|
invalidSnapshots: t.union([t.array(t.string), t.undefined]),
|
|
|
|
branding: t.union([
|
|
|
|
t.partial({
|
|
|
|
primaryColor: t.string,
|
|
|
|
accentColor: t.string,
|
|
|
|
}),
|
|
|
|
t.undefined,
|
|
|
|
]),
|
|
|
|
discourseForum: t.union([
|
|
|
|
t.partial({
|
|
|
|
url: t.string,
|
|
|
|
categoryId: t.string,
|
|
|
|
}),
|
|
|
|
t.undefined,
|
|
|
|
]),
|
|
|
|
safeAddress: t.union([t.string, t.null]),
|
2021-06-09 16:41:43 +00:00
|
|
|
treasuryAddresses: t.union([t.array(t.string), t.undefined]),
|
2021-06-23 09:05:21 +00:00
|
|
|
disableTreasuryNav: t.union([t.boolean, t.undefined]),
|
2021-04-13 17:47:41 +00:00
|
|
|
});
|
|
|
|
|
2021-06-10 12:58:04 +00:00
|
|
|
export const ProtocolForScreeenerIo = t.type({
|
|
|
|
name: t.string,
|
2021-06-11 12:33:38 +00:00
|
|
|
cname: t.string,
|
2021-06-10 12:58:04 +00:00
|
|
|
treasuryAddresses: t.array(t.string),
|
|
|
|
});
|
|
|
|
|
|
|
|
export type ProtocolForScreeener = t.TypeOf<typeof ProtocolForScreeenerIo>;
|
|
|
|
|
2021-04-13 17:47:41 +00:00
|
|
|
export type Protocol = t.TypeOf<typeof ProtocolIo>;
|