randomness-js
Version:
A library for consuming, verifying and using randomness from the dcipher network
274 lines (270 loc) • 5.41 kB
text/typescript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Interface, type ContractRunner } from "ethers";
import type {
IVRFCoordinatorV2Plus,
IVRFCoordinatorV2PlusInterface,
} from "../IVRFCoordinatorV2Plus";
const _abi = [
{
type: "function",
name: "acceptSubscriptionOwnerTransfer",
inputs: [
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "addConsumer",
inputs: [
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
{
name: "consumer",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "cancelSubscription",
inputs: [
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
{
name: "to",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "createSubscription",
inputs: [],
outputs: [
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "fundSubscriptionWithNative",
inputs: [
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "payable",
},
{
type: "function",
name: "getActiveSubscriptionIds",
inputs: [
{
name: "startIndex",
type: "uint256",
internalType: "uint256",
},
{
name: "maxCount",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "",
type: "uint256[]",
internalType: "uint256[]",
},
],
stateMutability: "view",
},
{
type: "function",
name: "getSubscription",
inputs: [
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "balance",
type: "uint96",
internalType: "uint96",
},
{
name: "nativeBalance",
type: "uint96",
internalType: "uint96",
},
{
name: "reqCount",
type: "uint64",
internalType: "uint64",
},
{
name: "owner",
type: "address",
internalType: "address",
},
{
name: "consumers",
type: "address[]",
internalType: "address[]",
},
],
stateMutability: "view",
},
{
type: "function",
name: "pendingRequestExists",
inputs: [
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "view",
},
{
type: "function",
name: "removeConsumer",
inputs: [
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
{
name: "consumer",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "requestRandomWords",
inputs: [
{
name: "req",
type: "tuple",
internalType: "struct VRFV2PlusClient.RandomWordsRequest",
components: [
{
name: "keyHash",
type: "bytes32",
internalType: "bytes32",
},
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
{
name: "requestConfirmations",
type: "uint16",
internalType: "uint16",
},
{
name: "callbackGasLimit",
type: "uint32",
internalType: "uint32",
},
{
name: "numWords",
type: "uint32",
internalType: "uint32",
},
{
name: "extraArgs",
type: "bytes",
internalType: "bytes",
},
],
},
],
outputs: [
{
name: "requestId",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "nonpayable",
},
{
type: "function",
name: "requestSubscriptionOwnerTransfer",
inputs: [
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
{
name: "newOwner",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
] as const;
export class IVRFCoordinatorV2Plus__factory {
static readonly abi = _abi;
static createInterface(): IVRFCoordinatorV2PlusInterface {
return new Interface(_abi) as IVRFCoordinatorV2PlusInterface;
}
static connect(
address: string,
runner?: ContractRunner | null
): IVRFCoordinatorV2Plus {
return new Contract(
address,
_abi,
runner
) as unknown as IVRFCoordinatorV2Plus;
}
}