# \[Help\] Index canister for mutliple ledger

**URL:** https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848
**Category:** Programs & Applications
**Created:** [October 4, 2024, 6:16pm UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848 "2024-10-04T18:16:07Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![baolongt](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@baolongt](https://forum.dfinity.org/u/baolongt)
#### Post date: [October 4, 2024, 6:16pm UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848/1 "2024-10-04T18:16:07Z")

</div>

I read [this](https://internetcomputer.org/docs/current/developer-docs/defi/tokens/indexes)  
and wonder is there anyone working on one giant index canister for multiple token canister?

---

<div class="post-metadata">

### Author: ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)
#### Post date: [October 4, 2024, 10:42pm UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848/2 "2024-10-04T22:42:29Z")

</div>

It is not possible to have multiple ledger canisters tied to an index canister.

The ledger is also the only canister that the index canister interacts with. No other canister-to-canister communication takes place.

You can see an example of an index canister such as [ELNA’s Index canister](https://dashboard.internetcomputer.org/canister/gwk6g-ciaaa-aaaaq-aacoq-cai) `gwk6g-ciaaa-aaaaq-aacoq-cai` which has a public query function `ledger_id` that will only return one ledger canister id.

Hope that helps!

---

<div class="post-metadata">

### Author: ![NS01](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ns01/32/9816_2.png) [@NS01](https://forum.dfinity.org/u/NS01)
#### Post date: [October 5, 2024, 8:35am UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848/3 "2024-10-05T08:35:37Z")

</div>

I understand what you are saying but its misleading. You should say it’s not possible to have multiple ledgers tied to the Dfinity Index canister. It IS entirely possible to create a index canister which reads data from multiple ledgers.

---

<div class="post-metadata">

### Author: ![baolongt](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@baolongt](https://forum.dfinity.org/u/baolongt)
#### Post date: [October 5, 2024, 8:44am UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848/4 "2024-10-05T08:44:16Z")

</div>

yeah I mean index canister for icrc token (non-SNS) 😅 but seems right now the code only for one specific ledger canister

---

<div class="post-metadata">

### Author: ![NS01](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ns01/32/9816_2.png) [@NS01](https://forum.dfinity.org/u/NS01)
#### Post date: [October 5, 2024, 8:47am UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848/5 "2024-10-05T08:47:17Z")

</div>

Here is the index canister that 221Bravo.App uses - [221BravoApp\_v3/src/super\_indexer\_v3 at main · SaorsaLabs/221BravoApp\_v3 · GitHub](https://github.com/SaorsaLabs/221BravoApp_v3/tree/main/src/super_indexer_v3)

It pulls from one ledger but it wouldn’t be too hard to change it to read from multiple. You might hit instruction limits though if you are pulling too much data in one go.

---

<div class="post-metadata">

### Author: ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)
#### Post date: [October 5, 2024, 3:22pm UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848/6 "2024-10-05T15:22:14Z")

</div>

Aren’t you using a different implementation than a standard ICRC1/2 implementation?

---

<div class="post-metadata">

### Author: ![NS01](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ns01/32/9816_2.png) [@NS01](https://forum.dfinity.org/u/NS01)
#### Post date: [October 5, 2024, 4:17pm UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848/7 "2024-10-05T16:17:39Z")

</div>

IIRC ICRC1/ 2 standards dont relate to the indexing of transactions.

Our indexers do produce different data structures if that’s what you mean - The 221B indexers have more features than the standard Dfinity indexers as we need more/ different data for 221Bravo.App

---

<div class="post-metadata">

### Author: ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)
#### Post date: [October 5, 2024, 4:24pm UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848/8 "2024-10-05T16:24:11Z")

</div>

In theory, you can create an indexer that calls to multiple ledgers which you have done in your case

@baolongt referenced the Index canisters commonly seen in most ICRC1/2 implementations per the [ICP docs](https://internetcomputer.org/docs/current/developer-docs/defi/tokens/indexes). You can only map one ledger to one index canister for Index Canisters that use this data structure/format referenced in the docs.

---

<div class="post-metadata">

### Author: ![baolongt](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@baolongt](https://forum.dfinity.org/u/baolongt)
#### Post date: [October 5, 2024, 4:36pm UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848/9 "2024-10-05T16:36:05Z")

</div>

I thought it related to icrc3?

And yes, the indexer is only for one if I use the code I referred in my previous question

---

<div class="post-metadata">

### Author: ![jennifertran](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/jennifertran/32/11558_2.png) [@jennifertran](https://forum.dfinity.org/u/jennifertran)
#### Post date: [October 5, 2024, 10:28pm UTC](https://forum.dfinity.org/t/help-index-canister-for-mutliple-ledger/35848/10 "2024-10-05T22:28:29Z")

</div>

[ICRC-3](https://github.com/dfinity/ICRC-1/blob/main/standards/ICRC-3/README.md) does not specific anything about the Index canister specifically. The standard relates to accessing the block log of a Ledger including returning information on the Archive canisters that store old transactions.
