Skip to content

Can't decode name when it's a bytes32 instead of a string #4198

Answered by zemse
feloot asked this question in Q&A
Discussion options

You must be logged in to vote

From the ABI it appears that bytes type is being used for name and symbol, while you need bytes32 there.

function name() public returns (bytes32);
function symbol() public returns (bytes32);

Then you can use ethers.decodeBytes32String util to process it.

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@ricmoo
Comment options

@fukemy
Comment options

@zemse
Comment options

Answer selected by feloot
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants
Converted from issue

This discussion was converted from issue #4187 on July 01, 2023 14:14.