UNPKG

@openzeppelin/confidential-contracts

Version:

Smart Contract library for use with confidential coprocessors

794 lines (793 loc) 16.9 kB
{ "_format": "hh-sol-artifact-1", "contractName": "ConfidentialFungibleTokenERC20Wrapper", "sourceName": "contracts/token/extensions/ConfidentialFungibleTokenERC20Wrapper.sol", "abi": [ { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "name": "ConfidentialFungibleTokenInvalidGatewayRequest", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "receiver", "type": "address" } ], "name": "ConfidentialFungibleTokenInvalidReceiver", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "sender", "type": "address" } ], "name": "ConfidentialFungibleTokenInvalidSender", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "caller", "type": "address" } ], "name": "ConfidentialFungibleTokenUnauthorizedCaller", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "holder", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "name": "ConfidentialFungibleTokenUnauthorizedSpender", "type": "error" }, { "inputs": [ { "internalType": "euint64", "name": "amount", "type": "bytes32" }, { "internalType": "address", "name": "user", "type": "address" } ], "name": "ConfidentialFungibleTokenUnauthorizedUseOfEncryptedAmount", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "holder", "type": "address" } ], "name": "ConfidentialFungibleTokenZeroBalance", "type": "error" }, { "inputs": [], "name": "HandlesAlreadySavedForRequestID", "type": "error" }, { "inputs": [], "name": "InvalidKMSSignatures", "type": "error" }, { "inputs": [], "name": "NoHandleFoundForRequestID", "type": "error" }, { "inputs": [ { "internalType": "uint8", "name": "bits", "type": "uint8" }, { "internalType": "uint256", "name": "value", "type": "uint256" } ], "name": "SafeCastOverflowedUintDowncast", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "token", "type": "address" } ], "name": "SafeERC20FailedOperation", "type": "error" }, { "inputs": [], "name": "UnsupportedHandleType", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "euint64", "name": "encryptedAmount", "type": "bytes32" }, { "indexed": false, "internalType": "uint64", "name": "amount", "type": "uint64" } ], "name": "AmountDisclosed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": true, "internalType": "euint64", "name": "amount", "type": "bytes32" } ], "name": "ConfidentialTransfer", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "requestID", "type": "uint256" } ], "name": "DecryptionFulfilled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "holder", "type": "address" }, { "indexed": true, "internalType": "address", "name": "operator", "type": "address" }, { "indexed": false, "internalType": "uint48", "name": "until", "type": "uint48" } ], "name": "OperatorSet", "type": "event" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" } ], "name": "confidentialBalanceOf", "outputs": [ { "internalType": "euint64", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "confidentialTotalSupply", "outputs": [ { "internalType": "euint64", "name": "", "type": "bytes32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "externalEuint64", "name": "encryptedAmount", "type": "bytes32" }, { "internalType": "bytes", "name": "inputProof", "type": "bytes" } ], "name": "confidentialTransfer", "outputs": [ { "internalType": "euint64", "name": "", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "euint64", "name": "amount", "type": "bytes32" } ], "name": "confidentialTransfer", "outputs": [ { "internalType": "euint64", "name": "", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "euint64", "name": "amount", "type": "bytes32" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "confidentialTransferAndCall", "outputs": [ { "internalType": "euint64", "name": "transferred", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "externalEuint64", "name": "encryptedAmount", "type": "bytes32" }, { "internalType": "bytes", "name": "inputProof", "type": "bytes" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "confidentialTransferAndCall", "outputs": [ { "internalType": "euint64", "name": "transferred", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "externalEuint64", "name": "encryptedAmount", "type": "bytes32" }, { "internalType": "bytes", "name": "inputProof", "type": "bytes" } ], "name": "confidentialTransferFrom", "outputs": [ { "internalType": "euint64", "name": "transferred", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "euint64", "name": "amount", "type": "bytes32" } ], "name": "confidentialTransferFrom", "outputs": [ { "internalType": "euint64", "name": "transferred", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "externalEuint64", "name": "encryptedAmount", "type": "bytes32" }, { "internalType": "bytes", "name": "inputProof", "type": "bytes" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "confidentialTransferFromAndCall", "outputs": [ { "internalType": "euint64", "name": "transferred", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "euint64", "name": "amount", "type": "bytes32" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "confidentialTransferFromAndCall", "outputs": [ { "internalType": "euint64", "name": "transferred", "type": "bytes32" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "decimals", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "euint64", "name": "encryptedAmount", "type": "bytes32" } ], "name": "discloseEncryptedAmount", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "internalType": "uint64", "name": "amount", "type": "uint64" }, { "internalType": "bytes[]", "name": "signatures", "type": "bytes[]" } ], "name": "finalizeDiscloseEncryptedAmount", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestID", "type": "uint256" }, { "internalType": "uint64", "name": "amount", "type": "uint64" }, { "internalType": "bytes[]", "name": "signatures", "type": "bytes[]" } ], "name": "finalizeUnwrap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "holder", "type": "address" }, { "internalType": "address", "name": "spender", "type": "address" } ], "name": "isOperator", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "name", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "", "type": "address" }, { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "name": "onTransferReceived", "outputs": [ { "internalType": "bytes4", "name": "", "type": "bytes4" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "rate", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "operator", "type": "address" }, { "internalType": "uint48", "name": "until", "type": "uint48" } ], "name": "setOperator", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "symbol", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "tokenURI", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "underlying", "outputs": [ { "internalType": "contract IERC20", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "externalEuint64", "name": "encryptedAmount", "type": "bytes32" }, { "internalType": "bytes", "name": "inputProof", "type": "bytes" } ], "name": "unwrap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "from", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "euint64", "name": "amount", "type": "bytes32" } ], "name": "unwrap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "wrap", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ], "bytecode": "0x", "deployedBytecode": "0x", "linkReferences": {}, "deployedLinkReferences": {} }