Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Define a database model #3

Closed
Uxio0 opened this issue Nov 11, 2024 · 1 comment
Closed

Define a database model #3

Uxio0 opened this issue Nov 11, 2024 · 1 comment
Assignees

Comments

@Uxio0
Copy link
Member

Uxio0 commented Nov 11, 2024

We must define the tables required to hold the data

@moisses89
Copy link
Member

moisses89 commented Nov 22, 2024

Proposed model:

erDiagram
    ABI ||--o{ CONTRACT : "has"
    CHAIN ||--o{ CONTRACT : "has"
    PROJECT ||--o{ CONTRACT  : "has"
    SOURCE ||--o{ ABI  : "has"
    ABI {
        int id PK
        string description
        int relevance
        string abi_hash
        json abi
        int source_id FK
    }
    CONTRACT {
        string address PK
        int chain_id PK, FK
        int contract_abi FK
        int project_id FK
        string name
        string display_name
        boolean trusted_for_delegate
        boolean proxy
        int fetch_retries
    }
    CHAIN {
        int id PK
        string name
    }
    PROJECT {
		    int id PK
		    string description
		    string logo_file
    }
    SOURCE {
		    int id PK
		    string name
		    string url
    }
    
Loading

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants