Skip to content

Commit

Permalink
feat: add theta and nois to hasura metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
fibonacci998 committed Oct 3, 2023
1 parent 5224b80 commit 717e1ca
Show file tree
Hide file tree
Showing 87 changed files with 3,008 additions and 6 deletions.
42 changes: 36 additions & 6 deletions hasura/metadata/databases/databases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
max_connections: 50
retries: 1
use_prepared_statements: true
tables: "!include default/tables/tables.yaml"
tables: '!include default/tables/tables.yaml'
- name: auratestnet
kind: postgres
configuration:
Expand All @@ -26,8 +26,8 @@
namespace: auratestnet
type_names:
prefix: auratestnet_
tables: "!include auratestnet/tables/tables.yaml"
functions: "!include auratestnet/functions/functions.yaml"
tables: '!include auratestnet/tables/tables.yaml'
functions: '!include auratestnet/functions/functions.yaml'
- name: euphoria
kind: postgres
configuration:
Expand All @@ -42,7 +42,7 @@
namespace: euphoria
type_names:
prefix: euphoria_
tables: "!include euphoria/tables/tables.yaml"
tables: '!include euphoria/tables/tables.yaml'
- name: serenity
kind: postgres
configuration:
Expand All @@ -57,7 +57,7 @@
namespace: serenity
type_names:
prefix: serenity_
tables: "!include serenity/tables/tables.yaml"
tables: '!include serenity/tables/tables.yaml'
- name: xstaxy
kind: postgres
configuration:
Expand All @@ -72,4 +72,34 @@
namespace: xstaxy
type_names:
prefix: xstaxy_
tables: "!include xstaxy/tables/tables.yaml"
tables: '!include xstaxy/tables/tables.yaml'
- name: nois
kind: postgres
configuration:
connection_info:
database_url:
from_env: DATABASE_URL_NOIS
isolation_level: read-committed
use_prepared_statements: false
customization:
naming_convention: hasura-default
root_fields:
namespace: nois
type_names:
prefix: nois_
tables: '!include nois/tables/tables.yaml'
- name: theta
kind: postgres
configuration:
connection_info:
database_url:
from_env: DATABASE_URL_THETA
isolation_level: read-committed
use_prepared_statements: false
customization:
naming_convention: hasura-default
root_fields:
namespace: theta
type_names:
prefix: theta_
tables: '!include nois/tables/tables.yaml'
28 changes: 28 additions & 0 deletions hasura/metadata/databases/nois/tables/public_account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
table:
name: account
schema: public
object_relationships:
- name: account_vesting
using:
foreign_key_constraint_on:
column: account_id
table:
name: account_vesting
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- address
- type
- account_number
- id
- sequence
- balances
- pubkey
- spendable_balances
- created_at
- updated_at
filter: {}
limit: 100
allow_aggregations: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
table:
name: account_statistics
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- amount_received
- amount_sent
- gas_used
- tx_sent
- address
- id
- date
filter: {}
limit: 100
allow_aggregations: true
23 changes: 23 additions & 0 deletions hasura/metadata/databases/nois/tables/public_account_vesting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
table:
name: account_vesting
schema: public
object_relationships:
- name: account
using:
foreign_key_constraint_on: account_id
select_permissions:
- role: internal_service
permission:
columns:
- account_id
- end_time
- id
- start_time
- delegated_free
- delegated_vesting
- original_vesting
- created_at
- updated_at
filter: {}
limit: 100
allow_aggregations: true
63 changes: 63 additions & 0 deletions hasura/metadata/databases/nois/tables/public_block.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
table:
name: block
schema: public
object_relationships:
- name: validator
using:
manual_configuration:
column_mapping:
proposer_address: consensus_hex_address
insertion_order: null
remote_table:
name: validator
schema: public
array_relationships:
- name: block_signatures
using:
foreign_key_constraint_on:
column: height
table:
name: block_signature
schema: public
- name: event_attributes
using:
foreign_key_constraint_on:
column: block_height
table:
name: event_attribute
schema: public
- name: events
using:
foreign_key_constraint_on:
column: block_height
table:
name: event
schema: public
- name: transactions
using:
foreign_key_constraint_on:
column: height
table:
name: transaction
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- height
- hash
- time
- proposer_address
- data
filter: {}
limit: 100
- role: public
permission:
columns:
- height
- hash
- time
- proposer_address
- data
filter: {}
limit: 100
24 changes: 24 additions & 0 deletions hasura/metadata/databases/nois/tables/public_block_checkpoint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
table:
name: block_checkpoint
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- job_name
- height
- id
- created_at
- updated_at
filter: {}
limit: 100
- role: public
permission:
columns:
- job_name
- height
- id
- created_at
- updated_at
filter: {}
limit: 100
39 changes: 39 additions & 0 deletions hasura/metadata/databases/nois/tables/public_block_signature.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
table:
name: block_signature
schema: public
object_relationships:
- name: block
using:
foreign_key_constraint_on: height
- name: validator
using:
manual_configuration:
column_mapping:
validator_address: consensus_hex_address
insertion_order: null
remote_table:
name: validator
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- validator_address
- block_id_flag
- height
- id
- signature
- timestamp
filter: {}
limit: 100
- role: public
permission:
columns:
- validator_address
- block_id_flag
- height
- id
- signature
- timestamp
filter: {}
limit: 100
3 changes: 3 additions & 0 deletions hasura/metadata/databases/nois/tables/public_checkpoint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
table:
name: checkpoint
schema: public
50 changes: 50 additions & 0 deletions hasura/metadata/databases/nois/tables/public_code.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
table:
name: code
schema: public
array_relationships:
- name: code_id_verifications
using:
foreign_key_constraint_on:
column: code_id
table:
name: code_id_verification
schema: public
- name: smart_contracts
using:
foreign_key_constraint_on:
column: code_id
table:
name: smart_contract
schema: public
select_permissions:
- role: internal_service
permission:
columns:
- creator
- data_hash
- status
- store_hash
- type
- code_id
- store_height
- instantiate_permission
- created_at
- updated_at
filter: {}
limit: 100
allow_aggregations: true
- role: public
permission:
columns:
- creator
- data_hash
- status
- store_hash
- type
- code_id
- store_height
- instantiate_permission
- created_at
- updated_at
filter: {}
limit: 100
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
table:
name: code_id_verification
schema: public
object_relationships:
- name: code
using:
foreign_key_constraint_on: code_id
select_permissions:
- role: internal_service
permission:
columns:
- compiler_version
- data_hash
- github_url
- s3_location
- verification_status
- code_id
- id
- verify_step
- execute_msg_schema
- instantiate_msg_schema
- query_msg_schema
- created_at
- updated_at
- verified_at
filter: {}
limit: 100
25 changes: 25 additions & 0 deletions hasura/metadata/databases/nois/tables/public_cw20_activity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
table:
name: cw20_activity
schema: public
object_relationships:
- name: cw20_contract
using:
foreign_key_constraint_on: cw20_contract_id
- name: smart_contract_event
using:
foreign_key_constraint_on: smart_contract_event_id
select_permissions:
- role: internal_service
permission:
columns:
- action
- from
- sender
- to
- cw20_contract_id
- height
- id
- smart_contract_event_id
- amount
filter: {}
limit: 100
Loading

0 comments on commit 717e1ca

Please sign in to comment.