Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sending hex of bytes32 instead of Uint8List #122

Open
ParhaMDeF opened this issue Sep 18, 2023 · 0 comments
Open

Sending hex of bytes32 instead of Uint8List #122

ParhaMDeF opened this issue Sep 18, 2023 · 0 comments

Comments

@ParhaMDeF
Copy link

ParhaMDeF commented Sep 18, 2023

I have a function in my smart contract that gets bytes32 as input which is the CID of IPFS.
The example of CID is: bafybeicxndpeycrra7q7b3hus5m537yiq6u6nztaj3sdtmtobnvtxhxhgm.
I should convert this string to bytes32 and then transact the function but it gives me an error that the length of Uint8List must be exactly 32. Is there any way that I can use the hex of byte32 instead of Uint8List like this:

0x6261667962656963786e64706579637272613771376233687573356d3533377969713675366e7a74616a337364746d746f626e767478687868676d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant