There been a couple of questions on bytes32 to string in solidity itself. What's the best way to convert a solidity bytes32 return value to a string in JS?


you'll have a good live example of what you want in the browser-solidity, especially in line 395 of universal-dapp.js

// decode data
                    var decodedObj = EthJS.ABI.rawDecode(outputTypes, result.vm.return);

                    // format decoded data
                    decodedObj = EthJS.ABI.stringify(outputTypes, decodedObj);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.