/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
import type { Provider, TransactionRequest } from "@ethersproject/providers";
import type { PromiseOrValue } from "../../../../common";
import type {
  TestLib_Buffer,
  TestLib_BufferInterface,
} from "../../../../contracts/test-libraries/utils/TestLib_Buffer";

const _abi = [
  {
    inputs: [
      {
        internalType: "uint40",
        name: "_index",
        type: "uint40",
      },
      {
        internalType: "bytes27",
        name: "_extraData",
        type: "bytes27",
      },
    ],
    name: "deleteElementsAfterInclusive",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint40",
        name: "_index",
        type: "uint40",
      },
    ],
    name: "deleteElementsAfterInclusive",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_index",
        type: "uint256",
      },
    ],
    name: "get",
    outputs: [
      {
        internalType: "bytes32",
        name: "",
        type: "bytes32",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getContext",
    outputs: [
      {
        components: [
          {
            internalType: "uint40",
            name: "length",
            type: "uint40",
          },
          {
            internalType: "bytes27",
            name: "extraData",
            type: "bytes27",
          },
        ],
        internalType: "struct Lib_Buffer.BufferContext",
        name: "",
        type: "tuple",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getExtraData",
    outputs: [
      {
        internalType: "bytes27",
        name: "",
        type: "bytes27",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "getLength",
    outputs: [
      {
        internalType: "uint40",
        name: "",
        type: "uint40",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "bytes32",
        name: "_value",
        type: "bytes32",
      },
      {
        internalType: "bytes27",
        name: "_extraData",
        type: "bytes27",
      },
    ],
    name: "push",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "bytes32",
        name: "_value",
        type: "bytes32",
      },
    ],
    name: "push",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint40",
        name: "_index",
        type: "uint40",
      },
      {
        internalType: "bytes27",
        name: "_extraData",
        type: "bytes27",
      },
    ],
    name: "setContext",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "bytes27",
        name: "_extraData",
        type: "bytes27",
      },
    ],
    name: "setExtraData",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
];

const _bytecode =
  " ";

type TestLib_BufferConstructorParams =
  | [signer?: Signer]
  | ConstructorParameters<typeof ContractFactory>;

const isSuperArgs = (
  xs: TestLib_BufferConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;

export class TestLib_Buffer__factory extends ContractFactory {
  constructor(...args: TestLib_BufferConstructorParams) {
    if (isSuperArgs(args)) {
      super(...args);
    } else {
      super(_abi, _bytecode, args[0]);
    }
  }

  override deploy(
    overrides?: Overrides & { from?: PromiseOrValue<string> }
  ): Promise<TestLib_Buffer> {
    return super.deploy(overrides || {}) as Promise<TestLib_Buffer>;
  }
  override getDeployTransaction(
    overrides?: Overrides & { from?: PromiseOrValue<string> }
  ): TransactionRequest {
    return super.getDeployTransaction(overrides || {});
  }
  override attach(address: string): TestLib_Buffer {
    return super.attach(address) as TestLib_Buffer;
  }
  override connect(signer: Signer): TestLib_Buffer__factory {
    return super.connect(signer) as TestLib_Buffer__factory;
  }

  static readonly bytecode = _bytecode;
  static readonly abi = _abi;
  static createInterface(): TestLib_BufferInterface {
    return new utils.Interface(_abi) as TestLib_BufferInterface;
  }
  static connect(
    address: string,
    signerOrProvider: Signer | Provider
  ): TestLib_Buffer {
    return new Contract(address, _abi, signerOrProvider) as TestLib_Buffer;
  }
}
