blocklock-js
Version:
A library for encrypting and decrypting data for the future
116 lines (108 loc) • 2.99 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 { SafeCast, SafeCastInterface } from "../SafeCast";
const _abi = [
{
type: "error",
name: "SafeCastOverflowedIntDowncast",
inputs: [
{
name: "bits",
type: "uint8",
internalType: "uint8",
},
{
name: "value",
type: "int256",
internalType: "int256",
},
],
},
{
type: "error",
name: "SafeCastOverflowedIntToUint",
inputs: [
{
name: "value",
type: "int256",
internalType: "int256",
},
],
},
{
type: "error",
name: "SafeCastOverflowedUintDowncast",
inputs: [
{
name: "bits",
type: "uint8",
internalType: "uint8",
},
{
name: "value",
type: "uint256",
internalType: "uint256",
},
],
},
{
type: "error",
name: "SafeCastOverflowedUintToInt",
inputs: [
{
name: "value",
type: "uint256",
internalType: "uint256",
},
],
},
] as const;
const _bytecode =
"0x60556032600b8282823980515f1a607314602657634e487b7160e01b5f525f60045260245ffd5b305f52607381538281f3fe730000000000000000000000000000000000000000301460806040525f5ffdfea2646970667358221220f7f5b5e05d76b8bc54ae353c9d6add39f0cabb39cc838ffeffa85c798345297864736f6c634300081c0033";
type SafeCastConstructorParams =
| [signer?: Signer]
| ConstructorParameters<typeof ContractFactory>;
const isSuperArgs = (
xs: SafeCastConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;
export class SafeCast__factory extends ContractFactory {
constructor(...args: SafeCastConstructorParams) {
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<
SafeCast & {
deploymentTransaction(): ContractTransactionResponse;
}
>;
}
override connect(runner: ContractRunner | null): SafeCast__factory {
return super.connect(runner) as SafeCast__factory;
}
static readonly bytecode = _bytecode;
static readonly abi = _abi;
static createInterface(): SafeCastInterface {
return new Interface(_abi) as SafeCastInterface;
}
static connect(address: string, runner?: ContractRunner | null): SafeCast {
return new Contract(address, _abi, runner) as unknown as SafeCast;
}
}