taquito icon indicating copy to clipboard operation
taquito copied to clipboard

SPIKE: BigMapAbstraction enhancement

Open hui-an-yang opened this issue 1 year ago • 1 comments

From user questions asked to taquitobot by far, we can see the some developer experience improvement to be make in BigMapAbstraction class.

user questions as follows

  • how to check if bigmap in storage is empty?
  • how do I get all the keys in a BigMap from the chain?
  • how do I convert the values of a BigMapAbstraction to an array of objects

Would be great to investigate some options to support developer pain point above

For example there is a rpc endpoint https://ghostnet.ecadinfra.com/chains/main/blocks/head/context/big_maps/196967 that will return the bigmaps value objects in array, that we can add a function to BigMapAbstraction to check if the returned array is empty to fix the first issue above.

hui-an-yang avatar Jan 19 '24 23:01 hui-an-yang

related issue #222 that rpc endpoint solve second issue https://ghostnet.ecadinfra.com/chains/main/blocks/head/context/raw/json/big_maps/index/196967/contents will return a list of all the keys encoded as expression

hui-an-yang avatar Mar 02 '24 00:03 hui-an-yang