Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

invalid bytes32 value #2256

Closed
Closed
@zastrin

Description

@zastrin

Expected behavior

contract.deploy({
... data: bytecode,
... arguments: [stringArray.map(name => web3.utils.asciiToHex(name))]
... }).send({args ...})
should deploy the contract where argument to contract is an array of bytes32.

There is no issue with web3 1.0.0-beta.37, it happens with beta.41

Actual behavior

The deploy fails with Error: invalid bytes32 value (arg="candidateName", coderType="bytes32", value="0x52616d61", version=4.0.23)

Error Logs

(node:46067) UnhandledPromiseRejectionWarning: Error: invalid bytes32 value (arg="candidateNames", coderType="bytes32", value="0x52616d61", version=4.0.23)
at Object.throwError (node_modules/ethers/errors.js:76:17)
at CoderFixedBytes.encode (/node_modules/ethers/utils/abi-coder.js:473:20)
at /node_modules/ethers/utils/abi-coder.js:645:59
at Array.forEach ()
at pack (/node_modules/ethers/utils/abi-coder.js:644:12)
at CoderArray.encode (/node_modules/ethers/utils/abi-coder.js:744:40)
at /node_modules/ethers/utils/abi-coder.js:645:59

Versions

NodeJS 11.5.0
Web3js 1.0.0-beta.41

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugAddressing a bugIn ProgressCurrently being worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions