UNPKG

@zkp2p/contracts-v2

Version:

ZKP2P V2 smart contract interfaces and utilities

1,148 lines (1,147 loc) 23 kB
const data = [ { "inputs": [ { "internalType": "address", "name": "_owner", "type": "address" }, { "internalType": "uint256", "name": "_chainId", "type": "uint256" }, { "internalType": "address", "name": "_escrowRegistry", "type": "address" }, { "internalType": "address", "name": "_paymentVerifierRegistry", "type": "address" }, { "internalType": "address", "name": "_postIntentHookRegistry", "type": "address" }, { "internalType": "address", "name": "_relayerRegistry", "type": "address" }, { "internalType": "uint256", "name": "_protocolFee", "type": "uint256" }, { "internalType": "address", "name": "_protocolFeeRecipient", "type": "address" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [ { "internalType": "address", "name": "account", "type": "address" }, { "internalType": "bytes32", "name": "existingIntent", "type": "bytes32" } ], "name": "AccountHasActiveIntent", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "max", "type": "uint256" } ], "name": "AmountAboveMax", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "min", "type": "uint256" } ], "name": "AmountBelowMin", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "limit", "type": "uint256" } ], "name": "AmountExceedsLimit", "type": "error" }, { "inputs": [ { "internalType": "bytes32", "name": "paymentMethod", "type": "bytes32" }, { "internalType": "bytes32", "name": "currency", "type": "bytes32" } ], "name": "CurrencyNotSupported", "type": "error" }, { "inputs": [], "name": "EscrowLockFailed", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "escrow", "type": "address" } ], "name": "EscrowNotWhitelisted", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "fee", "type": "uint256" }, { "internalType": "uint256", "name": "maximum", "type": "uint256" } ], "name": "FeeExceedsMaximum", "type": "error" }, { "inputs": [ { "internalType": "bytes32", "name": "expected", "type": "bytes32" }, { "internalType": "bytes32", "name": "actual", "type": "bytes32" } ], "name": "HashMismatch", "type": "error" }, { "inputs": [ { "internalType": "bytes32", "name": "intentHash", "type": "bytes32" } ], "name": "IntentNotFound", "type": "error" }, { "inputs": [], "name": "InvalidReferrerFeeConfiguration", "type": "error" }, { "inputs": [], "name": "InvalidSignature", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "currentTime", "type": "uint256" }, { "internalType": "uint256", "name": "allowedTime", "type": "uint256" } ], "name": "PartialReleaseNotAllowedYet", "type": "error" }, { "inputs": [ { "internalType": "bytes32", "name": "paymentMethod", "type": "bytes32" } ], "name": "PaymentMethodDoesNotExist", "type": "error" }, { "inputs": [ { "internalType": "bytes32", "name": "paymentMethod", "type": "bytes32" } ], "name": "PaymentMethodNotSupported", "type": "error" }, { "inputs": [ { "internalType": "bytes32", "name": "paymentMethod", "type": "bytes32" } ], "name": "PaymentMethodNotWhitelisted", "type": "error" }, { "inputs": [], "name": "PaymentVerificationFailed", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "hook", "type": "address" } ], "name": "PostIntentHookNotWhitelisted", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "rate", "type": "uint256" }, { "internalType": "uint256", "name": "minRate", "type": "uint256" } ], "name": "RateBelowMinimum", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "expiration", "type": "uint256" }, { "internalType": "uint256", "name": "currentTime", "type": "uint256" } ], "name": "SignatureExpired", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "TransferFailed", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "caller", "type": "address" }, { "internalType": "address", "name": "authorized", "type": "address" } ], "name": "UnauthorizedCaller", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "caller", "type": "address" } ], "name": "UnauthorizedEscrowCaller", "type": "error" }, { "inputs": [], "name": "ZeroAddress", "type": "error" }, { "inputs": [], "name": "ZeroValue", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "bool", "name": "allowMultiple", "type": "bool" } ], "name": "AllowMultipleIntentsUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "escrowRegistry", "type": "address" } ], "name": "EscrowRegistryUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32", "name": "intentHash", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "fundsTransferredTo", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "isManualRelease", "type": "bool" } ], "name": "IntentFulfilled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32", "name": "intentHash", "type": "bytes32" } ], "name": "IntentPruned", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "bytes32", "name": "intentHash", "type": "bytes32" }, { "indexed": true, "internalType": "address", "name": "escrow", "type": "address" }, { "indexed": true, "internalType": "uint256", "name": "depositId", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "paymentMethod", "type": "bytes32" }, { "indexed": false, "internalType": "address", "name": "owner", "type": "address" }, { "indexed": false, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" }, { "indexed": false, "internalType": "bytes32", "name": "fiatCurrency", "type": "bytes32" }, { "indexed": false, "internalType": "uint256", "name": "conversionRate", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" } ], "name": "IntentSignaled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "partialManualReleaseDelay", "type": "uint256" } ], "name": "PartialManualReleaseDelayUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Paused", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "paymentVerifierRegistry", "type": "address" } ], "name": "PaymentVerifierRegistryUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "postIntentHookRegistry", "type": "address" } ], "name": "PostIntentHookRegistryUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "protocolFeeRecipient", "type": "address" } ], "name": "ProtocolFeeRecipientUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "protocolFee", "type": "uint256" } ], "name": "ProtocolFeeUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "relayerRegistry", "type": "address" } ], "name": "RelayerRegistryUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "account", "type": "address" } ], "name": "Unpaused", "type": "event" }, { "inputs": [], "name": "allowMultipleIntents", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_intentHash", "type": "bytes32" } ], "name": "cancelIntent", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "chainId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "escrowRegistry", "outputs": [ { "internalType": "contract IEscrowRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "bytes", "name": "paymentProof", "type": "bytes" }, { "internalType": "bytes32", "name": "intentHash", "type": "bytes32" }, { "internalType": "bytes", "name": "verificationData", "type": "bytes" }, { "internalType": "bytes", "name": "postIntentHookData", "type": "bytes" } ], "internalType": "struct IOrchestrator.FulfillIntentParams", "name": "_params", "type": "tuple" } ], "name": "fulfillIntent", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_account", "type": "address" } ], "name": "getAccountIntents", "outputs": [ { "internalType": "bytes32[]", "name": "", "type": "bytes32[]" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_intentHash", "type": "bytes32" } ], "name": "getIntent", "outputs": [ { "components": [ { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "address", "name": "escrow", "type": "address" }, { "internalType": "uint256", "name": "depositId", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256", "name": "timestamp", "type": "uint256" }, { "internalType": "bytes32", "name": "paymentMethod", "type": "bytes32" }, { "internalType": "bytes32", "name": "fiatCurrency", "type": "bytes32" }, { "internalType": "uint256", "name": "conversionRate", "type": "uint256" }, { "internalType": "bytes32", "name": "payeeId", "type": "bytes32" }, { "internalType": "address", "name": "referrer", "type": "address" }, { "internalType": "uint256", "name": "referrerFee", "type": "uint256" }, { "internalType": "contract IPostIntentHook", "name": "postIntentHook", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "internalType": "struct IOrchestrator.Intent", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_intentHash", "type": "bytes32" } ], "name": "getIntentMinAtSignal", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "intentCounter", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "pauseOrchestrator", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "paused", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "paymentVerifierRegistry", "outputs": [ { "internalType": "contract IPaymentVerifierRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "postIntentHookRegistry", "outputs": [ { "internalType": "contract IPostIntentHookRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "protocolFee", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "protocolFeeRecipient", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32[]", "name": "_intents", "type": "bytes32[]" } ], "name": "pruneIntents", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "relayerRegistry", "outputs": [ { "internalType": "contract IRelayerRegistry", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes32", "name": "_intentHash", "type": "bytes32" } ], "name": "releaseFundsToPayer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "bool", "name": "_allowMultiple", "type": "bool" } ], "name": "setAllowMultipleIntents", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_escrowRegistry", "type": "address" } ], "name": "setEscrowRegistry", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_postIntentHookRegistry", "type": "address" } ], "name": "setPostIntentHookRegistry", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "_protocolFee", "type": "uint256" } ], "name": "setProtocolFee", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_protocolFeeRecipient", "type": "address" } ], "name": "setProtocolFeeRecipient", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_relayerRegistry", "type": "address" } ], "name": "setRelayerRegistry", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "components": [ { "internalType": "address", "name": "escrow", "type": "address" }, { "internalType": "uint256", "name": "depositId", "type": "uint256" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "address", "name": "to", "type": "address" }, { "internalType": "bytes32", "name": "paymentMethod", "type": "bytes32" }, { "internalType": "bytes32", "name": "fiatCurrency", "type": "bytes32" }, { "internalType": "uint256", "name": "conversionRate", "type": "uint256" }, { "internalType": "address", "name": "referrer", "type": "address" }, { "internalType": "uint256", "name": "referrerFee", "type": "uint256" }, { "internalType": "bytes", "name": "gatingServiceSignature", "type": "bytes" }, { "internalType": "uint256", "name": "signatureExpiration", "type": "uint256" }, { "internalType": "contract IPostIntentHook", "name": "postIntentHook", "type": "address" }, { "internalType": "bytes", "name": "data", "type": "bytes" } ], "internalType": "struct IOrchestrator.SignalIntentParams", "name": "_params", "type": "tuple" } ], "name": "signalIntent", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "unpauseOrchestrator", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]; module.exports = data; module.exports.default = data;