HideMeToken is a confidential ERC-20-like token where every balance is an encrypted 64-bit integer (euint64) stored on Ethereum mainnet. Transfer amounts are encrypted, and events always emit amount = 0 to prevent leakage.
Each token is deployed by HideMeFactory. The example mainnet instance is at 0x02FA7116A5653dfDFe51cF83F587CB80F560145d.
Key properties
| Property | Value |
|---|---|
| Decimals | 6 (fixed) |
| Balance type | euint64 (FHE ciphertext) |
| Transfer event amount | Always 0 (privacy) |
| Solidity version | ^0.8.24 (compiled with 0.8.27) |
| License | MIT |
State variables
Token name, set at deployment.
Token symbol, set at deployment.
Always
6.Plaintext total supply. Updated on mint/burn.
Current owner. Can mint (if mintable), add/remove observers, transfer or renounce ownership.
Whether the owner can mint additional tokens.
Whether holders can burn their own tokens.
Maximum total supply cap.
0 = unlimited.Functions
transfer (client-side FHE)
encryptedAmount handle and inputProof are produced by encryptAmount() in the frontend SDK.
Recipient address. Cannot be
address(0).Encrypted amount handle produced by the client-side TFHE library.
Input verification proof from the Zama InputVerifier contract.
transfer (euint64 handle)
euint64 ciphertext. Used in contract-to-contract calls. The caller must be allowed on the amount handle (FHE.isSenderAllowed).
transferPlaintext
FHE.asEuint64(amount). No browser WASM required. Useful for integrations and the payment links feature.
approve
transferFrom
from using an approved allowance. Both balance and allowance are checked with encrypted comparisons.
mint
mintable = true. Reverts if maxSupply > 0 and the new total would exceed it.
burn
burnable = true. The encrypted comparison FHE.le(amount, balance) ensures a silent no-op if balance is insufficient.
addObserver / removeObserver
transferOwnership / renounceOwnership
balanceOf / allowance / getObservers
euint64 is a ciphertext — use the Zama decryption flow to read the actual value.
FHE transfer internals
The internal_transfer function uses this pattern to prevent balance leakage:
transferValue evaluates to 0 — no revert, no information leak.
Events
| Event | Parameters | Notes |
|---|---|---|
Transfer | from, to, amount | amount is always 0 |
Approval | owner, spender, amount | amount is always 0 |
ObserverAdded | observer, addedBy | |
ObserverRemoved | observer, removedBy | |
OwnershipTransferred | previousOwner, newOwner | |
OwnershipRenounced | previousOwner |
Custom errors
| Error | When thrown |
|---|---|
ZeroAddress | A required address parameter is address(0) |
SenderNotAllowed | Caller does not have FHE access on the provided euint64 handle |
OnlyOwner | Caller is not the owner |
MintingDisabled | mintable is false |
BurningDisabled | burnable is false |
ExceedsMaxSupply | Mint would exceed maxSupply |
HideMeFactory
Deploy new HideMeToken instances.
Encrypted Transfers
How to use the transfer functions from the frontend.