Architecture
PrivateERC20 (abstract)
βββ inherits: Context, ERC165, IPrivateERC20, AccessControl, ReentrancyGuard
βββ storage:
β βββ _balances: mapping(address => utUint256) // { ciphertext, userCiphertext }
β βββ _allowances: mapping(address => mapping(address => Allowance))
β βββ _totalSupply: ctUint256 // always decrypts to real supply
β βββ _accountEncryptionAddress: mapping(address => address)
βββ roles:
β βββ DEFAULT_ADMIN_ROLE β deployer
β βββ MINTER_ROLE β bridges, vesting contracts, etc.
βββ MpcCore (precompile at 0x64)
βββ setPublic256(uint256) β gtUint256
βββ validateCiphertext(itUint256) β gtUint256
βββ transfer(gt, gt, gt) β (gt, gt, gtBool)
βββ offBoard(gtUint256) β ctUint256
βββ offBoardToUser(gtUint256, address) β ctUint256
βββ onBoard(ctUint256) β gtUint256Key Concepts
Term
Description
Last updated
Was this helpful?