solidity合约文件构造函数中包含int64类型参数会报错
构造函数是否不支持int型参数,换成uint型参数无报错,相同的测试环境和入参。
长安链版本 2.3.1 合约文件:
// SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.9;
contract D { int64 public x; // 换成uint64是OK的 constructor(int64 a) { x = a; } }
报错: 创建合约结果: message: "OK" contract_result { code: 1 message: "contract initial fail, " } tx_id: "f88d5012967b001087c4e0391fdab83daeb8775f17a51a0837baf16dbdeaa515"
system.log: 2023-05-18 17:37:57.597 [ERROR] [Core] [31;1m@chain1[0m scheduler/scheduler.go:615 failed to run vm for tx id:f88d5012967b001087c4e0391fdab83daeb8775f17a51a0837baf16dbdeaa515,contractName:CONTRACT_MANAGE, tx result:code:CONTRACT_FAIL contract_result:<code:1 message:"contract initial fail, " > , error:contract initial fail,