Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 3 additions & 3 deletions hedera/core-concepts/smart-contracts/gas-and-fees.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ The gas requirements for **HTS view functions** can be calculated in a slightly

<Info>
**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.

Expand Down
2 changes: 1 addition & 1 deletion hedera/core-concepts/smart-contracts/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Applying this to the security model changes, the following table summarizes the

<table><thead><tr><th>Scenario</th><th>Authorization check</th><th align="center">Old Model</th><th align="center">New Model</th></tr></thead><tbody><tr><td>Smart contract A can change its own state using a call</td><td>sender = Contract A</td><td align="center">Y</td><td align="center">Y</td></tr><tr><td>Smart contract A can change EOA’s state via call</td><td>sender = EOA</td><td align="center">N</td><td align="center">N</td></tr><tr><td>Smart contract B can change contract A’s state via call</td><td>sender = A</td><td align="center">N</td><td align="center">N</td></tr><tr><td>Smart contract A can change EOA’s state via delegate call</td><td>sender = EOA</td><td align="center">Y</td><td align="center">Y</td></tr><tr><td>Smart contract B can change contract A’s state via delegate call</td><td>sender = Contract A</td><td align="center">Y</td><td align="center">Y</td></tr><tr><td>System smart contracts can change another accounts (EOA or contract A or contract B) state via call</td><td>sender = account</td><td align="center">N</td><td align="center">N</td></tr><tr><td>System smart contract can change another accounts EOA or contract A or contract B) state via delegate call</td><td>sender = account</td><td align="center">N</td><td align="center">N</td></tr><tr><td><strong>System contracts can change an accounts (EOA or contact A or contract B) state via call with the appropriate signature</strong></td><td><strong>signature map contains signature of accounts (EOA or contact A or contract B respectively)</strong></td><td align="center"><strong>Y</strong></td><td align="center"><strong>N</strong></td></tr><tr><td><strong>System smart contract can change another accounts (EOA or contact A or contract B) state via delegate call with the appropriate signature</strong></td><td><strong>signature map contains signature of accounts (EOA or contact A or contract B)</strong></td><td align="center"><strong>Y</strong></td><td align="center"><strong>N</strong></td></tr><tr><td>Contract A or B can call a system contract via a call</td><td>-</td><td align="center">Y</td><td align="center">Y</td></tr><tr><td><strong>Contract A or B can call a system contract via a delegate call</strong></td><td><strong>-</strong></td><td align="center"><strong>Y</strong></td><td align="center"><strong>N</strong></td></tr></tbody></table>

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.

<Warning>
**Note:** The following Solidity examples are *not* production-ready and are intended solely for instructional purposes to guide developers.
Expand All @@ -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 ⬇**

Expand Down Expand Up @@ -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 ⬇**

Expand Down Expand Up @@ -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 ⬇

Expand Down Expand Up @@ -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 ⬇

Expand Down Expand Up @@ -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 ⬇**

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

<Info>
**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.
</Info>

***
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ Given your HTS token address, you can invoke these functions:
<Card
icon="github"
title="GitHub"
href="https://github.com/hashgraph/hedera-smart-contracts/tree/main/contracts/system-contracts/hedera-token-service"
href="https://github.com/hiero-ledger/hiero-contracts/tree/main/contracts/token-service"
horizontal
/>
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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**

Expand Down Expand Up @@ -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/)
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
Expand Up @@ -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)
4 changes: 2 additions & 2 deletions hedera/core-concepts/smart-contracts/wrapped-hbar-whbar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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).

<table><thead><tr><th>Network</th><th>Contract ID</th><th>EVM Address</th></tr></thead><tbody><tr><td><strong>✅ Hedera Mainnet</strong></td><td><a href="https://hashscan.io/mainnet/contract/0.0.8840785">0.0.8840785</a></td><td>0xb1F616b8134F602c3Bb465fB5b5e6565cCAd37Ed</td></tr><tr><td><strong>✅ Hedera Testnet</strong></td><td><a href="https://hashscan.io/testnet/contract/0.0.5816542?pa=1&#x26;pr=1&#x26;ps=1&#x26;pf=1">0.0.5816542</a></td><td>0xb1F616b8134F602c3Bb465fB5b5e6565cCAd37Ed</td></tr><tr><td>🔜 <strong>Other Networks</strong></td><td>Coming soon</td><td>Coming soon</td></tr></tbody></table>

***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)

***

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.​

<table><thead><tr><th>Facade Contracts</th><th>Description</th></tr></thead><tbody><tr><td><strong>IHRC904AccountFacade.sol</strong></td><td><a href="https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-account-service/IHRC904AccountFacade.sol">https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-account-service/IHRC904AccountFacade.sol</a></td></tr><tr><td><strong>IHRC906AccountFacade.sol</strong></td><td><a href="https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-account-service/IHRC906AccountFacade.sol">https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-account-service/IHRC906AccountFacade.sol</a></td></tr><tr><td><strong>IHRC755ScheduleFacade.sol</strong></td><td><a href="https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-schedule-service/IHRC755ScheduleFacade.sol">https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-schedule-service/IHRC755ScheduleFacade.sol</a></td></tr><tr><td><strong>IHRC904TokenFacade.sol</strong></td><td><a href="https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/IHRC904TokenFacade.sol">https://github.com/hashgraph/hedera-smart-contracts/blob/main/contracts/system-contracts/hedera-token-service/IHRC904TokenFacade.sol</a></td></tr></tbody></table>
<table><thead><tr><th>Facade Contracts</th><th>Description</th></tr></thead><tbody><tr><td><strong>IHRC904AccountFacade.sol</strong></td><td><a href="https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/account-service/IHRC904AccountFacade.sol">https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/account-service/IHRC904AccountFacade.sol</a></td></tr><tr><td><strong>IHRC906AccountFacade.sol</strong></td><td><a href="https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/account-service/IHRC906AccountFacade.sol">https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/account-service/IHRC906AccountFacade.sol</a></td></tr><tr><td><strong>IHRC755ScheduleFacade.sol</strong></td><td><a href="https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/schedule-service/IHRC755ScheduleFacade.sol">https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/schedule-service/IHRC755ScheduleFacade.sol</a></td></tr><tr><td><strong>IHRC904TokenFacade.sol</strong></td><td><a href="https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHRC904TokenFacade.sol">https://github.com/hiero-ledger/hiero-contracts/blob/main/contracts/token-service/IHRC904TokenFacade.sol</a></td></tr></tbody></table>

<Info>
### Token Associations
Expand Down
Loading
Loading