From c2c6986ceea64241de663ce32f232d8ffc2ab365 Mon Sep 17 00:00:00 2001 From: Sourabh Niyogi Date: Mon, 29 Jan 2024 17:45:28 -0800 Subject: [PATCH] Substrate Raw+Decoded Stub Docs --- .../data-tables/decoded/substrate/balances.md | 33 +++++++++++++ docs/data-tables/decoded/substrate/blocks.md | 23 +++++++++ docs/data-tables/decoded/substrate/calls.md | 36 ++++++++++++++ docs/data-tables/decoded/substrate/events.md | 16 ++++++ .../decoded/substrate/extrinsics.md | 24 +++++++++ docs/data-tables/decoded/substrate/index.md | 36 ++++++++++++++ .../data-tables/decoded/substrate/stakings.md | 36 ++++++++++++++ docs/data-tables/decoded/substrate/traces.md | 49 +++++++++++++++++++ .../decoded/substrate/transfers.md | 27 ++++++++++ docs/data-tables/raw/substrate/index.md | 6 +++ 10 files changed, 286 insertions(+) create mode 100644 docs/data-tables/decoded/substrate/balances.md create mode 100644 docs/data-tables/decoded/substrate/blocks.md create mode 100644 docs/data-tables/decoded/substrate/calls.md create mode 100644 docs/data-tables/decoded/substrate/events.md create mode 100644 docs/data-tables/decoded/substrate/extrinsics.md create mode 100644 docs/data-tables/decoded/substrate/index.md create mode 100644 docs/data-tables/decoded/substrate/stakings.md create mode 100644 docs/data-tables/decoded/substrate/traces.md create mode 100644 docs/data-tables/decoded/substrate/transfers.md create mode 100644 docs/data-tables/raw/substrate/index.md diff --git a/docs/data-tables/decoded/substrate/balances.md b/docs/data-tables/decoded/substrate/balances.md new file mode 100644 index 00000000..bee45e65 --- /dev/null +++ b/docs/data-tables/decoded/substrate/balances.md @@ -0,0 +1,33 @@ +# Balances + +## **{chain}.balances** + +This table contains historical balances information: + +| **Column name** | **Type** | **Description** | +| --------------------- | ------------------------------- | -------------------------------------------------------- | +| ts | timestamp without timezone | Timestamp of balance | +| symbol | string | Token Symbol | +| address_ss58 | string | SS58 Address of Asset holder | +| address_pubkey | binary | Pubkey of holder | +| id | string | Chain ID (e.g. "polkadot") | +| chain_name | string | Chain Name (e.g. "KILT Spirit") | +| asset | string | | +| para_id | long | | +| free | double | | +| free_usd | double | | +| reserved | double | | +| reserved_usd | double | | +| misc_frozen | double | | +| misc_frozen_usd | double | | +| frozen | double | | +| frozen_usd | double | | +| price_usd | double | | +| nonce | long | | +| free_raw | string | | +| reserved_raw | string | | +| misc_frozen_raw | string | | +| frozen_raw | string | | +| flags_raw | string | | + +Balances are taken at the end of each day. diff --git a/docs/data-tables/decoded/substrate/blocks.md b/docs/data-tables/decoded/substrate/blocks.md new file mode 100644 index 00000000..5bd80ba7 --- /dev/null +++ b/docs/data-tables/decoded/substrate/blocks.md @@ -0,0 +1,23 @@ +# Blocks + +## **{chain}.blocks** + +This table contains historical blocks information: + +| **Column name** | **Type** | **Description** | +| --------------------- | ------------------------------- | -------------------------------------------------------- | +| block_time | timestamp | | +| number | long | | +| spec_version | long | | +| relay_block_number | long | | +| hash | binary | | +| parent_hash | binary | | +| state_root | binary | | +| extrinsics_root | binary | | +| author_ss58 | string | | +| author_pub_key | binary | | +| relay_state_root | binary | | +| extrinsic_count | long | | +| event_count | long | | +| transfer_count | long | | +| trace_count | long | | diff --git a/docs/data-tables/decoded/substrate/calls.md b/docs/data-tables/decoded/substrate/calls.md new file mode 100644 index 00000000..bbc8a8cb --- /dev/null +++ b/docs/data-tables/decoded/substrate/calls.md @@ -0,0 +1,36 @@ +# Calls + +## **{chain}.calls** + +This table contains historical calls information: + + + +| **Column name** | **Type** | **Description** | +| --------------------- | ------------------------------- | -------------------------------------------------------- | +| block_number | bigint | | +| block_time | timestamp | | +| extrinsic_id | string | | +| relay_chain | string | | +| para_id | bigint | | +| id | string | | +| block_hash | binary | | +| extrinsic_hash | binary | | +| extrinsic_section | string | | +| extrinsic_method | string | | +| call_id | string | | +| call_index | binary | | +| call_args | string | | +| call_args_def | string | | +| root | boolean | | +| leaf | boolean | | +| fee | double | | +| fee_usd | double | | +| weight | bigint | | +| signed | boolean | | +| signer_ss58 | string | | +| signer_pub_key | binary | | +| lifetime | string | | + + +Calls are only included if the extrinsic is _successful_. diff --git a/docs/data-tables/decoded/substrate/events.md b/docs/data-tables/decoded/substrate/events.md new file mode 100644 index 00000000..cd7d07cd --- /dev/null +++ b/docs/data-tables/decoded/substrate/events.md @@ -0,0 +1,16 @@ +# Events + +## **{chain}.events** + +This table contains historical events information: + +| **Column name** | **Type** | **Description** | +| --------------------- | ------------------------------- | -------------------------------------------------------- | +| block_time | timestamp | +| block_number | bigint | +| extrinsic_id | string | +| event_id | string | +| data | string | +| extrinsic_hash | binary | +| block_hash | binary | +| data_decoded | string | diff --git a/docs/data-tables/decoded/substrate/extrinsics.md b/docs/data-tables/decoded/substrate/extrinsics.md new file mode 100644 index 00000000..2059199c --- /dev/null +++ b/docs/data-tables/decoded/substrate/extrinsics.md @@ -0,0 +1,24 @@ +# Extrinsics + +## **{chain}.extrinsics** + +This table contains historical extrinsics information: + +| **Column name** | **Type** | **Description** | +| --------------------- | ------------------------------- | -------------------------------------------------------- | +| block_time | timestamp | | +| block_number | long | | +| extrinsic_id | string | | +| hash | binary | | +| block_hash | binary | | +| lifetime | string | | +| params | string | | +| fee | double | | +| weight | long | | +| signed | boolean | | +| signer_ss58 | string | | +| signer_pub_key | binary | | +| fee_usd | double | | + + +Extrinsics are included if the extrinsic _successful_ or _failed_. diff --git a/docs/data-tables/decoded/substrate/index.md b/docs/data-tables/decoded/substrate/index.md new file mode 100644 index 00000000..84a1513c --- /dev/null +++ b/docs/data-tables/decoded/substrate/index.md @@ -0,0 +1,36 @@ +--- +title: Substrate Tables +description: Third-party Indexer Colorful Notion indexes Polkadot and Kusama ecosystem data into 6 core Substrate tables. +--- + +
+ +- #### Substrate tables + + --- + + Across all Substrate chains (at present, Polkadot, Kusama, their system chains and parachains), the following tables are available: + + [→ Blocks tables](blocks.md) + + [→ Extrinsics tables](extrinsics.md) + + [→ Calls tables](calls.md) + + [→ Transfers tables](blocks.md) + + [→ Blocks tables](blocks.md) + + [→ Balances tables](balances.md) + +- #### Special Tables + + --- + + The following tables are only available for Polkadot and Kusama: + + [→ Stakings](stakings.md) + + [→ Traces tables](traces.md) + +
diff --git a/docs/data-tables/decoded/substrate/stakings.md b/docs/data-tables/decoded/substrate/stakings.md new file mode 100644 index 00000000..b80b8e79 --- /dev/null +++ b/docs/data-tables/decoded/substrate/stakings.md @@ -0,0 +1,36 @@ +# Stakings + +## **{chain}.stakings** + +This table contains historical staking information: + + +| **Column name** | **Type** | **Description** | +| --------------------- | ------------------------------- | -------------------------------------------------------- | +| block_number | long | | +| ts | timestamp | | +| era | long | | +| address_ss58 | string | | +| address_pubkey | binary | | +| block_hash | binary | | +| submitted_in | long | | +| suppressed | boolean | | +| validator_total | double | | +| validator_own | double | | +| validator_commission | double | | +| validator_reward_shares | double | | +| validator_reward_points | long | | +| validator_staking_rewards | double | | +| total_staked | double | | +| total_reward_points | long | | +| total_staking_rewards | double | | +| nominationpools_id | long | | +| nominationpools_total | double | | +| nominationpools_member_cnt | long | | +| nominationpools_commission | double | | +| nominationpools_rewardpools | string | | +| member_bonded | double | | +| member_unbonded | double | | +| member_share | double | | +| targets | array | | +| pv | string | | diff --git a/docs/data-tables/decoded/substrate/traces.md b/docs/data-tables/decoded/substrate/traces.md new file mode 100644 index 00000000..41cff27c --- /dev/null +++ b/docs/data-tables/decoded/substrate/traces.md @@ -0,0 +1,49 @@ +# Traces + +## **{chain}.traces** + +This table contains historical traces information: + +| **Column name** | **Type** | **Description** | +| --------------------- | ------------------------------- | -------------------------------------------------------- | +| ts | timestamp | | +| block_number | long | | +| trace_id | string | | +| extrinsic_id | string | | +| relay_chain | string | | +| para_id | string | | +| id | string | | +| chain_name | string | | +| block_hash | binary | | +| k | binary | | +| v | binary | | +| pk_extra | string | | +| pv | string | | +| symbol | string | | +| decimals | long | | +| asset | string | | +| asset_name | string | | +| asset_type | string | | +| xcm_interior_key | string | | +| address_ss58 | string | | +| address_pubkey | binary | | +| flags | string | | +| free | double | | +| free_usd | double | | +| free_raw | string | | +| reserved | double | | +| reserved_raw | string | | +| reserved_usd | double | | +| frozen | double | | +| frozen_raw | string | | +| frozen_usd | double | | +| misc_frozen | double | | +| misc_frozen_raw | string | | +| misc_frozen_usd | double | | +| fee_frozen | double | | +| fee_frozen_raw | string | | +| fee_frozen_usd | double | | +| total_issuance | double | | +| total_issuance_usd | double | | +| total_issuance_raw | string | | +| price_usd | double | | diff --git a/docs/data-tables/decoded/substrate/transfers.md b/docs/data-tables/decoded/substrate/transfers.md new file mode 100644 index 00000000..4aeee94c --- /dev/null +++ b/docs/data-tables/decoded/substrate/transfers.md @@ -0,0 +1,27 @@ +# Transfers + +## **{chain}.transfers** + +This table contains historical transfers + +| **Column name** | **Type** | **Description** | +| --------------------- | ------------------------------- | -------------------------------------------------------- | +| block_time | timestamp | | +| block_number | long | | +| event_id | string | | +| extrinsic_id | string | | +| section | string | | +| method | string | | +| extrinsic_hash | binary | | +| block_hash | binary | | +| from_ss58 | string | | +| from_pub_key | binary | | +| to_ss58 | string | | +| to_pub_key | binary | | +| asset | string | | +| price_usd | double | | +| amount_usd | double | | +| symbol | string | | +| decimals | long | | +| amount | double | | +| raw_amount | decimal(38,9) | | diff --git a/docs/data-tables/raw/substrate/index.md b/docs/data-tables/raw/substrate/index.md new file mode 100644 index 00000000..012d38ad --- /dev/null +++ b/docs/data-tables/raw/substrate/index.md @@ -0,0 +1,6 @@ +--- +title: Raw Tables (Substrate) +description: Instead of working with the raw Substrate tables, decoded data. +--- + +See [Decoded Substrate Tables](../../decoded/substrate/index.md)