I need to retrieve data to front end from event:
eventSignature: 'ProposalIsCreated(bytes32,address,address,address,string,uint256,uint256,bytes32))'
I use defaultAbiCoder from ethers.js and this function throws an error, probably because I use array syntax, but I have no other ideas how to represent struct and make it work:
ethers.utils.defaultAbiCoder.decode(
[
"bytes32",
"address",
["address", "address", "string", "uint256", "uint256", "bytes32"],
],
event.data
);
Data example:
"0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000a0bf3617915aec7a04b5fb59ee63c9df1975b677000000000000000000000000ec5596dffbb8ca06d83532bc4428bbae4ca1b76e00000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001692048e9a8062420fae2d6ea18d56a76e4c5f5b6255e9047b8ec624ffdbd15f200000000000000000000000000000000000000000000000000000000000000013100000000000000000000000000000000000000000000000000000000000000"