3

I am using the taquito library to interact with a smart contract that I have uploaded to carthagenet.

However, I am facing an issue in retrieving the value of a bigmap property in my smart contract storage with pair datatype as the key.

I have tried the following method and it doesn't work.

// agreements is a property in my storage with bigmap datatype

const bigMapValue = await storage.agreements.get({0:userAddr, 1: senderAddr});

The error that was thrown

Unable to encode big map key: TypeError: this.bigMap.KeySchema.ToBigMapKey is not a function
  • Thanks for using Taquito. Using a pair as a key is not yet supported in Taquito. We created this issue github.com/ecadlabs/taquito/issues/251 to track. Can you reach out to me as I'd like to get some more details about your use-case. – Jev Björsell Feb 6 at 15:25
  • Hi Jev, thanks for the answer. May I know how can I reach out to you to share with you more about the dapp that I am building? – Zack Feb 7 at 2:02
  • @JevBjörsell can you please move your comment to the answer? – Frank Feb 8 at 1:37
  • @Zack You can reach me on my jevonearth telegram handle. We have an update to support this use case, should be released this week. I will add a proper answer at that time. – Jev Björsell Feb 12 at 16:06
2

As of Taquito release v6.1.0-beta.0 Taquito offers a new API for Maps which support pairs as keys in Maps and BigMaps

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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