solod
1
Hello.
How to save icon?
String or bytes?
I have indexed event field - icon
get icon(): Bytes {
return this._event.parameters[1].value.toBytes();
}
save
game.icon = event.params.icon.toString();
game.save();
my icon in GraphQL
"icon": "\n�ZA�́\u0015��B\r3ʫ��\u0012�0t�:�7���NBR�",
1 Like
solod
2
I save -
How to save in GraphQL
"icon": "🙂",
1 Like
solod
3
Ok =)
How to decode indexed event field? Bytes to string?
get icon(): Bytes {
return this._event.parameters[1].value.toBytes();
}
1 Like
Best would be if you could ask this question in our Discord server, in the #subgraph-development channel.
1 Like