1

Title says it all. I'd like to get data from atomic assets' attribute map.

This is the link to their docs https://github.com/pinknetworkx/atomicassets-contract/wiki/Custom-Types#atomic_attrbiute tried a lot of ways but couldn't get to make it work. Any help is greatly appreciated thanks!

4

1 Answer 1

3

I forgot to post an answer to this question when I found it. Here's how:

Assuming I wanted to take the "Rarity" value from an ATTRIBUTE_MAP, this is how I would get it.

string rarity_value = get<string>(immutable_template_data["rarity"]);

For further context: get(ATTRIBUTE_MAP variable[key_name])

Hopefully this was clear enough to anyone who also needed the answer. Please feel free to comment if you need help too, would love to be able to contribute to the community.

Your Answer

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

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