/* 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 { PPMMath, PPMMathInterface } from '../../../contracts/libraries/PPMMath'

const _abi = [
  {
    inputs: [
      {
        internalType: 'uint256',
        name: 'a',
        type: 'uint256',
      },
      {
        internalType: 'uint256',
        name: 'b',
        type: 'uint256',
      },
    ],
    name: 'PPMMathInvalidMulPPM',
    type: 'error',
  },
  {
    inputs: [
      {
        internalType: 'uint256',
        name: 'value',
        type: 'uint256',
      },
    ],
    name: 'PPMMathInvalidPPM',
    type: 'error',
  },
] as const

const _bytecode =
  '0x60566037600b82828239805160001a607314602a57634e487b7160e01b600052600060045260246000fd5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600080fdfea26469706673582212208065fa6257c516be9dee3c0ea2fb4d049cb7d59e54012374e495443bd945f63664736f6c634300081b0033'

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

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

export class PPMMath__factory extends ContractFactory {
  constructor(...args: PPMMathConstructorParams) {
    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<
      PPMMath & {
        deploymentTransaction(): ContractTransactionResponse
      }
    >
  }
  override connect(runner: ContractRunner | null): PPMMath__factory {
    return super.connect(runner) as PPMMath__factory
  }

  static readonly bytecode = _bytecode
  static readonly abi = _abi
  static createInterface(): PPMMathInterface {
    return new Interface(_abi) as PPMMathInterface
  }
  static connect(address: string, runner?: ContractRunner | null): PPMMath {
    return new Contract(address, _abi, runner) as unknown as PPMMath
  }
}
