UNPKG

randomness-js

Version:

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

391 lines (383 loc) 15.8 kB
/* Autogenerated file. Do not edit manually. */ /* tslint:disable */ /* eslint-disable */ import { Contract, ContractFactory, ContractTransactionResponse, Interface, } from "ethers"; import type { Signer, AddressLike, ContractDeployTransaction, ContractRunner, } from "ethers"; import type { NonPayableOverrides } from "../common"; import type { ChainlinkVRFDirectFundingConsumer, ChainlinkVRFDirectFundingConsumerInterface, } from "../ChainlinkVRFDirectFundingConsumer"; const _abi = [ { type: "constructor", inputs: [ { name: "wrapperAddress", type: "address", internalType: "address", }, ], stateMutability: "nonpayable", }, { type: "receive", stateMutability: "payable", }, { type: "function", name: "acceptOwnership", inputs: [], outputs: [], stateMutability: "nonpayable", }, { type: "function", name: "fundContractNative", inputs: [], outputs: [], stateMutability: "payable", }, { type: "function", name: "getBalance", inputs: [], outputs: [ { name: "", type: "uint256", internalType: "uint256", }, ], stateMutability: "view", }, { type: "function", name: "getRandomWords", inputs: [ { name: "_requestId", type: "uint256", internalType: "uint256", }, ], outputs: [ { name: "", type: "uint256[]", internalType: "uint256[]", }, ], stateMutability: "view", }, { type: "function", name: "i_vrfV2PlusWrapper", inputs: [], outputs: [ { name: "", type: "address", internalType: "contract IVRFV2PlusWrapper", }, ], stateMutability: "view", }, { type: "function", name: "owner", inputs: [], outputs: [ { name: "", type: "address", internalType: "address", }, ], stateMutability: "view", }, { type: "function", name: "randomWordsOf", inputs: [ { name: "", type: "uint256", internalType: "uint256", }, { name: "", type: "uint256", internalType: "uint256", }, ], outputs: [ { name: "", type: "uint256", internalType: "uint256", }, ], stateMutability: "view", }, { type: "function", name: "rawFulfillRandomWords", inputs: [ { name: "_requestId", type: "uint256", internalType: "uint256", }, { name: "_randomWords", type: "uint256[]", internalType: "uint256[]", }, ], outputs: [], stateMutability: "nonpayable", }, { type: "function", name: "requestId", inputs: [], outputs: [ { name: "", type: "uint256", internalType: "uint256", }, ], stateMutability: "view", }, { type: "function", name: "requestRandomWords", inputs: [ { name: "callbackGasLimit", type: "uint32", internalType: "uint32", }, { name: "", type: "bool", internalType: "bool", }, ], outputs: [ { name: "", type: "uint256", internalType: "uint256", }, ], stateMutability: "nonpayable", }, { type: "function", name: "transferOwnership", inputs: [ { name: "to", type: "address", internalType: "address", }, ], outputs: [], stateMutability: "nonpayable", }, { type: "function", name: "withdrawNative", inputs: [ { name: "amount", type: "uint256", internalType: "uint256", }, { name: "recipient", 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: "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, }, { type: "error", name: "OnlyVRFWrapperCanFulfill", inputs: [ { name: "have", type: "address", internalType: "address", }, { name: "want", type: "address", internalType: "address", }, ], }, ] as const; const _bytecode = "0x60a060405234801561000f575f5ffd5b50604051610fc8380380610fc883398101604081905261002e91610170565b6001600160a01b03811660805233805f816100905760405162461bcd60e51b815260206004820152601860248201527f43616e6e6f7420736574206f776e657220746f207a65726f000000000000000060448201526064015b60405180910390fd5b5f80546001600160a01b0319166001600160a01b03848116919091179091558116156100bf576100bf816100c8565b5050505061019d565b336001600160a01b038216036101205760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c660000000000000000006044820152606401610087565b600180546001600160a01b0319166001600160a01b038381169182179092555f8054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b5f60208284031215610180575f5ffd5b81516001600160a01b0381168114610196575f5ffd5b9392505050565b608051610dfe6101ca5f395f818161023c015281816102a60152818161088401526108f10152610dfe5ff3fe6080604052600436106100c5575f3560e01c806388b660a611610071578063b8ca8dd81161004c578063b8ca8dd81461025e578063e64a66ea1461027d578063f2fde38b14610285575f5ffd5b806388b660a6146101c25780638da5cb5b146101e15780639ed0868d1461022b575f5ffd5b80634b3c08f3116100a15780634b3c08f3146101635780636b2b3aab1461018f57806379ba5097146101ae575f5ffd5b80626d6cae1461010857806312065fe0146101305780631fe543e314610142575f5ffd5b3661010457604080513381523460208201527f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874910160405180910390a1005b5f5ffd5b348015610113575f5ffd5b5061011d60025481565b6040519081526020015b60405180910390f35b34801561013b575f5ffd5b504761011d565b34801561014d575f5ffd5b5061016161015c366004610b19565b6102a4565b005b34801561016e575f5ffd5b5061018261017d366004610c0b565b610346565b6040516101279190610c22565b34801561019a575f5ffd5b5061011d6101a9366004610c64565b6103a5565b3480156101b9575f5ffd5b506101616103f1565b3480156101cd575f5ffd5b5061011d6101dc366004610ca7565b6104ed565b3480156101ec575f5ffd5b505f5473ffffffffffffffffffffffffffffffffffffffff165b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610127565b348015610236575f5ffd5b506102067f000000000000000000000000000000000000000000000000000000000000000081565b348015610269575f5ffd5b50610161610278366004610cef565b610518565b61016161061f565b348015610290575f5ffd5b5061016161029f366004610d19565b6106bf565b7f00000000000000000000000000000000000000000000000000000000000000003373ffffffffffffffffffffffffffffffffffffffff821614610337576040517f8ba9316e00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff821660248201526044015b60405180910390fd5b61034183836106d3565b505050565b5f8181526003602090815260409182902080548351818402810184019094528084526060939283018282801561039957602002820191905f5260205f20905b815481526020019060010190808311610385575b50505050509050919050565b5f6103ae6106f1565b6040805160208101909152600180825260039181905f906103ce90610773565b90505f5f6103de8987878661082f565b5060028190559998505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610472576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015260640161032e565b5f8054337fffffffffffffffffffffffff00000000000000000000000000000000000000008083168217845560018054909116905560405173ffffffffffffffffffffffffffffffffffffffff90921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b6003602052815f5260405f208181548110610506575f80fd5b905f5260205f20015f91509150505481565b6105206106f1565b8147101561058a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f496e73756666696369656e742066756e647320696e20636f6e74726163740000604482015260640161032e565b60405173ffffffffffffffffffffffffffffffffffffffff82169083156108fc029084905f818181858888f193505050501580156105ca573d5f5f3e3d5ffd5b508073ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d58360405161061391815260200190565b60405180910390a25050565b5f3411610688576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f596f75206d7573742073656e6420736f6d652045544800000000000000000000604482015260640161032e565b60405134815233907f5af8184bef8e4b45eb9f6ed7734d04da38ced226495548f46e0c8ff8d7d9a5249060200160405180910390a2565b6106c76106f1565b6106d08161099b565b50565b5f828152600360209081526040909120825161034192840190610a8f565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610771576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015260640161032e565b565b60607f92fd13387c7fe7befbc38d303d6468778fb9731bc4583f17d92989c6fcfdeaaa826040516024016107ac91511515815260200190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff000000000000000000000000000000000000000000000000000000009093169290921790915292915050565b6040517f13c34b7f00000000000000000000000000000000000000000000000000000000815263ffffffff8086166004830152831660248201525f90819073ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016906313c34b7f90604401602060405180830381865afa1580156108c9573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108ed9190610d39565b90507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16639cfc058e82888888886040518663ffffffff1660e01b815260040161094f9493929190610d50565b60206040518083038185885af115801561096b573d5f5f3e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906109909190610d39565b915094509492505050565b3373ffffffffffffffffffffffffffffffffffffffff821603610a1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f43616e6e6f74207472616e7366657220746f2073656c66000000000000000000604482015260640161032e565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8381169182179092555f8054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b828054828255905f5260205f20908101928215610ac8579160200282015b82811115610ac8578251825591602001919060010190610aad565b50610ad4929150610ad8565b5090565b5b80821115610ad4575f8155600101610ad9565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f5f60408385031215610b2a575f5ffd5b82359150602083013567ffffffffffffffff811115610b47575f5ffd5b8301601f81018513610b57575f5ffd5b803567ffffffffffffffff811115610b7157610b71610aec565b8060051b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f830116810181811067ffffffffffffffff82111715610bbc57610bbc610aec565b604052918252602081840181019290810188841115610bd9575f5ffd5b6020850194505b83851015610bfc57843580825260209586019590935001610be0565b50809450505050509250929050565b5f60208284031215610c1b575f5ffd5b5035919050565b602080825282518282018190525f918401906040840190835b81811015610c59578351835260209384019390920191600101610c3b565b509095945050505050565b5f5f60408385031215610c75575f5ffd5b823563ffffffff81168114610c88575f5ffd5b915060208301358015158114610c9c575f5ffd5b809150509250929050565b5f5f60408385031215610cb8575f5ffd5b50508035926020909101359150565b803573ffffffffffffffffffffffffffffffffffffffff81168114610cea575f5ffd5b919050565b5f5f60408385031215610d00575f5ffd5b82359150610d1060208401610cc7565b90509250929050565b5f60208284031215610d29575f5ffd5b610d3282610cc7565b9392505050565b5f60208284031215610d49575f5ffd5b5051919050565b63ffffffff8516815261ffff8416602082015263ffffffff83166040820152608060608201525f8251806080840152806020850160a085015e5f60a0828501015260a07fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8301168401019150509594505050505056fea2646970667358221220e068680c3626a6dc2321769d7312dd729ed3441c9ce0d7a59c32d637bb4a457c64736f6c634300081c0033"; type ChainlinkVRFDirectFundingConsumerConstructorParams = | [signer?: Signer] | ConstructorParameters<typeof ContractFactory>; const isSuperArgs = ( xs: ChainlinkVRFDirectFundingConsumerConstructorParams ): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1; export class ChainlinkVRFDirectFundingConsumer__factory extends ContractFactory { constructor(...args: ChainlinkVRFDirectFundingConsumerConstructorParams) { if (isSuperArgs(args)) { super(...args); } else { super(_abi, _bytecode, args[0]); } } override getDeployTransaction( wrapperAddress: AddressLike, overrides?: NonPayableOverrides & { from?: string } ): Promise<ContractDeployTransaction> { return super.getDeployTransaction(wrapperAddress, overrides || {}); } override deploy( wrapperAddress: AddressLike, overrides?: NonPayableOverrides & { from?: string } ) { return super.deploy(wrapperAddress, overrides || {}) as Promise< ChainlinkVRFDirectFundingConsumer & { deploymentTransaction(): ContractTransactionResponse; } >; } override connect( runner: ContractRunner | null ): ChainlinkVRFDirectFundingConsumer__factory { return super.connect(runner) as ChainlinkVRFDirectFundingConsumer__factory; } static readonly bytecode = _bytecode; static readonly abi = _abi; static createInterface(): ChainlinkVRFDirectFundingConsumerInterface { return new Interface(_abi) as ChainlinkVRFDirectFundingConsumerInterface; } static connect( address: string, runner?: ContractRunner | null ): ChainlinkVRFDirectFundingConsumer { return new Contract( address, _abi, runner ) as unknown as ChainlinkVRFDirectFundingConsumer; } }