Skip to content

hiero-ledger/hiero-contracts

⚠️ ‼️ All examples and contracts in this repository are exploration code and have NOT been audited. Use them at your own risk! ‼️ ⚠️

Hedera Smart Contracts

Reference library for Smart Contracts utilized by the Hedera network with supporting files and examples.

Overview

The Hedera network utilizes system contracts at a reserved contract address on the EVM to surface HAPI service functionality through EVM processed transactions. These system contracts are precompiled smart contracts whose function selectors are mapped to defined network logic. In this way EVM users can utilize exposed HAPI features natively in their smart contracts.

The system contract functions are defined in this library and implemented by the Hedera Services repo as part of consensus node functionality.

Hedera Token Service (HTS) System Contract

The Hedera Token Service (HTS) functionality is defined by the IHederaTokenService.sol interface smart contract as defined in HIP 206, HIP 376 and HIP 514. The contract is exposed via the 0x167 address. Reference smart contracts to call these functions can be found under contracts/token-service

For further details on methods, hashes and availability please refer to HTS System Contract Methods

Hedera Account Service (HAS) System Contract

The Hedera Account Service (HAS) functionality is defined by the IHederaAccountService.sol interface smart contract as defined in HIP 632 and HIP 906. The contract is exposed via the 0x16a address. Reference smart contracts to call these functions as well as examples can be found under contracts/account-service

For further details on methods, hashes and availability please refer to HAS System Contract Methods

Exchange Rate System Contract

The Exchange Rate functionality is defined by the IExchangeRate.sol interface smart contract as defined in HIP 475 and exposed via the 0x168 address. Reference smart contracts to call these functions as well as examples can be found under contracts/exchange-rate

For further details on methods, hashes and availability please refer to Exchange Rate System Contract Methods

Prng System Contract

The PRNG functionality is defined by the IPrngSystemContract.sol interface smart contract as defined in HIP 351 and exposed via the 0x169 address. Reference smart contracts to call these functions as well as examples can be found under contracts/prng

For further details on methods, hashes and availability please refer to PRNG System Contract Methods

Support

If you have a question on how to use the product, please see our support guide.

Contributing

Contributions are welcome. Please see the contributing guide to see how you can get involved.

About Users and Maintainers

Users and Maintainers guidelines are located in Hiero-Ledger's CONTRIBUTING.md file under the "About-Users-and-Maintainers" section.

Code of Conduct

This project is governed by the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code of conduct. Please report unacceptable behavior to oss@hedera.com.

License

Apache License 2.0

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors