From d65cd09234b6b25babdc10d3e524df7944ca4452 Mon Sep 17 00:00:00 2001 From: AYESIGA ISAAC Date: Sun, 15 Mar 2026 12:49:07 +0300 Subject: [PATCH 1/3] docs: migrate smart contract docs to hiero-contracts (#445) Signed-off-by: AYESIGA ISAAC --- .../compiling-smart-contracts.mdx | 2 +- .../smart-contracts/gas-and-fees.mdx | 6 ++-- .../smart-contracts/security.mdx | 2 +- .../system-smart-contracts.mdx | 12 +++---- .../hedera-account-service.mdx | 2 +- .../hedera-token-service-system-contract.mdx | 2 +- ...erification-and-keys-ecdsa-vs.-ed25519.mdx | 2 +- .../handling-hbar-transfers-in-contracts.mdx | 4 +-- ...n-management-with-hedera-token-service.mdx | 2 +- ...-token-management-with-smart-contracts.mdx | 2 +- .../smart-contracts/wrapped-hbar-whbar.mdx | 4 +-- .../erc-evm-compatible-tokenization.mdx | 2 +- .../tokens/hybrid-hts-+-evm-tokenization.mdx | 2 +- .../layerzero.mdx | 18 +++++----- .../hedera-service-solidity-libraries.mdx | 36 +++++++++---------- ...dera-network-with-hardhat-advanced-hts.mdx | 24 ++++++------- ...m-part-1-schedule-smart-contract-calls.mdx | 8 ++--- .../hss-x-evm-part-2-dynamic-rebalancing.mdx | 10 +++--- .../hts-x-evm-part-1-how-to-mint-nfts.mdx | 12 +++---- .../hts-x-evm-part-2-kyc-and-update.mdx | 8 ++--- ...w-to-pause-freeze-wipe-and-delete-nfts.mdx | 8 ++--- ...ve-hbar-using-solidity-smart-contracts.mdx | 4 +-- ...nsfer-an-nft-using-a-solidity-contract.mdx | 2 +- .../token/hybrid-hts-+-evm-tokenization.mdx | 20 +++++------ 24 files changed, 97 insertions(+), 97 deletions(-) diff --git a/hedera/core-concepts/smart-contracts/compiling-smart-contracts.mdx b/hedera/core-concepts/smart-contracts/compiling-smart-contracts.mdx index e0c6a979..8f0d0a97 100644 --- a/hedera/core-concepts/smart-contracts/compiling-smart-contracts.mdx +++ b/hedera/core-concepts/smart-contracts/compiling-smart-contracts.mdx @@ -91,4 +91,4 @@ This is the example ABI output produced when the HelloHedera smart contract is c ## Additional Resources -**➡** [**HTS Precompile Methods**](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/README.md) +**➡** [**HTS Precompile Methods**](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/README.md) diff --git a/hedera/core-concepts/smart-contracts/gas-and-fees.mdx b/hedera/core-concepts/smart-contracts/gas-and-fees.mdx index 7a43924b..d34371e8 100644 --- a/hedera/core-concepts/smart-contracts/gas-and-fees.mdx +++ b/hedera/core-concepts/smart-contracts/gas-and-fees.mdx @@ -96,9 +96,9 @@ The gas requirements for **HTS view functions** can be calculated in a slightly **Example System Contracts:** -- **[Hedera Token Service (HTS)](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/HederaTokenService.sol)** -- **[Pseudo Random Number Generator (PRNG)](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/pseudo-random-number-generator/PrngSystemContract.sol)** -- **[Exchange Rate](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/exchange-rate/ExchangeRateSystemContract.sol)** +- **[Hedera Token Service (HTS)](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/HederaTokenService.sol)** +- **[Pseudo Random Number Generator (PRNG)](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/prng/PrngSystemContract.sol)** +- **[Exchange Rate](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/exchange-rate/ExchangeRateSystemContract.sol)** **Learn More**: Our detailed gas calculation [reference](https://github.com/hashgraph/hedera-services/blob/develop/hedera-node/docs/design/services/smart-contract-service/system-contract-gas-calc.md#system-contracts) explains the precise steps for calculating gas fees on Hedera. diff --git a/hedera/core-concepts/smart-contracts/security.mdx b/hedera/core-concepts/smart-contracts/security.mdx index 94d60957..e0dfefe1 100644 --- a/hedera/core-concepts/smart-contracts/security.mdx +++ b/hedera/core-concepts/smart-contracts/security.mdx @@ -98,7 +98,7 @@ Applying this to the security model changes, the following table summarizes the
ScenarioAuthorization checkOld ModelNew Model
Smart contract A can change its own state using a callsender = Contract AYY
Smart contract A can change EOA’s state via callsender = EOANN
Smart contract B can change contract A’s state via callsender = ANN
Smart contract A can change EOA’s state via delegate callsender = EOAYY
Smart contract B can change contract A’s state via delegate callsender = Contract AYY
System smart contracts can change another accounts (EOA or contract A or contract B) state via callsender = accountNN
System smart contract can change another accounts EOA or contract A or contract B) state via delegate callsender = accountNN
System contracts can change an accounts (EOA or contact A or contract B) state via call with the appropriate signaturesignature map contains signature of accounts (EOA or contact A or contract B respectively)YN
System smart contract can change another accounts (EOA or contact A or contract B) state via delegate call with the appropriate signaturesignature map contains signature of accounts (EOA or contact A or contract B)YN
Contract A or B can call a system contract via a call-YY
Contract A or B can call a system contract via a delegate call-YN
-At the time of the change, the [HTS system contract](https://github.com/hashgraph/hedera-smart-contracts/tree/release/0.3/contracts/hts-precompile) was the only pathway to expose Hedera API functionality through Smart Contracts. As such, it’s fair to consider the differences between pre and post-security model updates when observing HTS system contract state-changing functions. +At the time of the change, the [HTS system contract](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/token-service) was the only pathway to expose Hedera API functionality through Smart Contracts. As such, it’s fair to consider the differences between pre and post-security model updates when observing HTS system contract state-changing functions. #### Existing HTS system contract impacts summary diff --git a/hedera/core-concepts/smart-contracts/system-smart-contracts.mdx b/hedera/core-concepts/smart-contracts/system-smart-contracts.mdx index d94cf81c..ed041429 100644 --- a/hedera/core-concepts/smart-contracts/system-smart-contracts.mdx +++ b/hedera/core-concepts/smart-contracts/system-smart-contracts.mdx @@ -6,7 +6,7 @@ System smart contracts are Hedera API functionality logic presented at reserved **System Smart Contract Interfaces** -Solidity interfaces provide and define a set of functions that other smart contracts can call. The interfaces for all Hedera systems contracts written in Solidity are maintained in the [`hedera-smart-contracts`](https://github.com/hashgraph/hedera-smart-contracts) repository. +Solidity interfaces provide and define a set of functions that other smart contracts can call. The interfaces for all Hedera systems contracts written in Solidity are maintained in the [`hiero-contracts`](https://github.com/hiero-ledger/hiero-contracts) repository. **Note:** The following Solidity examples are *not* production-ready and are intended solely for instructional purposes to guide developers. @@ -20,7 +20,7 @@ The exchange rate contract allows you to convert from tinycents to tinybars and | Contract Address | Source | | ---------------- | -------------------------------------------------------------------------------------------------------- | -| `0x168` | https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/exchange-rate | +| `0x168` | https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/exchange-rate | **Example ⬇** @@ -64,7 +64,7 @@ The Hedera Token Service smart contract precompile provides functions to use the | Contract Address | Source | | ---------------- | --------------------------------------------------------------------------------------------------------------- | -| `0x167` | https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-token-service | +| `0x167` | https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/token-service | **Example ⬇** @@ -886,7 +886,7 @@ The Hedera Account Service contract provides functions to interact with the Hede | Contract Address | Source | | ---------------- | ----------------------------------------------------------------------------------------------------------------- | -| `0x16a` | https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-account-service | +| `0x16a` | https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/account-service | #### Example ⬇ @@ -930,7 +930,7 @@ The Hedera Schedule Service (HSS) system contract exposes functions that enable | Contract Address | Source | | ---------------- | ------------------------------------------------------------------------------------------------------------------ | -| `0x16b` | https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-schedule-service | +| `0x16b` | https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/schedule-service | #### Example ⬇ @@ -990,7 +990,7 @@ The `PRNG` system contract allows you to generate a pseudo-random number that ca | Contract Address | Source | | ---------------- | ------------------------------------------------------------------------------------------------------------------------- | -| `0x169` | https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/pseudo-random-number-generator | +| `0x169` | https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/prng | **Example ⬇** diff --git a/hedera/core-concepts/smart-contracts/system-smart-contracts/hedera-account-service.mdx b/hedera/core-concepts/smart-contracts/system-smart-contracts/hedera-account-service.mdx index 915c21c2..9ac92a34 100644 --- a/hedera/core-concepts/smart-contracts/system-smart-contracts/hedera-account-service.mdx +++ b/hedera/core-concepts/smart-contracts/system-smart-contracts/hedera-account-service.mdx @@ -10,7 +10,7 @@ EVM developers should note that `ECRECOVER` natively supports ECDSA accounts on To verify an ECDSA signature, developers can call `ECRECOVER(messageHash, r, s, v)` in Ethereum smart contracts. If the recovered address matches the alias of a Hedera account, the signer is confirmed to control the account. No special integration is needed—`ECRECOVER` functions as a standard EVM precompiled contract on Hedera -**Note**: This functionality is specific to ECDSA accounts with Keccak-256(publicKey) aliases. For ED25519 accounts, Hedera offers alternative authorization methods, such as `isAuthorized()` or `isAuthorizedRaw()`, to verify control of an account. For details, refer to the [Hedera Account Service System Contract](https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-account-service). See below for details on these two precompile functions. +**Note**: This functionality is specific to ECDSA accounts with Keccak-256(publicKey) aliases. For ED25519 accounts, Hedera offers alternative authorization methods, such as `isAuthorized()` or `isAuthorizedRaw()`, to verify control of an account. For details, refer to the [Hedera Account Service System Contract](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/account-service). See below for details on these two precompile functions. *** diff --git a/hedera/core-concepts/smart-contracts/tokens-managed-by-smart-contracts/hedera-token-service-system-contract.mdx b/hedera/core-concepts/smart-contracts/tokens-managed-by-smart-contracts/hedera-token-service-system-contract.mdx index af29d73e..9749d270 100644 --- a/hedera/core-concepts/smart-contracts/tokens-managed-by-smart-contracts/hedera-token-service-system-contract.mdx +++ b/hedera/core-concepts/smart-contracts/tokens-managed-by-smart-contracts/hedera-token-service-system-contract.mdx @@ -21,6 +21,6 @@ Given your HTS token address, you can invoke these functions: diff --git a/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/accounts-signature-verification-and-keys-ecdsa-vs.-ed25519.mdx b/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/accounts-signature-verification-and-keys-ecdsa-vs.-ed25519.mdx index 89b1fe25..249a5b02 100644 --- a/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/accounts-signature-verification-and-keys-ecdsa-vs.-ed25519.mdx +++ b/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/accounts-signature-verification-and-keys-ecdsa-vs.-ed25519.mdx @@ -151,4 +151,4 @@ This simple pattern allows you to change the trusted signer as needed, reflectin * [**Hedera SDKs**](/hedera/sdks-and-apis/sdks) * [**Hedera Account Service**](/hedera/core-concepts/smart-contracts/system-smart-contracts/hedera-account-service) * [**HIP-632 Specification**](https://hips.hedera.com/hip/hip-632) -* [**Hedera Account Service System Contract**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-account-service) +* [**Hedera Account Service System Contract**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/account-service) diff --git a/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/handling-hbar-transfers-in-contracts.mdx b/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/handling-hbar-transfers-in-contracts.mdx index 67d0167f..718b17b8 100644 --- a/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/handling-hbar-transfers-in-contracts.mdx +++ b/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/handling-hbar-transfers-in-contracts.mdx @@ -17,7 +17,7 @@ In Solidity, there are three ways to transfer value to and from contracts: * `send()`: Sends a fixed amount of gas and returns `false` on failure instead of reverting. * `call()`: A low-level function for sending value that allows specifying gas and includes additional data payloads. -These methods are supported on Hedera, ensuring compatibility with existing Solidity patterns. For more information on the supported functions, refer to the [Hedera smart contracts repo](https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/solidity). +These methods are supported on Hedera, ensuring compatibility with existing Solidity patterns. For more information on the supported functions, refer to the [Hedera smart contracts repo](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts). ### **Key Considerations** @@ -65,6 +65,6 @@ For developers newer to Solidity, we recommend exploring [Solidity courses](http ### Additional Resources -* [**Hedera Smart Contracts Repo**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/solidity) +* [**Hedera Smart Contracts Repo**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts) * [**Solidity Documentation**](https://docs.soliditylang.org/) * [**Solidity by Example**](https://solidity-by-example.org/) diff --git a/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/token-management-with-hedera-token-service.mdx b/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/token-management-with-hedera-token-service.mdx index 07e3925f..18b14f47 100644 --- a/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/token-management-with-hedera-token-service.mdx +++ b/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-evm-developers-migrating-to-hedera/token-management-with-hedera-token-service.mdx @@ -81,4 +81,4 @@ contract TokenManager { ## Additional Resources * [**Access HTS Tokens Through the EVM**](/hedera/core-concepts/tokens/erc-evm-compatible-tokenization) -* [**HTS System Contract Functions**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-token-service) +* [**HTS System Contract Functions**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/token-service) diff --git a/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-hedera-native-developers-adding-smart-contract-functionality/extending-token-management-with-smart-contracts.mdx b/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-hedera-native-developers-adding-smart-contract-functionality/extending-token-management-with-smart-contracts.mdx index 8661b0a3..70c7320d 100644 --- a/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-hedera-native-developers-adding-smart-contract-functionality/extending-token-management-with-smart-contracts.mdx +++ b/hedera/core-concepts/smart-contracts/understanding-hederas-evm-differences-and-compatibility/for-hedera-native-developers-adding-smart-contract-functionality/extending-token-management-with-smart-contracts.mdx @@ -58,6 +58,6 @@ contract TokenManager { ## Additional Resources -* [**HTS System Contract Functions**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-token-service) +* [**HTS System Contract Functions**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/token-service) * [**Tokens Managed by Smart Contracts**](/hedera/core-concepts/smart-contracts/tokens-managed-by-smart-contracts) * [**Accessing HTS Tokens Through the EVM**](/hedera/core-concepts/tokens/hybrid-hts-+-evm-tokenization) diff --git a/hedera/core-concepts/smart-contracts/wrapped-hbar-whbar.mdx b/hedera/core-concepts/smart-contracts/wrapped-hbar-whbar.mdx index 033f5143..6b287005 100644 --- a/hedera/core-concepts/smart-contracts/wrapped-hbar-whbar.mdx +++ b/hedera/core-concepts/smart-contracts/wrapped-hbar-whbar.mdx @@ -94,11 +94,11 @@ WHBAR supports all standard ERC20 operations: ## Contract Deployments -The WHBAR contract implementation is available on GitHub in the [Hedera Smart Contracts repository](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/wrapped-tokens/WHBAR.sol). +The WHBAR contract implementation is available on GitHub in the [Hedera Smart Contracts repository](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts).
NetworkContract IDEVM Address
✅ Hedera Mainnet0.0.88407850xb1F616b8134F602c3Bb465fB5b5e6565cCAd37Ed
✅ Hedera Testnet0.0.58165420xb1F616b8134F602c3Bb465fB5b5e6565cCAd37Ed
🔜 Other NetworksComing soonComing soon
-***Source Code:*** [*WHBAR.sol*](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/wrapped-tokens/WHBAR.sol) +***Source Code:*** [*WHBAR.sol*](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts) *** diff --git a/hedera/core-concepts/tokens/erc-evm-compatible-tokenization.mdx b/hedera/core-concepts/tokens/erc-evm-compatible-tokenization.mdx index 0164c440..707b88f6 100644 --- a/hedera/core-concepts/tokens/erc-evm-compatible-tokenization.mdx +++ b/hedera/core-concepts/tokens/erc-evm-compatible-tokenization.mdx @@ -54,7 +54,7 @@ Under the hood, when an EVM-compatible tool interacts with an HTS token's facade In summary, facade contracts provide a bridge between Hedera's native token services and the Ethereum ecosystem, enabling developers to leverage Hedera's performance benefits while maintaining compatibility with established Ethereum standards and tools.​ -
Facade ContractsDescription
IHRC904AccountFacade.solhttps://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-account-service/IHRC904AccountFacade.sol
IHRC906AccountFacade.solhttps://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-account-service/IHRC906AccountFacade.sol
IHRC755ScheduleFacade.solhttps://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-schedule-service/IHRC755ScheduleFacade.sol
IHRC904TokenFacade.solhttps://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/IHRC904TokenFacade.sol
+
Facade ContractsDescription
IHRC904AccountFacade.solhttps://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/account-service/IHRC904AccountFacade.sol
IHRC906AccountFacade.solhttps://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/account-service/IHRC906AccountFacade.sol
IHRC755ScheduleFacade.solhttps://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/schedule-service/IHRC755ScheduleFacade.sol
IHRC904TokenFacade.solhttps://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHRC904TokenFacade.sol
### Token Associations diff --git a/hedera/core-concepts/tokens/hybrid-hts-+-evm-tokenization.mdx b/hedera/core-concepts/tokens/hybrid-hts-+-evm-tokenization.mdx index 44de3745..cff9d1bc 100644 --- a/hedera/core-concepts/tokens/hybrid-hts-+-evm-tokenization.mdx +++ b/hedera/core-concepts/tokens/hybrid-hts-+-evm-tokenization.mdx @@ -55,7 +55,7 @@ Hedera's system contracts allow EVM-based smart contracts to interact directly w This native integration eliminates the need for custom bridges or complex workarounds, making HTS token management within smart contracts more efficient and developer-friendly. -
System ContractContract AddressSource
Hedera Account Service (HAS)0x16ahttps://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-account-service
Hedera Schedule Service (HSS)0x16bhttps://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-schedule-service
Hedera Token Service (HTS)0x167https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-token-service
Exchange Rate0x168https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/exchange-rate
Pseudo Random Number Generator (PRNG)0x169https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/pseudo-random-number-generator
+
System ContractContract AddressSource
Hedera Account Service (HAS)0x16ahttps://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/account-service
Hedera Schedule Service (HSS)0x16bhttps://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/schedule-service
Hedera Token Service (HTS)0x167https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/token-service
Exchange Rate0x168https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/exchange-rate
Pseudo Random Number Generator (PRNG)0x169https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/prng
*** diff --git a/hedera/open-source-solutions/interoperability-and-bridging/layerzero.mdx b/hedera/open-source-solutions/interoperability-and-bridging/layerzero.mdx index 888309a5..7f626daa 100644 --- a/hedera/open-source-solutions/interoperability-and-bridging/layerzero.mdx +++ b/hedera/open-source-solutions/interoperability-and-bridging/layerzero.mdx @@ -36,7 +36,7 @@ To get started quickly, you can begin with the Gitpod demo, which requires no en
Explore examples for bridging tokens with LayerZero. @@ -53,7 +53,7 @@ All examples in the demo repo are exploratory code and have NOT been audited. Pl ### Omnichain Fungible Token (OFT) / Omnichain Non-Fungible Token (ONFT) -The OFT and ONFT token standards allow the transfer of fungible (ERC-20s) and non-fungible tokens (ERC-721s) across chains using LayerZero's messaging infrastructure. If you're bridging an existing fungible ERC token on Hedera to another EVM chain, you can deploy the [**OFT**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#oft) standard contract and the [**ONFT**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#onft) standard contract for NFTs. +The OFT and ONFT token standards allow the transfer of fungible (ERC-20s) and non-fungible tokens (ERC-721s) across chains using LayerZero's messaging infrastructure. If you're bridging an existing fungible ERC token on Hedera to another EVM chain, you can deploy the [**OFT**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) standard contract and the [**ONFT**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) standard contract for NFTs. #### **Use Case** @@ -65,7 +65,7 @@ Allows fungible and non-fungible tokens to be transferred across chains. @@ -101,7 +101,7 @@ contract ExampleOFT is OFT { @@ -136,7 +136,7 @@ contract ExampleONFT is ONFT721 { ### OFT Adapter / ONFT Adapter -The OFT Adapter acts as an intermediary contract that handles sending and receiving existing fungible tokens across chains. If your token already exists on the chain you want to connect to, you can deploy the [**OFT Adapter**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#oft-adapter) contract to act as an intermediary lockbox for the token. Similarly, the ONFT Adapter handles sending and receiving existing fungible tokens across chains. If your NFT already exists on the chain you want to connect to, you can deploy the [**ONFT Adapter**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#onft-adapter) contract to act as an intermediary lockbox for the NFT. +The OFT Adapter acts as an intermediary contract that handles sending and receiving existing fungible tokens across chains. If your token already exists on the chain you want to connect to, you can deploy the [**OFT Adapter**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) contract to act as an intermediary lockbox for the token. Similarly, the ONFT Adapter handles sending and receiving existing fungible tokens across chains. If your NFT already exists on the chain you want to connect to, you can deploy the [**ONFT Adapter**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) contract to act as an intermediary lockbox for the NFT. #### **Use Case** @@ -148,7 +148,7 @@ Intermediary contract that handles sending and receiving existing fungible token @@ -172,7 +172,7 @@ contract ExampleOFTAdapter is OFTAdapter { @@ -203,7 +203,7 @@ contract ExampleONFTAdapter is ONFT721Adapter { ### HTS Connector -The [**HTS Connector Contract**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#hts-connector) ([independent audit report](https://hedera.com/audits-and-standards)) extends LayerZero’s functionality to accommodate HTS tokens, addressing the differences between HTS and ERC token standards. It facilitates the integration of existing ERC tokens with Hedera by bridging them as native HTS tokens. This is a variant of OFT when bringing tokens to Hedera as HTS. If you bring a token to Hedera as an ERC token, you can use [**OFT**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#oft) or [**ONFT**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#onft). +The [**HTS Connector Contract**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) ([independent audit report](https://hedera.com/audits-and-standards)) extends LayerZero’s functionality to accommodate HTS tokens, addressing the differences between HTS and ERC token standards. It facilitates the integration of existing ERC tokens with Hedera by bridging them as native HTS tokens. This is a variant of OFT when bringing tokens to Hedera as HTS. If you bring a token to Hedera as an ERC token, you can use [**OFT**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) or [**ONFT**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions). #### **Use Case** @@ -348,7 +348,7 @@ Please note the smallest unit of ***HBAR is the tinybar (8 decimal places)***, w ## Additional Resources -* [**LZ Examples Repo**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#layer-zero-examples) +* [**LZ Examples Repo**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) * [**Independent Audit Report**](https://hedera.com/audits-and-standards) * [**Demo Code Repo**](https://github.com/hedera-dev/hedera-example-layer-zero-bridging-oapp) * [**LayerZero Scan**](https://layerzeroscan.com/) diff --git a/hedera/sdks-and-apis/sdks/smart-contracts/hedera-service-solidity-libraries.mdx b/hedera/sdks-and-apis/sdks/smart-contracts/hedera-service-solidity-libraries.mdx index b755b05b..f19176e2 100644 --- a/hedera/sdks-and-apis/sdks/smart-contracts/hedera-service-solidity-libraries.mdx +++ b/hedera/sdks-and-apis/sdks/smart-contracts/hedera-service-solidity-libraries.mdx @@ -7,14 +7,14 @@ title: "Hedera Service Solidity Libraries" Hedera Token Service integration allows you to write token transactions natively in Solidity smart contracts. There are a few **Solidity source files** available to developers. -* [HederaTokenService.sol](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/HederaTokenService.sol) -* [HederaResponseCodes.sol](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/HederaResponseCodes.sol) -* [IHederaTokenService.sol](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol) -* [ExpiryHelper.sol](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/ExpiryHelper.sol) -* [FeeHelper.sol](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/FeeHelper.sol) -* [KeyHelper.sol](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/KeyHelper.sol) +* [HederaTokenService.sol](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/HederaTokenService.sol) +* [HederaResponseCodes.sol](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/common/HederaResponseCodes.sol) +* [IHederaTokenService.sol](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHederaTokenService.sol) +* [ExpiryHelper.sol](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/ExpiryHelper.sol) +* [FeeHelper.sol](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/FeeHelper.sol) +* [KeyHelper.sol](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/KeyHelper.sol) -The Hedera Token Service Solidity file provides the transactions to interact with tokens created on Hedera. The Hedera Response Codes contract provides the response codes associated with network errors. The IHedera Token Service is a supporting library for the Hedera Token Service Solidity file. You can grab these libraries [here](https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-token-service) to add to your project and import them to your Solidity contract. Please see the example file below. +The Hedera Token Service Solidity file provides the transactions to interact with tokens created on Hedera. The Hedera Response Codes contract provides the response codes associated with network errors. The IHedera Token Service is a supporting library for the Hedera Token Service Solidity file. You can grab these libraries [here](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/token-service) to add to your project and import them to your Solidity contract. Please see the example file below. ```solidity ContractExample.sol // SPDX-License-Identifier: GPL-3.0 @@ -33,7 +33,7 @@ int response = HederaTokenService.transferToken(tokenAddress, msg.sender, addres -**Note:** Although the [IHederaTokenService.sol ](https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol)file is not imported in the contract, you will need it in your project directory for the supporting libraries to reference. +**Note:** Although [IHederaTokenService.sol](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHederaTokenService.sol) is not imported in the contract, you need it in your project directory so supporting libraries can reference it. ## HederaTokenService.sol API Docs @@ -41,7 +41,7 @@ int response = HederaTokenService.transferToken(tokenAddress, msg.sender, addres ### Create Tokens -[HIP-358](https://hips.hedera.com/hip/hip-358): Token create precompile is live on previewnet and testnet. The [TokenCreateContract](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/examples/token-create/TokenCreateContract.sol) example contains four examples of how to create a token using the token create solidity libraries. +[HIP-358](https://hips.hedera.com/hip/hip-358): Token create precompile is live on previewnet and testnet. The [TokenCreateContract](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/extensions/token-create/TokenCreateContract.sol) example contains four examples of how to create a token using the token create solidity libraries. ### `createFungibleToken(token, initialTotalSupply, decimals)` @@ -94,7 +94,7 @@ ABI Version: 2 | **Param** | **Type** | **Description** | | ---------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------- | -| `tokenTransfers` | [IHederaTokenService.TokenTransferList\[\] ](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol)memory | The list of token transfers | +| `tokenTransfers` | [IHederaTokenService.TokenTransferList\[\] ](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHederaTokenService.sol)memory | The list of token transfers | ### `transferToken(token, sender, receiver, amount)` @@ -457,7 +457,7 @@ Updates the properties of a token including the name, symbol, treasury account, | **Param** | **Type** | **Description** | | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | | `token` | address | The Hedera token ID in Solidity format. | -| `tokenInfo` | [IHederaTokenService.HederaToken](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol) memory | The token properties to update. | +| `tokenInfo` | [IHederaTokenService.HederaToken](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHederaTokenService.sol) memory | The token properties to update. | ### `updateTokenExpiryInfo(token, expiryInfo)` @@ -466,7 +466,7 @@ Update the token expiration time. | **Param** | **Type** | **Description** | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | | `token` | address | The Hedera token ID in Solidity format. | -| `expiryInfo` | [IHederaTokenService.Expiry](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol) memory | The expiry properties of a token. | +| `expiryInfo` | [IHederaTokenService.Expiry](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHederaTokenService.sol) memory | The expiry properties of a token. | ### `updateTokenKeys(token, keys)` @@ -475,7 +475,7 @@ Update the keys set on a token. The key type is defined in the key parameter. | **Param** | **Type** | **Description** | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | | `token` | address | The Hedera token ID in Solidity format. | -| `keys` | [IHederaTokenService.TokenKey\[\]](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol) memory | The token key type. | +| `keys` | [IHederaTokenService.TokenKey\[\]](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHederaTokenService.sol) memory | The token key type. | ### `updateTokenKeys(token, keys)` @@ -484,7 +484,7 @@ Update the keys set on a token. The key type is defined in the key parameter. | **Param** | **Type** | **Description** | | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- | | `token` | address | The Hedera token ID in Solidity format. | -| `keys` | [IHederaTokenService.TokenKey\[\]](https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol) memory | The token key type. | +| `keys` | [IHederaTokenService.TokenKey\[\]](https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHederaTokenService.sol) memory | The token key type. | ### Airdrop Tokens @@ -492,25 +492,25 @@ Update the keys set on a token. The key type is defined in the key parameter. Airdrop one or more tokens to one or more accounts. -
ParamTypeDescription
tokenTransfersIHederaTokenService.TokenTransferList[] memoryThe list of token transfers
+
ParamTypeDescription
tokenTransfersIHederaTokenService.TokenTransferList[] memoryThe list of token transfers
### `cancelAirdrop(pendingAirdrops)` Cancels pending airdrops that have not yet been claimed. -
ParamTypeDescription
pendingAirdropsIHederaTokenService.PendingAirdrop[] memoryThe list of pending airdrops to cancel.
+
ParamTypeDescription
pendingAirdropsIHederaTokenService.PendingAirdrop[] memoryThe list of pending airdrops to cancel.
### `claimAirdrops(pendingAirdrops)` Claims pending airdrops that were sent to the calling account. -
ParamTypeDescription
pendingAirdropsIHederaTokenService.PendingAirdrop[] memoryThe list of pending airdrops to claim.
+
ParamTypeDescription
pendingAirdropsIHederaTokenService.PendingAirdrop[] memoryThe list of pending airdrops to claim.
### `rejectTokens(rejectAddress, ftAddresses, nftIds)` Airdrop one or more tokens to one or more accounts. -
ParamTypeDescription
rejectingAddressaddressThe address rejecting the tokens
ftAddressesmemoryArray of fungible token addresses to reject
nftIdsIHederaTokenService.NftId[] memoryArray of NFT IDs to reject
+
ParamTypeDescription
rejectingAddressaddressThe address rejecting the tokens
ftAddressesmemoryArray of fungible token addresses to reject
nftIdsIHederaTokenService.NftId[] memoryArray of NFT IDs to reject
## Gas Cost diff --git a/hedera/tutorials/smart-contracts/how-to-fork-the-hedera-network-with-hardhat-advanced-hts.mdx b/hedera/tutorials/smart-contracts/how-to-fork-the-hedera-network-with-hardhat-advanced-hts.mdx index 860a17ee..0a9f6262 100644 --- a/hedera/tutorials/smart-contracts/how-to-fork-the-hedera-network-with-hardhat-advanced-hts.mdx +++ b/hedera/tutorials/smart-contracts/how-to-fork-the-hedera-network-with-hardhat-advanced-hts.mdx @@ -12,7 +12,7 @@ This guide shows how to: References: - Repo: [hashgraph/hedera-forking](https://github.com/hashgraph/hedera-forking) -- HTS System Contracts: [hedera-smart-contracts](https://github.com/hashgraph/hedera-smart-contracts) +- HTS System Contracts: [hiero-contracts](https://github.com/hiero-ledger/hiero-contracts) - Supported methods: [README - Supported Methods](https://github.com/hashgraph/hedera-forking#hedera-token-service-supported-methods) @@ -31,7 +31,7 @@ References: ## Prerequisites - Completed [Part 1](/hedera/tutorials/smart-contracts/how-to-fork-the-hedera-network-with-hardhat-basic-erc20) of this tutorial series -- Familiarity with Hedera System Contracts - more specifically [HTS System Contracts precompiles](https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-token-service) +- Familiarity with Hedera System Contracts - more specifically [HTS System Contracts precompiles](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/token-service) --- @@ -73,7 +73,7 @@ Create or update your `package.json` with all required dependencies: }, "license": "MIT", "devDependencies": { - "@hashgraph/smart-contracts": "github:hashgraph/hedera-smart-contracts", + "@hiero-ledger/hiero-contracts": "^0.1.0-rc.0", "@hashgraph/system-contracts-forking": "0.1.2", "@nomicfoundation/hardhat-chai-matchers": "^2.0.0", "@nomicfoundation/hardhat-ethers": "^3.0.0", @@ -100,7 +100,7 @@ Create or update your `package.json` with all required dependencies: } ``` -Note the addition of `@hashgraph/smart-contracts` which provides the HTS System Contracts interfaces and helper contracts. +Note the addition of `@hiero-ledger/hiero-contracts` which provides the HTS System Contracts interfaces and helper contracts. Then install all dependencies: @@ -117,7 +117,7 @@ The `@hashgraph/system-contracts-forking` plugin requires **Hardhat 2.22.x**. Ne - **`hardhat@2.22.19`** - Last compatible version before breaking changes - **`@nomicfoundation/hardhat-toolbox@5.0.0`** - Compatible with Hardhat 2.22.x - **`@hashgraph/system-contracts-forking@0.1.2`** - The Hedera forking plugin -- **`@hashgraph/smart-contracts`** - HTS System Contracts interfaces +- **`@hiero-ledger/hiero-contracts`** - HTS System Contracts interfaces - **`--legacy-peer-deps`** - Required to resolve dependency conflicts between these versions
@@ -253,12 +253,12 @@ Create a new file `contracts/HTSTokenManager.sol`: // SPDX-License-Identifier: MIT pragma solidity ^0.8.33; -import "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/HederaTokenService.sol"; -import "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/ExpiryHelper.sol"; -import "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/KeyHelper.sol"; -import "@hashgraph/smart-contracts/contracts/system-contracts/HederaResponseCodes.sol"; -import "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol"; -import "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/FeeHelper.sol"; +import "@hiero-ledger/hiero-contracts/token-service/HederaTokenService.sol"; +import "@hiero-ledger/hiero-contracts/token-service/ExpiryHelper.sol"; +import "@hiero-ledger/hiero-contracts/token-service/KeyHelper.sol"; +import "@hiero-ledger/hiero-contracts/common/HederaResponseCodes.sol"; +import "@hiero-ledger/hiero-contracts/token-service/IHederaTokenService.sol"; +import "@hiero-ledger/hiero-contracts/token-service/FeeHelper.sol"; contract HTSTokenManager is HederaTokenService, @@ -1216,7 +1216,7 @@ await network.provider.send("hardhat_setBalance", [ 3. [**hedera-forking Repository**](https://github.com/hashgraph/hedera-forking)\ Explore examples and documentation -4. [**Hedera Smart Contracts Repository**](https://github.com/hashgraph/hedera-smart-contracts)\ +4. [**Hedera Smart Contracts Repository**](https://github.com/hiero-ledger/hiero-contracts)\ Explore HTS System Contracts interfaces diff --git a/hedera/tutorials/smart-contracts/hss-x-evm-part-1-schedule-smart-contract-calls.mdx b/hedera/tutorials/smart-contracts/hss-x-evm-part-1-schedule-smart-contract-calls.mdx index 09c787ac..c4852eda 100644 --- a/hedera/tutorials/smart-contracts/hss-x-evm-part-1-schedule-smart-contract-calls.mdx +++ b/hedera/tutorials/smart-contracts/hss-x-evm-part-1-schedule-smart-contract-calls.mdx @@ -109,10 +109,10 @@ rm -rf ignition Next, install the required dependencies: ```bash -npm install github:hashgraph/hedera-smart-contracts +npm install @hiero-ledger/hiero-contracts ``` -Note that we are installing the latest code from the main branch when we install `github:hashgraph/hedera-smart-contracts`. This also gets installed at `@hashgraph/smart-contracts` so we can easily call these contracts from our own contract. +Install the published `@hiero-ledger/hiero-contracts` package to access the latest available system contract interfaces in your project. --- @@ -168,10 +168,10 @@ pragma solidity ^0.8.31; import { HederaScheduleService -} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-schedule-service/HederaScheduleService.sol"; +} from "@hiero-ledger/hiero-contracts/schedule-service/HederaScheduleService.sol"; import { HederaResponseCodes -} from "@hashgraph/smart-contracts/contracts/system-contracts/HederaResponseCodes.sol"; +} from "@hiero-ledger/hiero-contracts/common/HederaResponseCodes.sol"; /// Very simple "alarm clock" demo: /// - User calls setAlarm() diff --git a/hedera/tutorials/smart-contracts/hss-x-evm-part-2-dynamic-rebalancing.mdx b/hedera/tutorials/smart-contracts/hss-x-evm-part-2-dynamic-rebalancing.mdx index 5558d868..90538a90 100644 --- a/hedera/tutorials/smart-contracts/hss-x-evm-part-2-dynamic-rebalancing.mdx +++ b/hedera/tutorials/smart-contracts/hss-x-evm-part-2-dynamic-rebalancing.mdx @@ -140,10 +140,10 @@ rm -rf ignition Next, install the required dependencies: ```bash -npm install github:hashgraph/hedera-smart-contracts +npm install @hiero-ledger/hiero-contracts ``` -Note that we are installing the latest code from the main branch when we install `github:hashgraph/hedera-smart-contracts`. This also gets installed at `@hashgraph/smart-contracts` so we can easily call these contracts from our own contract. +Install the published `@hiero-ledger/hiero-contracts` package to access the latest available system contract interfaces in your project. Configure `hardhat.config.ts`: @@ -285,13 +285,13 @@ pragma solidity ^0.8.31; import { HederaScheduleService -} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-schedule-service/HederaScheduleService.sol"; +} from "@hiero-ledger/hiero-contracts/schedule-service/HederaScheduleService.sol"; import { HederaResponseCodes -} from "@hashgraph/smart-contracts/contracts/system-contracts/HederaResponseCodes.sol"; +} from "@hiero-ledger/hiero-contracts/common/HederaResponseCodes.sol"; import { PrngSystemContract -} from "@hashgraph/smart-contracts/contracts/system-contracts/pseudo-random-number-generator/PrngSystemContract.sol"; +} from "@hiero-ledger/hiero-contracts/prng/PrngSystemContract.sol"; contract RebalancerCapacityAware is HederaScheduleService { uint256 internal constant REBALANCE_GAS_LIMIT = 2_000_000; diff --git a/hedera/tutorials/smart-contracts/hts-x-evm-part-1-how-to-mint-nfts.mdx b/hedera/tutorials/smart-contracts/hts-x-evm-part-1-how-to-mint-nfts.mdx index 9fc883e7..33cf120b 100644 --- a/hedera/tutorials/smart-contracts/hts-x-evm-part-1-how-to-mint-nfts.mdx +++ b/hedera/tutorials/smart-contracts/hts-x-evm-part-1-how-to-mint-nfts.mdx @@ -97,10 +97,10 @@ Next, install the required dependencies: ```bash npm install @openzeppelin/contracts -npm install github:hashgraph/hedera-smart-contracts +npm install @hiero-ledger/hiero-contracts ``` -Note that we are installing the latest code from the main branch when we install `github:hashgraph/hedera-smart-contracts` . This also gets installed at `@hashgraph/smart-contracts` so we can easily call these contracts from our own contract. +Install the published `@hiero-ledger/hiero-contracts` package to access the latest available system contract interfaces in your project. --- @@ -168,10 +168,10 @@ import {IERC721} from "@openzeppelin/contracts/interfaces/IERC721.sol"; // Hedera HTS system contracts (as in your setup) // Hedera HTS system contracts (v1, NOT v2) -import {HederaTokenService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/HederaTokenService.sol"; -import {IHederaTokenService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol"; -import {HederaResponseCodes} from "@hashgraph/smart-contracts/contracts/system-contracts/HederaResponseCodes.sol"; -import {KeyHelper} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/KeyHelper.sol"; +import {HederaTokenService} from "@hiero-ledger/hiero-contracts/token-service/HederaTokenService.sol"; +import {IHederaTokenService} from "@hiero-ledger/hiero-contracts/token-service/IHederaTokenService.sol"; +import {HederaResponseCodes} from "@hiero-ledger/hiero-contracts/common/HederaResponseCodes.sol"; +import {KeyHelper} from "@hiero-ledger/hiero-contracts/token-service/KeyHelper.sol"; /** * HTS-backed ERC721-like collection: diff --git a/hedera/tutorials/smart-contracts/hts-x-evm-part-2-kyc-and-update.mdx b/hedera/tutorials/smart-contracts/hts-x-evm-part-2-kyc-and-update.mdx index 0eee3e22..d48b17a4 100644 --- a/hedera/tutorials/smart-contracts/hts-x-evm-part-2-kyc-and-update.mdx +++ b/hedera/tutorials/smart-contracts/hts-x-evm-part-2-kyc-and-update.mdx @@ -235,10 +235,10 @@ import {IERC721} from "@openzeppelin/contracts/interfaces/IERC721.sol"; // Hedera HTS system contracts (as in your setup) // Hedera HTS system contracts (v1, NOT v2) -import {HederaTokenService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/HederaTokenService.sol"; -import {IHederaTokenService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol"; -import {HederaResponseCodes} from "@hashgraph/smart-contracts/contracts/system-contracts/HederaResponseCodes.sol"; -import {KeyHelper} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/KeyHelper.sol"; +import {HederaTokenService} from "@hiero-ledger/hiero-contracts/token-service/HederaTokenService.sol"; +import {IHederaTokenService} from "@hiero-ledger/hiero-contracts/token-service/IHederaTokenService.sol"; +import {HederaResponseCodes} from "@hiero-ledger/hiero-contracts/common/HederaResponseCodes.sol"; +import {KeyHelper} from "@hiero-ledger/hiero-contracts/token-service/KeyHelper.sol"; /** * HTS-backed ERC721-like collection: diff --git a/hedera/tutorials/smart-contracts/hts-x-evm-part-3-how-to-pause-freeze-wipe-and-delete-nfts.mdx b/hedera/tutorials/smart-contracts/hts-x-evm-part-3-how-to-pause-freeze-wipe-and-delete-nfts.mdx index 51c0debf..1c29d9b9 100644 --- a/hedera/tutorials/smart-contracts/hts-x-evm-part-3-how-to-pause-freeze-wipe-and-delete-nfts.mdx +++ b/hedera/tutorials/smart-contracts/hts-x-evm-part-3-how-to-pause-freeze-wipe-and-delete-nfts.mdx @@ -317,10 +317,10 @@ import {IERC721} from "@openzeppelin/contracts/interfaces/IERC721.sol"; // Hedera HTS system contracts (as in your setup) // Hedera HTS system contracts (v1, NOT v2) -import {HederaTokenService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/HederaTokenService.sol"; -import {IHederaTokenService} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/IHederaTokenService.sol"; -import {HederaResponseCodes} from "@hashgraph/smart-contracts/contracts/system-contracts/HederaResponseCodes.sol"; -import {KeyHelper} from "@hashgraph/smart-contracts/contracts/system-contracts/hedera-token-service/KeyHelper.sol"; +import {HederaTokenService} from "@hiero-ledger/hiero-contracts/token-service/HederaTokenService.sol"; +import {IHederaTokenService} from "@hiero-ledger/hiero-contracts/token-service/IHederaTokenService.sol"; +import {HederaResponseCodes} from "@hiero-ledger/hiero-contracts/common/HederaResponseCodes.sol"; +import {KeyHelper} from "@hiero-ledger/hiero-contracts/token-service/KeyHelper.sol"; /** * HTS-backed ERC721-like collection: diff --git a/hedera/tutorials/smart-contracts/send-and-receive-hbar-using-solidity-smart-contracts.mdx b/hedera/tutorials/smart-contracts/send-and-receive-hbar-using-solidity-smart-contracts.mdx index 3ecedf11..9bda4fa9 100644 --- a/hedera/tutorials/smart-contracts/send-and-receive-hbar-using-solidity-smart-contracts.mdx +++ b/hedera/tutorials/smart-contracts/send-and-receive-hbar-using-solidity-smart-contracts.mdx @@ -100,8 +100,8 @@ main(); pragma solidity >=0.7.0 <0.9.0; // Compile with remix for remote imports to work - otherwise keep precompiles locally -import "https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/HederaTokenService.sol"; -import "https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/HederaResponseCodes.sol"; +import "https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/HederaTokenService.sol"; +import "https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/common/HederaResponseCodes.sol"; contract hbarToAndFromContract is HederaTokenService{ //============================================ diff --git a/hedera/tutorials/token/create-and-transfer-an-nft-using-a-solidity-contract.mdx b/hedera/tutorials/token/create-and-transfer-an-nft-using-a-solidity-contract.mdx index bd446c3a..9a2aa747 100644 --- a/hedera/tutorials/token/create-and-transfer-an-nft-using-a-solidity-contract.mdx +++ b/hedera/tutorials/token/create-and-transfer-an-nft-using-a-solidity-contract.mdx @@ -5,7 +5,7 @@ title: "Create and Transfer an NFT using a Solidity Contract" ## Summary -Besides creating NFTs using Hedera SDK, you can use a Solidity Contract to create, mint, and transfer NFTs by calling contract functions directly. These are the contracts you will need to import into your working directory provided by Hedera that you can find in the **contracts** folder [here](https://github.com/hashgraph/hedera-smart-contracts): +Besides creating NFTs using Hedera SDK, you can use a Solidity Contract to create, mint, and transfer NFTs by calling contract functions directly. These are the contracts you will need to import into your working directory provided by Hedera that you can find in the **contracts** folder [here](https://github.com/hiero-ledger/hiero-contracts): * HederaTokenService.sol * HederaResponseCodes.sol diff --git a/hedera/tutorials/token/hybrid-hts-+-evm-tokenization.mdx b/hedera/tutorials/token/hybrid-hts-+-evm-tokenization.mdx index 13a61c99..5232e0fa 100644 --- a/hedera/tutorials/token/hybrid-hts-+-evm-tokenization.mdx +++ b/hedera/tutorials/token/hybrid-hts-+-evm-tokenization.mdx @@ -71,8 +71,8 @@ This native integration eliminates the need for custom bridges or complex workar 0x16a - - https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-account-service + + https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/account-service @@ -84,8 +84,8 @@ This native integration eliminates the need for custom bridges or complex workar 0x16b - - https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-schedule-service + + https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/schedule-service @@ -97,8 +97,8 @@ This native integration eliminates the need for custom bridges or complex workar 0x167 - - https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-token-service + + https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/token-service @@ -110,8 +110,8 @@ This native integration eliminates the need for custom bridges or complex workar 0x168 - - https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/exchange-rate + + https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/exchange-rate @@ -123,8 +123,8 @@ This native integration eliminates the need for custom bridges or complex workar 0x169 - - https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/pseudo-random-number-generator + + https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/prng From b47920aba54df0bac9dbd634bbde83f8636e0ffd Mon Sep 17 00:00:00 2001 From: AYESIGA ISAAC Date: Thu, 19 Mar 2026 08:06:38 +0300 Subject: [PATCH 2/3] docs: restore LayerZero example paths Signed-off-by: AYESIGA ISAAC --- .../layerzero.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/hedera/open-source-solutions/interoperability-and-bridging/layerzero.mdx b/hedera/open-source-solutions/interoperability-and-bridging/layerzero.mdx index 7f626daa..759ae1b8 100644 --- a/hedera/open-source-solutions/interoperability-and-bridging/layerzero.mdx +++ b/hedera/open-source-solutions/interoperability-and-bridging/layerzero.mdx @@ -36,7 +36,7 @@ To get started quickly, you can begin with the Gitpod demo, which requires no en Explore examples for bridging tokens with LayerZero. @@ -53,7 +53,7 @@ All examples in the demo repo are exploratory code and have NOT been audited. Pl ### Omnichain Fungible Token (OFT) / Omnichain Non-Fungible Token (ONFT) -The OFT and ONFT token standards allow the transfer of fungible (ERC-20s) and non-fungible tokens (ERC-721s) across chains using LayerZero's messaging infrastructure. If you're bridging an existing fungible ERC token on Hedera to another EVM chain, you can deploy the [**OFT**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) standard contract and the [**ONFT**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) standard contract for NFTs. +The OFT and ONFT token standards allow the transfer of fungible (ERC-20s) and non-fungible tokens (ERC-721s) across chains using LayerZero's messaging infrastructure. If you're bridging an existing fungible ERC token on Hedera to another EVM chain, you can deploy the [**OFT**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#oft) standard contract and the [**ONFT**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#onft) standard contract for NFTs. #### **Use Case** @@ -65,7 +65,7 @@ Allows fungible and non-fungible tokens to be transferred across chains. @@ -101,7 +101,7 @@ contract ExampleOFT is OFT { @@ -136,7 +136,7 @@ contract ExampleONFT is ONFT721 { ### OFT Adapter / ONFT Adapter -The OFT Adapter acts as an intermediary contract that handles sending and receiving existing fungible tokens across chains. If your token already exists on the chain you want to connect to, you can deploy the [**OFT Adapter**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) contract to act as an intermediary lockbox for the token. Similarly, the ONFT Adapter handles sending and receiving existing fungible tokens across chains. If your NFT already exists on the chain you want to connect to, you can deploy the [**ONFT Adapter**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) contract to act as an intermediary lockbox for the NFT. +The OFT Adapter acts as an intermediary contract that handles sending and receiving existing fungible tokens across chains. If your token already exists on the chain you want to connect to, you can deploy the [**OFT Adapter**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#oft-adapter) contract to act as an intermediary lockbox for the token. Similarly, the ONFT Adapter handles sending and receiving existing fungible tokens across chains. If your NFT already exists on the chain you want to connect to, you can deploy the [**ONFT Adapter**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#onft-adapter) contract to act as an intermediary lockbox for the NFT. #### **Use Case** @@ -148,7 +148,7 @@ Intermediary contract that handles sending and receiving existing fungible token @@ -172,7 +172,7 @@ contract ExampleOFTAdapter is OFTAdapter { @@ -203,7 +203,7 @@ contract ExampleONFTAdapter is ONFT721Adapter { ### HTS Connector -The [**HTS Connector Contract**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) ([independent audit report](https://hedera.com/audits-and-standards)) extends LayerZero’s functionality to accommodate HTS tokens, addressing the differences between HTS and ERC token standards. It facilitates the integration of existing ERC tokens with Hedera by bridging them as native HTS tokens. This is a variant of OFT when bringing tokens to Hedera as HTS. If you bring a token to Hedera as an ERC token, you can use [**OFT**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) or [**ONFT**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions). +The [**HTS Connector Contract**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#hts-connector) ([independent audit report](https://hedera.com/audits-and-standards)) extends LayerZero’s functionality to accommodate HTS tokens, addressing the differences between HTS and ERC token standards. It facilitates the integration of existing ERC tokens with Hedera by bridging them as native HTS tokens. This is a variant of OFT when bringing tokens to Hedera as HTS. If you bring a token to Hedera as an ERC token, you can use [**OFT**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#oft) or [**ONFT**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#onft). #### **Use Case** @@ -348,7 +348,7 @@ Please note the smallest unit of ***HBAR is the tinybar (8 decimal places)***, w ## Additional Resources -* [**LZ Examples Repo**](https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/extensions) +* [**LZ Examples Repo**](https://github.com/hashgraph/hedera-smart-contracts/tree/main/lib/layer-zero#layer-zero-examples) * [**Independent Audit Report**](https://hedera.com/audits-and-standards) * [**Demo Code Repo**](https://github.com/hedera-dev/hedera-example-layer-zero-bridging-oapp) * [**LayerZero Scan**](https://layerzeroscan.com/) From f21f8b7463ef5549fb067deb61e6c340b877e1d1 Mon Sep 17 00:00:00 2001 From: AYESIGA ISAAC Date: Thu, 19 Mar 2026 15:23:01 +0300 Subject: [PATCH 3/3] docs: describe the change Signed-off-by: AYESIGA ISAAC --- "\357\200\272 describe the change\357\200\242" | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 "\357\200\272 describe the change\357\200\242" diff --git "a/\357\200\272 describe the change\357\200\242" "b/\357\200\272 describe the change\357\200\242" new file mode 100644 index 00000000..29f3bd6d --- /dev/null +++ "b/\357\200\272 describe the change\357\200\242" @@ -0,0 +1,3 @@ + backup/pr474-before-rewrite-20260319 +* docs/445-hiero-smart-contracts-migration + main