Skip to content

Commit

Permalink
introduced versioning, added more notes on data model lebel
Browse files Browse the repository at this point in the history
  • Loading branch information
mseidlx committed Apr 2, 2024
1 parent eca17d6 commit db46a9d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 8 deletions.
20 changes: 12 additions & 8 deletions data_model/data_model.dbml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// dbdocs: https://dbdocs.io/matthias/OpenLabelsInitiative
// interactive visualization: https://dbdiagram.io/d/OLI-65c538c3ac844320aec4000e

// Version: 1.0

Project OLI {
database_type: 'PostgreSQL'
Note: '''
Expand All @@ -13,18 +15,20 @@ Project OLI {
}

Table Tags {
tag_id string [pk]
name string
description string
create string
value_set list

Note: "Individual labels or identifiers that can be applied to data points for sorting, searching, and categorization purposes."
tag_id string [pk, Note: "A slug that acts as unique identifier for this tag. Namespaces can be assigned."]
name string [Note: "The name of this tag in human-readable format."]
description string [Note: "A short description of this tag and its purpose."]
type string [Note: "The datatype that associated values can take."]
value_set list [Note: "If set, this list acts as enums for this tag. Only values from this values set can be assigned."]
creator string [Note: "Creator of this tag id."]
version float [Note: "The versioning of the tag. Whenever a value set change happens, the versioning will also change."]

Note: "Individual tags or identifiers that can be applied to addresses for sorting, searching, and categorization purposes."
}

Table TagMapping {
address string [pk]
chain_id string [pk]
chain_id string [pk, Note: "Unique chain identifier according to CAIP-2 standard."]
tag_id string [pk]
value string

Expand Down
13 changes: 13 additions & 0 deletions tag_definitions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,59 +4,68 @@ tags:
description: This tag refers to the fundamental descriptor that provides a clear and immediate understanding of an address's purpose or role. It should offer a straightforward one-word detailed definition into the functionality of the address. For example, the Uniswap router contract would have the name = 'router'.
type: string
creator: OLI
version: 1.0

- id: oli.is_eoa
name: Is EOA
description: Is the account an Externally Owned Account (EOA)?
type: boolean
value_set: [true, false]
creator: OLI
version: 1.0

- id: oli.is_factory_contract
name: Is Contract
description: Is the address a factory contract?
type: boolean
value_set: [true, false]
creator: OLI
version: 1.0

- id: oli.is_contract
name: Is Factory Contract
description: Is the address a contract?
type: boolean
value_set: [true, false]
creator: OLI
version: 1.0

- id: oli.deployment_tx
name: Deployer Transaction
description: The transaction that deployed the contract.
type: bytea
creator: OLI
version: 1.0

- id: oli.deployer_address
name: Deployer Address
description: The address that deployed the contract.
type: bytea
creator: OLI
version: 1.0

- id: oli.owner_project
name: Owner Project
description: The project that owns the contract or eoa. Link to project registry https://github.com/opensource-observer/oss-directory.
type: string
value_set: https://github.com/opensource-observer/oss-directory
creator: OLI
version: 1.0

- id: oli.deployment_date
name: Deployment Date
description: The date the contract was deployed.
type: date
creator: OLI
version: 1.0

- id: oli.is_proxy
name: Is Proxy
description: Is the contract a proxy contract?
type: boolean
value_set: [true, false]
creator: OLI
version: 1.0

# - id: oli.bytecode
# name: Bytecode
Expand All @@ -70,22 +79,26 @@ tags:
type: string
value_set: [ERC20, ERC721, ERC777, ERC1155, ERC1400, ERC1404, ERC1594, ERC1643, ERC1644, ERC173, ERC1820, ERC223, ERC621, ERC677, ERC777, ERC827, ERC884, ERC918, ERC948, ERC965, ERC998, ERC1155, ERC1400, ERC1404, ERC1594, ERC1643, ERC1644, ERC173, ERC1820, ERC223, ERC621, ERC677, ERC777, ERC827, ERC884, ERC918, ERC948, ERC965, ERC998]
creator: OLI
version: 1.0

- id: oli.erc20_name
name: ERC20 Name
description: The name of the ERC20 token.
type: string
creator: OLI
version: 1.0

- id: oli.usage_category
name: Usage Category
description: The category of usage for the contract.
type: string
value_set: https://github.com/openlabelsinitiative/OLI/blob/main/valuesets/category_definitions.yml
creator: OLI
version: 1.0

- id: oli.version
name: Version
description: The release version of the dApp (i.e. 2 for Uniswap v2 contracts).
type: int
creator: OLI
version: 1.0
1 change: 1 addition & 0 deletions valuesets/category_definitions.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
version: 1.0
cefi:
main_category_name: CeFi
categories:
Expand Down

0 comments on commit db46a9d

Please sign in to comment.