【问题标题】:Can I use smart contracts on the Hedera network?我可以在 Hedera 网络上使用智能合约吗?
【发布时间】:2021-11-21 20:02:09
【问题描述】:

Hedera Hashgraph Network 是否支持智能合约,是否可以将智能合约迁移到 Hedera?

【问题讨论】:

    标签: smartcontracts hashgraph hedera-hashgraph


    【解决方案1】:

    支持智能合约。请参阅文档here

    此外,智能合约 2.0 已宣布并将在 21 季度左右推出 - 请参阅 Hedera roadmapannouncement 了解更多详情。 简而言之,智能合约 2.0 将能够每秒运行数百个 Solidity 智能合约。这也将有助于从其他网络迁移,同时最大限度地减少代码更改。

    //Create the transaction const transaction = new ContractCreateTransaction()
        .setGas(500)
        .setBytecodeFileId(bytecodeFileId)
        .setAdminKey(adminKey);
    
    //Modify the default max transaction fee (1 hbar) const modifyTransactionFee = transaction.setMaxTransactionFee(new Hbar(16));
    
    //Sign the transaction with the client operator key and submit to a Hedera network const txResponse = await modifyTransactionFee.execute(client)
    

    【讨论】:

      猜你喜欢
      • 2022-12-06
      • 2022-12-18
      • 1970-01-01
      • 2019-04-07
      • 2021-06-28
      • 2022-08-18
      • 2021-12-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多