zksync-ethers
Version: 
A Web3 library for interacting with the ZkSync Layer 2 scaling solution.
366 lines (335 loc) • 10.3 kB
text/typescript
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BigNumberish,
  BytesLike,
  FunctionFragment,
  Result,
  Interface,
  EventFragment,
  AddressLike,
  ContractRunner,
  ContractMethod,
  Listener,
} from "ethers";
import type {
  TypedContractEvent,
  TypedDeferredTopicFilter,
  TypedEventLog,
  TypedLogDescription,
  TypedListener,
  TypedContractMethod,
} from "./common";
export interface IEthTokenInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "balanceOf"
      | "decimals"
      | "mint"
      | "name"
      | "symbol"
      | "totalSupply"
      | "transferFromTo"
      | "withdraw"
      | "withdrawWithMessage"
  ): FunctionFragment;
  getEvent(
    nameOrSignatureOrTopic:
      | "Mint"
      | "Transfer"
      | "Withdrawal"
      | "WithdrawalWithMessage"
  ): EventFragment;
  encodeFunctionData(
    functionFragment: "balanceOf",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "mint",
    values: [AddressLike, BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "name", values?: undefined): string;
  encodeFunctionData(functionFragment: "symbol", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "totalSupply",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "transferFromTo",
    values: [AddressLike, AddressLike, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "withdraw",
    values: [AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "withdrawWithMessage",
    values: [AddressLike, BytesLike]
  ): string;
  decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "name", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "totalSupply",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "transferFromTo",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "withdrawWithMessage",
    data: BytesLike
  ): Result;
}
export namespace MintEvent {
  export type InputTuple = [account: AddressLike, amount: BigNumberish];
  export type OutputTuple = [account: string, amount: bigint];
  export interface OutputObject {
    account: string;
    amount: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}
export namespace TransferEvent {
  export type InputTuple = [
    from: AddressLike,
    to: AddressLike,
    value: BigNumberish
  ];
  export type OutputTuple = [from: string, to: string, value: bigint];
  export interface OutputObject {
    from: string;
    to: string;
    value: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}
export namespace WithdrawalEvent {
  export type InputTuple = [
    _l2Sender: AddressLike,
    _l1Receiver: AddressLike,
    _amount: BigNumberish
  ];
  export type OutputTuple = [
    _l2Sender: string,
    _l1Receiver: string,
    _amount: bigint
  ];
  export interface OutputObject {
    _l2Sender: string;
    _l1Receiver: string;
    _amount: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}
export namespace WithdrawalWithMessageEvent {
  export type InputTuple = [
    _l2Sender: AddressLike,
    _l1Receiver: AddressLike,
    _amount: BigNumberish,
    _additionalData: BytesLike
  ];
  export type OutputTuple = [
    _l2Sender: string,
    _l1Receiver: string,
    _amount: bigint,
    _additionalData: string
  ];
  export interface OutputObject {
    _l2Sender: string;
    _l1Receiver: string;
    _amount: bigint;
    _additionalData: string;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}
export interface IEthToken extends BaseContract {
  connect(runner?: ContractRunner | null): IEthToken;
  waitForDeployment(): Promise<this>;
  interface: IEthTokenInterface;
  queryFilter<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEventLog<TCEvent>>>;
  queryFilter<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEventLog<TCEvent>>>;
  on<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>
  ): Promise<this>;
  on<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>
  ): Promise<this>;
  once<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>
  ): Promise<this>;
  once<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>
  ): Promise<this>;
  listeners<TCEvent extends TypedContractEvent>(
    event: TCEvent
  ): Promise<Array<TypedListener<TCEvent>>>;
  listeners(eventName?: string): Promise<Array<Listener>>;
  removeAllListeners<TCEvent extends TypedContractEvent>(
    event?: TCEvent
  ): Promise<this>;
  balanceOf: TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;
  decimals: TypedContractMethod<[], [bigint], "view">;
  mint: TypedContractMethod<
    [_account: AddressLike, _amount: BigNumberish],
    [void],
    "nonpayable"
  >;
  name: TypedContractMethod<[], [string], "view">;
  symbol: TypedContractMethod<[], [string], "view">;
  totalSupply: TypedContractMethod<[], [bigint], "view">;
  transferFromTo: TypedContractMethod<
    [_from: AddressLike, _to: AddressLike, _amount: BigNumberish],
    [void],
    "nonpayable"
  >;
  withdraw: TypedContractMethod<[_l1Receiver: AddressLike], [void], "payable">;
  withdrawWithMessage: TypedContractMethod<
    [_l1Receiver: AddressLike, _additionalData: BytesLike],
    [void],
    "payable"
  >;
  getFunction<T extends ContractMethod = ContractMethod>(
    key: string | FunctionFragment
  ): T;
  getFunction(
    nameOrSignature: "balanceOf"
  ): TypedContractMethod<[arg0: BigNumberish], [bigint], "view">;
  getFunction(
    nameOrSignature: "decimals"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "mint"
  ): TypedContractMethod<
    [_account: AddressLike, _amount: BigNumberish],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "name"
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "symbol"
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "totalSupply"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "transferFromTo"
  ): TypedContractMethod<
    [_from: AddressLike, _to: AddressLike, _amount: BigNumberish],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "withdraw"
  ): TypedContractMethod<[_l1Receiver: AddressLike], [void], "payable">;
  getFunction(
    nameOrSignature: "withdrawWithMessage"
  ): TypedContractMethod<
    [_l1Receiver: AddressLike, _additionalData: BytesLike],
    [void],
    "payable"
  >;
  getEvent(
    key: "Mint"
  ): TypedContractEvent<
    MintEvent.InputTuple,
    MintEvent.OutputTuple,
    MintEvent.OutputObject
  >;
  getEvent(
    key: "Transfer"
  ): TypedContractEvent<
    TransferEvent.InputTuple,
    TransferEvent.OutputTuple,
    TransferEvent.OutputObject
  >;
  getEvent(
    key: "Withdrawal"
  ): TypedContractEvent<
    WithdrawalEvent.InputTuple,
    WithdrawalEvent.OutputTuple,
    WithdrawalEvent.OutputObject
  >;
  getEvent(
    key: "WithdrawalWithMessage"
  ): TypedContractEvent<
    WithdrawalWithMessageEvent.InputTuple,
    WithdrawalWithMessageEvent.OutputTuple,
    WithdrawalWithMessageEvent.OutputObject
  >;
  filters: {
    "Mint(address,uint256)": TypedContractEvent<
      MintEvent.InputTuple,
      MintEvent.OutputTuple,
      MintEvent.OutputObject
    >;
    Mint: TypedContractEvent<
      MintEvent.InputTuple,
      MintEvent.OutputTuple,
      MintEvent.OutputObject
    >;
    "Transfer(address,address,uint256)": TypedContractEvent<
      TransferEvent.InputTuple,
      TransferEvent.OutputTuple,
      TransferEvent.OutputObject
    >;
    Transfer: TypedContractEvent<
      TransferEvent.InputTuple,
      TransferEvent.OutputTuple,
      TransferEvent.OutputObject
    >;
    "Withdrawal(address,address,uint256)": TypedContractEvent<
      WithdrawalEvent.InputTuple,
      WithdrawalEvent.OutputTuple,
      WithdrawalEvent.OutputObject
    >;
    Withdrawal: TypedContractEvent<
      WithdrawalEvent.InputTuple,
      WithdrawalEvent.OutputTuple,
      WithdrawalEvent.OutputObject
    >;
    "WithdrawalWithMessage(address,address,uint256,bytes)": TypedContractEvent<
      WithdrawalWithMessageEvent.InputTuple,
      WithdrawalWithMessageEvent.OutputTuple,
      WithdrawalWithMessageEvent.OutputObject
    >;
    WithdrawalWithMessage: TypedContractEvent<
      WithdrawalWithMessageEvent.InputTuple,
      WithdrawalWithMessageEvent.OutputTuple,
      WithdrawalWithMessageEvent.OutputObject
    >;
  };
}