Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Sign in
issue
issue
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 23
    • Issues 23
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar

新注册的用户请输入邮箱并保存,随后登录邮箱激活账号。后续可直接使用邮箱登录!

  • chainmaker
  • issueissue
  • Issues
  • #694

Closed
Open
Opened May 18, 2023 by h x@hxrs

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,

Edited May 18, 2023 by h x
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: chainmaker/issue#694

Copyright © 2021 ChainMaker Org. All Rights Reserved. 长安链 版权所有。