HH Whats New Hero Desktop

What’s New in Hedera

Explore new capabilities added to the Hedera network services in the areas of accounts, contracts, Solidity libraries, tokenization, and more.

Accounts & HBAR

STAKING

Stake the HBAR balance of accounts and contracts to network nodes – no minimums, lock-up periods, bonding, or slashing

(v0.27 - HIP-406)

Automatic Account Creation with HBAR

Send HBAR to the alias of an account ID that does not yet exist to automatically create a Hedera account

(v0.21 - HIP-32)

Automatic Account Creation with Tokens

Send fungible and non-fungible native tokens to the alias of an account ID that does not yet exist to automatically create a Hedera account

(v0.31 - HIP-542)

Carbon-Negative Solidity Contracts

Smart Contracts 2.0

Deploy Solidity-based, carbon-negative, low-cost, and scalable contracts

(v0.22 - HIP-25, HIP-185)

CREATE2 Opcode

Create contract factories that deploy other smart contracts (factory patterns) to enable use cases like decentralized exchanges (DEX)

(v0.23 - HIP-329)

Random Number Generation

Generate a random number for use cases like games and lotteries by just calling a simple function

(v0.28 - HIP-351)

CONTRACT RENEWAL

Keep your contracts current on the network by extending the expiration time with a renewal fee payment

(v0.30 - HIP-16, HIP-372)

Migrating to Hedera

ECDSA Keys

Create Hedera accounts that have ECDSA keys to migrate your applications while using libraries and tools you’re already familiar with

(v0.21 - HIP-222)

ETHEREUM TRANSACTIONS

Migrate your applications to Hedera by deploying contracts with the most ubiquitous EVM ecosystem libraries and tools you already know

(v0.26 - HIP-410)

Virtual Block Numbers

Get block information to integrate EVM-based tooling, explorers, exchanges, and wallet with Hedera

(v0.26 - HIP-415)

Zero Token Values in Contracts

Submit transactions with 0 tokens to Hedera without having to implement if statements or qualification logic to check for 0 values

(v0.31 - HIP-564)

Code Snippet Background
// create constructor parameters from the signature of the constructor + parameter values
// .slide(2) to remove '0x' from the result
let constructParameters = web3.eth.abi.encodeParameters(['string'], [constructMessage]).slice(2);
// convert to a Uint8Array
const constructorParametersAsUint8Array = Buffer.from(constructParameters, 'hex');
// Create the contract
const contractTransactionResponse = await new ContractCreateTransaction()
   // Set the parameters that should be passed to the contract constructor
   // using the output from the web3.js library
   .setConstructorParameters(constructorParametersAsUint8Array)
   // Set gas to create the contract
   .setGas(100_000)
   // The contract bytecode must be set to the file ID containing the contract bytecode
   .setBytecodeFileId(fileId)
   .execute(client);
 
// Fetch the receipt for the transaction that created the contract
const contractReceipt = await contractTransactionResponse.getReceipt(client);
 
// The contract ID is located on the transaction receipt
const contractId = contractReceipt.contractId

Hedera Services with Solidity

Token Service Libraries

Transfer, mint, burn, associate, and dissociate native Hedera tokens using Solidity smart contracts

(v0.22 - HIP-206)

Library for Creating Tokens

Create native Hedera tokens with or without custom fees using Solidity smart contracts

(v0.25 - HIP-358)

Additional Token Service Libraries

Access all other Hedera Token Service (HTS) capabilities to fully manage native tokens using Solidity smart contracts

(v0.30 - HIP-514)

ERC Functions with Hedera Tokens

Interact with fungible and non-fungible native Hedera tokens in your Solidity contracts using ERC-20 and ERC-721 standard functions

(v0.24 - HIP-218)

Asset Approvals & Allowances

Allowances with SDK

Enable third-party accounts to transfer assets on your behalf by approving allowances with the Hedera SDKs

(v0.25 - HIP-336)

Allowances with Solidity

Enable third-party accounts to transfer assets on your behalf by approving allowances with Token Service Libraries and ERC-20/721 standard functions

(v0.26 - HIP-376, HIP-514)

Schedule Approvals and Allowances

Submit an allowance approval transaction once all required signatures are collected

(v0.30 - HIP-336)

HBAR ALLOWANCE
  • HBAR ALLOWANCE
  • FUNGIBLE TOKEN ALLOWANCE
  • NON-FUNGIBLE TOKEN ALLOWANCE
Code Snippet Background
export async function hbarAllowanceFcn(owner, spender, allowBal, pvKey, client) {
   const allowanceTx = new AccountAllowanceApproveTransaction().approveHbarAllowance(owner, spender, allowBal).freezeWith(client);
   const allowanceSign = await allowanceTx.sign(pvKey);
   const allowanceSubmit = await allowanceSign.execute(client);
   const allowanceRx = await allowanceSubmit.getReceipt(client);
 
   return allowanceRx;
}
export async function ftAllowanceFcn(tId, owner, spender, allowBal, pvKey, client) {
   const allowanceTx = new AccountAllowanceApproveTransaction().approveTokenAllowance(tId, owner, spender, allowBal).freezeWith(client);
   const allowanceSign = await allowanceTx.sign(pvKey);
   const allowanceSubmit = await allowanceSign.execute(client);
   const allowanceRx = await allowanceSubmit.getReceipt(client);

   return allowanceRx;
}

export async function nftAllowanceFcn(tId, owner, spender, nft2Approve, pvKey, client) {
   const allowanceTx = new AccountAllowanceApproveTransaction()
       // .approveTokenNftAllowanceAllSerials(tId, owner, spender) // Can approve all serials under a NFT collection
       .approveTokenNftAllowance(nft2Approve[0], owner, spender) // Or can approve individual serials under a NFT collection
       .approveTokenNftAllowance(nft2Approve[1], owner, spender)
       .approveTokenNftAllowance(nft2Approve[2], owner, spender)
       .freezeWith(client);
   const allowanceSign = await allowanceTx.sign(pvKey);
   const allowanceSubmit = await allowanceSign.execute(client);
   const allowanceRx = await allowanceSubmit.getReceipt(client);
   return allowanceRx;
}

Tokenize Everything

Unlimited Token Associations

Associate a Hedera account with an unlimited number of native tokens

(v0.25 - HIP-367)

Exemption from Custom Fees

Optionally exempt all fee collectors from paying custom fees when exchanging units of a native token

(v0.31 - HIP-573)