Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
b4ce8d9
Add `ERC7984Freezable` extension.
james-toussaint Jul 25, 2025
f04162b
Update pragma
james-toussaint Jul 25, 2025
ec16cdf
Merge remote-tracking branch 'origin/master' into feature/confidentia…
james-toussaint Aug 6, 2025
ff2a74f
Add freezable test
james-toussaint Aug 6, 2025
f485ec0
Remove unused functions in freezable mock
james-toussaint Aug 6, 2025
a961e33
Bring back previous HandleAccessManager
james-toussaint Aug 19, 2025
3c759fb
Move allow available to access function in mock
james-toussaint Aug 19, 2025
cd81483
Swap event & error order
james-toussaint Aug 19, 2025
3bb3f2e
Update inline documentation
james-toussaint Aug 19, 2025
ac9ae06
Remove useless var
james-toussaint Aug 19, 2025
4095083
Merge branch 'master' into feature/confidential-freezable-token
arr00 Aug 19, 2025
0286f57
Apply suggestions from review
james-toussaint Aug 20, 2025
c790dc5
Move freezable test file to extensions dir
james-toussaint Aug 20, 2025
754ecec
update tests
arr00 Aug 20, 2025
8e08500
Apply suggestions
james-toussaint Aug 21, 2025
7e45893
Remove account from `_validateHandleAllowance` (#178)
arr00 Aug 21, 2025
ed13e2f
Call internal when setting frozen with proof
james-toussaint Aug 22, 2025
9ae4074
Update doc
james-toussaint Aug 22, 2025
6a52710
Update pragma & remove import in freezable mock
james-toussaint Aug 22, 2025
bc71379
Base freezable mock on ERC7984Mock
james-toussaint Aug 22, 2025
4466341
Merge branch 'master' into feature/confidential-freezable-token
arr00 Aug 22, 2025
7f9b646
Apply suggestions
james-toussaint Aug 25, 2025
9d8aa7d
Check transfer amount is zero if transferring more than available
james-toussaint Aug 25, 2025
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
2 changes: 1 addition & 1 deletion .changeset/seven-books-dig.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
'openzeppelin-confidential-contracts': minor
---

`ERC7984Freezable`: Add an extension to `ERC7984`, which allows accounts granted the "freezer" role to freeze and unfreeze tokens.
`ERC7984Freezable`: Add an extension to `ERC7984`, which allows an account granted the "freezer" role to freeze and unfreeze a confidential amount of tokens for holders.
6 changes: 3 additions & 3 deletions contracts/token/ERC7984/extensions/ERC7984Freezable.sol
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ import {FHESafeMath} from "../../../utils/FHESafeMath.sol";
import {ERC7984} from "../ERC7984.sol";

/**
* Inspired by https://github.com/OpenZeppelin/openzeppelin-community-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Freezable.sol
*
* @dev Extension of {ERC7984} that allows to implement a confidential
* freezing mechanism that can be managed by an authorized account with
* the {_setConfidentialFrozen} function.
* {setConfidentialFrozen} functions.
*
* The freezing mechanism provides the guarantee to the contract owner
* (e.g. a DAO or a well-configured multisig) that a specific confidential
* amount of tokens held by an account won't be transferable until those
* tokens are unfrozen.
*
* Inspired by https://github.com/OpenZeppelin/openzeppelin-community-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Freezable.sol
*/
abstract contract ERC7984Freezable is ERC7984 {
/// @dev Confidential frozen amount of tokens per address.
Expand Down
2 changes: 2 additions & 0 deletions contracts/token/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ This set of interfaces, contracts, and utilities are all related to `ERC7984`, a

- {ERC7984}: Implementation of {IERC7984}.
- {ERC7984ERC20Wrapper}: Extension of {ERC7984} which wraps an `ERC20` into a confidential token. The wrapper allows for free conversion in both directions at a fixed rate.
- {ERC7984Freezable}: An extension for {ERC7984}, which allows an account granted the "freezer" role to freeze and unfreeze a confidential amount of tokens for holders.
- {ERC7984Utils}: A library that provides the on-transfer callback check used by {ERC7984}.

== Core
{{ERC7984}}

== Extensions
{{ERC7984ERC20Wrapper}}
{{ERC7984Freezable}}

== Utilities
{{ERC7984Utils}}