Modify transaction fields
Method
Type
//Create the transaction and set the transaction properties
Transaction transaction = new AccountCreateTransaction() //Any transaction can be applied here
.setKey(key)
.setInitialBalance(Hbar.fromTinybars(1000))
.setMaxTransactionFee(new Hbar(2)) //Set the max transaction fee to 2 hbar
.setTransactionMemo("Transaction memo"); //Set the node ID to submit the transaction to
//v2.0.0//Create the transaction and set the transaction properties
const transaction = await new AccountCreateTransaction() //Any transaction can be applied here
.setKey(key)
.setInitialBalance(Hbar.fromTinybars(1000))
.setMaxTransactionFee(new Hbar(2)) //Set the max transaction fee to 2 hbar
.setTransactionMemo("Transaction memo"); //Set the node ID to submit the transaction to//Create the transaction and set the transaction properties
transaction := hedera.NewAccountCreateTransaction(). //Any transaction can be applied here
SetKey(newKey.PublicKey()).
SetInitialBalance(hedera.NewHbar(1000)).
SetMaxTransactionFee(hedera.NewHbar(2)). //Set the max transaction fee to 2 hbar
SetTransactionMemo("Transaction memo") //Set the transaction memo
//v2.0.0 Get transaction properties
Method
Type
Last updated