UNPKG

randomness-js

Version:

A library for consuming, verifying and using randomness from the dcipher network

211 lines (207 loc) 4.08 kB
/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ import { Contract, Interface, type ContractRunner } from "ethers"; import type { ISubscription, ISubscriptionInterface } from "../ISubscription"; 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: "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: "requestSubscriptionOwnerTransfer", inputs: [ { name: "subId", type: "uint256", internalType: "uint256", }, { name: "newOwner", type: "address", internalType: "address", }, ], outputs: [], stateMutability: "nonpayable", }, ] as const; export class ISubscription__factory { static readonly abi = _abi; static createInterface(): ISubscriptionInterface { return new Interface(_abi) as ISubscriptionInterface; } static connect( address: string, runner?: ContractRunner | null ): ISubscription { return new Contract(address, _abi, runner) as unknown as ISubscription; } }