randomness-js
Version:
A library for consuming, verifying and using randomness from the dcipher network
139 lines (131 loc) • 4.76 kB
text/typescript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
Contract,
ContractFactory,
ContractTransactionResponse,
Interface,
} from "ethers";
import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers";
import type { NonPayableOverrides } from "../common";
import type { Factory, FactoryInterface } from "../Factory";
const _abi = [
{
type: "function",
name: "computeAddress",
inputs: [
{
name: "salt",
type: "bytes32",
internalType: "bytes32",
},
{
name: "creationCodeHash",
type: "bytes32",
internalType: "bytes32",
},
],
outputs: [
{
name: "addr",
type: "address",
internalType: "address",
},
],
stateMutability: "view",
},
{
type: "function",
name: "deploy",
inputs: [
{
name: "salt",
type: "bytes32",
internalType: "bytes32",
},
{
name: "creationCode",
type: "bytes",
internalType: "bytes",
},
],
outputs: [
{
name: "addr",
type: "address",
internalType: "address",
},
],
stateMutability: "payable",
},
{
type: "event",
name: "CreatedContract",
inputs: [
{
name: "addr",
type: "address",
indexed: false,
internalType: "address",
},
{
name: "salt",
type: "bytes32",
indexed: false,
internalType: "bytes32",
},
],
anonymous: false,
},
{
type: "error",
name: "Create2EmptyBytecode",
inputs: [],
},
{
type: "error",
name: "Create2FailedDeployment",
inputs: [],
},
] as const;
const _bytecode =
"0x6080604052348015600e575f5ffd5b506103168061001c5f395ff3fe608060405260043610610028575f3560e01c8063481286e61461002c578063cdcb760a14610074575b5f5ffd5b348015610037575f5ffd5b5061004b610046366004610199565b610087565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61004b6100823660046101e6565b6100b1565b6040805190810182905260208101839052308082525f91600b0160ff815360559020949350505050565b5f81515f036100ec576040517f4ca249dc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8282516020840134f5905073ffffffffffffffffffffffffffffffffffffffff8116610144576040517f741752c200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040805173ffffffffffffffffffffffffffffffffffffffff83168152602081018590527f4108529e399e9cd5343c48ae06aa62a23c8c1b7c93f59d4691a0ea1e6f5b4603910160405180910390a192915050565b5f5f604083850312156101aa575f5ffd5b50508035926020909101359150565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b5f5f604083850312156101f7575f5ffd5b82359150602083013567ffffffffffffffff811115610214575f5ffd5b8301601f81018513610224575f5ffd5b803567ffffffffffffffff81111561023e5761023e6101b9565b6040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0603f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8501160116810181811067ffffffffffffffff821117156102aa576102aa6101b9565b6040528181528282016020018710156102c1575f5ffd5b816020840160208301375f60208383010152809350505050925092905056fea26469706673582212204f1d6ef3e7ec731a343deecbc6e6985cf93e8b4e0c9e4dc9bdfcce909c1149c364736f6c634300081c0033";
type FactoryConstructorParams =
| [signer?: Signer]
| ConstructorParameters<typeof ContractFactory>;
const isSuperArgs = (
xs: FactoryConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
export class Factory__factory extends ContractFactory {
constructor(...args: FactoryConstructorParams) {
if (isSuperArgs(args)) {
super(...args);
} else {
super(_abi, _bytecode, args[0]);
}
}
override getDeployTransaction(
overrides?: NonPayableOverrides & { from?: string }
): Promise<ContractDeployTransaction> {
return super.getDeployTransaction(overrides || {});
}
override deploy(overrides?: NonPayableOverrides & { from?: string }) {
return super.deploy(overrides || {}) as Promise<
Factory & {
deploymentTransaction(): ContractTransactionResponse;
}
>;
}
override connect(runner: ContractRunner | null): Factory__factory {
return super.connect(runner) as Factory__factory;
}
static readonly bytecode = _bytecode;
static readonly abi = _abi;
static createInterface(): FactoryInterface {
return new Interface(_abi) as FactoryInterface;
}
static connect(address: string, runner?: ContractRunner | null): Factory {
return new Contract(address, _abi, runner) as unknown as Factory;
}
}