Zephyr.toml Extensions: Indexes And Dashboard
Learn how to declare zephyr.toml extension to publish indexes and dashboards to the community.
Declaring an Index
[[indexes]]
name = "clateral"
title = "Blend ecosystem collateral indexes"
description = """
Index of the whole Blend ecosystem historical collateral actions (deposit,
withdraw) as well as total supply by action.
"""
instructions = """
Import the collateral table as follows in your Mercury program:
```rust
#[derive(DatabaseDerive, Clone)]
#[with_name("clateral")]
#[external("2")]
pub struct Collateral {
pub id: i64,
pub timestamp: u64,
pub ledger: u32,
pub pool: String,
pub asset: String,
pub clateral: i128,
pub delta: i128,
pub source: String,
}
```
"""
tags = ["blend", "defi", "collateral", "lending", "deposit"]
[[indexes]]
name = "borrowed"
title = "Blend ecosystem borrows indexes"
description = """
Index of the whole Blend ecosystem historical borrow actions (borrow,
repay) as well as total supply by action.
"""
instructions = """
Import the borrow table as follows in your Mercury program:
```rust
#[derive(DatabaseDerive, Clone)]
#[with_name("borrowed")]
#[external("2")]
pub struct Borrowed {
pub id: i64,
pub timestamp: u64,
pub ledger: u32,
pub pool: String,
pub asset: String,
pub borrowed: i128,
pub delta: i128,
pub source: String,
}
```
"""
tags = ["blend", "defi", "borrow"]Declaring the Dashboard
Last updated