Skip to content

Commit

Permalink
add hasura schemas for wasm and nft tables
Browse files Browse the repository at this point in the history
  • Loading branch information
slandymani committed Oct 10, 2024
1 parent a4f7702 commit c085ba0
Show file tree
Hide file tree
Showing 7 changed files with 149 additions and 0 deletions.
27 changes: 27 additions & 0 deletions hasura/metadata/databases/callisto/tables/public_nft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
table:
name: nft
schema: public
object_relationships:
- name: nft_class
using:
manual_configuration:
column_mapping:
class_id: id
insertion_order: null
remote_table:
name: nft_class
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- id
- class_id
- uri
- uri_hash
- data
- owner
- metadata
- height
filter: {}
role: anonymous
27 changes: 27 additions & 0 deletions hasura/metadata/databases/callisto/tables/public_nft_class.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
table:
name: nft_class
schema: public
array_relationships:
- name: nfts
using:
foreign_key_constraint_on:
column: class_id
table:
name: nft
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- id
- name
- symbol
- description
- uri
- uri_hash
- data
- owner
- metadata
- height
filter: {}
role: anonymous
22 changes: 22 additions & 0 deletions hasura/metadata/databases/callisto/tables/public_wasm_code.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
table:
name: wasm_code
schema: public
array_relationships:
- name: wasm_contracts
using:
foreign_key_constraint_on:
column: code_id
table:
name: wasm_contract
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- sender
- byte_code
- instantiate_permission
- code_id
- height
filter: {}
role: anonymous
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
table:
name: wasm_contract
schema: public
object_relationships:
- name: wasm_code
using:
foreign_key_constraint_on: code_id
array_relationships:
- name: wasm_execute_contracts
using:
foreign_key_constraint_on:
column: contract_address
table:
name: wasm_execute_contract
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- sender
- creator
- admin
- code_id
- label
- raw_contract_message
- funds
- contract_address
- data
- instantiated_at
- contract_info_extension
- contract_states
- height
filter: {}
role: anonymous
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
table:
name: wasm_execute_contract
schema: public
object_relationships:
- name: wasm_contract
using:
foreign_key_constraint_on: contract_address
select_permissions:
- permission:
allow_aggregations: true
columns:
- sender
- contract_address
- raw_contract_message
- funds
- data
- executed_at
- height
filter: {}
role: anonymous
13 changes: 13 additions & 0 deletions hasura/metadata/databases/callisto/tables/public_wasm_params.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
table:
name: wasm_params
schema: public
select_permissions:
- permission:
allow_aggregations: true
columns:
- one_row_id
- code_upload_access
- instantiate_default_permission
- height
filter: {}
role: anonymous
6 changes: 6 additions & 0 deletions hasura/metadata/databases/callisto/tables/tables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
- "!include public_monthly_avg_block_time.yaml"
- "!include public_monthly_request_counts.yaml"
- "!include public_monthly_transaction_volume.yaml"
- "!include public_nft.yaml"
- "!include public_nft_class.yaml"
- "!include public_oracle_params.yaml"
- "!include public_pre_commit.yaml"
- "!include public_proposal.yaml"
Expand Down Expand Up @@ -60,3 +62,7 @@
- "!include public_average_block_fee.yaml"
- "!include public_treasury_pool.yaml"
- "!include public_request_data_source.yaml"
- "!include public_wasm_code.yaml"
- "!include public_wasm_contract.yaml"
- "!include public_wasm_execute_contract.yaml"
- "!include public_wasm_params.yaml"

0 comments on commit c085ba0

Please sign in to comment.