1

I have made a web interface for Tezos token interaction and now I would like to show a balance overview of the loaded tokens, i.e. show a list of address, account tuples . This requires me to be able to loop over the keys of a big_map. Is that possible using Taquito?

Looking at a token contract on the block explorer Better Call Dev they are able to show a balance overview, so I guess it should be possible in principle.

My storage is defined as

type account is record
    balance : nat;
    allowances: map(address, nat);
end

type storage is record
  ledger: big_map(address, account);
  total_supply: nat;
end

1 Answer 1

3

It is not possible using Taquito alone. You must use an indexer to extract all the key/value pairs from a big map (Better Call Dev is developed by Baking Bad who also offers an indexer API).
This will however be possible in the near future as Taquito will soon be able to plug into any indexer and extract all the values from a big map.

8
  • Can you elaborate on what it means to plug into an indexer? Does this mean Taquito can be pointed to a block explorer which can return the set of keys in the big_map? Nov 25, 2020 at 13:03
  • 1
    This feature is not available in Taquito now but in the future :) When available, you will be able to fetch data from the indexer of your choice through Taquito. For now, I personally use Baking Bad API to fetch all the entries of a big map when I need to. Nov 25, 2020 at 14:36
  • Any idea of the timeline about when you expect this to be done? Nov 26, 2020 at 11:55
  • 1
    I never had any CORS issue when using Taquito client-side, do you have any example of when that happened to you? The feature is still under development, I will get more info about the timeline and let you know! Nov 27, 2020 at 8:45
  • 1
    It is still a work in progress. Mar 31, 2021 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.