Smart contracts 2.0 now on the Hedera testnet | Hedera Hedera Network Services Token Service Mint and configure tokens and accounts. Consensus Service Verifiable timestamps and ordering of events. Smart Contracts Run Solidity smart contracts. HBAR The Hedera network's native cryptocurrency. Insights How It Works Learn about Hedera from end to end. Explorers View live and historical data on Hedera. Dashboards Analyze network activity and metrics. Network Nodes Understand networks and node types. Devs Start Building Get Started Learn core concepts and build the future. Documentation Review the API and build using your favorite language. Developer Resources Integrations Plugins and microservices for Hedera. Fee Estimator Understand and estimate transaction costs. Open Source Hedera is committed to open, transparent code. Learning Center Learn about web3 and blockchain technologies. Grants Grants & accelerators for your project. Bounties Find bugs. Submit a report. Earn rewards. Ecosystem ECOSYSTEM Hedera Ecosystem Applications, developer tools, network explorers, and more. NFT Ecosystem Metrics Analyze on-chain and market NFT ecosystem metrics. CATEGORIES Web3 Applications Connect into the innovative startups decentralizing the web on Hedera. Enterprise Applications Learn about the Fortune 500 companies decentralizing the web on Hedera. Wallets & Custodians Create a Hedera account to manage HBAR, fungible tokens, and NFTs. Network Explorers Hedera mainnet and testnet graphical network explorers. Developer Tooling Third-party APIs, integrations, and plugins to build apps on Hedera. Grants & Accelerators Boost your project with support from the Hedera ecosystem. Partner Program Explore our partners to bring your vision into reality. Hedera Council Over 30 highly diversified organizations govern Hedera. Use Cases Hedera Solutions Asset Tokenization Studio Open source toolkit for tokenizing assets securely. Stablecoin Studio All-in-one toolkit for stablecoin solutions. Hedera Guardian Auditable carbon markets and traceability. Functional Use Cases Data Integrity & AI Reliable, secure, and ethically governed insights. Sustainability Enabling fair carbon markets with trust. Real-World Asset Tokenization Seamless tokenization of real-world assets and digital at scale. Consumer Engagement & Loyalty Mint, distribute, and redeem loyalty rewards. Decentralized Identity Maintain the lifecycle of credentials. Decentralized Logs Scalable, real-time timestamped events. DeFi Dapps built for the next-generation of finance. NFTs Low, fixed fees. Immutable royalties. Payments Scalable, real-time, and affordable crypto-payments. HBAR Overview Learn about Hedera's token, HBAR. Treasury Management Hedera’s report of the HBAR supply. Governance Decentralized Governance Hedera Council See the world's leading organizations that own Hedera. About Meet Hedera's Board of Directors and team. Journey Watch Hedera's journey to build an empowered digital future for all. Transparent Governance Public Policy Hedera's mission is to inform policy and regulation that impact the industry. Meeting Minutes Immutably recorded on Hedera. Roadmap Follow Hedera's roadmap in its journey to build the future. Resources Company What's New Partners Papers Careers Media Blog Technical Press Podcast Community Events Meetups Store Brand Navigation QUICKSTART Smart contracts 2.0 now on the Hedera testnet technical Jan 20, 2022 by Gehrig Kunz Product Marketing at Hedera Hashgraph Smart contracts play a critical role in building the trust layer of the internet. Used to manage autonomous logic that doesn’t rely on a centralized intermediary, server, or custom governance model, smart contracts can power core infrastructure of the future like decentralized finance. While the Hedera Smart Contract Service is EVM compatible and runs Solidity, with the availability of Smart Contracts 2.0 now on the Hedera testnet it now does so with a few added bonuses as only Hedera and the soon to be open-sourced hashgraph can. The best of both worlds with Hedera Token Service Solidity smart contracts on Hedera now support the Hedera Token Service (HTS). This means that as a developer you can choose your own token adventure. Minting an in-app currency for your users? As easy as writing a JavaScript app. Want to programmatically mint an NFT for some cool generative art? Use smart contracts with Hedera Token Service precompile. This flexibility is unprecedented. As a developer, you can now determine if a smart contract is required for your use case or not and consider the tradeoffs in throughput and cost appropriately. As an ecosystem, we’ll have to work together to better understand user experiences and best practices. We’ve put together a quickstart tutorial to get started with your first smart contract using HTS precompile, but here’s an example of the Solidity file. // SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.6.12; import "./HederaTokenService.sol"; import "./HederaResponseCodes.sol"; contract HTS is HederaTokenService { function tokenAssociate(address sender, address tokenAddress) external { int response = HederaTokenService.associateToken(sender, tokenAddress); if (response != HederaResponseCodes.SUCCESS) { revert ("Associate Failed"); } } function tokenTransfer(address tokenId, address fromAccountId , address toAccountId , int64 tokenAmount) external { int response = HederaTokenService.transferToken(tokenId, toAccountId, fromAccountId, tokenAmount); if (response != HederaResponseCodes.SUCCESS) { revert ("Transfer Failed"); } } function tokenDissociate(address sender, address tokenAddress) external { int response = HederaTokenService.dissociateToken(sender, tokenAddress); if (response != HederaResponseCodes.SUCCESS) { revert ("Dissociate Failed"); } } } Copy Low fees, latency, and even lower energy-use Every Hedera network service has low, predictable fees that are set in USD and paid for in hbars. The efficiency of hashgraph makes this possible and, as to be expected, these fees are still predictable when using smart contracts. Hedera, as an EVM implementation, a Hyperledger Besu EVM one to be precise, does have the notion of gas fees. For those unfamiliar, gas is the cost it takes for the computational resources to use a smart contract. On other layer-1 networks, gas fees can be highly variable and at times downright unruly. Ethereum hourly gas prices from ethgas.watch On Hedera, gas fees are always predictable. What it takes to perform that smart contract today will be the same at any hour, no more network congestion issues or having to go so far as to create your own device to know when it’s cheaper to deploy a contract (it’s always a $1 to deploy a contract on Hedera). Next, the performance is fast and scalable. The amount of gas available in an entire block on ethereum, 15 million, is available in a second on Hedera. The transaction is final in seconds. No need to wait for block confirmations or have that internal debate if you should pay a low, medium, or high gas priority fee to speed your transaction up. Stay tuned for more performance results as we go through internal testing.  And lastly, of course like everything else on Hedera, all smart contract use is carbon negative. Again, the efficiency of hashgraph makes this possible, with Hedera having the lowest energy-use of layer-1 networks with additional carbon offsets made possible through our partner, Terapass.  Ready to build We’re excited to see you try the new Hedera Smart Contract Service and see an emerging smart contract ecosystem spring up around Hedera.  There are some known enhancements already on the roadmap and available as Hedera Improvement Proposals (HIPs), if you have your own suggestions, don't hesitate to submit them.  According to Electric Capital's web3 developer report, 30% of all web3 developers are working with Solidity and the Ethereum Virtual Machine (EVM). We’re excited to help support the EVM and other layer-1 networks to help that number grow even more. If you’re not familiar yet with solidity, we’ve put together a helpful introduction with some recommended resources.  From developer tools to DeFi to DAOs we can’t wait to see what gets created. If you’re looking for support to start building or scaling your smart contract project, reach out to the HBAR Foundation. Share This Back to blog What is gRPC, gRPC-Web, and Proxies? Ed Marquez Pragmatic Blockchain Design Patterns – Integrating Blockchain into Business Processes Michiel Mulders Zero Cost EthereumTransaction on Success: Hedera's New Fee Model for Relay Operators Oliver Thorn Hedera Adopts Chainlink Standard for Cross-Chain Interoperability To Accelerate Ecosystem Adoption Hedera Team Hedera Developer Highlights March 2025 Michiel Mulders Hedera Release Cycle Overview Ed Marquez View All Posts Sign up for the newsletter CONNECT WITH US Transparency Open Source Audits & Standards Sustainability Commitment Carbon Offsets Governance Hedera Council Public Policy Treasury Management Meeting Minutes LLC Agreement Node Requirements Community Events Meetups HBAR Telegram Developer Discord Twitter Community Support FAQ Network Status Developer Discord StackOverflow Brand Brand Guidelines Built on Hedera Logo Hedera Store About Team Partners Journey Roadmap Careers Contact General Inquiry Public Relations © 2018-2025 Hedera Hashgraph, LLC. All trademarks and company names are the property of their respective owners. All rights in the Deutsche Telekom mark are protected by Deutsche Telekom AG. All rights reserved. Hedera uses the third party marks with permission. Terms of Use  |  Privacy Policy