UNPKG

@paintswap/vrf

Version:

Paintswap VRF

835 lines (834 loc) 16.2 kB
[ { "inputs": [], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "name": "CommitmentMismatch", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "FundingFailed", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "sent", "type": "uint256" }, { "internalType": "uint256", "name": "required", "type": "uint256" } ], "name": "InsufficientGasLimit", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "sent", "type": "uint256" }, { "internalType": "uint256", "name": "required", "type": "uint256" } ], "name": "InsufficientGasPayment", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "oracle", "type": "address" }, { "internalType": "uint256", "name": "balance", "type": "uint256" } ], "name": "InsufficientOracleBalance", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "window", "type": "uint256" } ], "name": "InvalidGasPriceHistoryWindow", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "numWords", "type": "uint256" }, { "internalType": "uint256", "name": "max", "type": "uint256" } ], "name": "InvalidNumWords", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "name": "InvalidProof", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "internalType": "address", "name": "proofSigner", "type": "address" }, { "internalType": "address", "name": "vrfSigner", "type": "address" } ], "name": "InvalidPublicKey", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "invalid", "type": "address" } ], "name": "NotOracle", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "oracle", "type": "address" } ], "name": "OracleAlreadyRegistered", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "sent", "type": "uint256" }, { "internalType": "uint256", "name": "max", "type": "uint256" } ], "name": "OverConsumerGasLimit", "type": "error" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "name": "RequestNotFound", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "recipient", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "WithdrawFailed", "type": "error" }, { "inputs": [], "name": "ZeroAddress", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "uint8", "name": "reason", "type": "uint8" }, { "indexed": true, "internalType": "address", "name": "target", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "gasLeft", "type": "uint256" } ], "name": "ConsumerCallbackFailed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "callSuccess", "type": "bool" }, { "indexed": false, "internalType": "string", "name": "reason", "type": "string" } ], "name": "DebugFulfillment", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "refundee", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "gasRefunded", "type": "uint256" }, { "indexed": false, "internalType": "bool", "name": "refundedSuccessfully", "type": "bool" } ], "name": "FulfillmentGasRefunded", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "newWindow", "type": "uint256" } ], "name": "GasPriceHistoryWindowUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "oracle", "type": "address" } ], "name": "OracleRegistered", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint32", "name": "minimumGasLimit", "type": "uint32" }, { "indexed": false, "internalType": "uint32", "name": "maximumGasLimit", "type": "uint32" }, { "indexed": false, "internalType": "uint16", "name": "maxNumWords", "type": "uint16" } ], "name": "RandomRequestLimitsUpdated", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": false, "internalType": "uint256[]", "name": "randomWords", "type": "uint256[]" }, { "indexed": true, "internalType": "address", "name": "oracle", "type": "address" }, { "indexed": false, "internalType": "bool", "name": "callSuccess", "type": "bool" }, { "indexed": false, "internalType": "uint256", "name": "fulfilledAt", "type": "uint256" } ], "name": "RandomWordsFulfilled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "numWords", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "origin", "type": "address" }, { "indexed": true, "internalType": "address", "name": "consumer", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "indexed": false, "internalType": "address", "name": "refundee", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "gasPricePaid", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "requestedAt", "type": "uint256" } ], "name": "RandomWordsRequested", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "signerAddress", "type": "address" } ], "name": "SignerAddressUpdated", "type": "event" }, { "inputs": [], "name": "MIN_CONSUMER_GAS_LIMIT", "outputs": [ { "internalType": "uint32", "name": "", "type": "uint32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "consumer", "type": "address" } ], "name": "calculateNextRequestId", "outputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" } ], "name": "calculateRequestPriceNative", "outputs": [ { "internalType": "uint256", "name": "payment", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "errorData", "type": "bytes" } ], "name": "decodeErrorString", "outputs": [ { "internalType": "string", "name": "errorMessage", "type": "string" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "internalType": "address", "name": "consumer", "type": "address" }, { "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" }, { "internalType": "uint256", "name": "numWords", "type": "uint256" }, { "internalType": "address", "name": "refundee", "type": "address" }, { "internalType": "uint256", "name": "gasPricePaid", "type": "uint256" }, { "internalType": "uint256[2]", "name": "publicKey", "type": "uint256[2]" }, { "internalType": "uint256[4]", "name": "proof", "type": "uint256[4]" }, { "internalType": "uint256[2]", "name": "", "type": "uint256[2]" }, { "internalType": "uint256[4]", "name": "", "type": "uint256[4]" }, { "internalType": "uint8", "name": "", "type": "uint8" } ], "name": "fulfillRandomWords", "outputs": [ { "internalType": "bool", "name": "callSuccess", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "internalType": "uint256[]", "name": "randomWords", "type": "uint256[]" }, { "internalType": "address", "name": "refundee", "type": "address" } ], "name": "fulfillRequestMock", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "name": "fulfillRequestMockWithRandomWords", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "getFulfillmentStats", "outputs": [ { "internalType": "uint64", "name": "total", "type": "uint64" }, { "internalType": "uint64", "name": "pending", "type": "uint64" }, { "internalType": "uint64", "name": "successes", "type": "uint64" }, { "internalType": "uint64", "name": "failures", "type": "uint64" }, { "internalType": "uint64", "name": "totalWordsRequested", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "consumer", "type": "address" } ], "name": "getNonce", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "name": "getRequest", "outputs": [ { "internalType": "address", "name": "consumer", "type": "address" }, { "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" }, { "internalType": "uint256", "name": "numWords", "type": "uint256" }, { "internalType": "uint256", "name": "gasPricePaid", "type": "uint256" }, { "internalType": "bool", "name": "fulfilled", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "name": "getRequestResult", "outputs": [ { "internalType": "bool", "name": "wasSuccess", "type": "bool" }, { "internalType": "bool", "name": "wasFulfilled", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getSignerAddress", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "oracle", "type": "address" } ], "name": "isOracle", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "name": "isRequestPending", "outputs": [ { "internalType": "bool", "name": "isPending", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "callbackGasLimit", "type": "uint256" }, { "internalType": "uint256", "name": "numWords", "type": "uint256" }, { "internalType": "address", "name": "refundee", "type": "address" } ], "name": "requestRandomnessPayInNative", "outputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "stateMutability": "payable", "type": "receive" } ]