Can I use smart contracts on the Hedera network?

179 views Asked by At

Does the Hedera Hashgraph Network support smart contracts, and is it possible to migrate smart contracts to Hedera?

1

There are 1 answers

0
Ed Marquez On BEST ANSWER

Smart contracts are supported. See the documentation here.

In addition, Smart Contracts 2.0 were announced and will be introduced around 21Q4 - see the Hedera roadmap and the announcement for more details. In short, Smart Contracts 2.0 will enable running hundreds of Solidity smart contracts per second. This will also facilitate migration from other networks while minimizing code changes.

//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)