docs icon indicating copy to clipboard operation
docs copied to clipboard

[DOC] Add code snippet for getData call from solidity contract

Open Hugoo opened this issue 1 year ago • 0 comments

https://docs.lukso.tech/learn/smart-contract-developers/retrieve-token-type#implementation

We should add a solidity function call which shows how to query this data.

Right now it says basically:

Here is the key _LSP4_TOKEN_TYPE_DATA_KEY use getData and deal with it. Good luck my friend.

So let's add something like:

import {ERC725YCore} from "@erc725/smart-contracts/contracts/ERC725YCore.sol";

// ...

bytes memory tokenTypeDataKey = ERC725YCore._getData( _LSP4_TOKEN_TYPE_DATA_KEY);

Hugoo avatar Mar 17 '24 17:03 Hugoo