@openzeppelin/confidential-contracts
Version:
Smart Contract library for use with confidential coprocessors
615 lines (614 loc) • 13.1 kB
JSON
{
"_format": "hh-sol-artifact-1",
"contractName": "ConfidentialFungibleToken",
"sourceName": "contracts/token/ConfidentialFungibleToken.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": [],
"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": "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": "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"
}
],
"bytecode": "0x",
"deployedBytecode": "0x",
"linkReferences": {},
"deployedLinkReferences": {}
}