2

Want to obtain fxhash token attributes/metadata with smartpy, the problem is fxhash smart contract doesn't have entrypoint or views for it. There is "get_token_data" view but it returns nothing useful for getting attributes.

Attributes/metadata stored in Bigmap #149772 but I don't know how to get that via smartpy. I saw this post Read another contract's storage without making a transaction? which claims "It is not possible for a contract X to access the storage of contract Y against Y's will."

is there any solution for reading fxhash token attributes/metadata with smartpy ?

3 Answers 3

2

There is still no way to view other contract's storage if the contract doesn't give access to the info.

From a contract point of view the storage is private.

1

yes! since the post you referenced, views have effectively been added when the Hangzhou protocol was activated.

In practice, you can explore available views on tzkt or tzstats

For usage in your contract, see Smartpy doc

1
  • yes I am aware views exists, "There is "get_token_data" view but it returns nothing useful for getting attributes." unfortunately they don't provide views for getting metadata/attributes.
    – Hexa
    Jul 13, 2022 at 0:05
0

fxhash attributes are stored in the tzip-21 metadata, which is stored off-chain. This means it is unavailable inside another contract.

To address your specific goal of having the data available inside another contract you could locally index all the tokens and originate the results inside a new smart contract and expose a new on-chain view for the attributes inside that new contract so that it is a sort-of fxhash attribute oracle and keep it updated every X hours with new data via an entrypoint.

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.