randomness-js
Version:
A library for consuming, verifying and using randomness from the dcipher network
319 lines (315 loc) • 5.86 kB
text/typescript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Contract, Interface, type ContractRunner } from "ethers";
import type {
RandomnessReceiverBase,
RandomnessReceiverBaseInterface,
} from "../RandomnessReceiverBase";
const _abi = [
{
type: "function",
name: "acceptOwnership",
inputs: [],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "createSubscriptionAndFundNative",
inputs: [],
outputs: [],
stateMutability: "payable",
},
{
type: "function",
name: "getBalance",
inputs: [],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "isInFlight",
inputs: [
{
name: "requestId",
type: "uint256",
internalType: "uint256",
},
],
outputs: [
{
name: "",
type: "bool",
internalType: "bool",
},
],
stateMutability: "view",
},
{
type: "function",
name: "owner",
inputs: [],
outputs: [
{
name: "",
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: "randomnessSender",
inputs: [],
outputs: [
{
name: "",
type: "address",
internalType: "contract IRandomnessSender",
},
],
stateMutability: "view",
},
{
type: "function",
name: "receiveRandomness",
inputs: [
{
name: "requestID",
type: "uint256",
internalType: "uint256",
},
{
name: "randomness",
type: "bytes32",
internalType: "bytes32",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setRandomnessSender",
inputs: [
{
name: "_randomnessSender",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "setSubId",
inputs: [
{
name: "subId",
type: "uint256",
internalType: "uint256",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "subscriptionId",
inputs: [],
outputs: [
{
name: "",
type: "uint256",
internalType: "uint256",
},
],
stateMutability: "view",
},
{
type: "function",
name: "topUpSubscriptionNative",
inputs: [],
outputs: [],
stateMutability: "payable",
},
{
type: "function",
name: "transferOwnership",
inputs: [
{
name: "to",
type: "address",
internalType: "address",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "function",
name: "updateSubscription",
inputs: [
{
name: "consumers",
type: "address[]",
internalType: "address[]",
},
],
outputs: [],
stateMutability: "nonpayable",
},
{
type: "event",
name: "Funded",
inputs: [
{
name: "sender",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "amount",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "NewSubscriptionId",
inputs: [
{
name: "subscriptionId",
type: "uint256",
indexed: true,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "OwnershipTransferRequested",
inputs: [
{
name: "from",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "to",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "OwnershipTransferred",
inputs: [
{
name: "from",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "to",
type: "address",
indexed: true,
internalType: "address",
},
],
anonymous: false,
},
{
type: "event",
name: "Received",
inputs: [
{
name: "",
type: "address",
indexed: false,
internalType: "address",
},
{
name: "",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
{
type: "event",
name: "Withdrawn",
inputs: [
{
name: "recipient",
type: "address",
indexed: true,
internalType: "address",
},
{
name: "amount",
type: "uint256",
indexed: false,
internalType: "uint256",
},
],
anonymous: false,
},
] as const;
export class RandomnessReceiverBase__factory {
static readonly abi = _abi;
static createInterface(): RandomnessReceiverBaseInterface {
return new Interface(_abi) as RandomnessReceiverBaseInterface;
}
static connect(
address: string,
runner?: ContractRunner | null
): RandomnessReceiverBase {
return new Contract(
address,
_abi,
runner
) as unknown as RandomnessReceiverBase;
}
}