You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
Connect to private blockchain
Compile contract
Try to deploy contract with arguments (array to bytes32)
Error Logs
Error: Returned error: invalid argument 0: json: cannot unmarshal hex string without 0x prefix into Go struct field SendTxArgs.data of type hexutil.Bytes
Extra data
I created a private test blockchain with this genesis.json
This is required because asciiToHex does have a default property for defining the bytes length the returned string should have. The default length is 32 bytes please check out the documentation for further details: web3.utils.asciiToHex.
Btw.: You could use the web3.utils.asciiToHex method directly instead of using the fromAscii alias.
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: