From 64767ca1ff5b4a274a88add89ebee5d0e76cd53d Mon Sep 17 00:00:00 2001 From: Arr00 <13561405+arr00@users.noreply.github.com> Date: Tue, 17 Feb 2026 08:49:40 -0700 Subject: [PATCH] Use a hyphen when referring to ERCs outside of code in confidential docs --- content/confidential-contracts/token.mdx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/content/confidential-contracts/token.mdx b/content/confidential-contracts/token.mdx index 188d1979..387b3732 100644 --- a/content/confidential-contracts/token.mdx +++ b/content/confidential-contracts/token.mdx @@ -1,8 +1,8 @@ --- -title: ERC7984 +title: ERC-7984 --- -[`ERC7984`](/confidential-contracts/api/token#ERC7984) is a standard fungible token implementation that is similar to ERC-20, but built from the ground up with confidentiality in mind. All balance and transfer amounts are represented as ciphertext handles, ensuring that no data is leaked to the public. +[ERC-7984](/confidential-contracts/api/token#ERC7984) is a standard fungible token implementation that is similar to ERC-20, but built from the ground up with confidentiality in mind. All balance and transfer amounts are represented as ciphertext handles, ensuring that no data is leaked to the public. While the standard is built with inspiration from ERC-20, it is not ERC-20 compliant--the standard takes learning from all tokens built over the past 10 years (ERC-20, ERC-721, ERC-1155, ERC-6909 etc) and provides an interface for maximal functionality. @@ -20,7 +20,7 @@ Select the appropriate transfer function and generate a ciphertext using [fhevm- ### Operator -An operator is an address that has the ability to move tokens on behalf of another address by calling `transferFrom`. If Bob is an operator for Alice, Bob can move any amount of Alice’s tokens at any point in time. Operators are set using an expiration timestamp--this can be thought of as a limited duration infinite approval for an `ERC20`. Below is an example of setting Bob as an operator for Alice for 24 hours. +An operator is an address that has the ability to move tokens on behalf of another address by calling `transferFrom`. If Bob is an operator for Alice, Bob can move any amount of Alice’s tokens at any point in time. Operators are set using an expiration timestamp--this can be thought of as a limited duration infinite approval for an ERC-20. Below is an example of setting Bob as an operator for Alice for 24 hours. ```typescript const alice: Wallet; @@ -55,9 +55,9 @@ Here is an example of a contract for a confidential fungible token with a privil Swapping is one of the most primitive use-cases for fungible tokens. Below are examples for swapping between confidential and non-confidential tokens. -#### Swap `ERC20` to `ERC7984` +#### Swap ERC-20 to ERC-7984 -Swapping from a non-confidential `ERC20` to a confidential `ERC7984` is simple and actually done within the `ERC7984ERC20Wrapper`. See the excerpt from the `wrap` function below. +Swapping from a non-confidential ERC-20 to a confidential ERC-7984 is simple and actually done within the `ERC7984ERC20Wrapper`. See the excerpt from the `wrap` function below. ```solidity function wrap(address to, uint256 amount) public virtual { @@ -69,11 +69,11 @@ function wrap(address to, uint256 amount) public virtual { } ``` -The `ERC20` token is simply transferred in, which would revert on failure. We then transfer out the correct amount of the `ERC7984` using the internal `_mint` function, which is guaranteed to succeed. +The ERC-20 token is simply transferred in, which would revert on failure. We then transfer out the correct amount of the ERC-7984 using the internal `_mint` function, which is guaranteed to succeed. -#### Swap `ERC7984` to `ERC7984` +#### Swap ERC-7984 to ERC-7984 -Swapping from a confidential `ERC7984` to another confidential `ERC7984` is a bit more complex although quite simple given the usage of the `FHE` library. For the sake of the example, we will swap from `fromToken` to `toToken` with a 1:1 exchange rate. +Swapping from a confidential ERC-7984 to another confidential ERC-7984 is a bit more complex although quite simple given the usage of the `FHE` library. For the sake of the example, we will swap from `fromToken` to `toToken` with a 1:1 exchange rate. ```solidity function swapConfidentialForConfidential( @@ -102,7 +102,7 @@ The steps are as follows: 4. Allow the `toToken` to access `amountTransferred` 5. Transfer `amountTransferred` to `msg.sender` -#### Swap `ERC7984` to `ERC20` +#### Swap ERC-7984 to ERC-20 Swapping from a confidential token to a non-confidential token is the most complex since the decrypted data must be accessed to accurately complete the request. Decryption in our example will be done off-chain and relayed back using Zama’s Gateway. Below is an example of a contract doing a 1:1 swap from a confidential token to an ERC20 token.