Skip to content

Commit

Permalink
feat: update hasura metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Oct 28, 2024
1 parent 1c22b97 commit de89044
Show file tree
Hide file tree
Showing 30 changed files with 932 additions and 0 deletions.
15 changes: 15 additions & 0 deletions hasura/metadata/databases/databases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,21 @@
type_names:
prefix: euphoria_
tables: '!include euphoria/tables/tables.yaml'
- name: odyssey
kind: postgres
configuration:
connection_info:
database_url:
from_env: DATABASE_URL_ODYSSEY_TESTNET
isolation_level: read-committed
use_prepared_statements: false
customization:
naming_convention: hasura-default
root_fields:
namespace: odyssey
type_names:
prefix: odyssey_
tables: '!include odyssey/tables/tables.yaml'
- name: serenity
kind: postgres
configuration:
Expand Down
29 changes: 29 additions & 0 deletions hasura/metadata/databases/odessey/tables/public_account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
table:
name: account
schema: public
array_relationships:
- name: account_balances
using:
foreign_key_constraint_on:
column: account_id
table:
name: account_balance
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- address
- code_hash
- evm_address
- type
- account_number
- id
- sequence
- balances
- pubkey
- spendable_balances
- created_at
- updated_at
filter: {}
limit: 100
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
table:
name: account_balance
schema: public
object_relationships:
- name: account
using:
foreign_key_constraint_on: account_id
select_permissions:
- role: internal_service
permission:
columns:
- id
- account_id
- denom
- amount
- base_denom
- created_at
- last_updated_height
- type
filter: {}
limit: 100
allow_aggregations: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
table:
name: account_statistics
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- address
- id
- tx_sent
- amount_received
- amount_sent
- gas_used
- date
filter: {}
limit: 100
18 changes: 18 additions & 0 deletions hasura/metadata/databases/odessey/tables/public_asset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
table:
name: asset
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- id
- denom
- decimal
- name
- type
- price
- total_supply
- origin_id
- updated_at
filter: {}
limit: 100
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
table:
name: block_checkpoint
schema: public
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
table:
name: daily_statistics
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- id
- daily_txs
- daily_active_addresses
- unique_addresses
- date
filter: {}
limit: 365
17 changes: 17 additions & 0 deletions hasura/metadata/databases/odessey/tables/public_delegator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
table:
name: delegator
schema: public
object_relationships:
- name: validator
using:
foreign_key_constraint_on: validator_id
select_permissions:
- role: internal_service
permission:
columns:
- delegator_address
- id
- validator_id
- amount
filter: {}
limit: 100
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
table:
name: erc20_activity
schema: public
object_relationships:
- name: erc20_contract
using:
foreign_key_constraint_on: erc20_contract_address
- name: evm_transaction
using:
manual_configuration:
column_mapping:
evm_tx_id: id
insertion_order: null
remote_table:
name: evm_transaction
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- action
- amount
- erc20_contract_address
- evm_event_id
- evm_tx_id
- from
- height
- id
- sender
- to
- tx_hash
filter: {}
limit: 100
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
table:
name: erc20_contract
schema: public
object_relationships:
- name: evm_smart_contract
using:
manual_configuration:
column_mapping:
evm_smart_contract_id: id
insertion_order: null
remote_table:
name: evm_smart_contract
schema: public
array_relationships:
- name: erc20_activities
using:
foreign_key_constraint_on:
column: erc20_contract_address
table:
name: erc20_activity
schema: public
- name: evm_internal_transaction_from
using:
manual_configuration:
column_mapping:
address: from
insertion_order: null
remote_table:
name: evm_internal_transaction
schema: public
- name: evm_internal_transaction_to
using:
manual_configuration:
column_mapping:
address: to
insertion_order: null
remote_table:
name: evm_internal_transaction
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- address
- decimal
- evm_smart_contract_id
- id
- last_updated_height
- name
- symbol
- total_actions
- total_holder
- total_supply
- track
filter: {}
limit: 100
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
table:
name: erc721_activity
schema: public
object_relationships:
- name: erc721_contract
using:
foreign_key_constraint_on: erc721_contract_address
- name: erc721_token
using:
foreign_key_constraint_on: erc721_token_id
- name: evm_transaction
using:
manual_configuration:
column_mapping:
evm_tx_id: id
insertion_order: null
remote_table:
name: evm_transaction
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- id
- tx_hash
- erc721_contract_address
- evm_event_id
- action
- sender
- from
- to
- height
- erc721_token_id
- evm_tx_id
filter: {}
limit: 100
allow_aggregations: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
table:
name: erc721_contract
schema: public
object_relationships:
- name: erc721_stat
using:
foreign_key_constraint_on:
column: erc721_contract_id
table:
name: erc721_stats
schema: public
- name: evm_smart_contract
using:
manual_configuration:
column_mapping:
evm_smart_contract_id: id
insertion_order: null
remote_table:
name: evm_smart_contract
schema: public
array_relationships:
- name: erc721_activities
using:
foreign_key_constraint_on:
column: erc721_contract_address
table:
name: erc721_activity
schema: public
- name: erc721_tokens
using:
foreign_key_constraint_on:
column: erc721_contract_address
table:
name: erc721_token
schema: public
- name: evm_internal_transaction_from
using:
manual_configuration:
column_mapping:
address: from
insertion_order: null
remote_table:
name: evm_internal_transaction
schema: public
- name: evm_internal_transaction_to
using:
manual_configuration:
column_mapping:
address: to
insertion_order: null
remote_table:
name: evm_internal_transaction
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- address
- evm_smart_contract_id
- id
- last_updated_height
- name
- symbol
- total_actions
- total_supply
- track
filter: {}
limit: 100
allow_aggregations: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
table:
name: erc721_holder_statistic
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- count
- owner
- erc721_contract_address
- id
- last_updated_height
filter: {}
limit: 100
allow_aggregations: true
19 changes: 19 additions & 0 deletions hasura/metadata/databases/odessey/tables/public_erc721_stats.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
table:
name: erc721_stats
schema: public
object_relationships:
- name: erc721_contract
using:
foreign_key_constraint_on: erc721_contract_id
select_permissions:
- role: internal_service
permission:
columns:
- id
- erc721_contract_id
- total_activity
- transfer_24h
- updated_at
filter: {}
limit: 100
allow_aggregations: true
Loading

0 comments on commit de89044

Please sign in to comment.