【问题标题】:Free TON tonos-cli. Can't deploy a contract. Error: failed to create inbound message: Encode deploy message failed: Wrong parameters count免费 TON tonos-cli。无法部署合约。错误:创建入站消息失败:编码部署消息失败:参数计数错误
【发布时间】:2021-08-27 08:29:25
【问题描述】:

我无法通过 tonos-cli 部署已编译的免费 ton solidity 智能合约。

> tonos-cli deploy Hello.tvc tonos-cli.conf.json

Config: /ton/solidity_deploy/hello/tonos-cli.conf.json
Input arguments:
     tvc: Hello.tvc
  params: {""url"":""https://main.ton.dev"",""wc"":-1,""addr"":null,""wallet"":null,""abi_path"":""Hello.abi.json"",""keys_path"":""keyfile.json"",""retries"":3,""timeout"":600,""is_json"":false,""depool_fee"":0.5,""lifetime"":3600,""no_answer"":true,""use_delimiters"":true,""local_run"":true}
     abi: Hello.abi.json
    keys: keyfile.json
      wc: None
Connecting to https://main.ton.dev
Deploying...
Error: failed to create inbound message: Encode deploy message failed: Wrong parameters count. Expected: 0, provided: 14
Error: 1

以错误结束。我的配置是:

❯ tonos-cli config --list

Config: /ton/solidity_deploy/hello/tonos-cli.conf.json
{
  ""url"": ""https://main.ton.dev"",
  ""wc"": -1,
  ""addr"": null,
  ""wallet"": null,
  ""abi_path"": ""Hello.abi.json"",
  ""keys_path"": ""keyfile.json"",
  ""retries"": 3,
  ""timeout"": 600,
  ""is_json"": false,
  ""depool_fee"": 0.5,
  ""lifetime"": 3600,
  ""no_answer"": true,
  ""use_delimiters"": true,
  ""local_run"": true
}

有人知道怎么回事吗?我按照手册中的说明进行操作。 Config 是按照 repo 中的说明生成的。可能问题出在参数上。”

【问题讨论】:

    标签: solidity smartcontracts ton


    【解决方案1】:

    params 表示合约构造函数中的参数。您在构造函数中有 0 个参数(预期:0),因此您需要编写“{}”。

    如果tonos-cli.conf.json在当前目录,则不需要在命令行中写--config tonos-cli.conf.json。

    修复 tonos-cli.conf.json 中的引号:从 "" 到 " 和 尝试这个: tonos-cli deploy Hello.tvc "{}"

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-05-28
      • 2015-03-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-02-09
      • 2020-10-15
      • 2014-04-30
      相关资源
      最近更新 更多