/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */

import { Contract, Signer, utils } from "ethers";
import type { Provider } from "@ethersproject/providers";
import type {
  Router_Adapter,
  Router_AdapterInterface,
} from "../Router_Adapter";

const _abi = [
  {
    type: "constructor",
    inputs: [
      {
        name: "_l1Adapter",
        type: "address",
        internalType: "address",
      },
      {
        name: "_l2Target",
        type: "address",
        internalType: "address",
      },
      {
        name: "_l2ChainId",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "_l3ChainId",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "_hubPool",
        type: "address",
        internalType: "contract HubPoolInterface",
      },
    ],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "HUB_POOL",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "address",
        internalType: "contract HubPoolInterface",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "L1_ADAPTER",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "address",
        internalType: "address",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "L2_CHAIN_ID",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "L2_TARGET",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "address",
        internalType: "address",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "L3_CHAIN_ID",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "relayMessage",
    inputs: [
      {
        name: "target",
        type: "address",
        internalType: "address",
      },
      {
        name: "message",
        type: "bytes",
        internalType: "bytes",
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "function",
    name: "relayTokens",
    inputs: [
      {
        name: "l1Token",
        type: "address",
        internalType: "address",
      },
      {
        name: "l3Token",
        type: "address",
        internalType: "address",
      },
      {
        name: "amount",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "target",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "event",
    name: "MessageRelayed",
    inputs: [
      {
        name: "target",
        type: "address",
        indexed: false,
        internalType: "address",
      },
      {
        name: "message",
        type: "bytes",
        indexed: false,
        internalType: "bytes",
      },
    ],
    anonymous: false,
  },
  {
    type: "event",
    name: "TokensRelayed",
    inputs: [
      {
        name: "l1Token",
        type: "address",
        indexed: false,
        internalType: "address",
      },
      {
        name: "l2Token",
        type: "address",
        indexed: false,
        internalType: "address",
      },
      {
        name: "amount",
        type: "uint256",
        indexed: false,
        internalType: "uint256",
      },
      {
        name: "to",
        type: "address",
        indexed: false,
        internalType: "address",
      },
    ],
    anonymous: false,
  },
  {
    type: "error",
    name: "L2RouteNotWhitelisted",
    inputs: [
      {
        name: "l1Token",
        type: "address",
        internalType: "address",
      },
    ],
  },
  {
    type: "error",
    name: "RelayMessageFailed",
    inputs: [],
  },
  {
    type: "error",
    name: "RelayTokensFailed",
    inputs: [
      {
        name: "l1Token",
        type: "address",
        internalType: "address",
      },
    ],
  },
] as const;

export class Router_Adapter__factory {
  static readonly abi = _abi;
  static createInterface(): Router_AdapterInterface {
    return new utils.Interface(_abi) as Router_AdapterInterface;
  }
  static connect(
    address: string,
    signerOrProvider: Signer | Provider
  ): Router_Adapter {
    return new Contract(address, _abi, signerOrProvider) as Router_Adapter;
  }
}
