Skip to content

How can i pass/convert an address as bytes 32 in this constructor argument? #2386

Answered by alymurtazamemon
ippy1997 asked this question in Q&A
Discussion options

You must be logged in to vote

@ippy1997 You can add zeros after the address or you can convert it to bytes32 like this

bytes32(abi.encodePacked(0x5B38Da6a701c568545dCfcB03FcB875f56beddC4));

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@ippy1997
Comment options

Answer selected by ippy1997
Comment options

You must be logged in to vote
2 replies
@ippy1997
Comment options

@krakxn
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants