Closed Hugoo closed 2 years ago
Both should work the same:
const encodedDataOneKey = erc725.encodeData({ '5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5': { json: profileJson, // check instantiation.js to see the actual JSON url: 'ifps://QmQTqheBLZFnQUxu5RDs8tA9JtkxfZqMBcmGd9sukXxwRm', }, }); /** { keys [ '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5'], values: [ '0x6f357c6a2404a2866f05e53e141eb61382a045e53c2fc54831daca9d9e1e039a11f739e1696670733a2f2f516d5154716865424c5a466e5155787535524473387441394a746b78665a714d42636d47643973756b587877526d'] } */
const encodedDataOneKey = erc725.encodeData({ '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5': { json: profileJson, // check instantiation.js to see the actual JSON url: 'ifps://QmQTqheBLZFnQUxu5RDs8tA9JtkxfZqMBcmGd9sukXxwRm', }, }); /** { keys [ '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5'], values: [ '0x6f357c6a2404a2866f05e53e141eb61382a045e53c2fc54831daca9d9e1e039a11f739e1696670733a2f2f516d5154716865424c5a466e5155787535524473387441394a746b78665a714d42636d47643973756b587877526d'] } */
const encodedDataOneKey = erc725.encodeData({ LSP3Profile: { json: profileJson, // check instantiation.js to see the actual JSON url: 'ifps://QmQTqheBLZFnQUxu5RDs8tA9JtkxfZqMBcmGd9sukXxwRm', }, }); /** { keys [ '0x5ef83ad9559033e6e941db7d7c495acdce616347d28e90c7ce47cbfcfcad3bc5'], values: [ '0x6f357c6a2404a2866f05e53e141eb61382a045e53c2fc54831daca9d9e1e039a11f739e1696670733a2f2f516d5154716865424c5a466e5155787535524473387441394a746b78665a714d42636d47643973756b587877526d'] } */
NOTE: The key can be used with and without 0x
0x
Also update the documentation accordingly with examples
The PR: #143 is solving the "input" part - regarding the new shape of the output, it is covered by the issue: https://github.com/ERC725Alliance/erc725.js/issues/140
Both should work the same:
NOTE: The key can be used with and without
0x
Also update the documentation accordingly with examples