常见错误:
- Error encoding arguments: Error: invalid bytes32 value (arg="", coderType=“bytes32”, value=“0x6c”, version=4.0.37)
原因:因为新版本remix要求,如果指定了参数的类型为bytes32,那么你就必须在输入参数的值的时候,该值也必须是32 bytes的。 - SyntaxError: Functions are not allowed to have the same name as the contract. If you intend this to be a constructor, use “constructor(…) { … }” to define it.
这个报错的信息还是很简单,它要求函数名和合约名不能相同,如果使用构造函数需要使用:constructor(…){…}的形式。
只需将function 函数名 改为 constructor - 部署时的错误:Error encoding arguments: Error: expected array value (arg="", coderType=“array”, value="", version=4.0.40)
构造函数deploy(右边框中)时输入构造函数的参数,(添加地址)
如[“0xd4967590eb024589dfb6b9e48a576eb49ebc19d764b0d1d67dc21975e7258e97”,
“0x0000000000000000000000000000000000000000000000000000000000000001”,
“0x000000000000000000000