web3dart
web3dart copied to clipboard
Sending hex of bytes32 instead of Uint8List
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