【问题标题】:Why showing a error messag 'system.ExtrinsicFailed' while calling a Smart Contract function?为什么在调用智能合约函数时显示错误消息“system.ExtrinsicFailed”?
【发布时间】:2019-08-06 13:49:11
【问题描述】:

我通过以下页面了解了如何部署合同: https://substrate.dev/substrate-contracts-workshop/#/0/deploying-your-contract https://substrate.dev/docs/en/contracts/deploying-a-contract

但他们都在“调用合同”步骤中失败了

这是我创建的链源代码(引用自https://substrate.dev/docs/en/tutorials/creating-your-first-substrate-chain): https://github.com/coolcode/sux-contract-chain

错误信息: system.ExtrinsicFailed 外在事件

【问题讨论】:

  • 我们需要查看您的代码。

标签: substrate rust-ink


【解决方案1】:

联系人在创建后立即变为tombstone。在部署时提高默认 endowment 可以防止这种情况发生。

该教程现在似乎已更新,并且在部署智能合约 (https://substrate.dev/substrate-contracts-workshop/#/0/deploying-your-contract) 的步骤中包含:

要实例化我们的合约,我们只需要提供这个合约账户 endowment 为 10,000,000 并再次将允许的最大 gas 设置为 500,000 个单位。

但是,他们正在考虑增强合约的用户体验,这些合约变成了tombstone。您可以在此处查看讨论: https://github.com/paritytech/ink/issues/304

【讨论】:

    【解决方案2】:

    system.ExtrinsicFailed 表示出现问题。 You should decode exactly what went wrong here, 如果您仍然感到困惑,请重新发布。关于这些错误的含义似乎没有太多指导,所以很混乱;{I'm having my own confusions over here.

    【讨论】:

      猜你喜欢
      • 2017-08-07
      • 2022-06-15
      • 2019-12-11
      • 2021-03-04
      • 2022-06-30
      • 2021-11-29
      • 2019-01-24
      • 2022-07-08
      • 1970-01-01
      相关资源
      最近更新 更多