-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix/rsk/ledger
- Loading branch information
Showing
147 changed files
with
4,373 additions
and
987 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
import { NormalizedEVMAddress } from "./types" | ||
|
||
type HoldERC20 = { | ||
type: "hold" | ||
address: string | ||
} | ||
|
||
type OwnNFT = { | ||
type: "own" | ||
nftAddress: string | ||
} | ||
|
||
type AllowList = { | ||
type: "allowList" | ||
} | ||
|
||
type Unknown = { | ||
type: "unknown" | ||
} | ||
|
||
export type AbilityRequirement = HoldERC20 | OwnNFT | AllowList | Unknown | ||
|
||
export const ABILITY_TYPES_ENABLED = [ | ||
"mint", | ||
"airdrop", | ||
"vote", | ||
"access", | ||
] as const | ||
// https://docs.daylight.xyz/reference/ability-model#ability-types | ||
export const ABILITY_TYPES = [ | ||
...ABILITY_TYPES_ENABLED, | ||
"claim", | ||
"product", | ||
"event", | ||
"article", | ||
"result", | ||
"misc", | ||
] as const | ||
|
||
export type AbilityType = typeof ABILITY_TYPES[number] | ||
|
||
export type Ability = { | ||
type: AbilityType | ||
title: string | ||
description: string | null | ||
abilityId: string | ||
slug: string | ||
linkUrl: string | ||
imageUrl?: string | ||
openAt?: string | ||
closeAt?: string | ||
completed: boolean | ||
removedFromUi: boolean | ||
address: NormalizedEVMAddress | ||
requirement: AbilityRequirement | ||
} | ||
|
||
export const ABILITY_TYPE_COLOR = { | ||
mint: "#20c580", | ||
airdrop: "#FF1E6F", | ||
vote: "#E3C10B", | ||
result: "#E3C10B", | ||
access: "#02C0EA", | ||
product: "#D824DC", | ||
event: "#FF8A1E", | ||
article: "#B2B2B2", | ||
misc: "#CBCBCB", | ||
claim: "#F4D530", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.