-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Cannot unmarshal hex string without 0x prefix #2333
Comments
Does this error still occur in the latest version (beta.44)? I've fixed issue #2256. |
With 1.0.0-beta.46 I have this result:
|
Yes, this error happens because ethers.js added a strict validation for Just change this line: const votingHex = candidates.map(asciiToHex); To: const votingHex = candidates.map((value) => {
return asciiToHex(value);
}); This is required because Btw.: You could use the |
Expected behavior
This is a small example of a contract.
I want to deploy a smart contract and vote for candidate.
Actual behavior
I want to deploy a smart contract but in deploy function return error.
I am using Web3.js 1.0.0-beta.37 because with the version 1.0.0-beta.41 I have this issue
#2256
Steps to reproduce the behavior
Error Logs
Extra data
I created a private test blockchain with this genesis.json
Versions
NPM 6.4.0
Node v8.11.1
Web3.js 1.0.0-beta.37
OS Ubuntu 18.04
The text was updated successfully, but these errors were encountered: