我可以在Hedera网络上使用智能合约吗?



Hedera哈希图网络是否支持智能合约,是否有可能将智能合约迁移到Hedera?

支持智能合约。参考这里的文档。

此外,智能合约2.0已经公布,并将在2011年第四季度左右推出——更多细节请参阅Hedera路线图和公告。简而言之,智能合约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)