/* 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 {
  TokenTarget,
  TokenTargetInterface,
} from "../../../contracts/test/TokenTarget";

const _abi = [
  {
    inputs: [
      {
        internalType: "address",
        name: "_token",
        type: "address",
      },
    ],
    stateMutability: "nonpayable",
    type: "constructor",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_who",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_amount",
        type: "uint256",
      },
    ],
    name: "take",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "token",
    outputs: [
      {
        internalType: "contract ERC20",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
];

const _bytecode =
  "0x608060405234801561001057600080fd5b506040516102c73803806102c783398101604081905261002f91610054565b600080546001600160a01b0319166001600160a01b0392909216919091179055610084565b60006020828403121561006657600080fd5b81516001600160a01b038116811461007d57600080fd5b9392505050565b610234806100936000396000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c8063521802081461003b578063fc0c546a14610050575b600080fd5b61004e6100493660046101b9565b610099565b005b6000546100709073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b6000546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff848116600483015230602483015260448201849052909116906323b872dd90606401602060405180830381600087803b15801561011357600080fd5b505af1158015610127573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061014b91906101fe565b6101b5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f4661696c6564207472616e736665720000000000000000000000000000000000604482015260640160405180910390fd5b5050565b600080604083850312156101cc57600080fd5b823573ffffffffffffffffffffffffffffffffffffffff811681146101f057600080fd5b946020939093013593505050565b60006020828403121561021057600080fd5b8151801515811461022057600080fd5b939250505056fea164736f6c6343000809000a";

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

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

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

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

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