Skip to content

format json #56

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

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
291 changes: 156 additions & 135 deletions schemas/automated-liquidity-management/schema.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
{
"schema": "Automated Liquidity Management",
"description": "Standard table definitions for automated liquidity management protocol.",
"protocolCategory": ["Automated Liquidity Management"],
"protocolCategory": [
"Automated Liquidity Management"
],
"version": "1.0.0-alpha",
"tables": [
{
"label": "Pools",
"tableName": "automated_liquidity_pools",
"aggregation": "none",
"uniqueKey": ["pool_address"],
"uniqueKey": [
"pool_address"
],
"description": "List of pools in the protocol.",
"properties": {
"chain_id": {
Expand Down Expand Up @@ -49,7 +53,12 @@
"label": "Position Snapshot",
"tableName": "automated_liquidity_depositors",
"aggregation": "daily",
"uniqueKey": ["user_address", "liquidity_pool_address", "block_date", "token_index"],
"uniqueKey": [
"user_address",
"liquidity_pool_address",
"block_date",
"token_index"
],
"description": "Snapshot of the pool users.",
"properties": {
"timestamp": {
Expand Down Expand Up @@ -102,7 +111,10 @@
"label": "Pool Snapshot",
"tableName": "automated_liquidity_pool_metrics",
"aggregation": "daily",
"uniqueKey": ["pool_address", "block_date"],
"uniqueKey": [
"pool_address",
"block_date"
],
"description": "TVL, fees, and incentives data at the pool level.",
"properties": {
"timestamp": {
Expand Down Expand Up @@ -151,152 +163,161 @@
"label": "ERC-20 LP Token Transfer Events",
"tableName": "automated_liquidity_lp_transfer_events",
"aggregation": "transaction",
"uniqueKey": ["transaction_hash", "log_index"],
"uniqueKey": [
"transaction_hash",
"log_index"
],
"description": "All LP Token transfer events",
"properties": {
"timestamp": {
"description": "The timestamp of the transaction.",
"type": "timestamp"
},
"chain_id": {
"description": "The standard id of the chain.",
"type": "int"
},
"block_number": {
"description": "The block number of the trade.",
"type": "bigint"
},
"log_index": {
"description": "The event log. For transactions that don't emit event, create arbitrary index starting from 0.",
"type": "bigint"
},
"transaction_hash": {
"description": "The hash of the transaction.",
"type": "string"
},
"from_address": {
"description": "The from address of the event (ie, the from field in a transfer).",
"type": "string"
"timestamp": {
"description": "The timestamp of the transaction.",
"type": "timestamp"
},
"chain_id": {
"description": "The standard id of the chain.",
"type": "int"
},
"block_number": {
"description": "The block number of the trade.",
"type": "bigint"
},
"log_index": {
"description": "The event log. For transactions that don't emit event, create arbitrary index starting from 0.",
"type": "bigint"
},
"transaction_hash": {
"description": "The hash of the transaction.",
"type": "string"
},
"from_address": {
"description": "The from address of the event (ie, the from field in a transfer).",
"type": "string"
},
"to_address": {
"description": "The to address of the event (ie, the to field in a transfer).",
"type": "string"
},
"pool_address": {
"description": "The contract address of the pool LP token.",
"type": "string"
},
"amount": {
"description": "The amount of token transacted, decimal normalized.",
"type": "double"
},
"event_type": {
"description": "The type of event, corresponds to the action taken by the user (ie, deposit, withdrawal).",
"type": "string"
}
"pool_address": {
"description": "The contract address of the pool LP token.",
"type": "string"
},
"amount": {
"description": "The amount of token transacted, decimal normalized.",
"type": "double"
},
"event_type": {
"description": "The type of event, corresponds to the action taken by the user (ie, deposit, withdrawal).",
"type": "string"
}
}
},
},
{
"label": "Events",
"tableName": "automated_liquidity_events",
"aggregation": "transaction",
"uniqueKey": ["transaction_hash", "log_index"],
"uniqueKey": [
"transaction_hash",
"log_index"
],
"description": "All user events (ie, Deposit, Withdrawal)",
"properties": {
"timestamp": {
"description": "The timestamp of the transaction.",
"type": "timestamp"
},
"chain_id": {
"description": "The standard id of the chain.",
"type": "int"
},
"block_number": {
"description": "The block number of the trade.",
"type": "bigint"
},
"log_index": {
"description": "The event log. For transactions that don't emit event, create arbitrary index starting from 0.",
"type": "bigint"
},
"transaction_hash": {
"description": "The hash of the transaction.",
"type": "string"
},
"user_address": {
"description": "The address that initiates the transaction (ie, the transaction signer).",
"type": "string"
},
"pool_address": {
"description": "The smart contract address of the pool.",
"type": "string"
},
"underlying_token_address": {
"description": "The contract address of the underlying token or deposited token.",
"type": "string"
},
"amount": {
"description": "The amount of token transacted, decimal normalized.",
"type": "double"
},
"amount_usd": {
"description": "The amount of token transacted, in USD.",
"type": "double"
},
"event_type": {
"description": "The type of event, corresponds to the action taken by the user (ie, deposit, withdrawal).",
"type": "string"
}
"timestamp": {
"description": "The timestamp of the transaction.",
"type": "timestamp"
},
"chain_id": {
"description": "The standard id of the chain.",
"type": "int"
},
"block_number": {
"description": "The block number of the trade.",
"type": "bigint"
},
"log_index": {
"description": "The event log. For transactions that don't emit event, create arbitrary index starting from 0.",
"type": "bigint"
},
"transaction_hash": {
"description": "The hash of the transaction.",
"type": "string"
},
"user_address": {
"description": "The address that initiates the transaction (ie, the transaction signer).",
"type": "string"
},
"pool_address": {
"description": "The smart contract address of the pool.",
"type": "string"
},
"underlying_token_address": {
"description": "The contract address of the underlying token or deposited token.",
"type": "string"
},
"amount": {
"description": "The amount of token transacted, decimal normalized.",
"type": "double"
},
"amount_usd": {
"description": "The amount of token transacted, in USD.",
"type": "double"
},
"event_type": {
"description": "The type of event, corresponds to the action taken by the user (ie, deposit, withdrawal).",
"type": "string"
}
}
},
{
"label": "Incentive Claim Data",
"tableName": "automated_liquidity_incentive_claim",
"aggregation": "transaction",
"uniqueKey": ["transaction_hash", "log_index"],
"description": "Transactional data on user level incentives claimed data.",
"properties": {
"timestamp": {
"description": "The timestamp of the claim.",
"type": "timestamp"
},
"chain_id": {
"description": "The standard chain id.",
"type": "int"
},
"transaction_hash": {
"description": "The hash of the transaction.",
"type": "string"
},
"log_index": {
"description": "The event log. For transactions that don't emit event, create arbitrary index starting from 0.",
"type": "bigint"
},
"transaction_signer": {
"description": "The address of the account that signed the transaction.",
"type": "string"
},
"user_address": {
"description": "The address of the user who claimed the incentives (could be different from the transaction_signer).",
"type": "string"
},
"claimed_token_address": {
"description": "The smart contract address of the claimed token.",
"type": "string"
},
"amount": {
"description": "The amount of the token claimed, decimal normalized.",
"type": "double"
},
"amount_usd": {
"description": "The amount of claimed tokens in USD.",
"type": "double"
},
"other_incentive_usd": {
"description": "(Optional) Any incentives outside of the claimed token, in this transaction, summed up in USD terms.",
"type": "double"
},
{
"label": "Incentive Claim Data",
"tableName": "automated_liquidity_incentive_claim",
"aggregation": "transaction",
"uniqueKey": [
"transaction_hash",
"log_index"
],
"description": "Transactional data on user level incentives claimed data.",
"properties": {
"timestamp": {
"description": "The timestamp of the claim.",
"type": "timestamp"
},
"chain_id": {
"description": "The standard chain id.",
"type": "int"
},
"transaction_hash": {
"description": "The hash of the transaction.",
"type": "string"
},
"log_index": {
"description": "The event log. For transactions that don't emit event, create arbitrary index starting from 0.",
"type": "bigint"
},
"transaction_signer": {
"description": "The address of the account that signed the transaction.",
"type": "string"
},
"user_address": {
"description": "The address of the user who claimed the incentives (could be different from the transaction_signer).",
"type": "string"
},
"claimed_token_address": {
"description": "The smart contract address of the claimed token.",
"type": "string"
},
"amount": {
"description": "The amount of the token claimed, decimal normalized.",
"type": "double"
},
"amount_usd": {
"description": "The amount of claimed tokens in USD.",
"type": "double"
},
"other_incentive_usd": {
"description": "(Optional) Any incentives outside of the claimed token, in this transaction, summed up in USD terms.",
"type": "double"
}
}
}
}
]
}
}
22 changes: 17 additions & 5 deletions schemas/bridge-aggregator/schema.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"schema": "Bridge Aggregator",
"description": "Standard table definitions for bridge aggregator protocols that route users across different bridge protocols.",
"protocolCategory": ["Bridge Aggregator"],
"protocolCategory": [
"Bridge Aggregator"
],
"version": "1.0.0-alpha",
"tables": [
{
"label": "Tokens",
"tableName": "bridge_aggregator_tokens",
"aggregation": "none",
"uniqueKey": ["chain_id", "token_address"],
"uniqueKey": [
"chain_id",
"token_address"
],
"description": "List of tokens supported by the bridge aggregator.",
"properties": {
"chain_id": {
Expand Down Expand Up @@ -37,7 +42,11 @@
"label": "Token Snapshot",
"tableName": "bridge_aggregator_token_metrics",
"aggregation": "daily",
"uniqueKey": ["chain_id", "token_address", "block_date"],
"uniqueKey": [
"chain_id",
"token_address",
"block_date"
],
"description": "Snapshot of token-level metrics in the aggregator.",
"properties": {
"timestamp": {
Expand Down Expand Up @@ -86,7 +95,10 @@
"label": "Bridge Transactions",
"tableName": "bridge_aggregator_transactions",
"aggregation": "transaction",
"uniqueKey": ["source_transaction_hash", "destination_transaction_hash"],
"uniqueKey": [
"source_transaction_hash",
"destination_transaction_hash"
],
"description": "Transaction-level data for bridge aggregator operations.",
"properties": {
"timestamp": {
Expand Down Expand Up @@ -140,4 +152,4 @@
}
}
]
}
}
Loading
Loading