I am learning to use polkadotjs api, I am trying to send a system.remarkWithEvent and then get the event that this created and decode de output to verify that the remark is there.
The sending of the extrinsic is pretty straight forward:
let remark = new TextEncoder().encode('this is a test to encode something#5');
api.tx.system.remarkWithEvent(remark).signAndSend(account, { nonce: nextSudoNonce });
but then when I try to get the event data for this remark object the data is the following:
{
sender: '0xf24FF3a9CF04c71Dbc94D0b566f7A27B94566cac',
hash_: '0x2652d1ebf54bb7143af7548273e4f51c960fb743d2f99e945eb00b6ef141abbb'
}
Where hash_
is the remark, how can I decode this data to get the original string?