UNPKG

@chainlink/contracts

Version:

Chainlink smart contracts

1,051 lines (1,050 loc) 20.8 kB
[ { "inputs": [ { "internalType": "address", "name": "_link", "type": "address" }, { "internalType": "address", "name": "_linkNativeFeed", "type": "address" }, { "internalType": "address", "name": "_coordinator", "type": "address" }, { "internalType": "uint256", "name": "_subId", "type": "uint256" } ], "stateMutability": "nonpayable", "type": "constructor" }, { "inputs": [], "name": "FailedToTransferLink", "type": "error" }, { "inputs": [ { "internalType": "uint16", "name": "expectedMinimumLength", "type": "uint16" }, { "internalType": "uint16", "name": "actualLength", "type": "uint16" } ], "name": "IncorrectExtraArgsLength", "type": "error" }, { "inputs": [ { "internalType": "uint8", "name": "mode", "type": "uint8" } ], "name": "InvalidL1FeeCalculationMode", "type": "error" }, { "inputs": [ { "internalType": "uint8", "name": "coefficient", "type": "uint8" } ], "name": "InvalidL1FeeCoefficient", "type": "error" }, { "inputs": [ { "internalType": "uint8", "name": "premiumPercentage", "type": "uint8" }, { "internalType": "uint8", "name": "max", "type": "uint8" } ], "name": "InvalidPremiumPercentage", "type": "error" }, { "inputs": [], "name": "LINKPaymentInRequestRandomWordsInNative", "type": "error" }, { "inputs": [], "name": "LinkAlreadySet", "type": "error" }, { "inputs": [ { "internalType": "uint32", "name": "flatFeeLinkDiscountPPM", "type": "uint32" }, { "internalType": "uint32", "name": "flatFeeNativePPM", "type": "uint32" } ], "name": "LinkDiscountTooHigh", "type": "error" }, { "inputs": [], "name": "NativePaymentInOnTokenTransfer", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "have", "type": "address" }, { "internalType": "address", "name": "want", "type": "address" } ], "name": "OnlyCoordinatorCanFulfill", "type": "error" }, { "inputs": [ { "internalType": "address", "name": "have", "type": "address" }, { "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "address", "name": "coordinator", "type": "address" } ], "name": "OnlyOwnerOrCoordinator", "type": "error" }, { "inputs": [], "name": "SubscriptionIdMissing", "type": "error" }, { "inputs": [ { "internalType": "uint8", "name": "mode", "type": "uint8" } ], "name": "UnsupportedL1FeeCalculationMode", "type": "error" }, { "inputs": [], "name": "ZeroAddress", "type": "error" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint32", "name": "wrapperGasOverhead", "type": "uint32" }, { "indexed": false, "internalType": "uint32", "name": "coordinatorGasOverheadNative", "type": "uint32" }, { "indexed": false, "internalType": "uint32", "name": "coordinatorGasOverheadLink", "type": "uint32" }, { "indexed": false, "internalType": "uint16", "name": "coordinatorGasOverheadPerWord", "type": "uint16" }, { "indexed": false, "internalType": "uint8", "name": "coordinatorNativePremiumPercentage", "type": "uint8" }, { "indexed": false, "internalType": "uint8", "name": "coordinatorLinkPremiumPercentage", "type": "uint8" }, { "indexed": false, "internalType": "bytes32", "name": "keyHash", "type": "bytes32" }, { "indexed": false, "internalType": "uint8", "name": "maxNumWords", "type": "uint8" }, { "indexed": false, "internalType": "uint32", "name": "stalenessSeconds", "type": "uint32" }, { "indexed": false, "internalType": "int256", "name": "fallbackWeiPerUnitLink", "type": "int256" }, { "indexed": false, "internalType": "uint32", "name": "fulfillmentFlatFeeNativePPM", "type": "uint32" }, { "indexed": false, "internalType": "uint32", "name": "fulfillmentFlatFeeLinkDiscountPPM", "type": "uint32" } ], "name": "ConfigSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "address", "name": "vrfCoordinator", "type": "address" } ], "name": "CoordinatorSet", "type": "event" }, { "anonymous": false, "inputs": [], "name": "Disabled", "type": "event" }, { "anonymous": false, "inputs": [], "name": "Enabled", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": false, "internalType": "int256", "name": "fallbackWeiPerUnitLink", "type": "int256" } ], "name": "FallbackWeiPerUnitLinkUsed", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint32", "name": "size", "type": "uint32" } ], "name": "FulfillmentTxSizeSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint8", "name": "mode", "type": "uint8" }, { "indexed": false, "internalType": "uint8", "name": "coefficient", "type": "uint8" } ], "name": "L1FeeCalculationSet", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "NativeWithdrawn", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" } ], "name": "OwnershipTransferRequested", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "from", "type": "address" }, { "indexed": true, "internalType": "address", "name": "to", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "to", "type": "address" }, { "indexed": false, "internalType": "uint256", "name": "amount", "type": "uint256" } ], "name": "Withdrawn", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "indexed": true, "internalType": "address", "name": "consumer", "type": "address" } ], "name": "WrapperFulfillmentFailed", "type": "event" }, { "inputs": [], "name": "SUBSCRIPTION_ID", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "acceptOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint32", "name": "_callbackGasLimit", "type": "uint32" }, { "internalType": "uint32", "name": "_numWords", "type": "uint32" } ], "name": "calculateRequestPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint32", "name": "_callbackGasLimit", "type": "uint32" }, { "internalType": "uint32", "name": "_numWords", "type": "uint32" } ], "name": "calculateRequestPriceNative", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "bytes", "name": "extraArgs", "type": "bytes" }, { "internalType": "bool", "name": "isLinkMode", "type": "bool" } ], "name": "checkPaymentMode", "outputs": [], "stateMutability": "pure", "type": "function" }, { "inputs": [], "name": "disable", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "enable", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint32", "name": "_callbackGasLimit", "type": "uint32" }, { "internalType": "uint32", "name": "_numWords", "type": "uint32" }, { "internalType": "uint256", "name": "_requestGasPriceWei", "type": "uint256" } ], "name": "estimateRequestPrice", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint32", "name": "_callbackGasLimit", "type": "uint32" }, { "internalType": "uint32", "name": "_numWords", "type": "uint32" }, { "internalType": "uint256", "name": "_requestGasPriceWei", "type": "uint256" } ], "name": "estimateRequestPriceNative", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "getConfig", "outputs": [ { "internalType": "int256", "name": "fallbackWeiPerUnitLink", "type": "int256" }, { "internalType": "uint32", "name": "stalenessSeconds", "type": "uint32" }, { "internalType": "uint32", "name": "fulfillmentFlatFeeNativePPM", "type": "uint32" }, { "internalType": "uint32", "name": "fulfillmentFlatFeeLinkDiscountPPM", "type": "uint32" }, { "internalType": "uint32", "name": "wrapperGasOverhead", "type": "uint32" }, { "internalType": "uint32", "name": "coordinatorGasOverheadNative", "type": "uint32" }, { "internalType": "uint32", "name": "coordinatorGasOverheadLink", "type": "uint32" }, { "internalType": "uint16", "name": "coordinatorGasOverheadPerWord", "type": "uint16" }, { "internalType": "uint8", "name": "wrapperNativePremiumPercentage", "type": "uint8" }, { "internalType": "uint8", "name": "wrapperLinkPremiumPercentage", "type": "uint8" }, { "internalType": "bytes32", "name": "keyHash", "type": "bytes32" }, { "internalType": "uint8", "name": "maxNumWords", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "lastRequestId", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "link", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "linkNativeFeed", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_sender", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes", "name": "_data", "type": "bytes" } ], "name": "onTokenTransfer", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" }, { "internalType": "uint256[]", "name": "randomWords", "type": "uint256[]" } ], "name": "rawFulfillRandomWords", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint32", "name": "_callbackGasLimit", "type": "uint32" }, { "internalType": "uint16", "name": "_requestConfirmations", "type": "uint16" }, { "internalType": "uint32", "name": "_numWords", "type": "uint32" }, { "internalType": "bytes", "name": "extraArgs", "type": "bytes" } ], "name": "requestRandomWordsInNative", "outputs": [ { "internalType": "uint256", "name": "requestId", "type": "uint256" } ], "stateMutability": "payable", "type": "function" }, { "inputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "name": "s_callbacks", "outputs": [ { "internalType": "address", "name": "callbackAddress", "type": "address" }, { "internalType": "uint32", "name": "callbackGasLimit", "type": "uint32" }, { "internalType": "uint64", "name": "requestGasPrice", "type": "uint64" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "s_configured", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "s_disabled", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "s_fulfillmentTxSizeBytes", "outputs": [ { "internalType": "uint32", "name": "", "type": "uint32" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "s_l1FeeCalculationMode", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "s_l1FeeCoefficient", "outputs": [ { "internalType": "uint8", "name": "", "type": "uint8" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "s_vrfCoordinator", "outputs": [ { "internalType": "contract IVRFCoordinatorV2Plus", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [ { "internalType": "uint32", "name": "_wrapperGasOverhead", "type": "uint32" }, { "internalType": "uint32", "name": "_coordinatorGasOverheadNative", "type": "uint32" }, { "internalType": "uint32", "name": "_coordinatorGasOverheadLink", "type": "uint32" }, { "internalType": "uint16", "name": "_coordinatorGasOverheadPerWord", "type": "uint16" }, { "internalType": "uint8", "name": "_coordinatorNativePremiumPercentage", "type": "uint8" }, { "internalType": "uint8", "name": "_coordinatorLinkPremiumPercentage", "type": "uint8" }, { "internalType": "bytes32", "name": "_keyHash", "type": "bytes32" }, { "internalType": "uint8", "name": "_maxNumWords", "type": "uint8" }, { "internalType": "uint32", "name": "_stalenessSeconds", "type": "uint32" }, { "internalType": "int256", "name": "_fallbackWeiPerUnitLink", "type": "int256" }, { "internalType": "uint32", "name": "_fulfillmentFlatFeeNativePPM", "type": "uint32" }, { "internalType": "uint32", "name": "_fulfillmentFlatFeeLinkDiscountPPM", "type": "uint32" } ], "name": "setConfig", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_vrfCoordinator", "type": "address" } ], "name": "setCoordinator", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint32", "name": "_size", "type": "uint32" } ], "name": "setFulfillmentTxSize", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "uint8", "name": "mode", "type": "uint8" }, { "internalType": "uint8", "name": "coefficient", "type": "uint8" } ], "name": "setL1FeeCalculation", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "to", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "typeAndVersion", "outputs": [ { "internalType": "string", "name": "", "type": "string" } ], "stateMutability": "pure", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_recipient", "type": "address" } ], "name": "withdraw", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "_recipient", "type": "address" } ], "name": "withdrawNative", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ]