From 2e0c4398c84354b029061d0ebe25c00d2b323fca Mon Sep 17 00:00:00 2001 From: Raid Ateir Date: Wed, 2 Oct 2024 19:01:18 +0400 Subject: [PATCH] (fix): add typechain --- .gitignore | 1 - typechain/IAssetRouterBase.ts | 413 +++ typechain/IBridgedStandardToken.ts | 283 ++ typechain/IBridgehub.ts | 743 +++++ typechain/IContractDeployer.ts | 425 +++ typechain/IERC1271.ts | 98 + typechain/IERC20.ts | 286 ++ typechain/IEthToken.ts | 365 +++ typechain/IL1AssetRouter.ts | 1448 ++++++++++ typechain/IL1Bridge.ts | 634 +++++ typechain/IL1ERC20Bridge.ts | 482 ++++ typechain/IL1Messenger.ts | 260 ++ typechain/IL1NativeTokenVault.ts | 353 +++ typechain/IL1Nullifier.ts | 562 ++++ typechain/IL1SharedBridge.ts | 897 ++++++ typechain/IL2AssetRouter.ts | 552 ++++ typechain/IL2Bridge.ts | 178 ++ typechain/IL2NativeTokenVault.ts | 418 +++ typechain/IL2SharedBridge.ts | 285 ++ typechain/INonceHolder.ts | 310 +++ typechain/IPaymasterFlow.ts | 107 + typechain/ITestnetERC20Token.ts | 104 + typechain/IZkSync.ts | 1836 +++++++++++++ typechain/IZkSyncHyperchain.ts | 2322 ++++++++++++++++ typechain/common.ts | 131 + .../factories/IAssetRouterBase__factory.ts | 272 ++ .../IBridgedStandardToken__factory.ts | 199 ++ typechain/factories/IBridgehub__factory.ts | 648 +++++ .../factories/IContractDeployer__factory.ts | 329 +++ typechain/factories/IERC1271__factory.ts | 43 + typechain/factories/IERC20__factory.ts | 241 ++ typechain/factories/IEthToken__factory.ts | 262 ++ .../factories/IL1AssetRouter__factory.ts | 1245 +++++++++ typechain/factories/IL1Bridge__factory.ts | 529 ++++ .../factories/IL1ERC20Bridge__factory.ts | 395 +++ typechain/factories/IL1Messenger__factory.ts | 166 ++ .../factories/IL1NativeTokenVault__factory.ts | 273 ++ typechain/factories/IL1Nullifier__factory.ts | 466 ++++ .../factories/IL1SharedBridge__factory.ts | 746 +++++ .../factories/IL2AssetRouter__factory.ts | 385 +++ typechain/factories/IL2Bridge__factory.ts | 126 + .../factories/IL2NativeTokenVault__factory.ts | 316 +++ .../factories/IL2SharedBridge__factory.ts | 207 ++ typechain/factories/INonceHolder__factory.ts | 239 ++ .../factories/IPaymasterFlow__factory.ts | 61 + .../factories/ITestnetERC20Token__factory.ts | 62 + .../factories/IZkSyncHyperchain__factory.ts | 2430 +++++++++++++++++ typechain/factories/IZkSync__factory.ts | 1639 +++++++++++ typechain/factories/index.ts | 26 + typechain/index.ts | 50 + 50 files changed, 24847 insertions(+), 1 deletion(-) create mode 100644 typechain/IAssetRouterBase.ts create mode 100644 typechain/IBridgedStandardToken.ts create mode 100644 typechain/IBridgehub.ts create mode 100644 typechain/IContractDeployer.ts create mode 100644 typechain/IERC1271.ts create mode 100644 typechain/IERC20.ts create mode 100644 typechain/IEthToken.ts create mode 100644 typechain/IL1AssetRouter.ts create mode 100644 typechain/IL1Bridge.ts create mode 100644 typechain/IL1ERC20Bridge.ts create mode 100644 typechain/IL1Messenger.ts create mode 100644 typechain/IL1NativeTokenVault.ts create mode 100644 typechain/IL1Nullifier.ts create mode 100644 typechain/IL1SharedBridge.ts create mode 100644 typechain/IL2AssetRouter.ts create mode 100644 typechain/IL2Bridge.ts create mode 100644 typechain/IL2NativeTokenVault.ts create mode 100644 typechain/IL2SharedBridge.ts create mode 100644 typechain/INonceHolder.ts create mode 100644 typechain/IPaymasterFlow.ts create mode 100644 typechain/ITestnetERC20Token.ts create mode 100644 typechain/IZkSync.ts create mode 100644 typechain/IZkSyncHyperchain.ts create mode 100644 typechain/common.ts create mode 100644 typechain/factories/IAssetRouterBase__factory.ts create mode 100644 typechain/factories/IBridgedStandardToken__factory.ts create mode 100644 typechain/factories/IBridgehub__factory.ts create mode 100644 typechain/factories/IContractDeployer__factory.ts create mode 100644 typechain/factories/IERC1271__factory.ts create mode 100644 typechain/factories/IERC20__factory.ts create mode 100644 typechain/factories/IEthToken__factory.ts create mode 100644 typechain/factories/IL1AssetRouter__factory.ts create mode 100644 typechain/factories/IL1Bridge__factory.ts create mode 100644 typechain/factories/IL1ERC20Bridge__factory.ts create mode 100644 typechain/factories/IL1Messenger__factory.ts create mode 100644 typechain/factories/IL1NativeTokenVault__factory.ts create mode 100644 typechain/factories/IL1Nullifier__factory.ts create mode 100644 typechain/factories/IL1SharedBridge__factory.ts create mode 100644 typechain/factories/IL2AssetRouter__factory.ts create mode 100644 typechain/factories/IL2Bridge__factory.ts create mode 100644 typechain/factories/IL2NativeTokenVault__factory.ts create mode 100644 typechain/factories/IL2SharedBridge__factory.ts create mode 100644 typechain/factories/INonceHolder__factory.ts create mode 100644 typechain/factories/IPaymasterFlow__factory.ts create mode 100644 typechain/factories/ITestnetERC20Token__factory.ts create mode 100644 typechain/factories/IZkSyncHyperchain__factory.ts create mode 100644 typechain/factories/IZkSync__factory.ts create mode 100644 typechain/factories/index.ts create mode 100644 typechain/index.ts diff --git a/.gitignore b/.gitignore index 059e0d13..19c85582 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ node_modules coverage docs tests/build -typechain !src/typechain .idea diff --git a/typechain/IAssetRouterBase.ts b/typechain/IAssetRouterBase.ts new file mode 100644 index 00000000..9cbe3236 --- /dev/null +++ b/typechain/IAssetRouterBase.ts @@ -0,0 +1,413 @@ +/* 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 IAssetRouterBaseInterface extends Interface { + getFunction( + nameOrSignature: + | "BRIDGE_HUB" + | "assetHandlerAddress" + | "finalizeDeposit" + | "setAssetHandlerAddressThisChain" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "AssetHandlerRegistered" + | "AssetHandlerRegisteredInitial" + | "BridgehubDepositBaseTokenInitiated" + | "BridgehubDepositInitiated" + | "BridgehubWithdrawalInitiated" + | "DepositFinalizedAssetRouter" + ): EventFragment; + + encodeFunctionData( + functionFragment: "BRIDGE_HUB", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "assetHandlerAddress", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "finalizeDeposit", + values: [BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "setAssetHandlerAddressThisChain", + values: [BytesLike, AddressLike] + ): string; + + decodeFunctionResult(functionFragment: "BRIDGE_HUB", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "assetHandlerAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "finalizeDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setAssetHandlerAddressThisChain", + data: BytesLike + ): Result; +} + +export namespace AssetHandlerRegisteredEvent { + export type InputTuple = [assetId: BytesLike, _assetAddress: AddressLike]; + export type OutputTuple = [assetId: string, _assetAddress: string]; + export interface OutputObject { + assetId: string; + _assetAddress: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AssetHandlerRegisteredInitialEvent { + export type InputTuple = [ + assetId: BytesLike, + assetHandlerAddress: AddressLike, + additionalData: BytesLike, + assetDeploymentTracker: AddressLike + ]; + export type OutputTuple = [ + assetId: string, + assetHandlerAddress: string, + additionalData: string, + assetDeploymentTracker: string + ]; + export interface OutputObject { + assetId: string; + assetHandlerAddress: string; + additionalData: string; + assetDeploymentTracker: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubDepositBaseTokenInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + from: AddressLike, + assetId: BytesLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + from: string, + assetId: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + from: string; + assetId: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubDepositInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + txDataHash: BytesLike, + from: AddressLike, + assetId: BytesLike, + bridgeMintCalldata: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + txDataHash: string, + from: string, + assetId: string, + bridgeMintCalldata: string + ]; + export interface OutputObject { + chainId: bigint; + txDataHash: string; + from: string; + assetId: string; + bridgeMintCalldata: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubWithdrawalInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + sender: AddressLike, + assetId: BytesLike, + assetDataHash: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + sender: string, + assetId: string, + assetDataHash: string + ]; + export interface OutputObject { + chainId: bigint; + sender: string; + assetId: string; + assetDataHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace DepositFinalizedAssetRouterEvent { + export type InputTuple = [ + chainId: BigNumberish, + assetId: BytesLike, + assetData: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + assetId: string, + assetData: string + ]; + export interface OutputObject { + chainId: bigint; + assetId: string; + assetData: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IAssetRouterBase extends BaseContract { + connect(runner?: ContractRunner | null): IAssetRouterBase; + waitForDeployment(): Promise; + + interface: IAssetRouterBaseInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + BRIDGE_HUB: TypedContractMethod<[], [string], "view">; + + assetHandlerAddress: TypedContractMethod< + [_assetId: BytesLike], + [string], + "view" + >; + + finalizeDeposit: TypedContractMethod< + [_chainId: BigNumberish, _assetId: BytesLike, _transferData: BytesLike], + [void], + "nonpayable" + >; + + setAssetHandlerAddressThisChain: TypedContractMethod< + [_assetRegistrationData: BytesLike, _assetHandlerAddress: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "BRIDGE_HUB" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "assetHandlerAddress" + ): TypedContractMethod<[_assetId: BytesLike], [string], "view">; + getFunction( + nameOrSignature: "finalizeDeposit" + ): TypedContractMethod< + [_chainId: BigNumberish, _assetId: BytesLike, _transferData: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setAssetHandlerAddressThisChain" + ): TypedContractMethod< + [_assetRegistrationData: BytesLike, _assetHandlerAddress: AddressLike], + [void], + "nonpayable" + >; + + getEvent( + key: "AssetHandlerRegistered" + ): TypedContractEvent< + AssetHandlerRegisteredEvent.InputTuple, + AssetHandlerRegisteredEvent.OutputTuple, + AssetHandlerRegisteredEvent.OutputObject + >; + getEvent( + key: "AssetHandlerRegisteredInitial" + ): TypedContractEvent< + AssetHandlerRegisteredInitialEvent.InputTuple, + AssetHandlerRegisteredInitialEvent.OutputTuple, + AssetHandlerRegisteredInitialEvent.OutputObject + >; + getEvent( + key: "BridgehubDepositBaseTokenInitiated" + ): TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + getEvent( + key: "BridgehubDepositInitiated" + ): TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + getEvent( + key: "BridgehubWithdrawalInitiated" + ): TypedContractEvent< + BridgehubWithdrawalInitiatedEvent.InputTuple, + BridgehubWithdrawalInitiatedEvent.OutputTuple, + BridgehubWithdrawalInitiatedEvent.OutputObject + >; + getEvent( + key: "DepositFinalizedAssetRouter" + ): TypedContractEvent< + DepositFinalizedAssetRouterEvent.InputTuple, + DepositFinalizedAssetRouterEvent.OutputTuple, + DepositFinalizedAssetRouterEvent.OutputObject + >; + + filters: { + "AssetHandlerRegistered(bytes32,address)": TypedContractEvent< + AssetHandlerRegisteredEvent.InputTuple, + AssetHandlerRegisteredEvent.OutputTuple, + AssetHandlerRegisteredEvent.OutputObject + >; + AssetHandlerRegistered: TypedContractEvent< + AssetHandlerRegisteredEvent.InputTuple, + AssetHandlerRegisteredEvent.OutputTuple, + AssetHandlerRegisteredEvent.OutputObject + >; + + "AssetHandlerRegisteredInitial(bytes32,address,bytes32,address)": TypedContractEvent< + AssetHandlerRegisteredInitialEvent.InputTuple, + AssetHandlerRegisteredInitialEvent.OutputTuple, + AssetHandlerRegisteredInitialEvent.OutputObject + >; + AssetHandlerRegisteredInitial: TypedContractEvent< + AssetHandlerRegisteredInitialEvent.InputTuple, + AssetHandlerRegisteredInitialEvent.OutputTuple, + AssetHandlerRegisteredInitialEvent.OutputObject + >; + + "BridgehubDepositBaseTokenInitiated(uint256,address,bytes32,uint256)": TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + BridgehubDepositBaseTokenInitiated: TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + + "BridgehubDepositInitiated(uint256,bytes32,address,bytes32,bytes)": TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + BridgehubDepositInitiated: TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + + "BridgehubWithdrawalInitiated(uint256,address,bytes32,bytes32)": TypedContractEvent< + BridgehubWithdrawalInitiatedEvent.InputTuple, + BridgehubWithdrawalInitiatedEvent.OutputTuple, + BridgehubWithdrawalInitiatedEvent.OutputObject + >; + BridgehubWithdrawalInitiated: TypedContractEvent< + BridgehubWithdrawalInitiatedEvent.InputTuple, + BridgehubWithdrawalInitiatedEvent.OutputTuple, + BridgehubWithdrawalInitiatedEvent.OutputObject + >; + + "DepositFinalizedAssetRouter(uint256,bytes32,bytes)": TypedContractEvent< + DepositFinalizedAssetRouterEvent.InputTuple, + DepositFinalizedAssetRouterEvent.OutputTuple, + DepositFinalizedAssetRouterEvent.OutputObject + >; + DepositFinalizedAssetRouter: TypedContractEvent< + DepositFinalizedAssetRouterEvent.InputTuple, + DepositFinalizedAssetRouterEvent.OutputTuple, + DepositFinalizedAssetRouterEvent.OutputObject + >; + }; +} diff --git a/typechain/IBridgedStandardToken.ts b/typechain/IBridgedStandardToken.ts new file mode 100644 index 00000000..d09c6f78 --- /dev/null +++ b/typechain/IBridgedStandardToken.ts @@ -0,0 +1,283 @@ +/* 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 IBridgedStandardTokenInterface extends Interface { + getFunction( + nameOrSignature: + | "assetId" + | "bridgeBurn" + | "bridgeMint" + | "l1Address" + | "l2Bridge" + | "nativeTokenVault" + | "originToken" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: "BridgeBurn" | "BridgeInitialize" | "BridgeMint" + ): EventFragment; + + encodeFunctionData(functionFragment: "assetId", values?: undefined): string; + encodeFunctionData( + functionFragment: "bridgeBurn", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "bridgeMint", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "l1Address", values?: undefined): string; + encodeFunctionData(functionFragment: "l2Bridge", values?: undefined): string; + encodeFunctionData( + functionFragment: "nativeTokenVault", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "originToken", + values?: undefined + ): string; + + decodeFunctionResult(functionFragment: "assetId", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bridgeBurn", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "bridgeMint", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "l1Address", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "l2Bridge", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "nativeTokenVault", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "originToken", + data: BytesLike + ): Result; +} + +export namespace BridgeBurnEvent { + 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; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgeInitializeEvent { + export type InputTuple = [ + l1Token: AddressLike, + name: string, + symbol: string, + decimals: BigNumberish + ]; + export type OutputTuple = [ + l1Token: string, + name: string, + symbol: string, + decimals: bigint + ]; + export interface OutputObject { + l1Token: string; + name: string; + symbol: string; + decimals: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgeMintEvent { + 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; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IBridgedStandardToken extends BaseContract { + connect(runner?: ContractRunner | null): IBridgedStandardToken; + waitForDeployment(): Promise; + + interface: IBridgedStandardTokenInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + assetId: TypedContractMethod<[], [string], "view">; + + bridgeBurn: TypedContractMethod< + [_account: AddressLike, _amount: BigNumberish], + [void], + "nonpayable" + >; + + bridgeMint: TypedContractMethod< + [_account: AddressLike, _amount: BigNumberish], + [void], + "nonpayable" + >; + + l1Address: TypedContractMethod<[], [string], "view">; + + l2Bridge: TypedContractMethod<[], [string], "view">; + + nativeTokenVault: TypedContractMethod<[], [string], "view">; + + originToken: TypedContractMethod<[], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "assetId" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "bridgeBurn" + ): TypedContractMethod< + [_account: AddressLike, _amount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "bridgeMint" + ): TypedContractMethod< + [_account: AddressLike, _amount: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "l1Address" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "l2Bridge" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nativeTokenVault" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "originToken" + ): TypedContractMethod<[], [string], "view">; + + getEvent( + key: "BridgeBurn" + ): TypedContractEvent< + BridgeBurnEvent.InputTuple, + BridgeBurnEvent.OutputTuple, + BridgeBurnEvent.OutputObject + >; + getEvent( + key: "BridgeInitialize" + ): TypedContractEvent< + BridgeInitializeEvent.InputTuple, + BridgeInitializeEvent.OutputTuple, + BridgeInitializeEvent.OutputObject + >; + getEvent( + key: "BridgeMint" + ): TypedContractEvent< + BridgeMintEvent.InputTuple, + BridgeMintEvent.OutputTuple, + BridgeMintEvent.OutputObject + >; + + filters: { + "BridgeBurn(address,uint256)": TypedContractEvent< + BridgeBurnEvent.InputTuple, + BridgeBurnEvent.OutputTuple, + BridgeBurnEvent.OutputObject + >; + BridgeBurn: TypedContractEvent< + BridgeBurnEvent.InputTuple, + BridgeBurnEvent.OutputTuple, + BridgeBurnEvent.OutputObject + >; + + "BridgeInitialize(address,string,string,uint8)": TypedContractEvent< + BridgeInitializeEvent.InputTuple, + BridgeInitializeEvent.OutputTuple, + BridgeInitializeEvent.OutputObject + >; + BridgeInitialize: TypedContractEvent< + BridgeInitializeEvent.InputTuple, + BridgeInitializeEvent.OutputTuple, + BridgeInitializeEvent.OutputObject + >; + + "BridgeMint(address,uint256)": TypedContractEvent< + BridgeMintEvent.InputTuple, + BridgeMintEvent.OutputTuple, + BridgeMintEvent.OutputObject + >; + BridgeMint: TypedContractEvent< + BridgeMintEvent.InputTuple, + BridgeMintEvent.OutputTuple, + BridgeMintEvent.OutputObject + >; + }; +} diff --git a/typechain/IBridgehub.ts b/typechain/IBridgehub.ts new file mode 100644 index 00000000..c283d30d --- /dev/null +++ b/typechain/IBridgehub.ts @@ -0,0 +1,743 @@ +/* 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 type L2LogStruct = { + l2ShardId: BigNumberish; + isService: boolean; + txNumberInBatch: BigNumberish; + sender: AddressLike; + key: BytesLike; + value: BytesLike; +}; + +export type L2LogStructOutput = [ + l2ShardId: bigint, + isService: boolean, + txNumberInBatch: bigint, + sender: string, + key: string, + value: string +] & { + l2ShardId: bigint; + isService: boolean; + txNumberInBatch: bigint; + sender: string; + key: string; + value: string; +}; + +export type L2MessageStruct = { + txNumberInBatch: BigNumberish; + sender: AddressLike; + data: BytesLike; +}; + +export type L2MessageStructOutput = [ + txNumberInBatch: bigint, + sender: string, + data: string +] & { txNumberInBatch: bigint; sender: string; data: string }; + +export type L2TransactionRequestDirectStruct = { + chainId: BigNumberish; + mintValue: BigNumberish; + l2Contract: AddressLike; + l2Value: BigNumberish; + l2Calldata: BytesLike; + l2GasLimit: BigNumberish; + l2GasPerPubdataByteLimit: BigNumberish; + factoryDeps: BytesLike[]; + refundRecipient: AddressLike; +}; + +export type L2TransactionRequestDirectStructOutput = [ + chainId: bigint, + mintValue: bigint, + l2Contract: string, + l2Value: bigint, + l2Calldata: string, + l2GasLimit: bigint, + l2GasPerPubdataByteLimit: bigint, + factoryDeps: string[], + refundRecipient: string +] & { + chainId: bigint; + mintValue: bigint; + l2Contract: string; + l2Value: bigint; + l2Calldata: string; + l2GasLimit: bigint; + l2GasPerPubdataByteLimit: bigint; + factoryDeps: string[]; + refundRecipient: string; +}; + +export type L2TransactionRequestTwoBridgesOuterStruct = { + chainId: BigNumberish; + mintValue: BigNumberish; + l2Value: BigNumberish; + l2GasLimit: BigNumberish; + l2GasPerPubdataByteLimit: BigNumberish; + refundRecipient: AddressLike; + secondBridgeAddress: AddressLike; + secondBridgeValue: BigNumberish; + secondBridgeCalldata: BytesLike; +}; + +export type L2TransactionRequestTwoBridgesOuterStructOutput = [ + chainId: bigint, + mintValue: bigint, + l2Value: bigint, + l2GasLimit: bigint, + l2GasPerPubdataByteLimit: bigint, + refundRecipient: string, + secondBridgeAddress: string, + secondBridgeValue: bigint, + secondBridgeCalldata: string +] & { + chainId: bigint; + mintValue: bigint; + l2Value: bigint; + l2GasLimit: bigint; + l2GasPerPubdataByteLimit: bigint; + refundRecipient: string; + secondBridgeAddress: string; + secondBridgeValue: bigint; + secondBridgeCalldata: string; +}; + +export interface IBridgehubInterface extends Interface { + getFunction( + nameOrSignature: + | "acceptAdmin" + | "addStateTransitionManager" + | "addToken" + | "baseToken" + | "createNewChain" + | "getHyperchain" + | "l2TransactionBaseCost" + | "proveL1ToL2TransactionStatus" + | "proveL2LogInclusion" + | "proveL2MessageInclusion" + | "removeStateTransitionManager" + | "requestL2TransactionDirect" + | "requestL2TransactionTwoBridges" + | "setPendingAdmin" + | "setSharedBridge" + | "sharedBridge" + | "stateTransitionManager" + | "stateTransitionManagerIsRegistered" + | "tokenIsRegistered" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: "NewAdmin" | "NewChain" | "NewPendingAdmin" + ): EventFragment; + + encodeFunctionData( + functionFragment: "acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "addStateTransitionManager", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "addToken", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "baseToken", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "createNewChain", + values: [ + BigNumberish, + AddressLike, + AddressLike, + BigNumberish, + AddressLike, + BytesLike + ] + ): string; + encodeFunctionData( + functionFragment: "getHyperchain", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "l2TransactionBaseCost", + values: [BigNumberish, BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "proveL1ToL2TransactionStatus", + values: [ + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[], + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "proveL2LogInclusion", + values: [BigNumberish, BigNumberish, BigNumberish, L2LogStruct, BytesLike[]] + ): string; + encodeFunctionData( + functionFragment: "proveL2MessageInclusion", + values: [ + BigNumberish, + BigNumberish, + BigNumberish, + L2MessageStruct, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "removeStateTransitionManager", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "requestL2TransactionDirect", + values: [L2TransactionRequestDirectStruct] + ): string; + encodeFunctionData( + functionFragment: "requestL2TransactionTwoBridges", + values: [L2TransactionRequestTwoBridgesOuterStruct] + ): string; + encodeFunctionData( + functionFragment: "setPendingAdmin", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setSharedBridge", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "sharedBridge", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "stateTransitionManager", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "stateTransitionManagerIsRegistered", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "tokenIsRegistered", + values: [AddressLike] + ): string; + + decodeFunctionResult( + functionFragment: "acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "addStateTransitionManager", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "addToken", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "baseToken", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "createNewChain", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getHyperchain", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2TransactionBaseCost", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveL1ToL2TransactionStatus", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveL2LogInclusion", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveL2MessageInclusion", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "removeStateTransitionManager", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "requestL2TransactionDirect", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "requestL2TransactionTwoBridges", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setSharedBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sharedBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "stateTransitionManager", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "stateTransitionManagerIsRegistered", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tokenIsRegistered", + data: BytesLike + ): Result; +} + +export namespace NewAdminEvent { + export type InputTuple = [oldAdmin: AddressLike, newAdmin: AddressLike]; + export type OutputTuple = [oldAdmin: string, newAdmin: string]; + export interface OutputObject { + oldAdmin: string; + newAdmin: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewChainEvent { + export type InputTuple = [ + chainId: BigNumberish, + stateTransitionManager: AddressLike, + chainGovernance: AddressLike + ]; + export type OutputTuple = [ + chainId: bigint, + stateTransitionManager: string, + chainGovernance: string + ]; + export interface OutputObject { + chainId: bigint; + stateTransitionManager: string; + chainGovernance: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewPendingAdminEvent { + export type InputTuple = [ + oldPendingAdmin: AddressLike, + newPendingAdmin: AddressLike + ]; + export type OutputTuple = [oldPendingAdmin: string, newPendingAdmin: string]; + export interface OutputObject { + oldPendingAdmin: string; + newPendingAdmin: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IBridgehub extends BaseContract { + connect(runner?: ContractRunner | null): IBridgehub; + waitForDeployment(): Promise; + + interface: IBridgehubInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + acceptAdmin: TypedContractMethod<[], [void], "nonpayable">; + + addStateTransitionManager: TypedContractMethod< + [_stateTransitionManager: AddressLike], + [void], + "nonpayable" + >; + + addToken: TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; + + baseToken: TypedContractMethod<[_chainId: BigNumberish], [string], "view">; + + createNewChain: TypedContractMethod< + [ + _chainId: BigNumberish, + _stateTransitionManager: AddressLike, + _baseToken: AddressLike, + _salt: BigNumberish, + _admin: AddressLike, + _initData: BytesLike + ], + [bigint], + "nonpayable" + >; + + getHyperchain: TypedContractMethod< + [_chainId: BigNumberish], + [string], + "view" + >; + + l2TransactionBaseCost: TypedContractMethod< + [ + _chainId: BigNumberish, + _gasPrice: BigNumberish, + _l2GasLimit: BigNumberish, + _l2GasPerPubdataByteLimit: BigNumberish + ], + [bigint], + "view" + >; + + proveL1ToL2TransactionStatus: TypedContractMethod< + [ + _chainId: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[], + _status: BigNumberish + ], + [boolean], + "view" + >; + + proveL2LogInclusion: TypedContractMethod< + [ + _chainId: BigNumberish, + _batchNumber: BigNumberish, + _index: BigNumberish, + _log: L2LogStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + + proveL2MessageInclusion: TypedContractMethod< + [ + _chainId: BigNumberish, + _batchNumber: BigNumberish, + _index: BigNumberish, + _message: L2MessageStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + + removeStateTransitionManager: TypedContractMethod< + [_stateTransitionManager: AddressLike], + [void], + "nonpayable" + >; + + requestL2TransactionDirect: TypedContractMethod< + [_request: L2TransactionRequestDirectStruct], + [string], + "payable" + >; + + requestL2TransactionTwoBridges: TypedContractMethod< + [_request: L2TransactionRequestTwoBridgesOuterStruct], + [string], + "payable" + >; + + setPendingAdmin: TypedContractMethod< + [_newPendingAdmin: AddressLike], + [void], + "nonpayable" + >; + + setSharedBridge: TypedContractMethod< + [_sharedBridge: AddressLike], + [void], + "nonpayable" + >; + + sharedBridge: TypedContractMethod<[], [string], "view">; + + stateTransitionManager: TypedContractMethod< + [_chainId: BigNumberish], + [string], + "view" + >; + + stateTransitionManagerIsRegistered: TypedContractMethod< + [_stateTransitionManager: AddressLike], + [boolean], + "view" + >; + + tokenIsRegistered: TypedContractMethod< + [_baseToken: AddressLike], + [boolean], + "view" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "acceptAdmin" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "addStateTransitionManager" + ): TypedContractMethod< + [_stateTransitionManager: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "addToken" + ): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "baseToken" + ): TypedContractMethod<[_chainId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "createNewChain" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _stateTransitionManager: AddressLike, + _baseToken: AddressLike, + _salt: BigNumberish, + _admin: AddressLike, + _initData: BytesLike + ], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "getHyperchain" + ): TypedContractMethod<[_chainId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "l2TransactionBaseCost" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _gasPrice: BigNumberish, + _l2GasLimit: BigNumberish, + _l2GasPerPubdataByteLimit: BigNumberish + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "proveL1ToL2TransactionStatus" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[], + _status: BigNumberish + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "proveL2LogInclusion" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _batchNumber: BigNumberish, + _index: BigNumberish, + _log: L2LogStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "proveL2MessageInclusion" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _batchNumber: BigNumberish, + _index: BigNumberish, + _message: L2MessageStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "removeStateTransitionManager" + ): TypedContractMethod< + [_stateTransitionManager: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "requestL2TransactionDirect" + ): TypedContractMethod< + [_request: L2TransactionRequestDirectStruct], + [string], + "payable" + >; + getFunction( + nameOrSignature: "requestL2TransactionTwoBridges" + ): TypedContractMethod< + [_request: L2TransactionRequestTwoBridgesOuterStruct], + [string], + "payable" + >; + getFunction( + nameOrSignature: "setPendingAdmin" + ): TypedContractMethod<[_newPendingAdmin: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setSharedBridge" + ): TypedContractMethod<[_sharedBridge: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "sharedBridge" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "stateTransitionManager" + ): TypedContractMethod<[_chainId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "stateTransitionManagerIsRegistered" + ): TypedContractMethod< + [_stateTransitionManager: AddressLike], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "tokenIsRegistered" + ): TypedContractMethod<[_baseToken: AddressLike], [boolean], "view">; + + getEvent( + key: "NewAdmin" + ): TypedContractEvent< + NewAdminEvent.InputTuple, + NewAdminEvent.OutputTuple, + NewAdminEvent.OutputObject + >; + getEvent( + key: "NewChain" + ): TypedContractEvent< + NewChainEvent.InputTuple, + NewChainEvent.OutputTuple, + NewChainEvent.OutputObject + >; + getEvent( + key: "NewPendingAdmin" + ): TypedContractEvent< + NewPendingAdminEvent.InputTuple, + NewPendingAdminEvent.OutputTuple, + NewPendingAdminEvent.OutputObject + >; + + filters: { + "NewAdmin(address,address)": TypedContractEvent< + NewAdminEvent.InputTuple, + NewAdminEvent.OutputTuple, + NewAdminEvent.OutputObject + >; + NewAdmin: TypedContractEvent< + NewAdminEvent.InputTuple, + NewAdminEvent.OutputTuple, + NewAdminEvent.OutputObject + >; + + "NewChain(uint256,address,address)": TypedContractEvent< + NewChainEvent.InputTuple, + NewChainEvent.OutputTuple, + NewChainEvent.OutputObject + >; + NewChain: TypedContractEvent< + NewChainEvent.InputTuple, + NewChainEvent.OutputTuple, + NewChainEvent.OutputObject + >; + + "NewPendingAdmin(address,address)": TypedContractEvent< + NewPendingAdminEvent.InputTuple, + NewPendingAdminEvent.OutputTuple, + NewPendingAdminEvent.OutputObject + >; + NewPendingAdmin: TypedContractEvent< + NewPendingAdminEvent.InputTuple, + NewPendingAdminEvent.OutputTuple, + NewPendingAdminEvent.OutputObject + >; + }; +} diff --git a/typechain/IContractDeployer.ts b/typechain/IContractDeployer.ts new file mode 100644 index 00000000..fa895ec3 --- /dev/null +++ b/typechain/IContractDeployer.ts @@ -0,0 +1,425 @@ +/* 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 declare namespace IContractDeployer { + export type AccountInfoStruct = { + supportedAAVersion: BigNumberish; + nonceOrdering: BigNumberish; + }; + + export type AccountInfoStructOutput = [ + supportedAAVersion: bigint, + nonceOrdering: bigint + ] & { supportedAAVersion: bigint; nonceOrdering: bigint }; +} + +export interface IContractDeployerInterface extends Interface { + getFunction( + nameOrSignature: + | "create" + | "create2" + | "create2Account" + | "createAccount" + | "getAccountInfo" + | "getNewAddressCreate" + | "getNewAddressCreate2" + | "updateAccountVersion" + | "updateNonceOrdering" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "AccountNonceOrderingUpdated" + | "AccountVersionUpdated" + | "ContractDeployed" + ): EventFragment; + + encodeFunctionData( + functionFragment: "create", + values: [BytesLike, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "create2", + values: [BytesLike, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "create2Account", + values: [BytesLike, BytesLike, BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "createAccount", + values: [BytesLike, BytesLike, BytesLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getAccountInfo", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "getNewAddressCreate", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "getNewAddressCreate2", + values: [AddressLike, BytesLike, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "updateAccountVersion", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "updateNonceOrdering", + values: [BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "create", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "create2", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "create2Account", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "createAccount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getAccountInfo", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNewAddressCreate", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getNewAddressCreate2", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateAccountVersion", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "updateNonceOrdering", + data: BytesLike + ): Result; +} + +export namespace AccountNonceOrderingUpdatedEvent { + export type InputTuple = [ + accountAddress: AddressLike, + nonceOrdering: BigNumberish + ]; + export type OutputTuple = [accountAddress: string, nonceOrdering: bigint]; + export interface OutputObject { + accountAddress: string; + nonceOrdering: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AccountVersionUpdatedEvent { + export type InputTuple = [ + accountAddress: AddressLike, + aaVersion: BigNumberish + ]; + export type OutputTuple = [accountAddress: string, aaVersion: bigint]; + export interface OutputObject { + accountAddress: string; + aaVersion: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ContractDeployedEvent { + export type InputTuple = [ + deployerAddress: AddressLike, + bytecodeHash: BytesLike, + contractAddress: AddressLike + ]; + export type OutputTuple = [ + deployerAddress: string, + bytecodeHash: string, + contractAddress: string + ]; + export interface OutputObject { + deployerAddress: string; + bytecodeHash: string; + contractAddress: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IContractDeployer extends BaseContract { + connect(runner?: ContractRunner | null): IContractDeployer; + waitForDeployment(): Promise; + + interface: IContractDeployerInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + create: TypedContractMethod< + [_salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike], + [string], + "payable" + >; + + create2: TypedContractMethod< + [_salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike], + [string], + "payable" + >; + + create2Account: TypedContractMethod< + [ + _salt: BytesLike, + _bytecodeHash: BytesLike, + _input: BytesLike, + _aaVersion: BigNumberish + ], + [string], + "payable" + >; + + createAccount: TypedContractMethod< + [ + _salt: BytesLike, + _bytecodeHash: BytesLike, + _input: BytesLike, + _aaVersion: BigNumberish + ], + [string], + "payable" + >; + + getAccountInfo: TypedContractMethod< + [_address: AddressLike], + [IContractDeployer.AccountInfoStructOutput], + "view" + >; + + getNewAddressCreate: TypedContractMethod< + [_sender: AddressLike, _senderNonce: BigNumberish], + [string], + "view" + >; + + getNewAddressCreate2: TypedContractMethod< + [ + _sender: AddressLike, + _bytecodeHash: BytesLike, + _salt: BytesLike, + _input: BytesLike + ], + [string], + "view" + >; + + updateAccountVersion: TypedContractMethod< + [_version: BigNumberish], + [void], + "nonpayable" + >; + + updateNonceOrdering: TypedContractMethod< + [_nonceOrdering: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "create" + ): TypedContractMethod< + [_salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike], + [string], + "payable" + >; + getFunction( + nameOrSignature: "create2" + ): TypedContractMethod< + [_salt: BytesLike, _bytecodeHash: BytesLike, _input: BytesLike], + [string], + "payable" + >; + getFunction( + nameOrSignature: "create2Account" + ): TypedContractMethod< + [ + _salt: BytesLike, + _bytecodeHash: BytesLike, + _input: BytesLike, + _aaVersion: BigNumberish + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "createAccount" + ): TypedContractMethod< + [ + _salt: BytesLike, + _bytecodeHash: BytesLike, + _input: BytesLike, + _aaVersion: BigNumberish + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "getAccountInfo" + ): TypedContractMethod< + [_address: AddressLike], + [IContractDeployer.AccountInfoStructOutput], + "view" + >; + getFunction( + nameOrSignature: "getNewAddressCreate" + ): TypedContractMethod< + [_sender: AddressLike, _senderNonce: BigNumberish], + [string], + "view" + >; + getFunction( + nameOrSignature: "getNewAddressCreate2" + ): TypedContractMethod< + [ + _sender: AddressLike, + _bytecodeHash: BytesLike, + _salt: BytesLike, + _input: BytesLike + ], + [string], + "view" + >; + getFunction( + nameOrSignature: "updateAccountVersion" + ): TypedContractMethod<[_version: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "updateNonceOrdering" + ): TypedContractMethod<[_nonceOrdering: BigNumberish], [void], "nonpayable">; + + getEvent( + key: "AccountNonceOrderingUpdated" + ): TypedContractEvent< + AccountNonceOrderingUpdatedEvent.InputTuple, + AccountNonceOrderingUpdatedEvent.OutputTuple, + AccountNonceOrderingUpdatedEvent.OutputObject + >; + getEvent( + key: "AccountVersionUpdated" + ): TypedContractEvent< + AccountVersionUpdatedEvent.InputTuple, + AccountVersionUpdatedEvent.OutputTuple, + AccountVersionUpdatedEvent.OutputObject + >; + getEvent( + key: "ContractDeployed" + ): TypedContractEvent< + ContractDeployedEvent.InputTuple, + ContractDeployedEvent.OutputTuple, + ContractDeployedEvent.OutputObject + >; + + filters: { + "AccountNonceOrderingUpdated(address,uint8)": TypedContractEvent< + AccountNonceOrderingUpdatedEvent.InputTuple, + AccountNonceOrderingUpdatedEvent.OutputTuple, + AccountNonceOrderingUpdatedEvent.OutputObject + >; + AccountNonceOrderingUpdated: TypedContractEvent< + AccountNonceOrderingUpdatedEvent.InputTuple, + AccountNonceOrderingUpdatedEvent.OutputTuple, + AccountNonceOrderingUpdatedEvent.OutputObject + >; + + "AccountVersionUpdated(address,uint8)": TypedContractEvent< + AccountVersionUpdatedEvent.InputTuple, + AccountVersionUpdatedEvent.OutputTuple, + AccountVersionUpdatedEvent.OutputObject + >; + AccountVersionUpdated: TypedContractEvent< + AccountVersionUpdatedEvent.InputTuple, + AccountVersionUpdatedEvent.OutputTuple, + AccountVersionUpdatedEvent.OutputObject + >; + + "ContractDeployed(address,bytes32,address)": TypedContractEvent< + ContractDeployedEvent.InputTuple, + ContractDeployedEvent.OutputTuple, + ContractDeployedEvent.OutputObject + >; + ContractDeployed: TypedContractEvent< + ContractDeployedEvent.InputTuple, + ContractDeployedEvent.OutputTuple, + ContractDeployedEvent.OutputObject + >; + }; +} diff --git a/typechain/IERC1271.ts b/typechain/IERC1271.ts new file mode 100644 index 00000000..71f9df58 --- /dev/null +++ b/typechain/IERC1271.ts @@ -0,0 +1,98 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BytesLike, + FunctionFragment, + Result, + Interface, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IERC1271Interface extends Interface { + getFunction(nameOrSignature: "isValidSignature"): FunctionFragment; + + encodeFunctionData( + functionFragment: "isValidSignature", + values: [BytesLike, BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "isValidSignature", + data: BytesLike + ): Result; +} + +export interface IERC1271 extends BaseContract { + connect(runner?: ContractRunner | null): IERC1271; + waitForDeployment(): Promise; + + interface: IERC1271Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + isValidSignature: TypedContractMethod< + [hash: BytesLike, signature: BytesLike], + [string], + "view" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "isValidSignature" + ): TypedContractMethod< + [hash: BytesLike, signature: BytesLike], + [string], + "view" + >; + + filters: {}; +} diff --git a/typechain/IERC20.ts b/typechain/IERC20.ts new file mode 100644 index 00000000..783ad436 --- /dev/null +++ b/typechain/IERC20.ts @@ -0,0 +1,286 @@ +/* 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 IERC20Interface extends Interface { + getFunction( + nameOrSignature: + | "allowance" + | "approve" + | "balanceOf" + | "decimals" + | "name" + | "symbol" + | "totalSupply" + | "transfer" + | "transferFrom" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "Approval" | "Transfer"): EventFragment; + + encodeFunctionData( + functionFragment: "allowance", + values: [AddressLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "approve", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "balanceOf", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData(functionFragment: "name", values?: undefined): string; + encodeFunctionData(functionFragment: "symbol", values?: undefined): string; + encodeFunctionData( + functionFragment: "totalSupply", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transfer", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferFrom", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "allowance", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "approve", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "name", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "symbol", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "totalSupply", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "transfer", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "transferFrom", + data: BytesLike + ): Result; +} + +export namespace ApprovalEvent { + export type InputTuple = [ + owner: AddressLike, + spender: AddressLike, + value: BigNumberish + ]; + export type OutputTuple = [owner: string, spender: string, value: bigint]; + export interface OutputObject { + owner: string; + spender: string; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +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; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IERC20 extends BaseContract { + connect(runner?: ContractRunner | null): IERC20; + waitForDeployment(): Promise; + + interface: IERC20Interface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + allowance: TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + + approve: TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + balanceOf: TypedContractMethod<[account: AddressLike], [bigint], "view">; + + decimals: TypedContractMethod<[], [bigint], "view">; + + name: TypedContractMethod<[], [string], "view">; + + symbol: TypedContractMethod<[], [string], "view">; + + totalSupply: TypedContractMethod<[], [bigint], "view">; + + transfer: TypedContractMethod< + [to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + transferFrom: TypedContractMethod< + [from: AddressLike, to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "allowance" + ): TypedContractMethod< + [owner: AddressLike, spender: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "approve" + ): TypedContractMethod< + [spender: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "balanceOf" + ): TypedContractMethod<[account: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "name" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "symbol" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "totalSupply" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "transfer" + ): TypedContractMethod< + [to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFrom" + ): TypedContractMethod< + [from: AddressLike, to: AddressLike, amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getEvent( + key: "Approval" + ): TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + getEvent( + key: "Transfer" + ): TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + + filters: { + "Approval(address,address,uint256)": TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + Approval: TypedContractEvent< + ApprovalEvent.InputTuple, + ApprovalEvent.OutputTuple, + ApprovalEvent.OutputObject + >; + + "Transfer(address,address,uint256)": TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + Transfer: TypedContractEvent< + TransferEvent.InputTuple, + TransferEvent.OutputTuple, + TransferEvent.OutputObject + >; + }; +} diff --git a/typechain/IEthToken.ts b/typechain/IEthToken.ts new file mode 100644 index 00000000..689b2f15 --- /dev/null +++ b/typechain/IEthToken.ts @@ -0,0 +1,365 @@ +/* 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; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +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; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +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; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +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; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IEthToken extends BaseContract { + connect(runner?: ContractRunner | null): IEthToken; + waitForDeployment(): Promise; + + interface: IEthTokenInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + 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( + 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 + >; + }; +} diff --git a/typechain/IL1AssetRouter.ts b/typechain/IL1AssetRouter.ts new file mode 100644 index 00000000..90b6ac7d --- /dev/null +++ b/typechain/IL1AssetRouter.ts @@ -0,0 +1,1448 @@ +/* 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 type L2TransactionRequestTwoBridgesInnerStruct = { + magicValue: BytesLike; + l2Contract: AddressLike; + l2Calldata: BytesLike; + factoryDeps: BytesLike[]; + txDataHash: BytesLike; +}; + +export type L2TransactionRequestTwoBridgesInnerStructOutput = [ + magicValue: string, + l2Contract: string, + l2Calldata: string, + factoryDeps: string[], + txDataHash: string +] & { + magicValue: string; + l2Contract: string; + l2Calldata: string; + factoryDeps: string[]; + txDataHash: string; +}; + +export interface IL1AssetRouterInterface extends Interface { + getFunction( + nameOrSignature: + | "BRIDGE_HUB" + | "ERA_CHAIN_ID" + | "L1_CHAIN_ID" + | "L1_NULLIFIER" + | "L1_WETH_TOKEN" + | "acceptOwnership" + | "assetDeploymentTracker" + | "assetHandlerAddress" + | "bridgeRecoverFailedTransfer(uint256,address,bytes32,bytes)" + | "bridgeRecoverFailedTransfer(uint256,address,bytes32,bytes,bytes32,uint256,uint256,uint16,bytes32[])" + | "bridgehubConfirmL2Transaction" + | "bridgehubDeposit" + | "bridgehubDepositBaseToken" + | "claimFailedDeposit" + | "depositLegacyErc20Bridge" + | "finalizeDeposit" + | "finalizeWithdrawal" + | "getDepositCalldata" + | "initialize" + | "isWithdrawalFinalized" + | "legacyBridge" + | "nativeTokenVault" + | "owner" + | "pause" + | "paused" + | "pendingOwner" + | "renounceOwnership" + | "setAssetDeploymentTracker" + | "setAssetHandlerAddressThisChain" + | "setL1Erc20Bridge" + | "setNativeTokenVault" + | "transferFundsToNTV" + | "transferOwnership" + | "unpause" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "AssetDeploymentTrackerSet" + | "AssetHandlerRegistered" + | "AssetHandlerRegisteredInitial" + | "BridgehubDepositBaseTokenInitiated" + | "BridgehubDepositFinalized" + | "BridgehubDepositInitiated" + | "BridgehubMintData" + | "BridgehubWithdrawalInitiated" + | "ClaimedFailedDepositAssetRouter" + | "DepositFinalizedAssetRouter" + | "Initialized" + | "LegacyDepositInitiated" + | "OwnershipTransferStarted" + | "OwnershipTransferred" + | "Paused" + | "Unpaused" + ): EventFragment; + + encodeFunctionData( + functionFragment: "BRIDGE_HUB", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "ERA_CHAIN_ID", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "L1_CHAIN_ID", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "L1_NULLIFIER", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "L1_WETH_TOKEN", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "acceptOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "assetDeploymentTracker", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "assetHandlerAddress", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "bridgeRecoverFailedTransfer(uint256,address,bytes32,bytes)", + values: [BigNumberish, AddressLike, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "bridgeRecoverFailedTransfer(uint256,address,bytes32,bytes,bytes32,uint256,uint256,uint16,bytes32[])", + values: [ + BigNumberish, + AddressLike, + BytesLike, + BytesLike, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "bridgehubConfirmL2Transaction", + values: [BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "bridgehubDeposit", + values: [BigNumberish, AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "bridgehubDepositBaseToken", + values: [BigNumberish, BytesLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "claimFailedDeposit", + values: [ + BigNumberish, + AddressLike, + AddressLike, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "depositLegacyErc20Bridge", + values: [ + AddressLike, + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + AddressLike + ] + ): string; + encodeFunctionData( + functionFragment: "finalizeDeposit", + values: [BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "finalizeWithdrawal", + values: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "getDepositCalldata", + values: [AddressLike, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "initialize", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "isWithdrawalFinalized", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "legacyBridge", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "nativeTokenVault", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "owner", values?: undefined): string; + encodeFunctionData(functionFragment: "pause", values?: undefined): string; + encodeFunctionData(functionFragment: "paused", values?: undefined): string; + encodeFunctionData( + functionFragment: "pendingOwner", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "renounceOwnership", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setAssetDeploymentTracker", + values: [BytesLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setAssetHandlerAddressThisChain", + values: [BytesLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setL1Erc20Bridge", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setNativeTokenVault", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "transferFundsToNTV", + values: [BytesLike, BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "transferOwnership", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "unpause", values?: undefined): string; + + decodeFunctionResult(functionFragment: "BRIDGE_HUB", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "ERA_CHAIN_ID", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "L1_CHAIN_ID", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "L1_NULLIFIER", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "L1_WETH_TOKEN", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "acceptOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assetDeploymentTracker", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "assetHandlerAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgeRecoverFailedTransfer(uint256,address,bytes32,bytes)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgeRecoverFailedTransfer(uint256,address,bytes32,bytes,bytes32,uint256,uint256,uint16,bytes32[])", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgehubConfirmL2Transaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgehubDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgehubDepositBaseToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "claimFailedDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "depositLegacyErc20Bridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "finalizeDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "finalizeWithdrawal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getDepositCalldata", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "isWithdrawalFinalized", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "legacyBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "nativeTokenVault", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "owner", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "pause", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "paused", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "pendingOwner", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "renounceOwnership", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setAssetDeploymentTracker", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setAssetHandlerAddressThisChain", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setL1Erc20Bridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setNativeTokenVault", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferFundsToNTV", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferOwnership", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "unpause", data: BytesLike): Result; +} + +export namespace AssetDeploymentTrackerSetEvent { + export type InputTuple = [ + assetId: BytesLike, + assetDeploymentTracker: AddressLike, + additionalData: BytesLike + ]; + export type OutputTuple = [ + assetId: string, + assetDeploymentTracker: string, + additionalData: string + ]; + export interface OutputObject { + assetId: string; + assetDeploymentTracker: string; + additionalData: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AssetHandlerRegisteredEvent { + export type InputTuple = [assetId: BytesLike, _assetAddress: AddressLike]; + export type OutputTuple = [assetId: string, _assetAddress: string]; + export interface OutputObject { + assetId: string; + _assetAddress: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AssetHandlerRegisteredInitialEvent { + export type InputTuple = [ + assetId: BytesLike, + assetHandlerAddress: AddressLike, + additionalData: BytesLike, + assetDeploymentTracker: AddressLike + ]; + export type OutputTuple = [ + assetId: string, + assetHandlerAddress: string, + additionalData: string, + assetDeploymentTracker: string + ]; + export interface OutputObject { + assetId: string; + assetHandlerAddress: string; + additionalData: string; + assetDeploymentTracker: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubDepositBaseTokenInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + from: AddressLike, + assetId: BytesLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + from: string, + assetId: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + from: string; + assetId: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubDepositFinalizedEvent { + export type InputTuple = [ + chainId: BigNumberish, + txDataHash: BytesLike, + l2DepositTxHash: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + txDataHash: string, + l2DepositTxHash: string + ]; + export interface OutputObject { + chainId: bigint; + txDataHash: string; + l2DepositTxHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubDepositInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + txDataHash: BytesLike, + from: AddressLike, + assetId: BytesLike, + bridgeMintCalldata: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + txDataHash: string, + from: string, + assetId: string, + bridgeMintCalldata: string + ]; + export interface OutputObject { + chainId: bigint; + txDataHash: string; + from: string; + assetId: string; + bridgeMintCalldata: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubMintDataEvent { + export type InputTuple = [bridgeMintData: BytesLike]; + export type OutputTuple = [bridgeMintData: string]; + export interface OutputObject { + bridgeMintData: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubWithdrawalInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + sender: AddressLike, + assetId: BytesLike, + assetDataHash: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + sender: string, + assetId: string, + assetDataHash: string + ]; + export interface OutputObject { + chainId: bigint; + sender: string; + assetId: string; + assetDataHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ClaimedFailedDepositAssetRouterEvent { + export type InputTuple = [ + chainId: BigNumberish, + assetId: BytesLike, + assetData: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + assetId: string, + assetData: string + ]; + export interface OutputObject { + chainId: bigint; + assetId: string; + assetData: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace DepositFinalizedAssetRouterEvent { + export type InputTuple = [ + chainId: BigNumberish, + assetId: BytesLike, + assetData: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + assetId: string, + assetData: string + ]; + export interface OutputObject { + chainId: bigint; + assetId: string; + assetData: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace InitializedEvent { + export type InputTuple = [version: BigNumberish]; + export type OutputTuple = [version: bigint]; + export interface OutputObject { + version: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace LegacyDepositInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + l2DepositTxHash: BytesLike, + from: AddressLike, + to: AddressLike, + l1Asset: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + l2DepositTxHash: string, + from: string, + to: string, + l1Asset: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + l2DepositTxHash: string; + from: string; + to: string; + l1Asset: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OwnershipTransferStartedEvent { + export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [previousOwner: string, newOwner: string]; + export interface OutputObject { + previousOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace OwnershipTransferredEvent { + export type InputTuple = [previousOwner: AddressLike, newOwner: AddressLike]; + export type OutputTuple = [previousOwner: string, newOwner: string]; + export interface OutputObject { + previousOwner: string; + newOwner: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace PausedEvent { + export type InputTuple = [account: AddressLike]; + export type OutputTuple = [account: string]; + export interface OutputObject { + account: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace UnpausedEvent { + export type InputTuple = [account: AddressLike]; + export type OutputTuple = [account: string]; + export interface OutputObject { + account: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IL1AssetRouter extends BaseContract { + connect(runner?: ContractRunner | null): IL1AssetRouter; + waitForDeployment(): Promise; + + interface: IL1AssetRouterInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + BRIDGE_HUB: TypedContractMethod<[], [string], "view">; + + ERA_CHAIN_ID: TypedContractMethod<[], [bigint], "view">; + + L1_CHAIN_ID: TypedContractMethod<[], [bigint], "view">; + + L1_NULLIFIER: TypedContractMethod<[], [string], "view">; + + L1_WETH_TOKEN: TypedContractMethod<[], [string], "view">; + + acceptOwnership: TypedContractMethod<[], [void], "nonpayable">; + + assetDeploymentTracker: TypedContractMethod< + [assetId: BytesLike], + [string], + "view" + >; + + assetHandlerAddress: TypedContractMethod< + [assetId: BytesLike], + [string], + "view" + >; + + "bridgeRecoverFailedTransfer(uint256,address,bytes32,bytes)": TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _assetId: BytesLike, + _assetData: BytesLike + ], + [void], + "nonpayable" + >; + + "bridgeRecoverFailedTransfer(uint256,address,bytes32,bytes,bytes32,uint256,uint256,uint16,bytes32[])": TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _assetId: BytesLike, + _assetData: BytesLike, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + bridgehubConfirmL2Transaction: TypedContractMethod< + [_chainId: BigNumberish, _txDataHash: BytesLike, _txHash: BytesLike], + [void], + "nonpayable" + >; + + bridgehubDeposit: TypedContractMethod< + [ + _chainId: BigNumberish, + _originalCaller: AddressLike, + _value: BigNumberish, + _data: BytesLike + ], + [L2TransactionRequestTwoBridgesInnerStructOutput], + "payable" + >; + + bridgehubDepositBaseToken: TypedContractMethod< + [ + _chainId: BigNumberish, + _assetId: BytesLike, + _originalCaller: AddressLike, + _amount: BigNumberish + ], + [void], + "payable" + >; + + claimFailedDeposit: TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + depositLegacyErc20Bridge: TypedContractMethod< + [ + _originalCaller: AddressLike, + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxGasLimit: BigNumberish, + _l2TxGasPerPubdataByte: BigNumberish, + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + + finalizeDeposit: TypedContractMethod< + [_chainId: BigNumberish, _assetId: BytesLike, _transferData: BytesLike], + [void], + "nonpayable" + >; + + finalizeWithdrawal: TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + getDepositCalldata: TypedContractMethod< + [_sender: AddressLike, _assetId: BytesLike, _assetData: BytesLike], + [string], + "view" + >; + + initialize: TypedContractMethod<[_owner: AddressLike], [void], "nonpayable">; + + isWithdrawalFinalized: TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish + ], + [boolean], + "view" + >; + + legacyBridge: TypedContractMethod<[], [string], "view">; + + nativeTokenVault: TypedContractMethod<[], [string], "view">; + + owner: TypedContractMethod<[], [string], "view">; + + pause: TypedContractMethod<[], [void], "nonpayable">; + + paused: TypedContractMethod<[], [boolean], "view">; + + pendingOwner: TypedContractMethod<[], [string], "view">; + + renounceOwnership: TypedContractMethod<[], [void], "nonpayable">; + + setAssetDeploymentTracker: TypedContractMethod< + [_assetRegistrationData: BytesLike, _assetDeploymentTracker: AddressLike], + [void], + "nonpayable" + >; + + setAssetHandlerAddressThisChain: TypedContractMethod< + [_assetRegistrationData: BytesLike, _assetHandlerAddress: AddressLike], + [void], + "nonpayable" + >; + + setL1Erc20Bridge: TypedContractMethod< + [_legacyBridge: AddressLike], + [void], + "nonpayable" + >; + + setNativeTokenVault: TypedContractMethod< + [_nativeTokenVault: AddressLike], + [void], + "nonpayable" + >; + + transferFundsToNTV: TypedContractMethod< + [_assetId: BytesLike, _amount: BigNumberish, _originalCaller: AddressLike], + [boolean], + "nonpayable" + >; + + transferOwnership: TypedContractMethod< + [newOwner: AddressLike], + [void], + "nonpayable" + >; + + unpause: TypedContractMethod<[], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "BRIDGE_HUB" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "ERA_CHAIN_ID" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "L1_CHAIN_ID" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "L1_NULLIFIER" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "L1_WETH_TOKEN" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "acceptOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "assetDeploymentTracker" + ): TypedContractMethod<[assetId: BytesLike], [string], "view">; + getFunction( + nameOrSignature: "assetHandlerAddress" + ): TypedContractMethod<[assetId: BytesLike], [string], "view">; + getFunction( + nameOrSignature: "bridgeRecoverFailedTransfer(uint256,address,bytes32,bytes)" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _assetId: BytesLike, + _assetData: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "bridgeRecoverFailedTransfer(uint256,address,bytes32,bytes,bytes32,uint256,uint256,uint16,bytes32[])" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _assetId: BytesLike, + _assetData: BytesLike, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "bridgehubConfirmL2Transaction" + ): TypedContractMethod< + [_chainId: BigNumberish, _txDataHash: BytesLike, _txHash: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "bridgehubDeposit" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _originalCaller: AddressLike, + _value: BigNumberish, + _data: BytesLike + ], + [L2TransactionRequestTwoBridgesInnerStructOutput], + "payable" + >; + getFunction( + nameOrSignature: "bridgehubDepositBaseToken" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _assetId: BytesLike, + _originalCaller: AddressLike, + _amount: BigNumberish + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "claimFailedDeposit" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositLegacyErc20Bridge" + ): TypedContractMethod< + [ + _originalCaller: AddressLike, + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxGasLimit: BigNumberish, + _l2TxGasPerPubdataByte: BigNumberish, + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "finalizeDeposit" + ): TypedContractMethod< + [_chainId: BigNumberish, _assetId: BytesLike, _transferData: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "finalizeWithdrawal" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "getDepositCalldata" + ): TypedContractMethod< + [_sender: AddressLike, _assetId: BytesLike, _assetData: BytesLike], + [string], + "view" + >; + getFunction( + nameOrSignature: "initialize" + ): TypedContractMethod<[_owner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "isWithdrawalFinalized" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "legacyBridge" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nativeTokenVault" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "owner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "pause" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "paused" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "pendingOwner" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "renounceOwnership" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "setAssetDeploymentTracker" + ): TypedContractMethod< + [_assetRegistrationData: BytesLike, _assetDeploymentTracker: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setAssetHandlerAddressThisChain" + ): TypedContractMethod< + [_assetRegistrationData: BytesLike, _assetHandlerAddress: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setL1Erc20Bridge" + ): TypedContractMethod<[_legacyBridge: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setNativeTokenVault" + ): TypedContractMethod< + [_nativeTokenVault: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferFundsToNTV" + ): TypedContractMethod< + [_assetId: BytesLike, _amount: BigNumberish, _originalCaller: AddressLike], + [boolean], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferOwnership" + ): TypedContractMethod<[newOwner: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "unpause" + ): TypedContractMethod<[], [void], "nonpayable">; + + getEvent( + key: "AssetDeploymentTrackerSet" + ): TypedContractEvent< + AssetDeploymentTrackerSetEvent.InputTuple, + AssetDeploymentTrackerSetEvent.OutputTuple, + AssetDeploymentTrackerSetEvent.OutputObject + >; + getEvent( + key: "AssetHandlerRegistered" + ): TypedContractEvent< + AssetHandlerRegisteredEvent.InputTuple, + AssetHandlerRegisteredEvent.OutputTuple, + AssetHandlerRegisteredEvent.OutputObject + >; + getEvent( + key: "AssetHandlerRegisteredInitial" + ): TypedContractEvent< + AssetHandlerRegisteredInitialEvent.InputTuple, + AssetHandlerRegisteredInitialEvent.OutputTuple, + AssetHandlerRegisteredInitialEvent.OutputObject + >; + getEvent( + key: "BridgehubDepositBaseTokenInitiated" + ): TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + getEvent( + key: "BridgehubDepositFinalized" + ): TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + getEvent( + key: "BridgehubDepositInitiated" + ): TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + getEvent( + key: "BridgehubMintData" + ): TypedContractEvent< + BridgehubMintDataEvent.InputTuple, + BridgehubMintDataEvent.OutputTuple, + BridgehubMintDataEvent.OutputObject + >; + getEvent( + key: "BridgehubWithdrawalInitiated" + ): TypedContractEvent< + BridgehubWithdrawalInitiatedEvent.InputTuple, + BridgehubWithdrawalInitiatedEvent.OutputTuple, + BridgehubWithdrawalInitiatedEvent.OutputObject + >; + getEvent( + key: "ClaimedFailedDepositAssetRouter" + ): TypedContractEvent< + ClaimedFailedDepositAssetRouterEvent.InputTuple, + ClaimedFailedDepositAssetRouterEvent.OutputTuple, + ClaimedFailedDepositAssetRouterEvent.OutputObject + >; + getEvent( + key: "DepositFinalizedAssetRouter" + ): TypedContractEvent< + DepositFinalizedAssetRouterEvent.InputTuple, + DepositFinalizedAssetRouterEvent.OutputTuple, + DepositFinalizedAssetRouterEvent.OutputObject + >; + getEvent( + key: "Initialized" + ): TypedContractEvent< + InitializedEvent.InputTuple, + InitializedEvent.OutputTuple, + InitializedEvent.OutputObject + >; + getEvent( + key: "LegacyDepositInitiated" + ): TypedContractEvent< + LegacyDepositInitiatedEvent.InputTuple, + LegacyDepositInitiatedEvent.OutputTuple, + LegacyDepositInitiatedEvent.OutputObject + >; + getEvent( + key: "OwnershipTransferStarted" + ): TypedContractEvent< + OwnershipTransferStartedEvent.InputTuple, + OwnershipTransferStartedEvent.OutputTuple, + OwnershipTransferStartedEvent.OutputObject + >; + getEvent( + key: "OwnershipTransferred" + ): TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + getEvent( + key: "Paused" + ): TypedContractEvent< + PausedEvent.InputTuple, + PausedEvent.OutputTuple, + PausedEvent.OutputObject + >; + getEvent( + key: "Unpaused" + ): TypedContractEvent< + UnpausedEvent.InputTuple, + UnpausedEvent.OutputTuple, + UnpausedEvent.OutputObject + >; + + filters: { + "AssetDeploymentTrackerSet(bytes32,address,bytes32)": TypedContractEvent< + AssetDeploymentTrackerSetEvent.InputTuple, + AssetDeploymentTrackerSetEvent.OutputTuple, + AssetDeploymentTrackerSetEvent.OutputObject + >; + AssetDeploymentTrackerSet: TypedContractEvent< + AssetDeploymentTrackerSetEvent.InputTuple, + AssetDeploymentTrackerSetEvent.OutputTuple, + AssetDeploymentTrackerSetEvent.OutputObject + >; + + "AssetHandlerRegistered(bytes32,address)": TypedContractEvent< + AssetHandlerRegisteredEvent.InputTuple, + AssetHandlerRegisteredEvent.OutputTuple, + AssetHandlerRegisteredEvent.OutputObject + >; + AssetHandlerRegistered: TypedContractEvent< + AssetHandlerRegisteredEvent.InputTuple, + AssetHandlerRegisteredEvent.OutputTuple, + AssetHandlerRegisteredEvent.OutputObject + >; + + "AssetHandlerRegisteredInitial(bytes32,address,bytes32,address)": TypedContractEvent< + AssetHandlerRegisteredInitialEvent.InputTuple, + AssetHandlerRegisteredInitialEvent.OutputTuple, + AssetHandlerRegisteredInitialEvent.OutputObject + >; + AssetHandlerRegisteredInitial: TypedContractEvent< + AssetHandlerRegisteredInitialEvent.InputTuple, + AssetHandlerRegisteredInitialEvent.OutputTuple, + AssetHandlerRegisteredInitialEvent.OutputObject + >; + + "BridgehubDepositBaseTokenInitiated(uint256,address,bytes32,uint256)": TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + BridgehubDepositBaseTokenInitiated: TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + + "BridgehubDepositFinalized(uint256,bytes32,bytes32)": TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + BridgehubDepositFinalized: TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + + "BridgehubDepositInitiated(uint256,bytes32,address,bytes32,bytes)": TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + BridgehubDepositInitiated: TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + + "BridgehubMintData(bytes)": TypedContractEvent< + BridgehubMintDataEvent.InputTuple, + BridgehubMintDataEvent.OutputTuple, + BridgehubMintDataEvent.OutputObject + >; + BridgehubMintData: TypedContractEvent< + BridgehubMintDataEvent.InputTuple, + BridgehubMintDataEvent.OutputTuple, + BridgehubMintDataEvent.OutputObject + >; + + "BridgehubWithdrawalInitiated(uint256,address,bytes32,bytes32)": TypedContractEvent< + BridgehubWithdrawalInitiatedEvent.InputTuple, + BridgehubWithdrawalInitiatedEvent.OutputTuple, + BridgehubWithdrawalInitiatedEvent.OutputObject + >; + BridgehubWithdrawalInitiated: TypedContractEvent< + BridgehubWithdrawalInitiatedEvent.InputTuple, + BridgehubWithdrawalInitiatedEvent.OutputTuple, + BridgehubWithdrawalInitiatedEvent.OutputObject + >; + + "ClaimedFailedDepositAssetRouter(uint256,bytes32,bytes)": TypedContractEvent< + ClaimedFailedDepositAssetRouterEvent.InputTuple, + ClaimedFailedDepositAssetRouterEvent.OutputTuple, + ClaimedFailedDepositAssetRouterEvent.OutputObject + >; + ClaimedFailedDepositAssetRouter: TypedContractEvent< + ClaimedFailedDepositAssetRouterEvent.InputTuple, + ClaimedFailedDepositAssetRouterEvent.OutputTuple, + ClaimedFailedDepositAssetRouterEvent.OutputObject + >; + + "DepositFinalizedAssetRouter(uint256,bytes32,bytes)": TypedContractEvent< + DepositFinalizedAssetRouterEvent.InputTuple, + DepositFinalizedAssetRouterEvent.OutputTuple, + DepositFinalizedAssetRouterEvent.OutputObject + >; + DepositFinalizedAssetRouter: TypedContractEvent< + DepositFinalizedAssetRouterEvent.InputTuple, + DepositFinalizedAssetRouterEvent.OutputTuple, + DepositFinalizedAssetRouterEvent.OutputObject + >; + + "Initialized(uint8)": TypedContractEvent< + InitializedEvent.InputTuple, + InitializedEvent.OutputTuple, + InitializedEvent.OutputObject + >; + Initialized: TypedContractEvent< + InitializedEvent.InputTuple, + InitializedEvent.OutputTuple, + InitializedEvent.OutputObject + >; + + "LegacyDepositInitiated(uint256,bytes32,address,address,address,uint256)": TypedContractEvent< + LegacyDepositInitiatedEvent.InputTuple, + LegacyDepositInitiatedEvent.OutputTuple, + LegacyDepositInitiatedEvent.OutputObject + >; + LegacyDepositInitiated: TypedContractEvent< + LegacyDepositInitiatedEvent.InputTuple, + LegacyDepositInitiatedEvent.OutputTuple, + LegacyDepositInitiatedEvent.OutputObject + >; + + "OwnershipTransferStarted(address,address)": TypedContractEvent< + OwnershipTransferStartedEvent.InputTuple, + OwnershipTransferStartedEvent.OutputTuple, + OwnershipTransferStartedEvent.OutputObject + >; + OwnershipTransferStarted: TypedContractEvent< + OwnershipTransferStartedEvent.InputTuple, + OwnershipTransferStartedEvent.OutputTuple, + OwnershipTransferStartedEvent.OutputObject + >; + + "OwnershipTransferred(address,address)": TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + OwnershipTransferred: TypedContractEvent< + OwnershipTransferredEvent.InputTuple, + OwnershipTransferredEvent.OutputTuple, + OwnershipTransferredEvent.OutputObject + >; + + "Paused(address)": TypedContractEvent< + PausedEvent.InputTuple, + PausedEvent.OutputTuple, + PausedEvent.OutputObject + >; + Paused: TypedContractEvent< + PausedEvent.InputTuple, + PausedEvent.OutputTuple, + PausedEvent.OutputObject + >; + + "Unpaused(address)": TypedContractEvent< + UnpausedEvent.InputTuple, + UnpausedEvent.OutputTuple, + UnpausedEvent.OutputObject + >; + Unpaused: TypedContractEvent< + UnpausedEvent.InputTuple, + UnpausedEvent.OutputTuple, + UnpausedEvent.OutputObject + >; + }; +} diff --git a/typechain/IL1Bridge.ts b/typechain/IL1Bridge.ts new file mode 100644 index 00000000..e1461a73 --- /dev/null +++ b/typechain/IL1Bridge.ts @@ -0,0 +1,634 @@ +/* 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 type L2TransactionRequestTwoBridgesInnerStruct = { + magicValue: BytesLike; + l2Contract: AddressLike; + l2Calldata: BytesLike; + factoryDeps: BytesLike[]; + txDataHash: BytesLike; +}; + +export type L2TransactionRequestTwoBridgesInnerStructOutput = [ + magicValue: string, + l2Contract: string, + l2Calldata: string, + factoryDeps: string[], + txDataHash: string +] & { + magicValue: string; + l2Contract: string; + l2Calldata: string; + factoryDeps: string[]; + txDataHash: string; +}; + +export interface IL1BridgeInterface extends Interface { + getFunction( + nameOrSignature: + | "bridgehub" + | "bridgehubConfirmL2Transaction" + | "bridgehubDeposit" + | "bridgehubDepositBaseToken" + | "claimFailedDeposit" + | "deposit" + | "depositHappened" + | "finalizeWithdrawal" + | "isWithdrawalFinalizedShared" + | "l2BridgeAddress" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "BridgehubDepositFinalized" + | "BridgehubDepositInitiatedSharedBridge" + | "ClaimedFailedDepositSharedBridge" + | "DepositInitiatedSharedBridge" + | "WithdrawalFinalizedSharedBridge" + ): EventFragment; + + encodeFunctionData(functionFragment: "bridgehub", values?: undefined): string; + encodeFunctionData( + functionFragment: "bridgehubConfirmL2Transaction", + values: [BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "bridgehubDeposit", + values: [BigNumberish, AddressLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "bridgehubDepositBaseToken", + values: [BigNumberish, AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "claimFailedDeposit", + values: [ + BigNumberish, + AddressLike, + AddressLike, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "deposit", + values: [ + BigNumberish, + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + AddressLike + ] + ): string; + encodeFunctionData( + functionFragment: "depositHappened", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "finalizeWithdrawal", + values: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "isWithdrawalFinalizedShared", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "l2BridgeAddress", + values: [BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "bridgehub", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "bridgehubConfirmL2Transaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgehubDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgehubDepositBaseToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "claimFailedDeposit", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "depositHappened", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "finalizeWithdrawal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isWithdrawalFinalizedShared", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2BridgeAddress", + data: BytesLike + ): Result; +} + +export namespace BridgehubDepositFinalizedEvent { + export type InputTuple = [ + chainId: BigNumberish, + txDataHash: BytesLike, + l2DepositTxHash: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + txDataHash: string, + l2DepositTxHash: string + ]; + export interface OutputObject { + chainId: bigint; + txDataHash: string; + l2DepositTxHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubDepositInitiatedSharedBridgeEvent { + export type InputTuple = [ + chainId: BigNumberish, + txDataHash: BytesLike, + from: AddressLike, + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + txDataHash: string, + from: string, + to: string, + l1Token: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + txDataHash: string; + from: string; + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ClaimedFailedDepositSharedBridgeEvent { + export type InputTuple = [ + chainId: BigNumberish, + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + to: string, + l1Token: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace DepositInitiatedSharedBridgeEvent { + export type InputTuple = [ + chainId: BigNumberish, + l2DepositTxHash: BytesLike, + from: AddressLike, + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + l2DepositTxHash: string, + from: string, + to: string, + l1Token: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + l2DepositTxHash: string; + from: string; + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace WithdrawalFinalizedSharedBridgeEvent { + export type InputTuple = [ + chainId: BigNumberish, + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + to: string, + l1Token: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IL1Bridge extends BaseContract { + connect(runner?: ContractRunner | null): IL1Bridge; + waitForDeployment(): Promise; + + interface: IL1BridgeInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + bridgehub: TypedContractMethod<[], [string], "view">; + + bridgehubConfirmL2Transaction: TypedContractMethod< + [_chainId: BigNumberish, _txDataHash: BytesLike, _txHash: BytesLike], + [void], + "nonpayable" + >; + + bridgehubDeposit: TypedContractMethod< + [_chainId: BigNumberish, _prevMsgSender: AddressLike, _data: BytesLike], + [L2TransactionRequestTwoBridgesInnerStructOutput], + "payable" + >; + + bridgehubDepositBaseToken: TypedContractMethod< + [ + _chainId: BigNumberish, + _prevMsgSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish + ], + [void], + "payable" + >; + + claimFailedDeposit: TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + deposit: TypedContractMethod< + [ + _chainId: BigNumberish, + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _mintValue: BigNumberish, + _amount: BigNumberish, + _l2TxGasLimit: BigNumberish, + _l2TxGasPerPubdataByte: BigNumberish, + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + + depositHappened: TypedContractMethod< + [_chainId: BigNumberish, _l2TxHash: BytesLike], + [string], + "view" + >; + + finalizeWithdrawal: TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + isWithdrawalFinalizedShared: TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish + ], + [boolean], + "view" + >; + + l2BridgeAddress: TypedContractMethod< + [_chainId: BigNumberish], + [string], + "view" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "bridgehub" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "bridgehubConfirmL2Transaction" + ): TypedContractMethod< + [_chainId: BigNumberish, _txDataHash: BytesLike, _txHash: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "bridgehubDeposit" + ): TypedContractMethod< + [_chainId: BigNumberish, _prevMsgSender: AddressLike, _data: BytesLike], + [L2TransactionRequestTwoBridgesInnerStructOutput], + "payable" + >; + getFunction( + nameOrSignature: "bridgehubDepositBaseToken" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _prevMsgSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "claimFailedDeposit" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "deposit" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _mintValue: BigNumberish, + _amount: BigNumberish, + _l2TxGasLimit: BigNumberish, + _l2TxGasPerPubdataByte: BigNumberish, + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "depositHappened" + ): TypedContractMethod< + [_chainId: BigNumberish, _l2TxHash: BytesLike], + [string], + "view" + >; + getFunction( + nameOrSignature: "finalizeWithdrawal" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "isWithdrawalFinalizedShared" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "l2BridgeAddress" + ): TypedContractMethod<[_chainId: BigNumberish], [string], "view">; + + getEvent( + key: "BridgehubDepositFinalized" + ): TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + getEvent( + key: "BridgehubDepositInitiatedSharedBridge" + ): TypedContractEvent< + BridgehubDepositInitiatedSharedBridgeEvent.InputTuple, + BridgehubDepositInitiatedSharedBridgeEvent.OutputTuple, + BridgehubDepositInitiatedSharedBridgeEvent.OutputObject + >; + getEvent( + key: "ClaimedFailedDepositSharedBridge" + ): TypedContractEvent< + ClaimedFailedDepositSharedBridgeEvent.InputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputObject + >; + getEvent( + key: "DepositInitiatedSharedBridge" + ): TypedContractEvent< + DepositInitiatedSharedBridgeEvent.InputTuple, + DepositInitiatedSharedBridgeEvent.OutputTuple, + DepositInitiatedSharedBridgeEvent.OutputObject + >; + getEvent( + key: "WithdrawalFinalizedSharedBridge" + ): TypedContractEvent< + WithdrawalFinalizedSharedBridgeEvent.InputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputObject + >; + + filters: { + "BridgehubDepositFinalized(uint256,bytes32,bytes32)": TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + BridgehubDepositFinalized: TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + + "BridgehubDepositInitiatedSharedBridge(uint256,bytes32,address,address,address,uint256)": TypedContractEvent< + BridgehubDepositInitiatedSharedBridgeEvent.InputTuple, + BridgehubDepositInitiatedSharedBridgeEvent.OutputTuple, + BridgehubDepositInitiatedSharedBridgeEvent.OutputObject + >; + BridgehubDepositInitiatedSharedBridge: TypedContractEvent< + BridgehubDepositInitiatedSharedBridgeEvent.InputTuple, + BridgehubDepositInitiatedSharedBridgeEvent.OutputTuple, + BridgehubDepositInitiatedSharedBridgeEvent.OutputObject + >; + + "ClaimedFailedDepositSharedBridge(uint256,address,address,uint256)": TypedContractEvent< + ClaimedFailedDepositSharedBridgeEvent.InputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputObject + >; + ClaimedFailedDepositSharedBridge: TypedContractEvent< + ClaimedFailedDepositSharedBridgeEvent.InputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputObject + >; + + "DepositInitiatedSharedBridge(uint256,bytes32,address,address,address,uint256)": TypedContractEvent< + DepositInitiatedSharedBridgeEvent.InputTuple, + DepositInitiatedSharedBridgeEvent.OutputTuple, + DepositInitiatedSharedBridgeEvent.OutputObject + >; + DepositInitiatedSharedBridge: TypedContractEvent< + DepositInitiatedSharedBridgeEvent.InputTuple, + DepositInitiatedSharedBridgeEvent.OutputTuple, + DepositInitiatedSharedBridgeEvent.OutputObject + >; + + "WithdrawalFinalizedSharedBridge(uint256,address,address,uint256)": TypedContractEvent< + WithdrawalFinalizedSharedBridgeEvent.InputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputObject + >; + WithdrawalFinalizedSharedBridge: TypedContractEvent< + WithdrawalFinalizedSharedBridgeEvent.InputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputObject + >; + }; +} diff --git a/typechain/IL1ERC20Bridge.ts b/typechain/IL1ERC20Bridge.ts new file mode 100644 index 00000000..c1bfaf0c --- /dev/null +++ b/typechain/IL1ERC20Bridge.ts @@ -0,0 +1,482 @@ +/* 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 IL1ERC20BridgeInterface extends Interface { + getFunction( + nameOrSignature: + | "SHARED_BRIDGE" + | "claimFailedDeposit" + | "deposit(address,address,uint256,uint256,uint256)" + | "deposit(address,address,uint256,uint256,uint256,address)" + | "depositAmount" + | "finalizeWithdrawal" + | "isWithdrawalFinalized" + | "l2Bridge" + | "l2TokenAddress" + | "l2TokenBeacon" + | "transferTokenToSharedBridge" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "ClaimedFailedDeposit" + | "DepositInitiated" + | "WithdrawalFinalized" + ): EventFragment; + + encodeFunctionData( + functionFragment: "SHARED_BRIDGE", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "claimFailedDeposit", + values: [ + AddressLike, + AddressLike, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "deposit(address,address,uint256,uint256,uint256)", + values: [AddressLike, AddressLike, BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "deposit(address,address,uint256,uint256,uint256,address)", + values: [ + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + AddressLike + ] + ): string; + encodeFunctionData( + functionFragment: "depositAmount", + values: [AddressLike, AddressLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "finalizeWithdrawal", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike[]] + ): string; + encodeFunctionData( + functionFragment: "isWithdrawalFinalized", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData(functionFragment: "l2Bridge", values?: undefined): string; + encodeFunctionData( + functionFragment: "l2TokenAddress", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "l2TokenBeacon", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "transferTokenToSharedBridge", + values: [AddressLike] + ): string; + + decodeFunctionResult( + functionFragment: "SHARED_BRIDGE", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "claimFailedDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "deposit(address,address,uint256,uint256,uint256)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "deposit(address,address,uint256,uint256,uint256,address)", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "depositAmount", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "finalizeWithdrawal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isWithdrawalFinalized", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "l2Bridge", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "l2TokenAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2TokenBeacon", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferTokenToSharedBridge", + data: BytesLike + ): Result; +} + +export namespace ClaimedFailedDepositEvent { + export type InputTuple = [ + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [to: string, l1Token: string, amount: bigint]; + export interface OutputObject { + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace DepositInitiatedEvent { + export type InputTuple = [ + l2DepositTxHash: BytesLike, + from: AddressLike, + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + l2DepositTxHash: string, + from: string, + to: string, + l1Token: string, + amount: bigint + ]; + export interface OutputObject { + l2DepositTxHash: string; + from: string; + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace WithdrawalFinalizedEvent { + export type InputTuple = [ + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [to: string, l1Token: string, amount: bigint]; + export interface OutputObject { + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IL1ERC20Bridge extends BaseContract { + connect(runner?: ContractRunner | null): IL1ERC20Bridge; + waitForDeployment(): Promise; + + interface: IL1ERC20BridgeInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + SHARED_BRIDGE: TypedContractMethod<[], [string], "view">; + + claimFailedDeposit: TypedContractMethod< + [ + _depositSender: AddressLike, + _l1Token: AddressLike, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + "deposit(address,address,uint256,uint256,uint256)": TypedContractMethod< + [ + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxGasLimit: BigNumberish, + _l2TxGasPerPubdataByte: BigNumberish + ], + [string], + "payable" + >; + + "deposit(address,address,uint256,uint256,uint256,address)": TypedContractMethod< + [ + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxGasLimit: BigNumberish, + _l2TxGasPerPubdataByte: BigNumberish, + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + + depositAmount: TypedContractMethod< + [_account: AddressLike, _l1Token: AddressLike, _depositL2TxHash: BytesLike], + [bigint], + "nonpayable" + >; + + finalizeWithdrawal: TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + isWithdrawalFinalized: TypedContractMethod< + [_l2BatchNumber: BigNumberish, _l2MessageIndex: BigNumberish], + [boolean], + "view" + >; + + l2Bridge: TypedContractMethod<[], [string], "view">; + + l2TokenAddress: TypedContractMethod< + [_l1Token: AddressLike], + [string], + "view" + >; + + l2TokenBeacon: TypedContractMethod<[], [string], "view">; + + transferTokenToSharedBridge: TypedContractMethod< + [_token: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "SHARED_BRIDGE" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "claimFailedDeposit" + ): TypedContractMethod< + [ + _depositSender: AddressLike, + _l1Token: AddressLike, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "deposit(address,address,uint256,uint256,uint256)" + ): TypedContractMethod< + [ + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxGasLimit: BigNumberish, + _l2TxGasPerPubdataByte: BigNumberish + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "deposit(address,address,uint256,uint256,uint256,address)" + ): TypedContractMethod< + [ + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxGasLimit: BigNumberish, + _l2TxGasPerPubdataByte: BigNumberish, + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "depositAmount" + ): TypedContractMethod< + [_account: AddressLike, _l1Token: AddressLike, _depositL2TxHash: BytesLike], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "finalizeWithdrawal" + ): TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "isWithdrawalFinalized" + ): TypedContractMethod< + [_l2BatchNumber: BigNumberish, _l2MessageIndex: BigNumberish], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "l2Bridge" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "l2TokenAddress" + ): TypedContractMethod<[_l1Token: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "l2TokenBeacon" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "transferTokenToSharedBridge" + ): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; + + getEvent( + key: "ClaimedFailedDeposit" + ): TypedContractEvent< + ClaimedFailedDepositEvent.InputTuple, + ClaimedFailedDepositEvent.OutputTuple, + ClaimedFailedDepositEvent.OutputObject + >; + getEvent( + key: "DepositInitiated" + ): TypedContractEvent< + DepositInitiatedEvent.InputTuple, + DepositInitiatedEvent.OutputTuple, + DepositInitiatedEvent.OutputObject + >; + getEvent( + key: "WithdrawalFinalized" + ): TypedContractEvent< + WithdrawalFinalizedEvent.InputTuple, + WithdrawalFinalizedEvent.OutputTuple, + WithdrawalFinalizedEvent.OutputObject + >; + + filters: { + "ClaimedFailedDeposit(address,address,uint256)": TypedContractEvent< + ClaimedFailedDepositEvent.InputTuple, + ClaimedFailedDepositEvent.OutputTuple, + ClaimedFailedDepositEvent.OutputObject + >; + ClaimedFailedDeposit: TypedContractEvent< + ClaimedFailedDepositEvent.InputTuple, + ClaimedFailedDepositEvent.OutputTuple, + ClaimedFailedDepositEvent.OutputObject + >; + + "DepositInitiated(bytes32,address,address,address,uint256)": TypedContractEvent< + DepositInitiatedEvent.InputTuple, + DepositInitiatedEvent.OutputTuple, + DepositInitiatedEvent.OutputObject + >; + DepositInitiated: TypedContractEvent< + DepositInitiatedEvent.InputTuple, + DepositInitiatedEvent.OutputTuple, + DepositInitiatedEvent.OutputObject + >; + + "WithdrawalFinalized(address,address,uint256)": TypedContractEvent< + WithdrawalFinalizedEvent.InputTuple, + WithdrawalFinalizedEvent.OutputTuple, + WithdrawalFinalizedEvent.OutputObject + >; + WithdrawalFinalized: TypedContractEvent< + WithdrawalFinalizedEvent.InputTuple, + WithdrawalFinalizedEvent.OutputTuple, + WithdrawalFinalizedEvent.OutputObject + >; + }; +} diff --git a/typechain/IL1Messenger.ts b/typechain/IL1Messenger.ts new file mode 100644 index 00000000..8a65f8f0 --- /dev/null +++ b/typechain/IL1Messenger.ts @@ -0,0 +1,260 @@ +/* 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 type L2ToL1LogStruct = { + l2ShardId: BigNumberish; + isService: boolean; + txNumberInBlock: BigNumberish; + sender: AddressLike; + key: BytesLike; + value: BytesLike; +}; + +export type L2ToL1LogStructOutput = [ + l2ShardId: bigint, + isService: boolean, + txNumberInBlock: bigint, + sender: string, + key: string, + value: string +] & { + l2ShardId: bigint; + isService: boolean; + txNumberInBlock: bigint; + sender: string; + key: string; + value: string; +}; + +export interface IL1MessengerInterface extends Interface { + getFunction( + nameOrSignature: + | "requestBytecodeL1Publication" + | "sendL2ToL1Log" + | "sendToL1" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "BytecodeL1PublicationRequested" + | "L1MessageSent" + | "L2ToL1LogSent" + ): EventFragment; + + encodeFunctionData( + functionFragment: "requestBytecodeL1Publication", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "sendL2ToL1Log", + values: [boolean, BytesLike, BytesLike] + ): string; + encodeFunctionData(functionFragment: "sendToL1", values: [BytesLike]): string; + + decodeFunctionResult( + functionFragment: "requestBytecodeL1Publication", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "sendL2ToL1Log", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "sendToL1", data: BytesLike): Result; +} + +export namespace BytecodeL1PublicationRequestedEvent { + export type InputTuple = [_bytecodeHash: BytesLike]; + export type OutputTuple = [_bytecodeHash: string]; + export interface OutputObject { + _bytecodeHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace L1MessageSentEvent { + export type InputTuple = [ + _sender: AddressLike, + _hash: BytesLike, + _message: BytesLike + ]; + export type OutputTuple = [_sender: string, _hash: string, _message: string]; + export interface OutputObject { + _sender: string; + _hash: string; + _message: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace L2ToL1LogSentEvent { + export type InputTuple = [_l2log: L2ToL1LogStruct]; + export type OutputTuple = [_l2log: L2ToL1LogStructOutput]; + export interface OutputObject { + _l2log: L2ToL1LogStructOutput; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IL1Messenger extends BaseContract { + connect(runner?: ContractRunner | null): IL1Messenger; + waitForDeployment(): Promise; + + interface: IL1MessengerInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + requestBytecodeL1Publication: TypedContractMethod< + [_bytecodeHash: BytesLike], + [void], + "nonpayable" + >; + + sendL2ToL1Log: TypedContractMethod< + [_isService: boolean, _key: BytesLike, _value: BytesLike], + [bigint], + "nonpayable" + >; + + sendToL1: TypedContractMethod<[_message: BytesLike], [string], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "requestBytecodeL1Publication" + ): TypedContractMethod<[_bytecodeHash: BytesLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "sendL2ToL1Log" + ): TypedContractMethod< + [_isService: boolean, _key: BytesLike, _value: BytesLike], + [bigint], + "nonpayable" + >; + getFunction( + nameOrSignature: "sendToL1" + ): TypedContractMethod<[_message: BytesLike], [string], "nonpayable">; + + getEvent( + key: "BytecodeL1PublicationRequested" + ): TypedContractEvent< + BytecodeL1PublicationRequestedEvent.InputTuple, + BytecodeL1PublicationRequestedEvent.OutputTuple, + BytecodeL1PublicationRequestedEvent.OutputObject + >; + getEvent( + key: "L1MessageSent" + ): TypedContractEvent< + L1MessageSentEvent.InputTuple, + L1MessageSentEvent.OutputTuple, + L1MessageSentEvent.OutputObject + >; + getEvent( + key: "L2ToL1LogSent" + ): TypedContractEvent< + L2ToL1LogSentEvent.InputTuple, + L2ToL1LogSentEvent.OutputTuple, + L2ToL1LogSentEvent.OutputObject + >; + + filters: { + "BytecodeL1PublicationRequested(bytes32)": TypedContractEvent< + BytecodeL1PublicationRequestedEvent.InputTuple, + BytecodeL1PublicationRequestedEvent.OutputTuple, + BytecodeL1PublicationRequestedEvent.OutputObject + >; + BytecodeL1PublicationRequested: TypedContractEvent< + BytecodeL1PublicationRequestedEvent.InputTuple, + BytecodeL1PublicationRequestedEvent.OutputTuple, + BytecodeL1PublicationRequestedEvent.OutputObject + >; + + "L1MessageSent(address,bytes32,bytes)": TypedContractEvent< + L1MessageSentEvent.InputTuple, + L1MessageSentEvent.OutputTuple, + L1MessageSentEvent.OutputObject + >; + L1MessageSent: TypedContractEvent< + L1MessageSentEvent.InputTuple, + L1MessageSentEvent.OutputTuple, + L1MessageSentEvent.OutputObject + >; + + "L2ToL1LogSent(tuple)": TypedContractEvent< + L2ToL1LogSentEvent.InputTuple, + L2ToL1LogSentEvent.OutputTuple, + L2ToL1LogSentEvent.OutputObject + >; + L2ToL1LogSent: TypedContractEvent< + L2ToL1LogSentEvent.InputTuple, + L2ToL1LogSentEvent.OutputTuple, + L2ToL1LogSentEvent.OutputObject + >; + }; +} diff --git a/typechain/IL1NativeTokenVault.ts b/typechain/IL1NativeTokenVault.ts new file mode 100644 index 00000000..6fdd3acc --- /dev/null +++ b/typechain/IL1NativeTokenVault.ts @@ -0,0 +1,353 @@ +/* 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 IL1NativeTokenVaultInterface extends Interface { + getFunction( + nameOrSignature: + | "ASSET_ROUTER" + | "L1_NULLIFIER" + | "WETH_TOKEN" + | "assetId" + | "calculateAssetId" + | "calculateCreate2TokenAddress" + | "chainBalance" + | "getERC20Getters" + | "originChainId" + | "registerEthToken" + | "registerToken" + | "tokenAddress" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: "BridgedTokenBeaconUpdated" | "TokenBeaconUpdated" + ): EventFragment; + + encodeFunctionData( + functionFragment: "ASSET_ROUTER", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "L1_NULLIFIER", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "WETH_TOKEN", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "assetId", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "calculateAssetId", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "calculateCreate2TokenAddress", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "chainBalance", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "getERC20Getters", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "originChainId", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "registerEthToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "registerToken", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "tokenAddress", + values: [BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "ASSET_ROUTER", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "L1_NULLIFIER", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "WETH_TOKEN", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "assetId", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "calculateAssetId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "calculateCreate2TokenAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "chainBalance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getERC20Getters", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "originChainId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "registerEthToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "registerToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tokenAddress", + data: BytesLike + ): Result; +} + +export namespace BridgedTokenBeaconUpdatedEvent { + export type InputTuple = [ + bridgedTokenBeacon: AddressLike, + bridgedTokenProxyBytecodeHash: BytesLike + ]; + export type OutputTuple = [ + bridgedTokenBeacon: string, + bridgedTokenProxyBytecodeHash: string + ]; + export interface OutputObject { + bridgedTokenBeacon: string; + bridgedTokenProxyBytecodeHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace TokenBeaconUpdatedEvent { + export type InputTuple = [l2TokenBeacon: AddressLike]; + export type OutputTuple = [l2TokenBeacon: string]; + export interface OutputObject { + l2TokenBeacon: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IL1NativeTokenVault extends BaseContract { + connect(runner?: ContractRunner | null): IL1NativeTokenVault; + waitForDeployment(): Promise; + + interface: IL1NativeTokenVaultInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + ASSET_ROUTER: TypedContractMethod<[], [string], "view">; + + L1_NULLIFIER: TypedContractMethod<[], [string], "view">; + + WETH_TOKEN: TypedContractMethod<[], [string], "view">; + + assetId: TypedContractMethod<[token: AddressLike], [string], "view">; + + calculateAssetId: TypedContractMethod< + [_chainId: BigNumberish, _tokenAddress: AddressLike], + [string], + "view" + >; + + calculateCreate2TokenAddress: TypedContractMethod< + [_originChainId: BigNumberish, _originToken: AddressLike], + [string], + "view" + >; + + chainBalance: TypedContractMethod< + [_chainId: BigNumberish, _assetId: BytesLike], + [bigint], + "view" + >; + + getERC20Getters: TypedContractMethod< + [_token: AddressLike, _originChainId: BigNumberish], + [string], + "view" + >; + + originChainId: TypedContractMethod<[assetId: BytesLike], [bigint], "view">; + + registerEthToken: TypedContractMethod<[], [void], "nonpayable">; + + registerToken: TypedContractMethod< + [_l1Token: AddressLike], + [void], + "nonpayable" + >; + + tokenAddress: TypedContractMethod<[assetId: BytesLike], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "ASSET_ROUTER" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "L1_NULLIFIER" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "WETH_TOKEN" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "assetId" + ): TypedContractMethod<[token: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "calculateAssetId" + ): TypedContractMethod< + [_chainId: BigNumberish, _tokenAddress: AddressLike], + [string], + "view" + >; + getFunction( + nameOrSignature: "calculateCreate2TokenAddress" + ): TypedContractMethod< + [_originChainId: BigNumberish, _originToken: AddressLike], + [string], + "view" + >; + getFunction( + nameOrSignature: "chainBalance" + ): TypedContractMethod< + [_chainId: BigNumberish, _assetId: BytesLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "getERC20Getters" + ): TypedContractMethod< + [_token: AddressLike, _originChainId: BigNumberish], + [string], + "view" + >; + getFunction( + nameOrSignature: "originChainId" + ): TypedContractMethod<[assetId: BytesLike], [bigint], "view">; + getFunction( + nameOrSignature: "registerEthToken" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "registerToken" + ): TypedContractMethod<[_l1Token: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "tokenAddress" + ): TypedContractMethod<[assetId: BytesLike], [string], "view">; + + getEvent( + key: "BridgedTokenBeaconUpdated" + ): TypedContractEvent< + BridgedTokenBeaconUpdatedEvent.InputTuple, + BridgedTokenBeaconUpdatedEvent.OutputTuple, + BridgedTokenBeaconUpdatedEvent.OutputObject + >; + getEvent( + key: "TokenBeaconUpdated" + ): TypedContractEvent< + TokenBeaconUpdatedEvent.InputTuple, + TokenBeaconUpdatedEvent.OutputTuple, + TokenBeaconUpdatedEvent.OutputObject + >; + + filters: { + "BridgedTokenBeaconUpdated(address,bytes32)": TypedContractEvent< + BridgedTokenBeaconUpdatedEvent.InputTuple, + BridgedTokenBeaconUpdatedEvent.OutputTuple, + BridgedTokenBeaconUpdatedEvent.OutputObject + >; + BridgedTokenBeaconUpdated: TypedContractEvent< + BridgedTokenBeaconUpdatedEvent.InputTuple, + BridgedTokenBeaconUpdatedEvent.OutputTuple, + BridgedTokenBeaconUpdatedEvent.OutputObject + >; + + "TokenBeaconUpdated(address)": TypedContractEvent< + TokenBeaconUpdatedEvent.InputTuple, + TokenBeaconUpdatedEvent.OutputTuple, + TokenBeaconUpdatedEvent.OutputObject + >; + TokenBeaconUpdated: TypedContractEvent< + TokenBeaconUpdatedEvent.InputTuple, + TokenBeaconUpdatedEvent.OutputTuple, + TokenBeaconUpdatedEvent.OutputObject + >; + }; +} diff --git a/typechain/IL1Nullifier.ts b/typechain/IL1Nullifier.ts new file mode 100644 index 00000000..f02aa1c5 --- /dev/null +++ b/typechain/IL1Nullifier.ts @@ -0,0 +1,562 @@ +/* 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 type FinalizeL1DepositParamsStruct = { + chainId: BigNumberish; + l2BatchNumber: BigNumberish; + l2MessageIndex: BigNumberish; + l2Sender: AddressLike; + l2TxNumberInBatch: BigNumberish; + message: BytesLike; + merkleProof: BytesLike[]; +}; + +export type FinalizeL1DepositParamsStructOutput = [ + chainId: bigint, + l2BatchNumber: bigint, + l2MessageIndex: bigint, + l2Sender: string, + l2TxNumberInBatch: bigint, + message: string, + merkleProof: string[] +] & { + chainId: bigint; + l2BatchNumber: bigint; + l2MessageIndex: bigint; + l2Sender: string; + l2TxNumberInBatch: bigint; + message: string; + merkleProof: string[]; +}; + +export interface IL1NullifierInterface extends Interface { + getFunction( + nameOrSignature: + | "BRIDGE_HUB" + | "bridgeRecoverFailedTransfer" + | "bridgehubConfirmL2TransactionForwarded" + | "chainBalance" + | "claimFailedDeposit" + | "claimFailedDepositLegacyErc20Bridge" + | "depositHappened" + | "finalizeDeposit" + | "isWithdrawalFinalized" + | "l1NativeTokenVault" + | "l2BridgeAddress" + | "legacyBridge" + | "nullifyChainBalanceByNTV" + | "setL1AssetRouter" + | "setL1NativeTokenVault" + | "transferTokenToNTV" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "BridgehubDepositFinalized"): EventFragment; + + encodeFunctionData( + functionFragment: "BRIDGE_HUB", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "bridgeRecoverFailedTransfer", + values: [ + BigNumberish, + AddressLike, + BytesLike, + BytesLike, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "bridgehubConfirmL2TransactionForwarded", + values: [BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "chainBalance", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "claimFailedDeposit", + values: [ + BigNumberish, + AddressLike, + AddressLike, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "claimFailedDepositLegacyErc20Bridge", + values: [ + AddressLike, + AddressLike, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "depositHappened", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "finalizeDeposit", + values: [FinalizeL1DepositParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "isWithdrawalFinalized", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "l1NativeTokenVault", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "l2BridgeAddress", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "legacyBridge", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "nullifyChainBalanceByNTV", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setL1AssetRouter", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setL1NativeTokenVault", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "transferTokenToNTV", + values: [AddressLike] + ): string; + + decodeFunctionResult(functionFragment: "BRIDGE_HUB", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "bridgeRecoverFailedTransfer", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgehubConfirmL2TransactionForwarded", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "chainBalance", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "claimFailedDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "claimFailedDepositLegacyErc20Bridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "depositHappened", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "finalizeDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isWithdrawalFinalized", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l1NativeTokenVault", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2BridgeAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "legacyBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "nullifyChainBalanceByNTV", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setL1AssetRouter", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setL1NativeTokenVault", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferTokenToNTV", + data: BytesLike + ): Result; +} + +export namespace BridgehubDepositFinalizedEvent { + export type InputTuple = [ + chainId: BigNumberish, + txDataHash: BytesLike, + l2DepositTxHash: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + txDataHash: string, + l2DepositTxHash: string + ]; + export interface OutputObject { + chainId: bigint; + txDataHash: string; + l2DepositTxHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IL1Nullifier extends BaseContract { + connect(runner?: ContractRunner | null): IL1Nullifier; + waitForDeployment(): Promise; + + interface: IL1NullifierInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + BRIDGE_HUB: TypedContractMethod<[], [string], "view">; + + bridgeRecoverFailedTransfer: TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _assetId: BytesLike, + _assetData: BytesLike, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + bridgehubConfirmL2TransactionForwarded: TypedContractMethod< + [_chainId: BigNumberish, _txDataHash: BytesLike, _txHash: BytesLike], + [void], + "nonpayable" + >; + + chainBalance: TypedContractMethod< + [_chainId: BigNumberish, _token: AddressLike], + [bigint], + "view" + >; + + claimFailedDeposit: TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + claimFailedDepositLegacyErc20Bridge: TypedContractMethod< + [ + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + depositHappened: TypedContractMethod< + [_chainId: BigNumberish, _l2TxHash: BytesLike], + [string], + "view" + >; + + finalizeDeposit: TypedContractMethod< + [_finalizeWithdrawalParams: FinalizeL1DepositParamsStruct], + [void], + "nonpayable" + >; + + isWithdrawalFinalized: TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish + ], + [boolean], + "view" + >; + + l1NativeTokenVault: TypedContractMethod<[], [string], "view">; + + l2BridgeAddress: TypedContractMethod< + [_chainId: BigNumberish], + [string], + "view" + >; + + legacyBridge: TypedContractMethod<[], [string], "view">; + + nullifyChainBalanceByNTV: TypedContractMethod< + [_chainId: BigNumberish, _token: AddressLike], + [void], + "nonpayable" + >; + + setL1AssetRouter: TypedContractMethod< + [_l1AssetRouter: AddressLike], + [void], + "nonpayable" + >; + + setL1NativeTokenVault: TypedContractMethod< + [_nativeTokenVault: AddressLike], + [void], + "nonpayable" + >; + + transferTokenToNTV: TypedContractMethod< + [_token: AddressLike], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "BRIDGE_HUB" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "bridgeRecoverFailedTransfer" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _assetId: BytesLike, + _assetData: BytesLike, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "bridgehubConfirmL2TransactionForwarded" + ): TypedContractMethod< + [_chainId: BigNumberish, _txDataHash: BytesLike, _txHash: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "chainBalance" + ): TypedContractMethod< + [_chainId: BigNumberish, _token: AddressLike], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "claimFailedDeposit" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "claimFailedDepositLegacyErc20Bridge" + ): TypedContractMethod< + [ + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositHappened" + ): TypedContractMethod< + [_chainId: BigNumberish, _l2TxHash: BytesLike], + [string], + "view" + >; + getFunction( + nameOrSignature: "finalizeDeposit" + ): TypedContractMethod< + [_finalizeWithdrawalParams: FinalizeL1DepositParamsStruct], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "isWithdrawalFinalized" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "l1NativeTokenVault" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "l2BridgeAddress" + ): TypedContractMethod<[_chainId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "legacyBridge" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "nullifyChainBalanceByNTV" + ): TypedContractMethod< + [_chainId: BigNumberish, _token: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setL1AssetRouter" + ): TypedContractMethod<[_l1AssetRouter: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setL1NativeTokenVault" + ): TypedContractMethod< + [_nativeTokenVault: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "transferTokenToNTV" + ): TypedContractMethod<[_token: AddressLike], [void], "nonpayable">; + + getEvent( + key: "BridgehubDepositFinalized" + ): TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + + filters: { + "BridgehubDepositFinalized(uint256,bytes32,bytes32)": TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + BridgehubDepositFinalized: TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + }; +} diff --git a/typechain/IL1SharedBridge.ts b/typechain/IL1SharedBridge.ts new file mode 100644 index 00000000..dfa8018f --- /dev/null +++ b/typechain/IL1SharedBridge.ts @@ -0,0 +1,897 @@ +/* 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 type L2TransactionRequestTwoBridgesInnerStruct = { + magicValue: BytesLike; + l2Contract: AddressLike; + l2Calldata: BytesLike; + factoryDeps: BytesLike[]; + txDataHash: BytesLike; +}; + +export type L2TransactionRequestTwoBridgesInnerStructOutput = [ + magicValue: string, + l2Contract: string, + l2Calldata: string, + factoryDeps: string[], + txDataHash: string +] & { + magicValue: string; + l2Contract: string; + l2Calldata: string; + factoryDeps: string[]; + txDataHash: string; +}; + +export interface IL1SharedBridgeInterface extends Interface { + getFunction( + nameOrSignature: + | "BRIDGE_HUB" + | "L1_WETH_TOKEN" + | "bridgehubConfirmL2Transaction" + | "bridgehubDeposit" + | "bridgehubDepositBaseToken" + | "claimFailedDeposit" + | "claimFailedDepositLegacyErc20Bridge" + | "depositHappened" + | "depositLegacyErc20Bridge" + | "finalizeWithdrawal" + | "finalizeWithdrawalLegacyErc20Bridge" + | "isWithdrawalFinalized" + | "l2BridgeAddress" + | "legacyBridge" + | "receiveEth" + | "setEraLegacyBridgeLastDepositTime" + | "setEraPostDiamondUpgradeFirstBatch" + | "setEraPostLegacyBridgeUpgradeFirstBatch" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "BridgehubDepositBaseTokenInitiated" + | "BridgehubDepositFinalized" + | "BridgehubDepositInitiated" + | "ClaimedFailedDepositSharedBridge" + | "LegacyDepositInitiated" + | "WithdrawalFinalizedSharedBridge" + ): EventFragment; + + encodeFunctionData( + functionFragment: "BRIDGE_HUB", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "L1_WETH_TOKEN", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "bridgehubConfirmL2Transaction", + values: [BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "bridgehubDeposit", + values: [BigNumberish, AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "bridgehubDepositBaseToken", + values: [BigNumberish, AddressLike, AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "claimFailedDeposit", + values: [ + BigNumberish, + AddressLike, + AddressLike, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "claimFailedDepositLegacyErc20Bridge", + values: [ + AddressLike, + AddressLike, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "depositHappened", + values: [BigNumberish, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "depositLegacyErc20Bridge", + values: [ + AddressLike, + AddressLike, + AddressLike, + BigNumberish, + BigNumberish, + BigNumberish, + AddressLike + ] + ): string; + encodeFunctionData( + functionFragment: "finalizeWithdrawal", + values: [ + BigNumberish, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike, + BytesLike[] + ] + ): string; + encodeFunctionData( + functionFragment: "finalizeWithdrawalLegacyErc20Bridge", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike[]] + ): string; + encodeFunctionData( + functionFragment: "isWithdrawalFinalized", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "l2BridgeAddress", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "legacyBridge", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "receiveEth", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setEraLegacyBridgeLastDepositTime", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setEraPostDiamondUpgradeFirstBatch", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setEraPostLegacyBridgeUpgradeFirstBatch", + values: [BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "BRIDGE_HUB", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "L1_WETH_TOKEN", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgehubConfirmL2Transaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgehubDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgehubDepositBaseToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "claimFailedDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "claimFailedDepositLegacyErc20Bridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "depositHappened", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "depositLegacyErc20Bridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "finalizeWithdrawal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "finalizeWithdrawalLegacyErc20Bridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isWithdrawalFinalized", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2BridgeAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "legacyBridge", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "receiveEth", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "setEraLegacyBridgeLastDepositTime", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setEraPostDiamondUpgradeFirstBatch", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setEraPostLegacyBridgeUpgradeFirstBatch", + data: BytesLike + ): Result; +} + +export namespace BridgehubDepositBaseTokenInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + from: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + from: string, + l1Token: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + from: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubDepositFinalizedEvent { + export type InputTuple = [ + chainId: BigNumberish, + txDataHash: BytesLike, + l2DepositTxHash: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + txDataHash: string, + l2DepositTxHash: string + ]; + export interface OutputObject { + chainId: bigint; + txDataHash: string; + l2DepositTxHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubDepositInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + txDataHash: BytesLike, + from: AddressLike, + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + txDataHash: string, + from: string, + to: string, + l1Token: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + txDataHash: string; + from: string; + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ClaimedFailedDepositSharedBridgeEvent { + export type InputTuple = [ + chainId: BigNumberish, + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + to: string, + l1Token: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace LegacyDepositInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + l2DepositTxHash: BytesLike, + from: AddressLike, + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + l2DepositTxHash: string, + from: string, + to: string, + l1Token: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + l2DepositTxHash: string; + from: string; + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace WithdrawalFinalizedSharedBridgeEvent { + export type InputTuple = [ + chainId: BigNumberish, + to: AddressLike, + l1Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + to: string, + l1Token: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + to: string; + l1Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IL1SharedBridge extends BaseContract { + connect(runner?: ContractRunner | null): IL1SharedBridge; + waitForDeployment(): Promise; + + interface: IL1SharedBridgeInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + BRIDGE_HUB: TypedContractMethod<[], [string], "view">; + + L1_WETH_TOKEN: TypedContractMethod<[], [string], "view">; + + bridgehubConfirmL2Transaction: TypedContractMethod< + [_chainId: BigNumberish, _txDataHash: BytesLike, _txHash: BytesLike], + [void], + "nonpayable" + >; + + bridgehubDeposit: TypedContractMethod< + [ + _chainId: BigNumberish, + _prevMsgSender: AddressLike, + _l2Value: BigNumberish, + _data: BytesLike + ], + [L2TransactionRequestTwoBridgesInnerStructOutput], + "payable" + >; + + bridgehubDepositBaseToken: TypedContractMethod< + [ + _chainId: BigNumberish, + _prevMsgSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish + ], + [void], + "payable" + >; + + claimFailedDeposit: TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + claimFailedDepositLegacyErc20Bridge: TypedContractMethod< + [ + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + depositHappened: TypedContractMethod< + [_chainId: BigNumberish, _l2TxHash: BytesLike], + [string], + "view" + >; + + depositLegacyErc20Bridge: TypedContractMethod< + [ + _msgSender: AddressLike, + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxGasLimit: BigNumberish, + _l2TxGasPerPubdataByte: BigNumberish, + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + + finalizeWithdrawal: TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + finalizeWithdrawalLegacyErc20Bridge: TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [ + [string, string, bigint] & { + l1Receiver: string; + l1Token: string; + amount: bigint; + } + ], + "nonpayable" + >; + + isWithdrawalFinalized: TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish + ], + [boolean], + "view" + >; + + l2BridgeAddress: TypedContractMethod< + [_chainId: BigNumberish], + [string], + "view" + >; + + legacyBridge: TypedContractMethod<[], [string], "view">; + + receiveEth: TypedContractMethod<[_chainId: BigNumberish], [void], "payable">; + + setEraLegacyBridgeLastDepositTime: TypedContractMethod< + [ + _eraLegacyBridgeLastDepositBatch: BigNumberish, + _eraLegacyBridgeLastDepositTxNumber: BigNumberish + ], + [void], + "nonpayable" + >; + + setEraPostDiamondUpgradeFirstBatch: TypedContractMethod< + [_eraPostDiamondUpgradeFirstBatch: BigNumberish], + [void], + "nonpayable" + >; + + setEraPostLegacyBridgeUpgradeFirstBatch: TypedContractMethod< + [_eraPostLegacyBridgeUpgradeFirstBatch: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "BRIDGE_HUB" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "L1_WETH_TOKEN" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "bridgehubConfirmL2Transaction" + ): TypedContractMethod< + [_chainId: BigNumberish, _txDataHash: BytesLike, _txHash: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "bridgehubDeposit" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _prevMsgSender: AddressLike, + _l2Value: BigNumberish, + _data: BytesLike + ], + [L2TransactionRequestTwoBridgesInnerStructOutput], + "payable" + >; + getFunction( + nameOrSignature: "bridgehubDepositBaseToken" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _prevMsgSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish + ], + [void], + "payable" + >; + getFunction( + nameOrSignature: "claimFailedDeposit" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "claimFailedDepositLegacyErc20Bridge" + ): TypedContractMethod< + [ + _depositSender: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "depositHappened" + ): TypedContractMethod< + [_chainId: BigNumberish, _l2TxHash: BytesLike], + [string], + "view" + >; + getFunction( + nameOrSignature: "depositLegacyErc20Bridge" + ): TypedContractMethod< + [ + _msgSender: AddressLike, + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _l2TxGasLimit: BigNumberish, + _l2TxGasPerPubdataByte: BigNumberish, + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "finalizeWithdrawal" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "finalizeWithdrawalLegacyErc20Bridge" + ): TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [ + [string, string, bigint] & { + l1Receiver: string; + l1Token: string; + amount: bigint; + } + ], + "nonpayable" + >; + getFunction( + nameOrSignature: "isWithdrawalFinalized" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "l2BridgeAddress" + ): TypedContractMethod<[_chainId: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "legacyBridge" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "receiveEth" + ): TypedContractMethod<[_chainId: BigNumberish], [void], "payable">; + getFunction( + nameOrSignature: "setEraLegacyBridgeLastDepositTime" + ): TypedContractMethod< + [ + _eraLegacyBridgeLastDepositBatch: BigNumberish, + _eraLegacyBridgeLastDepositTxNumber: BigNumberish + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setEraPostDiamondUpgradeFirstBatch" + ): TypedContractMethod< + [_eraPostDiamondUpgradeFirstBatch: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setEraPostLegacyBridgeUpgradeFirstBatch" + ): TypedContractMethod< + [_eraPostLegacyBridgeUpgradeFirstBatch: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "BridgehubDepositBaseTokenInitiated" + ): TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + getEvent( + key: "BridgehubDepositFinalized" + ): TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + getEvent( + key: "BridgehubDepositInitiated" + ): TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + getEvent( + key: "ClaimedFailedDepositSharedBridge" + ): TypedContractEvent< + ClaimedFailedDepositSharedBridgeEvent.InputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputObject + >; + getEvent( + key: "LegacyDepositInitiated" + ): TypedContractEvent< + LegacyDepositInitiatedEvent.InputTuple, + LegacyDepositInitiatedEvent.OutputTuple, + LegacyDepositInitiatedEvent.OutputObject + >; + getEvent( + key: "WithdrawalFinalizedSharedBridge" + ): TypedContractEvent< + WithdrawalFinalizedSharedBridgeEvent.InputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputObject + >; + + filters: { + "BridgehubDepositBaseTokenInitiated(uint256,address,address,uint256)": TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + BridgehubDepositBaseTokenInitiated: TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + + "BridgehubDepositFinalized(uint256,bytes32,bytes32)": TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + BridgehubDepositFinalized: TypedContractEvent< + BridgehubDepositFinalizedEvent.InputTuple, + BridgehubDepositFinalizedEvent.OutputTuple, + BridgehubDepositFinalizedEvent.OutputObject + >; + + "BridgehubDepositInitiated(uint256,bytes32,address,address,address,uint256)": TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + BridgehubDepositInitiated: TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + + "ClaimedFailedDepositSharedBridge(uint256,address,address,uint256)": TypedContractEvent< + ClaimedFailedDepositSharedBridgeEvent.InputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputObject + >; + ClaimedFailedDepositSharedBridge: TypedContractEvent< + ClaimedFailedDepositSharedBridgeEvent.InputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputTuple, + ClaimedFailedDepositSharedBridgeEvent.OutputObject + >; + + "LegacyDepositInitiated(uint256,bytes32,address,address,address,uint256)": TypedContractEvent< + LegacyDepositInitiatedEvent.InputTuple, + LegacyDepositInitiatedEvent.OutputTuple, + LegacyDepositInitiatedEvent.OutputObject + >; + LegacyDepositInitiated: TypedContractEvent< + LegacyDepositInitiatedEvent.InputTuple, + LegacyDepositInitiatedEvent.OutputTuple, + LegacyDepositInitiatedEvent.OutputObject + >; + + "WithdrawalFinalizedSharedBridge(uint256,address,address,uint256)": TypedContractEvent< + WithdrawalFinalizedSharedBridgeEvent.InputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputObject + >; + WithdrawalFinalizedSharedBridge: TypedContractEvent< + WithdrawalFinalizedSharedBridgeEvent.InputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputTuple, + WithdrawalFinalizedSharedBridgeEvent.OutputObject + >; + }; +} diff --git a/typechain/IL2AssetRouter.ts b/typechain/IL2AssetRouter.ts new file mode 100644 index 00000000..4e8ff545 --- /dev/null +++ b/typechain/IL2AssetRouter.ts @@ -0,0 +1,552 @@ +/* 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 IL2AssetRouterInterface extends Interface { + getFunction( + nameOrSignature: + | "BRIDGE_HUB" + | "assetHandlerAddress" + | "finalizeDeposit" + | "l1AssetRouter" + | "setAssetHandlerAddress" + | "setAssetHandlerAddressThisChain" + | "withdraw" + | "withdrawLegacyBridge" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "AssetHandlerRegistered" + | "AssetHandlerRegisteredInitial" + | "BridgehubDepositBaseTokenInitiated" + | "BridgehubDepositInitiated" + | "BridgehubWithdrawalInitiated" + | "DepositFinalizedAssetRouter" + | "WithdrawalInitiatedAssetRouter" + ): EventFragment; + + encodeFunctionData( + functionFragment: "BRIDGE_HUB", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "assetHandlerAddress", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "finalizeDeposit", + values: [BigNumberish, BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "l1AssetRouter", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "setAssetHandlerAddress", + values: [BigNumberish, BytesLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setAssetHandlerAddressThisChain", + values: [BytesLike, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [BytesLike, BytesLike] + ): string; + encodeFunctionData( + functionFragment: "withdrawLegacyBridge", + values: [AddressLike, AddressLike, BigNumberish, AddressLike] + ): string; + + decodeFunctionResult(functionFragment: "BRIDGE_HUB", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "assetHandlerAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "finalizeDeposit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l1AssetRouter", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setAssetHandlerAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setAssetHandlerAddressThisChain", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "withdrawLegacyBridge", + data: BytesLike + ): Result; +} + +export namespace AssetHandlerRegisteredEvent { + export type InputTuple = [assetId: BytesLike, _assetAddress: AddressLike]; + export type OutputTuple = [assetId: string, _assetAddress: string]; + export interface OutputObject { + assetId: string; + _assetAddress: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace AssetHandlerRegisteredInitialEvent { + export type InputTuple = [ + assetId: BytesLike, + assetHandlerAddress: AddressLike, + additionalData: BytesLike, + assetDeploymentTracker: AddressLike + ]; + export type OutputTuple = [ + assetId: string, + assetHandlerAddress: string, + additionalData: string, + assetDeploymentTracker: string + ]; + export interface OutputObject { + assetId: string; + assetHandlerAddress: string; + additionalData: string; + assetDeploymentTracker: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubDepositBaseTokenInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + from: AddressLike, + assetId: BytesLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + chainId: bigint, + from: string, + assetId: string, + amount: bigint + ]; + export interface OutputObject { + chainId: bigint; + from: string; + assetId: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubDepositInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + txDataHash: BytesLike, + from: AddressLike, + assetId: BytesLike, + bridgeMintCalldata: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + txDataHash: string, + from: string, + assetId: string, + bridgeMintCalldata: string + ]; + export interface OutputObject { + chainId: bigint; + txDataHash: string; + from: string; + assetId: string; + bridgeMintCalldata: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BridgehubWithdrawalInitiatedEvent { + export type InputTuple = [ + chainId: BigNumberish, + sender: AddressLike, + assetId: BytesLike, + assetDataHash: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + sender: string, + assetId: string, + assetDataHash: string + ]; + export interface OutputObject { + chainId: bigint; + sender: string; + assetId: string; + assetDataHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace DepositFinalizedAssetRouterEvent { + export type InputTuple = [ + chainId: BigNumberish, + assetId: BytesLike, + assetData: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + assetId: string, + assetData: string + ]; + export interface OutputObject { + chainId: bigint; + assetId: string; + assetData: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace WithdrawalInitiatedAssetRouterEvent { + export type InputTuple = [ + chainId: BigNumberish, + l2Sender: AddressLike, + assetId: BytesLike, + assetData: BytesLike + ]; + export type OutputTuple = [ + chainId: bigint, + l2Sender: string, + assetId: string, + assetData: string + ]; + export interface OutputObject { + chainId: bigint; + l2Sender: string; + assetId: string; + assetData: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IL2AssetRouter extends BaseContract { + connect(runner?: ContractRunner | null): IL2AssetRouter; + waitForDeployment(): Promise; + + interface: IL2AssetRouterInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + BRIDGE_HUB: TypedContractMethod<[], [string], "view">; + + assetHandlerAddress: TypedContractMethod< + [_assetId: BytesLike], + [string], + "view" + >; + + finalizeDeposit: TypedContractMethod< + [_chainId: BigNumberish, _assetId: BytesLike, _transferData: BytesLike], + [void], + "nonpayable" + >; + + l1AssetRouter: TypedContractMethod<[], [string], "view">; + + setAssetHandlerAddress: TypedContractMethod< + [ + _originChainId: BigNumberish, + _assetId: BytesLike, + _assetAddress: AddressLike + ], + [void], + "nonpayable" + >; + + setAssetHandlerAddressThisChain: TypedContractMethod< + [_assetRegistrationData: BytesLike, _assetHandlerAddress: AddressLike], + [void], + "nonpayable" + >; + + withdraw: TypedContractMethod< + [_assetId: BytesLike, _transferData: BytesLike], + [void], + "nonpayable" + >; + + withdrawLegacyBridge: TypedContractMethod< + [ + _l1Receiver: AddressLike, + _l2Token: AddressLike, + _amount: BigNumberish, + _sender: AddressLike + ], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "BRIDGE_HUB" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "assetHandlerAddress" + ): TypedContractMethod<[_assetId: BytesLike], [string], "view">; + getFunction( + nameOrSignature: "finalizeDeposit" + ): TypedContractMethod< + [_chainId: BigNumberish, _assetId: BytesLike, _transferData: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "l1AssetRouter" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "setAssetHandlerAddress" + ): TypedContractMethod< + [ + _originChainId: BigNumberish, + _assetId: BytesLike, + _assetAddress: AddressLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setAssetHandlerAddressThisChain" + ): TypedContractMethod< + [_assetRegistrationData: BytesLike, _assetHandlerAddress: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "withdraw" + ): TypedContractMethod< + [_assetId: BytesLike, _transferData: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "withdrawLegacyBridge" + ): TypedContractMethod< + [ + _l1Receiver: AddressLike, + _l2Token: AddressLike, + _amount: BigNumberish, + _sender: AddressLike + ], + [void], + "nonpayable" + >; + + getEvent( + key: "AssetHandlerRegistered" + ): TypedContractEvent< + AssetHandlerRegisteredEvent.InputTuple, + AssetHandlerRegisteredEvent.OutputTuple, + AssetHandlerRegisteredEvent.OutputObject + >; + getEvent( + key: "AssetHandlerRegisteredInitial" + ): TypedContractEvent< + AssetHandlerRegisteredInitialEvent.InputTuple, + AssetHandlerRegisteredInitialEvent.OutputTuple, + AssetHandlerRegisteredInitialEvent.OutputObject + >; + getEvent( + key: "BridgehubDepositBaseTokenInitiated" + ): TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + getEvent( + key: "BridgehubDepositInitiated" + ): TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + getEvent( + key: "BridgehubWithdrawalInitiated" + ): TypedContractEvent< + BridgehubWithdrawalInitiatedEvent.InputTuple, + BridgehubWithdrawalInitiatedEvent.OutputTuple, + BridgehubWithdrawalInitiatedEvent.OutputObject + >; + getEvent( + key: "DepositFinalizedAssetRouter" + ): TypedContractEvent< + DepositFinalizedAssetRouterEvent.InputTuple, + DepositFinalizedAssetRouterEvent.OutputTuple, + DepositFinalizedAssetRouterEvent.OutputObject + >; + getEvent( + key: "WithdrawalInitiatedAssetRouter" + ): TypedContractEvent< + WithdrawalInitiatedAssetRouterEvent.InputTuple, + WithdrawalInitiatedAssetRouterEvent.OutputTuple, + WithdrawalInitiatedAssetRouterEvent.OutputObject + >; + + filters: { + "AssetHandlerRegistered(bytes32,address)": TypedContractEvent< + AssetHandlerRegisteredEvent.InputTuple, + AssetHandlerRegisteredEvent.OutputTuple, + AssetHandlerRegisteredEvent.OutputObject + >; + AssetHandlerRegistered: TypedContractEvent< + AssetHandlerRegisteredEvent.InputTuple, + AssetHandlerRegisteredEvent.OutputTuple, + AssetHandlerRegisteredEvent.OutputObject + >; + + "AssetHandlerRegisteredInitial(bytes32,address,bytes32,address)": TypedContractEvent< + AssetHandlerRegisteredInitialEvent.InputTuple, + AssetHandlerRegisteredInitialEvent.OutputTuple, + AssetHandlerRegisteredInitialEvent.OutputObject + >; + AssetHandlerRegisteredInitial: TypedContractEvent< + AssetHandlerRegisteredInitialEvent.InputTuple, + AssetHandlerRegisteredInitialEvent.OutputTuple, + AssetHandlerRegisteredInitialEvent.OutputObject + >; + + "BridgehubDepositBaseTokenInitiated(uint256,address,bytes32,uint256)": TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + BridgehubDepositBaseTokenInitiated: TypedContractEvent< + BridgehubDepositBaseTokenInitiatedEvent.InputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputTuple, + BridgehubDepositBaseTokenInitiatedEvent.OutputObject + >; + + "BridgehubDepositInitiated(uint256,bytes32,address,bytes32,bytes)": TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + BridgehubDepositInitiated: TypedContractEvent< + BridgehubDepositInitiatedEvent.InputTuple, + BridgehubDepositInitiatedEvent.OutputTuple, + BridgehubDepositInitiatedEvent.OutputObject + >; + + "BridgehubWithdrawalInitiated(uint256,address,bytes32,bytes32)": TypedContractEvent< + BridgehubWithdrawalInitiatedEvent.InputTuple, + BridgehubWithdrawalInitiatedEvent.OutputTuple, + BridgehubWithdrawalInitiatedEvent.OutputObject + >; + BridgehubWithdrawalInitiated: TypedContractEvent< + BridgehubWithdrawalInitiatedEvent.InputTuple, + BridgehubWithdrawalInitiatedEvent.OutputTuple, + BridgehubWithdrawalInitiatedEvent.OutputObject + >; + + "DepositFinalizedAssetRouter(uint256,bytes32,bytes)": TypedContractEvent< + DepositFinalizedAssetRouterEvent.InputTuple, + DepositFinalizedAssetRouterEvent.OutputTuple, + DepositFinalizedAssetRouterEvent.OutputObject + >; + DepositFinalizedAssetRouter: TypedContractEvent< + DepositFinalizedAssetRouterEvent.InputTuple, + DepositFinalizedAssetRouterEvent.OutputTuple, + DepositFinalizedAssetRouterEvent.OutputObject + >; + + "WithdrawalInitiatedAssetRouter(uint256,address,bytes32,bytes)": TypedContractEvent< + WithdrawalInitiatedAssetRouterEvent.InputTuple, + WithdrawalInitiatedAssetRouterEvent.OutputTuple, + WithdrawalInitiatedAssetRouterEvent.OutputObject + >; + WithdrawalInitiatedAssetRouter: TypedContractEvent< + WithdrawalInitiatedAssetRouterEvent.InputTuple, + WithdrawalInitiatedAssetRouterEvent.OutputTuple, + WithdrawalInitiatedAssetRouterEvent.OutputObject + >; + }; +} diff --git a/typechain/IL2Bridge.ts b/typechain/IL2Bridge.ts new file mode 100644 index 00000000..84d159e9 --- /dev/null +++ b/typechain/IL2Bridge.ts @@ -0,0 +1,178 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IL2BridgeInterface extends Interface { + getFunction( + nameOrSignature: + | "finalizeDeposit" + | "l1Bridge" + | "l1TokenAddress" + | "l2TokenAddress" + | "withdraw" + ): FunctionFragment; + + encodeFunctionData( + functionFragment: "finalizeDeposit", + values: [AddressLike, AddressLike, AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "l1Bridge", values?: undefined): string; + encodeFunctionData( + functionFragment: "l1TokenAddress", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "l2TokenAddress", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "finalizeDeposit", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "l1Bridge", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "l1TokenAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2TokenAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; +} + +export interface IL2Bridge extends BaseContract { + connect(runner?: ContractRunner | null): IL2Bridge; + waitForDeployment(): Promise; + + interface: IL2BridgeInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + finalizeDeposit: TypedContractMethod< + [ + _l1Sender: AddressLike, + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _data: BytesLike + ], + [void], + "nonpayable" + >; + + l1Bridge: TypedContractMethod<[], [string], "view">; + + l1TokenAddress: TypedContractMethod< + [_l2Token: AddressLike], + [string], + "view" + >; + + l2TokenAddress: TypedContractMethod< + [_l1Token: AddressLike], + [string], + "view" + >; + + withdraw: TypedContractMethod< + [_l1Receiver: AddressLike, _l2Token: AddressLike, _amount: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "finalizeDeposit" + ): TypedContractMethod< + [ + _l1Sender: AddressLike, + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "l1Bridge" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "l1TokenAddress" + ): TypedContractMethod<[_l2Token: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "l2TokenAddress" + ): TypedContractMethod<[_l1Token: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "withdraw" + ): TypedContractMethod< + [_l1Receiver: AddressLike, _l2Token: AddressLike, _amount: BigNumberish], + [void], + "nonpayable" + >; + + filters: {}; +} diff --git a/typechain/IL2NativeTokenVault.ts b/typechain/IL2NativeTokenVault.ts new file mode 100644 index 00000000..7e5905e8 --- /dev/null +++ b/typechain/IL2NativeTokenVault.ts @@ -0,0 +1,418 @@ +/* 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 IL2NativeTokenVaultInterface extends Interface { + getFunction( + nameOrSignature: + | "ASSET_ROUTER" + | "WETH_TOKEN" + | "assetId" + | "calculateAssetId" + | "calculateCreate2TokenAddress" + | "getERC20Getters" + | "l2TokenAddress" + | "originChainId" + | "registerToken" + | "tokenAddress" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "BridgedTokenBeaconUpdated" + | "FinalizeDeposit" + | "L2TokenBeaconUpdated" + | "WithdrawalInitiated" + ): EventFragment; + + encodeFunctionData( + functionFragment: "ASSET_ROUTER", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "WETH_TOKEN", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "assetId", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "calculateAssetId", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "calculateCreate2TokenAddress", + values: [BigNumberish, AddressLike] + ): string; + encodeFunctionData( + functionFragment: "getERC20Getters", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "l2TokenAddress", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "originChainId", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "registerToken", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "tokenAddress", + values: [BytesLike] + ): string; + + decodeFunctionResult( + functionFragment: "ASSET_ROUTER", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "WETH_TOKEN", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "assetId", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "calculateAssetId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "calculateCreate2TokenAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getERC20Getters", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2TokenAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "originChainId", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "registerToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "tokenAddress", + data: BytesLike + ): Result; +} + +export namespace BridgedTokenBeaconUpdatedEvent { + export type InputTuple = [ + bridgedTokenBeacon: AddressLike, + bridgedTokenProxyBytecodeHash: BytesLike + ]; + export type OutputTuple = [ + bridgedTokenBeacon: string, + bridgedTokenProxyBytecodeHash: string + ]; + export interface OutputObject { + bridgedTokenBeacon: string; + bridgedTokenProxyBytecodeHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace FinalizeDepositEvent { + export type InputTuple = [ + l1Sender: AddressLike, + l2Receiver: AddressLike, + l2Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + l1Sender: string, + l2Receiver: string, + l2Token: string, + amount: bigint + ]; + export interface OutputObject { + l1Sender: string; + l2Receiver: string; + l2Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace L2TokenBeaconUpdatedEvent { + export type InputTuple = [ + l2TokenBeacon: AddressLike, + l2TokenProxyBytecodeHash: BytesLike + ]; + export type OutputTuple = [ + l2TokenBeacon: string, + l2TokenProxyBytecodeHash: string + ]; + export interface OutputObject { + l2TokenBeacon: string; + l2TokenProxyBytecodeHash: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace WithdrawalInitiatedEvent { + export type InputTuple = [ + l2Sender: AddressLike, + l1Receiver: AddressLike, + l2Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + l2Sender: string, + l1Receiver: string, + l2Token: string, + amount: bigint + ]; + export interface OutputObject { + l2Sender: string; + l1Receiver: string; + l2Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IL2NativeTokenVault extends BaseContract { + connect(runner?: ContractRunner | null): IL2NativeTokenVault; + waitForDeployment(): Promise; + + interface: IL2NativeTokenVaultInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + ASSET_ROUTER: TypedContractMethod<[], [string], "view">; + + WETH_TOKEN: TypedContractMethod<[], [string], "view">; + + assetId: TypedContractMethod<[token: AddressLike], [string], "view">; + + calculateAssetId: TypedContractMethod< + [_chainId: BigNumberish, _tokenAddress: AddressLike], + [string], + "view" + >; + + calculateCreate2TokenAddress: TypedContractMethod< + [_originChainId: BigNumberish, _originToken: AddressLike], + [string], + "view" + >; + + getERC20Getters: TypedContractMethod< + [_token: AddressLike, _originChainId: BigNumberish], + [string], + "view" + >; + + l2TokenAddress: TypedContractMethod< + [_l1Token: AddressLike], + [string], + "view" + >; + + originChainId: TypedContractMethod<[assetId: BytesLike], [bigint], "view">; + + registerToken: TypedContractMethod< + [_l1Token: AddressLike], + [void], + "nonpayable" + >; + + tokenAddress: TypedContractMethod<[assetId: BytesLike], [string], "view">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "ASSET_ROUTER" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "WETH_TOKEN" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "assetId" + ): TypedContractMethod<[token: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "calculateAssetId" + ): TypedContractMethod< + [_chainId: BigNumberish, _tokenAddress: AddressLike], + [string], + "view" + >; + getFunction( + nameOrSignature: "calculateCreate2TokenAddress" + ): TypedContractMethod< + [_originChainId: BigNumberish, _originToken: AddressLike], + [string], + "view" + >; + getFunction( + nameOrSignature: "getERC20Getters" + ): TypedContractMethod< + [_token: AddressLike, _originChainId: BigNumberish], + [string], + "view" + >; + getFunction( + nameOrSignature: "l2TokenAddress" + ): TypedContractMethod<[_l1Token: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "originChainId" + ): TypedContractMethod<[assetId: BytesLike], [bigint], "view">; + getFunction( + nameOrSignature: "registerToken" + ): TypedContractMethod<[_l1Token: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "tokenAddress" + ): TypedContractMethod<[assetId: BytesLike], [string], "view">; + + getEvent( + key: "BridgedTokenBeaconUpdated" + ): TypedContractEvent< + BridgedTokenBeaconUpdatedEvent.InputTuple, + BridgedTokenBeaconUpdatedEvent.OutputTuple, + BridgedTokenBeaconUpdatedEvent.OutputObject + >; + getEvent( + key: "FinalizeDeposit" + ): TypedContractEvent< + FinalizeDepositEvent.InputTuple, + FinalizeDepositEvent.OutputTuple, + FinalizeDepositEvent.OutputObject + >; + getEvent( + key: "L2TokenBeaconUpdated" + ): TypedContractEvent< + L2TokenBeaconUpdatedEvent.InputTuple, + L2TokenBeaconUpdatedEvent.OutputTuple, + L2TokenBeaconUpdatedEvent.OutputObject + >; + getEvent( + key: "WithdrawalInitiated" + ): TypedContractEvent< + WithdrawalInitiatedEvent.InputTuple, + WithdrawalInitiatedEvent.OutputTuple, + WithdrawalInitiatedEvent.OutputObject + >; + + filters: { + "BridgedTokenBeaconUpdated(address,bytes32)": TypedContractEvent< + BridgedTokenBeaconUpdatedEvent.InputTuple, + BridgedTokenBeaconUpdatedEvent.OutputTuple, + BridgedTokenBeaconUpdatedEvent.OutputObject + >; + BridgedTokenBeaconUpdated: TypedContractEvent< + BridgedTokenBeaconUpdatedEvent.InputTuple, + BridgedTokenBeaconUpdatedEvent.OutputTuple, + BridgedTokenBeaconUpdatedEvent.OutputObject + >; + + "FinalizeDeposit(address,address,address,uint256)": TypedContractEvent< + FinalizeDepositEvent.InputTuple, + FinalizeDepositEvent.OutputTuple, + FinalizeDepositEvent.OutputObject + >; + FinalizeDeposit: TypedContractEvent< + FinalizeDepositEvent.InputTuple, + FinalizeDepositEvent.OutputTuple, + FinalizeDepositEvent.OutputObject + >; + + "L2TokenBeaconUpdated(address,bytes32)": TypedContractEvent< + L2TokenBeaconUpdatedEvent.InputTuple, + L2TokenBeaconUpdatedEvent.OutputTuple, + L2TokenBeaconUpdatedEvent.OutputObject + >; + L2TokenBeaconUpdated: TypedContractEvent< + L2TokenBeaconUpdatedEvent.InputTuple, + L2TokenBeaconUpdatedEvent.OutputTuple, + L2TokenBeaconUpdatedEvent.OutputObject + >; + + "WithdrawalInitiated(address,address,address,uint256)": TypedContractEvent< + WithdrawalInitiatedEvent.InputTuple, + WithdrawalInitiatedEvent.OutputTuple, + WithdrawalInitiatedEvent.OutputObject + >; + WithdrawalInitiated: TypedContractEvent< + WithdrawalInitiatedEvent.InputTuple, + WithdrawalInitiatedEvent.OutputTuple, + WithdrawalInitiatedEvent.OutputObject + >; + }; +} diff --git a/typechain/IL2SharedBridge.ts b/typechain/IL2SharedBridge.ts new file mode 100644 index 00000000..a044d488 --- /dev/null +++ b/typechain/IL2SharedBridge.ts @@ -0,0 +1,285 @@ +/* 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 IL2SharedBridgeInterface extends Interface { + getFunction( + nameOrSignature: + | "finalizeDeposit" + | "l1Bridge" + | "l1SharedBridge" + | "l1TokenAddress" + | "l2TokenAddress" + | "withdraw" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: "FinalizeDeposit" | "WithdrawalInitiated" + ): EventFragment; + + encodeFunctionData( + functionFragment: "finalizeDeposit", + values: [AddressLike, AddressLike, AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "l1Bridge", values?: undefined): string; + encodeFunctionData( + functionFragment: "l1SharedBridge", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "l1TokenAddress", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "l2TokenAddress", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "withdraw", + values: [AddressLike, AddressLike, BigNumberish] + ): string; + + decodeFunctionResult( + functionFragment: "finalizeDeposit", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "l1Bridge", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "l1SharedBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l1TokenAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2TokenAddress", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result; +} + +export namespace FinalizeDepositEvent { + export type InputTuple = [ + l1Sender: AddressLike, + l2Receiver: AddressLike, + l2Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + l1Sender: string, + l2Receiver: string, + l2Token: string, + amount: bigint + ]; + export interface OutputObject { + l1Sender: string; + l2Receiver: string; + l2Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace WithdrawalInitiatedEvent { + export type InputTuple = [ + l2Sender: AddressLike, + l1Receiver: AddressLike, + l2Token: AddressLike, + amount: BigNumberish + ]; + export type OutputTuple = [ + l2Sender: string, + l1Receiver: string, + l2Token: string, + amount: bigint + ]; + export interface OutputObject { + l2Sender: string; + l1Receiver: string; + l2Token: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IL2SharedBridge extends BaseContract { + connect(runner?: ContractRunner | null): IL2SharedBridge; + waitForDeployment(): Promise; + + interface: IL2SharedBridgeInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + finalizeDeposit: TypedContractMethod< + [ + _l1Sender: AddressLike, + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _data: BytesLike + ], + [void], + "nonpayable" + >; + + l1Bridge: TypedContractMethod<[], [string], "view">; + + l1SharedBridge: TypedContractMethod<[], [string], "view">; + + l1TokenAddress: TypedContractMethod< + [_l2Token: AddressLike], + [string], + "view" + >; + + l2TokenAddress: TypedContractMethod< + [_l1Token: AddressLike], + [string], + "view" + >; + + withdraw: TypedContractMethod< + [_l1Receiver: AddressLike, _l2Token: AddressLike, _amount: BigNumberish], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "finalizeDeposit" + ): TypedContractMethod< + [ + _l1Sender: AddressLike, + _l2Receiver: AddressLike, + _l1Token: AddressLike, + _amount: BigNumberish, + _data: BytesLike + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "l1Bridge" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "l1SharedBridge" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "l1TokenAddress" + ): TypedContractMethod<[_l2Token: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "l2TokenAddress" + ): TypedContractMethod<[_l1Token: AddressLike], [string], "view">; + getFunction( + nameOrSignature: "withdraw" + ): TypedContractMethod< + [_l1Receiver: AddressLike, _l2Token: AddressLike, _amount: BigNumberish], + [void], + "nonpayable" + >; + + getEvent( + key: "FinalizeDeposit" + ): TypedContractEvent< + FinalizeDepositEvent.InputTuple, + FinalizeDepositEvent.OutputTuple, + FinalizeDepositEvent.OutputObject + >; + getEvent( + key: "WithdrawalInitiated" + ): TypedContractEvent< + WithdrawalInitiatedEvent.InputTuple, + WithdrawalInitiatedEvent.OutputTuple, + WithdrawalInitiatedEvent.OutputObject + >; + + filters: { + "FinalizeDeposit(address,address,address,uint256)": TypedContractEvent< + FinalizeDepositEvent.InputTuple, + FinalizeDepositEvent.OutputTuple, + FinalizeDepositEvent.OutputObject + >; + FinalizeDeposit: TypedContractEvent< + FinalizeDepositEvent.InputTuple, + FinalizeDepositEvent.OutputTuple, + FinalizeDepositEvent.OutputObject + >; + + "WithdrawalInitiated(address,address,address,uint256)": TypedContractEvent< + WithdrawalInitiatedEvent.InputTuple, + WithdrawalInitiatedEvent.OutputTuple, + WithdrawalInitiatedEvent.OutputObject + >; + WithdrawalInitiated: TypedContractEvent< + WithdrawalInitiatedEvent.InputTuple, + WithdrawalInitiatedEvent.OutputTuple, + WithdrawalInitiatedEvent.OutputObject + >; + }; +} diff --git a/typechain/INonceHolder.ts b/typechain/INonceHolder.ts new file mode 100644 index 00000000..7200e44b --- /dev/null +++ b/typechain/INonceHolder.ts @@ -0,0 +1,310 @@ +/* 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 INonceHolderInterface extends Interface { + getFunction( + nameOrSignature: + | "getDeploymentNonce" + | "getMinNonce" + | "getRawNonce" + | "getValueUnderNonce" + | "increaseMinNonce" + | "incrementDeploymentNonce" + | "incrementMinNonceIfEquals" + | "isNonceUsed" + | "setValueUnderNonce" + | "validateNonceUsage" + ): FunctionFragment; + + getEvent(nameOrSignatureOrTopic: "ValueSetUnderNonce"): EventFragment; + + encodeFunctionData( + functionFragment: "getDeploymentNonce", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "getMinNonce", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "getRawNonce", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "getValueUnderNonce", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "increaseMinNonce", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "incrementDeploymentNonce", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "incrementMinNonceIfEquals", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isNonceUsed", + values: [AddressLike, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setValueUnderNonce", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "validateNonceUsage", + values: [AddressLike, BigNumberish, boolean] + ): string; + + decodeFunctionResult( + functionFragment: "getDeploymentNonce", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getMinNonce", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getRawNonce", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getValueUnderNonce", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "increaseMinNonce", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "incrementDeploymentNonce", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "incrementMinNonceIfEquals", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isNonceUsed", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setValueUnderNonce", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "validateNonceUsage", + data: BytesLike + ): Result; +} + +export namespace ValueSetUnderNonceEvent { + export type InputTuple = [ + accountAddress: AddressLike, + key: BigNumberish, + value: BigNumberish + ]; + export type OutputTuple = [ + accountAddress: string, + key: bigint, + value: bigint + ]; + export interface OutputObject { + accountAddress: string; + key: bigint; + value: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface INonceHolder extends BaseContract { + connect(runner?: ContractRunner | null): INonceHolder; + waitForDeployment(): Promise; + + interface: INonceHolderInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + getDeploymentNonce: TypedContractMethod< + [_address: AddressLike], + [bigint], + "view" + >; + + getMinNonce: TypedContractMethod<[_address: AddressLike], [bigint], "view">; + + getRawNonce: TypedContractMethod<[_address: AddressLike], [bigint], "view">; + + getValueUnderNonce: TypedContractMethod< + [_key: BigNumberish], + [bigint], + "view" + >; + + increaseMinNonce: TypedContractMethod< + [_value: BigNumberish], + [bigint], + "nonpayable" + >; + + incrementDeploymentNonce: TypedContractMethod< + [_address: AddressLike], + [bigint], + "nonpayable" + >; + + incrementMinNonceIfEquals: TypedContractMethod< + [_expectedNonce: BigNumberish], + [void], + "nonpayable" + >; + + isNonceUsed: TypedContractMethod< + [_address: AddressLike, _nonce: BigNumberish], + [boolean], + "view" + >; + + setValueUnderNonce: TypedContractMethod< + [_key: BigNumberish, _value: BigNumberish], + [void], + "nonpayable" + >; + + validateNonceUsage: TypedContractMethod< + [_address: AddressLike, _key: BigNumberish, _shouldBeUsed: boolean], + [void], + "view" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "getDeploymentNonce" + ): TypedContractMethod<[_address: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getMinNonce" + ): TypedContractMethod<[_address: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getRawNonce" + ): TypedContractMethod<[_address: AddressLike], [bigint], "view">; + getFunction( + nameOrSignature: "getValueUnderNonce" + ): TypedContractMethod<[_key: BigNumberish], [bigint], "view">; + getFunction( + nameOrSignature: "increaseMinNonce" + ): TypedContractMethod<[_value: BigNumberish], [bigint], "nonpayable">; + getFunction( + nameOrSignature: "incrementDeploymentNonce" + ): TypedContractMethod<[_address: AddressLike], [bigint], "nonpayable">; + getFunction( + nameOrSignature: "incrementMinNonceIfEquals" + ): TypedContractMethod<[_expectedNonce: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "isNonceUsed" + ): TypedContractMethod< + [_address: AddressLike, _nonce: BigNumberish], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "setValueUnderNonce" + ): TypedContractMethod< + [_key: BigNumberish, _value: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "validateNonceUsage" + ): TypedContractMethod< + [_address: AddressLike, _key: BigNumberish, _shouldBeUsed: boolean], + [void], + "view" + >; + + getEvent( + key: "ValueSetUnderNonce" + ): TypedContractEvent< + ValueSetUnderNonceEvent.InputTuple, + ValueSetUnderNonceEvent.OutputTuple, + ValueSetUnderNonceEvent.OutputObject + >; + + filters: { + "ValueSetUnderNonce(address,uint256,uint256)": TypedContractEvent< + ValueSetUnderNonceEvent.InputTuple, + ValueSetUnderNonceEvent.OutputTuple, + ValueSetUnderNonceEvent.OutputObject + >; + ValueSetUnderNonce: TypedContractEvent< + ValueSetUnderNonceEvent.InputTuple, + ValueSetUnderNonceEvent.OutputTuple, + ValueSetUnderNonceEvent.OutputObject + >; + }; +} diff --git a/typechain/IPaymasterFlow.ts b/typechain/IPaymasterFlow.ts new file mode 100644 index 00000000..adf54dda --- /dev/null +++ b/typechain/IPaymasterFlow.ts @@ -0,0 +1,107 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface IPaymasterFlowInterface extends Interface { + getFunction(nameOrSignature: "approvalBased" | "general"): FunctionFragment; + + encodeFunctionData( + functionFragment: "approvalBased", + values: [AddressLike, BigNumberish, BytesLike] + ): string; + encodeFunctionData(functionFragment: "general", values: [BytesLike]): string; + + decodeFunctionResult( + functionFragment: "approvalBased", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "general", data: BytesLike): Result; +} + +export interface IPaymasterFlow extends BaseContract { + connect(runner?: ContractRunner | null): IPaymasterFlow; + waitForDeployment(): Promise; + + interface: IPaymasterFlowInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + approvalBased: TypedContractMethod< + [_token: AddressLike, _minAllowance: BigNumberish, _innerInput: BytesLike], + [void], + "nonpayable" + >; + + general: TypedContractMethod<[input: BytesLike], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "approvalBased" + ): TypedContractMethod< + [_token: AddressLike, _minAllowance: BigNumberish, _innerInput: BytesLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "general" + ): TypedContractMethod<[input: BytesLike], [void], "nonpayable">; + + filters: {}; +} diff --git a/typechain/ITestnetERC20Token.ts b/typechain/ITestnetERC20Token.ts new file mode 100644 index 00000000..d13cc526 --- /dev/null +++ b/typechain/ITestnetERC20Token.ts @@ -0,0 +1,104 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + BaseContract, + BigNumberish, + BytesLike, + FunctionFragment, + Result, + Interface, + AddressLike, + ContractRunner, + ContractMethod, + Listener, +} from "ethers"; +import type { + TypedContractEvent, + TypedDeferredTopicFilter, + TypedEventLog, + TypedListener, + TypedContractMethod, +} from "./common"; + +export interface ITestnetERC20TokenInterface extends Interface { + getFunction(nameOrSignature: "decimals" | "mint"): FunctionFragment; + + encodeFunctionData(functionFragment: "decimals", values?: undefined): string; + encodeFunctionData( + functionFragment: "mint", + values: [AddressLike, BigNumberish] + ): string; + + decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result; + decodeFunctionResult(functionFragment: "mint", data: BytesLike): Result; +} + +export interface ITestnetERC20Token extends BaseContract { + connect(runner?: ContractRunner | null): ITestnetERC20Token; + waitForDeployment(): Promise; + + interface: ITestnetERC20TokenInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + decimals: TypedContractMethod<[], [bigint], "nonpayable">; + + mint: TypedContractMethod< + [_to: AddressLike, _amount: BigNumberish], + [boolean], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "decimals" + ): TypedContractMethod<[], [bigint], "nonpayable">; + getFunction( + nameOrSignature: "mint" + ): TypedContractMethod< + [_to: AddressLike, _amount: BigNumberish], + [boolean], + "nonpayable" + >; + + filters: {}; +} diff --git a/typechain/IZkSync.ts b/typechain/IZkSync.ts new file mode 100644 index 00000000..c33ca9bb --- /dev/null +++ b/typechain/IZkSync.ts @@ -0,0 +1,1836 @@ +/* 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 type VerifierParamsStruct = { + recursionNodeLevelVkHash: BytesLike; + recursionLeafLevelVkHash: BytesLike; + recursionCircuitsSetVksHash: BytesLike; +}; + +export type VerifierParamsStructOutput = [ + recursionNodeLevelVkHash: string, + recursionLeafLevelVkHash: string, + recursionCircuitsSetVksHash: string +] & { + recursionNodeLevelVkHash: string; + recursionLeafLevelVkHash: string; + recursionCircuitsSetVksHash: string; +}; + +export type PriorityOperationStruct = { + canonicalTxHash: BytesLike; + expirationTimestamp: BigNumberish; + layer2Tip: BigNumberish; +}; + +export type PriorityOperationStructOutput = [ + canonicalTxHash: string, + expirationTimestamp: bigint, + layer2Tip: bigint +] & { canonicalTxHash: string; expirationTimestamp: bigint; layer2Tip: bigint }; + +export type L2LogStruct = { + l2ShardId: BigNumberish; + isService: boolean; + txNumberInBatch: BigNumberish; + sender: AddressLike; + key: BytesLike; + value: BytesLike; +}; + +export type L2LogStructOutput = [ + l2ShardId: bigint, + isService: boolean, + txNumberInBatch: bigint, + sender: string, + key: string, + value: string +] & { + l2ShardId: bigint; + isService: boolean; + txNumberInBatch: bigint; + sender: string; + key: string; + value: string; +}; + +export type L2MessageStruct = { + txNumberInBatch: BigNumberish; + sender: AddressLike; + data: BytesLike; +}; + +export type L2MessageStructOutput = [ + txNumberInBatch: bigint, + sender: string, + data: string +] & { txNumberInBatch: bigint; sender: string; data: string }; + +export declare namespace Diamond { + export type FacetCutStruct = { + facet: AddressLike; + action: BigNumberish; + isFreezable: boolean; + selectors: BytesLike[]; + }; + + export type FacetCutStructOutput = [ + facet: string, + action: bigint, + isFreezable: boolean, + selectors: string[] + ] & { + facet: string; + action: bigint; + isFreezable: boolean; + selectors: string[]; + }; + + export type DiamondCutDataStruct = { + facetCuts: Diamond.FacetCutStruct[]; + initAddress: AddressLike; + initCalldata: BytesLike; + }; + + export type DiamondCutDataStructOutput = [ + facetCuts: Diamond.FacetCutStructOutput[], + initAddress: string, + initCalldata: string + ] & { + facetCuts: Diamond.FacetCutStructOutput[]; + initAddress: string; + initCalldata: string; + }; +} + +export declare namespace IMailbox { + export type L2CanonicalTransactionStruct = { + txType: BigNumberish; + from: BigNumberish; + to: BigNumberish; + gasLimit: BigNumberish; + gasPerPubdataByteLimit: BigNumberish; + maxFeePerGas: BigNumberish; + maxPriorityFeePerGas: BigNumberish; + paymaster: BigNumberish; + nonce: BigNumberish; + value: BigNumberish; + reserved: [BigNumberish, BigNumberish, BigNumberish, BigNumberish]; + data: BytesLike; + signature: BytesLike; + factoryDeps: BigNumberish[]; + paymasterInput: BytesLike; + reservedDynamic: BytesLike; + }; + + export type L2CanonicalTransactionStructOutput = [ + txType: bigint, + from: bigint, + to: bigint, + gasLimit: bigint, + gasPerPubdataByteLimit: bigint, + maxFeePerGas: bigint, + maxPriorityFeePerGas: bigint, + paymaster: bigint, + nonce: bigint, + value: bigint, + reserved: [bigint, bigint, bigint, bigint], + data: string, + signature: string, + factoryDeps: bigint[], + paymasterInput: string, + reservedDynamic: string + ] & { + txType: bigint; + from: bigint; + to: bigint; + gasLimit: bigint; + gasPerPubdataByteLimit: bigint; + maxFeePerGas: bigint; + maxPriorityFeePerGas: bigint; + paymaster: bigint; + nonce: bigint; + value: bigint; + reserved: [bigint, bigint, bigint, bigint]; + data: string; + signature: string; + factoryDeps: bigint[]; + paymasterInput: string; + reservedDynamic: string; + }; +} + +export declare namespace IExecutor { + export type StoredBatchInfoStruct = { + batchNumber: BigNumberish; + batchHash: BytesLike; + indexRepeatedStorageChanges: BigNumberish; + numberOfLayer1Txs: BigNumberish; + priorityOperationsHash: BytesLike; + l2LogsTreeRoot: BytesLike; + timestamp: BigNumberish; + commitment: BytesLike; + }; + + export type StoredBatchInfoStructOutput = [ + batchNumber: bigint, + batchHash: string, + indexRepeatedStorageChanges: bigint, + numberOfLayer1Txs: bigint, + priorityOperationsHash: string, + l2LogsTreeRoot: string, + timestamp: bigint, + commitment: string + ] & { + batchNumber: bigint; + batchHash: string; + indexRepeatedStorageChanges: bigint; + numberOfLayer1Txs: bigint; + priorityOperationsHash: string; + l2LogsTreeRoot: string; + timestamp: bigint; + commitment: string; + }; + + export type CommitBatchInfoStruct = { + batchNumber: BigNumberish; + timestamp: BigNumberish; + indexRepeatedStorageChanges: BigNumberish; + newStateRoot: BytesLike; + numberOfLayer1Txs: BigNumberish; + priorityOperationsHash: BytesLike; + bootloaderHeapInitialContentsHash: BytesLike; + eventsQueueStateHash: BytesLike; + systemLogs: BytesLike; + totalL2ToL1Pubdata: BytesLike; + }; + + export type CommitBatchInfoStructOutput = [ + batchNumber: bigint, + timestamp: bigint, + indexRepeatedStorageChanges: bigint, + newStateRoot: string, + numberOfLayer1Txs: bigint, + priorityOperationsHash: string, + bootloaderHeapInitialContentsHash: string, + eventsQueueStateHash: string, + systemLogs: string, + totalL2ToL1Pubdata: string + ] & { + batchNumber: bigint; + timestamp: bigint; + indexRepeatedStorageChanges: bigint; + newStateRoot: string; + numberOfLayer1Txs: bigint; + priorityOperationsHash: string; + bootloaderHeapInitialContentsHash: string; + eventsQueueStateHash: string; + systemLogs: string; + totalL2ToL1Pubdata: string; + }; + + export type ProofInputStruct = { + recursiveAggregationInput: BigNumberish[]; + serializedProof: BigNumberish[]; + }; + + export type ProofInputStructOutput = [ + recursiveAggregationInput: bigint[], + serializedProof: bigint[] + ] & { recursiveAggregationInput: bigint[]; serializedProof: bigint[] }; +} + +export declare namespace IGetters { + export type FacetStruct = { addr: AddressLike; selectors: BytesLike[] }; + + export type FacetStructOutput = [addr: string, selectors: string[]] & { + addr: string; + selectors: string[]; + }; +} + +export interface IZkSyncInterface extends Interface { + getFunction( + nameOrSignature: + | "acceptAdmin" + | "acceptGovernor" + | "commitBatches" + | "executeBatches" + | "executeUpgrade" + | "facetAddress" + | "facetAddresses" + | "facetFunctionSelectors" + | "facets" + | "finalizeEthWithdrawal" + | "freezeDiamond" + | "getFirstUnprocessedPriorityTx" + | "getGovernor" + | "getL2BootloaderBytecodeHash" + | "getL2DefaultAccountBytecodeHash" + | "getL2SystemContractsUpgradeBatchNumber" + | "getL2SystemContractsUpgradeTxHash" + | "getName" + | "getPendingGovernor" + | "getPriorityQueueSize" + | "getPriorityTxMaxGasLimit" + | "getProtocolVersion" + | "getTotalBatchesCommitted" + | "getTotalBatchesExecuted" + | "getTotalBatchesVerified" + | "getTotalPriorityTxs" + | "getVerifier" + | "getVerifierParams" + | "isDiamondStorageFrozen" + | "isEthWithdrawalFinalized" + | "isFacetFreezable" + | "isFunctionFreezable" + | "isValidator" + | "l2LogsRootHash" + | "l2TransactionBaseCost" + | "priorityQueueFrontOperation" + | "proveBatches" + | "proveL1ToL2TransactionStatus" + | "proveL2LogInclusion" + | "proveL2MessageInclusion" + | "requestL2Transaction" + | "revertBatches" + | "setPendingAdmin" + | "setPendingGovernor" + | "setPorterAvailability" + | "setPriorityTxMaxGasLimit" + | "setValidator" + | "storedBatchHash" + | "unfreezeDiamond" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "BlockCommit" + | "BlockExecution" + | "BlocksRevert" + | "BlocksVerification" + | "EthWithdrawalFinalized" + | "ExecuteUpgrade" + | "Freeze" + | "IsPorterAvailableStatusUpdate" + | "NewAdmin" + | "NewGovernor" + | "NewPendingAdmin" + | "NewPendingGovernor" + | "NewPriorityRequest" + | "NewPriorityTxMaxGasLimit" + | "Unfreeze" + | "ValidatorStatusUpdate" + ): EventFragment; + + encodeFunctionData( + functionFragment: "acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "acceptGovernor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "commitBatches", + values: [IExecutor.StoredBatchInfoStruct, IExecutor.CommitBatchInfoStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeBatches", + values: [IExecutor.StoredBatchInfoStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeUpgrade", + values: [Diamond.DiamondCutDataStruct] + ): string; + encodeFunctionData( + functionFragment: "facetAddress", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "facetAddresses", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "facetFunctionSelectors", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "facets", values?: undefined): string; + encodeFunctionData( + functionFragment: "finalizeEthWithdrawal", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike[]] + ): string; + encodeFunctionData( + functionFragment: "freezeDiamond", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFirstUnprocessedPriorityTx", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getGovernor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getL2BootloaderBytecodeHash", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getL2DefaultAccountBytecodeHash", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getL2SystemContractsUpgradeBatchNumber", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getL2SystemContractsUpgradeTxHash", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "getName", values?: undefined): string; + encodeFunctionData( + functionFragment: "getPendingGovernor", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getPriorityQueueSize", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getPriorityTxMaxGasLimit", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getProtocolVersion", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTotalBatchesCommitted", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTotalBatchesExecuted", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTotalBatchesVerified", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTotalPriorityTxs", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getVerifier", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getVerifierParams", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isDiamondStorageFrozen", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isEthWithdrawalFinalized", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isFacetFreezable", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "isFunctionFreezable", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isValidator", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "l2LogsRootHash", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "l2TransactionBaseCost", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "priorityQueueFrontOperation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proveBatches", + values: [ + IExecutor.StoredBatchInfoStruct, + IExecutor.StoredBatchInfoStruct[], + IExecutor.ProofInputStruct + ] + ): string; + encodeFunctionData( + functionFragment: "proveL1ToL2TransactionStatus", + values: [ + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[], + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "proveL2LogInclusion", + values: [BigNumberish, BigNumberish, L2LogStruct, BytesLike[]] + ): string; + encodeFunctionData( + functionFragment: "proveL2MessageInclusion", + values: [BigNumberish, BigNumberish, L2MessageStruct, BytesLike[]] + ): string; + encodeFunctionData( + functionFragment: "requestL2Transaction", + values: [ + AddressLike, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BytesLike[], + AddressLike + ] + ): string; + encodeFunctionData( + functionFragment: "revertBatches", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPendingAdmin", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setPendingGovernor", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setPorterAvailability", + values: [boolean] + ): string; + encodeFunctionData( + functionFragment: "setPriorityTxMaxGasLimit", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setValidator", + values: [AddressLike, boolean] + ): string; + encodeFunctionData( + functionFragment: "storedBatchHash", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "unfreezeDiamond", + values?: undefined + ): string; + + decodeFunctionResult( + functionFragment: "acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "acceptGovernor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "commitBatches", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeBatches", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeUpgrade", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "facetAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "facetAddresses", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "facetFunctionSelectors", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "facets", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "finalizeEthWithdrawal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "freezeDiamond", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getFirstUnprocessedPriorityTx", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getGovernor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getL2BootloaderBytecodeHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getL2DefaultAccountBytecodeHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getL2SystemContractsUpgradeBatchNumber", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getL2SystemContractsUpgradeTxHash", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getName", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getPendingGovernor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPriorityQueueSize", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPriorityTxMaxGasLimit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProtocolVersion", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalBatchesCommitted", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalBatchesExecuted", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalBatchesVerified", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalPriorityTxs", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVerifier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVerifierParams", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isDiamondStorageFrozen", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isEthWithdrawalFinalized", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFacetFreezable", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFunctionFreezable", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2LogsRootHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2TransactionBaseCost", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "priorityQueueFrontOperation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveBatches", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveL1ToL2TransactionStatus", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveL2LogInclusion", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveL2MessageInclusion", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "requestL2Transaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "revertBatches", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPendingGovernor", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPorterAvailability", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPriorityTxMaxGasLimit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "storedBatchHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "unfreezeDiamond", + data: BytesLike + ): Result; +} + +export namespace BlockCommitEvent { + export type InputTuple = [ + batchNumber: BigNumberish, + batchHash: BytesLike, + commitment: BytesLike + ]; + export type OutputTuple = [ + batchNumber: bigint, + batchHash: string, + commitment: string + ]; + export interface OutputObject { + batchNumber: bigint; + batchHash: string; + commitment: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BlockExecutionEvent { + export type InputTuple = [ + batchNumber: BigNumberish, + batchHash: BytesLike, + commitment: BytesLike + ]; + export type OutputTuple = [ + batchNumber: bigint, + batchHash: string, + commitment: string + ]; + export interface OutputObject { + batchNumber: bigint; + batchHash: string; + commitment: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BlocksRevertEvent { + export type InputTuple = [ + totalBatchesCommitted: BigNumberish, + totalBatchesVerified: BigNumberish, + totalBatchesExecuted: BigNumberish + ]; + export type OutputTuple = [ + totalBatchesCommitted: bigint, + totalBatchesVerified: bigint, + totalBatchesExecuted: bigint + ]; + export interface OutputObject { + totalBatchesCommitted: bigint; + totalBatchesVerified: bigint; + totalBatchesExecuted: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BlocksVerificationEvent { + export type InputTuple = [ + previousLastVerifiedBatch: BigNumberish, + currentLastVerifiedBatch: BigNumberish + ]; + export type OutputTuple = [ + previousLastVerifiedBatch: bigint, + currentLastVerifiedBatch: bigint + ]; + export interface OutputObject { + previousLastVerifiedBatch: bigint; + currentLastVerifiedBatch: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace EthWithdrawalFinalizedEvent { + export type InputTuple = [to: AddressLike, amount: BigNumberish]; + export type OutputTuple = [to: string, amount: bigint]; + export interface OutputObject { + to: string; + amount: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ExecuteUpgradeEvent { + export type InputTuple = [diamondCut: Diamond.DiamondCutDataStruct]; + export type OutputTuple = [diamondCut: Diamond.DiamondCutDataStructOutput]; + export interface OutputObject { + diamondCut: Diamond.DiamondCutDataStructOutput; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace FreezeEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace IsPorterAvailableStatusUpdateEvent { + export type InputTuple = [isPorterAvailable: boolean]; + export type OutputTuple = [isPorterAvailable: boolean]; + export interface OutputObject { + isPorterAvailable: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewAdminEvent { + export type InputTuple = [oldAdmin: AddressLike, newAdmin: AddressLike]; + export type OutputTuple = [oldAdmin: string, newAdmin: string]; + export interface OutputObject { + oldAdmin: string; + newAdmin: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewGovernorEvent { + export type InputTuple = [oldGovernor: AddressLike, newGovernor: AddressLike]; + export type OutputTuple = [oldGovernor: string, newGovernor: string]; + export interface OutputObject { + oldGovernor: string; + newGovernor: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewPendingAdminEvent { + export type InputTuple = [ + oldPendingAdmin: AddressLike, + newPendingAdmin: AddressLike + ]; + export type OutputTuple = [oldPendingAdmin: string, newPendingAdmin: string]; + export interface OutputObject { + oldPendingAdmin: string; + newPendingAdmin: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewPendingGovernorEvent { + export type InputTuple = [ + oldPendingGovernor: AddressLike, + newPendingGovernor: AddressLike + ]; + export type OutputTuple = [ + oldPendingGovernor: string, + newPendingGovernor: string + ]; + export interface OutputObject { + oldPendingGovernor: string; + newPendingGovernor: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewPriorityRequestEvent { + export type InputTuple = [ + txId: BigNumberish, + txHash: BytesLike, + expirationTimestamp: BigNumberish, + transaction: IMailbox.L2CanonicalTransactionStruct, + factoryDeps: BytesLike[] + ]; + export type OutputTuple = [ + txId: bigint, + txHash: string, + expirationTimestamp: bigint, + transaction: IMailbox.L2CanonicalTransactionStructOutput, + factoryDeps: string[] + ]; + export interface OutputObject { + txId: bigint; + txHash: string; + expirationTimestamp: bigint; + transaction: IMailbox.L2CanonicalTransactionStructOutput; + factoryDeps: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewPriorityTxMaxGasLimitEvent { + export type InputTuple = [ + oldPriorityTxMaxGasLimit: BigNumberish, + newPriorityTxMaxGasLimit: BigNumberish + ]; + export type OutputTuple = [ + oldPriorityTxMaxGasLimit: bigint, + newPriorityTxMaxGasLimit: bigint + ]; + export interface OutputObject { + oldPriorityTxMaxGasLimit: bigint; + newPriorityTxMaxGasLimit: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace UnfreezeEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ValidatorStatusUpdateEvent { + export type InputTuple = [validatorAddress: AddressLike, isActive: boolean]; + export type OutputTuple = [validatorAddress: string, isActive: boolean]; + export interface OutputObject { + validatorAddress: string; + isActive: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IZkSync extends BaseContract { + connect(runner?: ContractRunner | null): IZkSync; + waitForDeployment(): Promise; + + interface: IZkSyncInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + acceptAdmin: TypedContractMethod<[], [void], "nonpayable">; + + acceptGovernor: TypedContractMethod<[], [void], "nonpayable">; + + commitBatches: TypedContractMethod< + [ + _lastCommittedBatchData: IExecutor.StoredBatchInfoStruct, + _newBatchesData: IExecutor.CommitBatchInfoStruct[] + ], + [void], + "nonpayable" + >; + + executeBatches: TypedContractMethod< + [_batchesData: IExecutor.StoredBatchInfoStruct[]], + [void], + "nonpayable" + >; + + executeUpgrade: TypedContractMethod< + [_diamondCut: Diamond.DiamondCutDataStruct], + [void], + "nonpayable" + >; + + facetAddress: TypedContractMethod<[_selector: BytesLike], [string], "view">; + + facetAddresses: TypedContractMethod<[], [string[]], "view">; + + facetFunctionSelectors: TypedContractMethod< + [_facet: AddressLike], + [string[]], + "view" + >; + + facets: TypedContractMethod<[], [IGetters.FacetStructOutput[]], "view">; + + finalizeEthWithdrawal: TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + freezeDiamond: TypedContractMethod<[], [void], "nonpayable">; + + getFirstUnprocessedPriorityTx: TypedContractMethod<[], [bigint], "view">; + + getGovernor: TypedContractMethod<[], [string], "view">; + + getL2BootloaderBytecodeHash: TypedContractMethod<[], [string], "view">; + + getL2DefaultAccountBytecodeHash: TypedContractMethod<[], [string], "view">; + + getL2SystemContractsUpgradeBatchNumber: TypedContractMethod< + [], + [bigint], + "view" + >; + + getL2SystemContractsUpgradeTxHash: TypedContractMethod<[], [string], "view">; + + getName: TypedContractMethod<[], [string], "view">; + + getPendingGovernor: TypedContractMethod<[], [string], "view">; + + getPriorityQueueSize: TypedContractMethod<[], [bigint], "view">; + + getPriorityTxMaxGasLimit: TypedContractMethod<[], [bigint], "view">; + + getProtocolVersion: TypedContractMethod<[], [bigint], "view">; + + getTotalBatchesCommitted: TypedContractMethod<[], [bigint], "view">; + + getTotalBatchesExecuted: TypedContractMethod<[], [bigint], "view">; + + getTotalBatchesVerified: TypedContractMethod<[], [bigint], "view">; + + getTotalPriorityTxs: TypedContractMethod<[], [bigint], "view">; + + getVerifier: TypedContractMethod<[], [string], "view">; + + getVerifierParams: TypedContractMethod< + [], + [VerifierParamsStructOutput], + "view" + >; + + isDiamondStorageFrozen: TypedContractMethod<[], [boolean], "view">; + + isEthWithdrawalFinalized: TypedContractMethod< + [_l2BatchNumber: BigNumberish, _l2MessageIndex: BigNumberish], + [boolean], + "view" + >; + + isFacetFreezable: TypedContractMethod< + [_facet: AddressLike], + [boolean], + "view" + >; + + isFunctionFreezable: TypedContractMethod< + [_selector: BytesLike], + [boolean], + "view" + >; + + isValidator: TypedContractMethod<[_address: AddressLike], [boolean], "view">; + + l2LogsRootHash: TypedContractMethod< + [_batchNumber: BigNumberish], + [string], + "view" + >; + + l2TransactionBaseCost: TypedContractMethod< + [ + _gasPrice: BigNumberish, + _l2GasLimit: BigNumberish, + _l2GasPerPubdataByteLimit: BigNumberish + ], + [bigint], + "view" + >; + + priorityQueueFrontOperation: TypedContractMethod< + [], + [PriorityOperationStructOutput], + "view" + >; + + proveBatches: TypedContractMethod< + [ + _prevBatch: IExecutor.StoredBatchInfoStruct, + _committedBatches: IExecutor.StoredBatchInfoStruct[], + _proof: IExecutor.ProofInputStruct + ], + [void], + "nonpayable" + >; + + proveL1ToL2TransactionStatus: TypedContractMethod< + [ + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[], + _status: BigNumberish + ], + [boolean], + "view" + >; + + proveL2LogInclusion: TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _index: BigNumberish, + _log: L2LogStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + + proveL2MessageInclusion: TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _index: BigNumberish, + _message: L2MessageStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + + requestL2Transaction: TypedContractMethod< + [ + _contractL2: AddressLike, + _l2Value: BigNumberish, + _calldata: BytesLike, + _l2GasLimit: BigNumberish, + _l2GasPerPubdataByteLimit: BigNumberish, + _factoryDeps: BytesLike[], + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + + revertBatches: TypedContractMethod< + [_newLastBatch: BigNumberish], + [void], + "nonpayable" + >; + + setPendingAdmin: TypedContractMethod< + [_newPendingAdmin: AddressLike], + [void], + "nonpayable" + >; + + setPendingGovernor: TypedContractMethod< + [_newPendingGovernor: AddressLike], + [void], + "nonpayable" + >; + + setPorterAvailability: TypedContractMethod< + [_zkPorterIsAvailable: boolean], + [void], + "nonpayable" + >; + + setPriorityTxMaxGasLimit: TypedContractMethod< + [_newPriorityTxMaxGasLimit: BigNumberish], + [void], + "nonpayable" + >; + + setValidator: TypedContractMethod< + [_validator: AddressLike, _active: boolean], + [void], + "nonpayable" + >; + + storedBatchHash: TypedContractMethod< + [_batchNumber: BigNumberish], + [string], + "view" + >; + + unfreezeDiamond: TypedContractMethod<[], [void], "nonpayable">; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "acceptAdmin" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "acceptGovernor" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "commitBatches" + ): TypedContractMethod< + [ + _lastCommittedBatchData: IExecutor.StoredBatchInfoStruct, + _newBatchesData: IExecutor.CommitBatchInfoStruct[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "executeBatches" + ): TypedContractMethod< + [_batchesData: IExecutor.StoredBatchInfoStruct[]], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "executeUpgrade" + ): TypedContractMethod< + [_diamondCut: Diamond.DiamondCutDataStruct], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "facetAddress" + ): TypedContractMethod<[_selector: BytesLike], [string], "view">; + getFunction( + nameOrSignature: "facetAddresses" + ): TypedContractMethod<[], [string[]], "view">; + getFunction( + nameOrSignature: "facetFunctionSelectors" + ): TypedContractMethod<[_facet: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "facets" + ): TypedContractMethod<[], [IGetters.FacetStructOutput[]], "view">; + getFunction( + nameOrSignature: "finalizeEthWithdrawal" + ): TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "freezeDiamond" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "getFirstUnprocessedPriorityTx" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getGovernor" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getL2BootloaderBytecodeHash" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getL2DefaultAccountBytecodeHash" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getL2SystemContractsUpgradeBatchNumber" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getL2SystemContractsUpgradeTxHash" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getName" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getPendingGovernor" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getPriorityQueueSize" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getPriorityTxMaxGasLimit" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getProtocolVersion" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getTotalBatchesCommitted" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getTotalBatchesExecuted" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getTotalBatchesVerified" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getTotalPriorityTxs" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getVerifier" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getVerifierParams" + ): TypedContractMethod<[], [VerifierParamsStructOutput], "view">; + getFunction( + nameOrSignature: "isDiamondStorageFrozen" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "isEthWithdrawalFinalized" + ): TypedContractMethod< + [_l2BatchNumber: BigNumberish, _l2MessageIndex: BigNumberish], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "isFacetFreezable" + ): TypedContractMethod<[_facet: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isFunctionFreezable" + ): TypedContractMethod<[_selector: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "isValidator" + ): TypedContractMethod<[_address: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "l2LogsRootHash" + ): TypedContractMethod<[_batchNumber: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "l2TransactionBaseCost" + ): TypedContractMethod< + [ + _gasPrice: BigNumberish, + _l2GasLimit: BigNumberish, + _l2GasPerPubdataByteLimit: BigNumberish + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "priorityQueueFrontOperation" + ): TypedContractMethod<[], [PriorityOperationStructOutput], "view">; + getFunction( + nameOrSignature: "proveBatches" + ): TypedContractMethod< + [ + _prevBatch: IExecutor.StoredBatchInfoStruct, + _committedBatches: IExecutor.StoredBatchInfoStruct[], + _proof: IExecutor.ProofInputStruct + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "proveL1ToL2TransactionStatus" + ): TypedContractMethod< + [ + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[], + _status: BigNumberish + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "proveL2LogInclusion" + ): TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _index: BigNumberish, + _log: L2LogStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "proveL2MessageInclusion" + ): TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _index: BigNumberish, + _message: L2MessageStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "requestL2Transaction" + ): TypedContractMethod< + [ + _contractL2: AddressLike, + _l2Value: BigNumberish, + _calldata: BytesLike, + _l2GasLimit: BigNumberish, + _l2GasPerPubdataByteLimit: BigNumberish, + _factoryDeps: BytesLike[], + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "revertBatches" + ): TypedContractMethod<[_newLastBatch: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setPendingAdmin" + ): TypedContractMethod<[_newPendingAdmin: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setPendingGovernor" + ): TypedContractMethod< + [_newPendingGovernor: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setPorterAvailability" + ): TypedContractMethod<[_zkPorterIsAvailable: boolean], [void], "nonpayable">; + getFunction( + nameOrSignature: "setPriorityTxMaxGasLimit" + ): TypedContractMethod< + [_newPriorityTxMaxGasLimit: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setValidator" + ): TypedContractMethod< + [_validator: AddressLike, _active: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "storedBatchHash" + ): TypedContractMethod<[_batchNumber: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "unfreezeDiamond" + ): TypedContractMethod<[], [void], "nonpayable">; + + getEvent( + key: "BlockCommit" + ): TypedContractEvent< + BlockCommitEvent.InputTuple, + BlockCommitEvent.OutputTuple, + BlockCommitEvent.OutputObject + >; + getEvent( + key: "BlockExecution" + ): TypedContractEvent< + BlockExecutionEvent.InputTuple, + BlockExecutionEvent.OutputTuple, + BlockExecutionEvent.OutputObject + >; + getEvent( + key: "BlocksRevert" + ): TypedContractEvent< + BlocksRevertEvent.InputTuple, + BlocksRevertEvent.OutputTuple, + BlocksRevertEvent.OutputObject + >; + getEvent( + key: "BlocksVerification" + ): TypedContractEvent< + BlocksVerificationEvent.InputTuple, + BlocksVerificationEvent.OutputTuple, + BlocksVerificationEvent.OutputObject + >; + getEvent( + key: "EthWithdrawalFinalized" + ): TypedContractEvent< + EthWithdrawalFinalizedEvent.InputTuple, + EthWithdrawalFinalizedEvent.OutputTuple, + EthWithdrawalFinalizedEvent.OutputObject + >; + getEvent( + key: "ExecuteUpgrade" + ): TypedContractEvent< + ExecuteUpgradeEvent.InputTuple, + ExecuteUpgradeEvent.OutputTuple, + ExecuteUpgradeEvent.OutputObject + >; + getEvent( + key: "Freeze" + ): TypedContractEvent< + FreezeEvent.InputTuple, + FreezeEvent.OutputTuple, + FreezeEvent.OutputObject + >; + getEvent( + key: "IsPorterAvailableStatusUpdate" + ): TypedContractEvent< + IsPorterAvailableStatusUpdateEvent.InputTuple, + IsPorterAvailableStatusUpdateEvent.OutputTuple, + IsPorterAvailableStatusUpdateEvent.OutputObject + >; + getEvent( + key: "NewAdmin" + ): TypedContractEvent< + NewAdminEvent.InputTuple, + NewAdminEvent.OutputTuple, + NewAdminEvent.OutputObject + >; + getEvent( + key: "NewGovernor" + ): TypedContractEvent< + NewGovernorEvent.InputTuple, + NewGovernorEvent.OutputTuple, + NewGovernorEvent.OutputObject + >; + getEvent( + key: "NewPendingAdmin" + ): TypedContractEvent< + NewPendingAdminEvent.InputTuple, + NewPendingAdminEvent.OutputTuple, + NewPendingAdminEvent.OutputObject + >; + getEvent( + key: "NewPendingGovernor" + ): TypedContractEvent< + NewPendingGovernorEvent.InputTuple, + NewPendingGovernorEvent.OutputTuple, + NewPendingGovernorEvent.OutputObject + >; + getEvent( + key: "NewPriorityRequest" + ): TypedContractEvent< + NewPriorityRequestEvent.InputTuple, + NewPriorityRequestEvent.OutputTuple, + NewPriorityRequestEvent.OutputObject + >; + getEvent( + key: "NewPriorityTxMaxGasLimit" + ): TypedContractEvent< + NewPriorityTxMaxGasLimitEvent.InputTuple, + NewPriorityTxMaxGasLimitEvent.OutputTuple, + NewPriorityTxMaxGasLimitEvent.OutputObject + >; + getEvent( + key: "Unfreeze" + ): TypedContractEvent< + UnfreezeEvent.InputTuple, + UnfreezeEvent.OutputTuple, + UnfreezeEvent.OutputObject + >; + getEvent( + key: "ValidatorStatusUpdate" + ): TypedContractEvent< + ValidatorStatusUpdateEvent.InputTuple, + ValidatorStatusUpdateEvent.OutputTuple, + ValidatorStatusUpdateEvent.OutputObject + >; + + filters: { + "BlockCommit(uint256,bytes32,bytes32)": TypedContractEvent< + BlockCommitEvent.InputTuple, + BlockCommitEvent.OutputTuple, + BlockCommitEvent.OutputObject + >; + BlockCommit: TypedContractEvent< + BlockCommitEvent.InputTuple, + BlockCommitEvent.OutputTuple, + BlockCommitEvent.OutputObject + >; + + "BlockExecution(uint256,bytes32,bytes32)": TypedContractEvent< + BlockExecutionEvent.InputTuple, + BlockExecutionEvent.OutputTuple, + BlockExecutionEvent.OutputObject + >; + BlockExecution: TypedContractEvent< + BlockExecutionEvent.InputTuple, + BlockExecutionEvent.OutputTuple, + BlockExecutionEvent.OutputObject + >; + + "BlocksRevert(uint256,uint256,uint256)": TypedContractEvent< + BlocksRevertEvent.InputTuple, + BlocksRevertEvent.OutputTuple, + BlocksRevertEvent.OutputObject + >; + BlocksRevert: TypedContractEvent< + BlocksRevertEvent.InputTuple, + BlocksRevertEvent.OutputTuple, + BlocksRevertEvent.OutputObject + >; + + "BlocksVerification(uint256,uint256)": TypedContractEvent< + BlocksVerificationEvent.InputTuple, + BlocksVerificationEvent.OutputTuple, + BlocksVerificationEvent.OutputObject + >; + BlocksVerification: TypedContractEvent< + BlocksVerificationEvent.InputTuple, + BlocksVerificationEvent.OutputTuple, + BlocksVerificationEvent.OutputObject + >; + + "EthWithdrawalFinalized(address,uint256)": TypedContractEvent< + EthWithdrawalFinalizedEvent.InputTuple, + EthWithdrawalFinalizedEvent.OutputTuple, + EthWithdrawalFinalizedEvent.OutputObject + >; + EthWithdrawalFinalized: TypedContractEvent< + EthWithdrawalFinalizedEvent.InputTuple, + EthWithdrawalFinalizedEvent.OutputTuple, + EthWithdrawalFinalizedEvent.OutputObject + >; + + "ExecuteUpgrade(tuple)": TypedContractEvent< + ExecuteUpgradeEvent.InputTuple, + ExecuteUpgradeEvent.OutputTuple, + ExecuteUpgradeEvent.OutputObject + >; + ExecuteUpgrade: TypedContractEvent< + ExecuteUpgradeEvent.InputTuple, + ExecuteUpgradeEvent.OutputTuple, + ExecuteUpgradeEvent.OutputObject + >; + + "Freeze()": TypedContractEvent< + FreezeEvent.InputTuple, + FreezeEvent.OutputTuple, + FreezeEvent.OutputObject + >; + Freeze: TypedContractEvent< + FreezeEvent.InputTuple, + FreezeEvent.OutputTuple, + FreezeEvent.OutputObject + >; + + "IsPorterAvailableStatusUpdate(bool)": TypedContractEvent< + IsPorterAvailableStatusUpdateEvent.InputTuple, + IsPorterAvailableStatusUpdateEvent.OutputTuple, + IsPorterAvailableStatusUpdateEvent.OutputObject + >; + IsPorterAvailableStatusUpdate: TypedContractEvent< + IsPorterAvailableStatusUpdateEvent.InputTuple, + IsPorterAvailableStatusUpdateEvent.OutputTuple, + IsPorterAvailableStatusUpdateEvent.OutputObject + >; + + "NewAdmin(address,address)": TypedContractEvent< + NewAdminEvent.InputTuple, + NewAdminEvent.OutputTuple, + NewAdminEvent.OutputObject + >; + NewAdmin: TypedContractEvent< + NewAdminEvent.InputTuple, + NewAdminEvent.OutputTuple, + NewAdminEvent.OutputObject + >; + + "NewGovernor(address,address)": TypedContractEvent< + NewGovernorEvent.InputTuple, + NewGovernorEvent.OutputTuple, + NewGovernorEvent.OutputObject + >; + NewGovernor: TypedContractEvent< + NewGovernorEvent.InputTuple, + NewGovernorEvent.OutputTuple, + NewGovernorEvent.OutputObject + >; + + "NewPendingAdmin(address,address)": TypedContractEvent< + NewPendingAdminEvent.InputTuple, + NewPendingAdminEvent.OutputTuple, + NewPendingAdminEvent.OutputObject + >; + NewPendingAdmin: TypedContractEvent< + NewPendingAdminEvent.InputTuple, + NewPendingAdminEvent.OutputTuple, + NewPendingAdminEvent.OutputObject + >; + + "NewPendingGovernor(address,address)": TypedContractEvent< + NewPendingGovernorEvent.InputTuple, + NewPendingGovernorEvent.OutputTuple, + NewPendingGovernorEvent.OutputObject + >; + NewPendingGovernor: TypedContractEvent< + NewPendingGovernorEvent.InputTuple, + NewPendingGovernorEvent.OutputTuple, + NewPendingGovernorEvent.OutputObject + >; + + "NewPriorityRequest(uint256,bytes32,uint64,tuple,bytes[])": TypedContractEvent< + NewPriorityRequestEvent.InputTuple, + NewPriorityRequestEvent.OutputTuple, + NewPriorityRequestEvent.OutputObject + >; + NewPriorityRequest: TypedContractEvent< + NewPriorityRequestEvent.InputTuple, + NewPriorityRequestEvent.OutputTuple, + NewPriorityRequestEvent.OutputObject + >; + + "NewPriorityTxMaxGasLimit(uint256,uint256)": TypedContractEvent< + NewPriorityTxMaxGasLimitEvent.InputTuple, + NewPriorityTxMaxGasLimitEvent.OutputTuple, + NewPriorityTxMaxGasLimitEvent.OutputObject + >; + NewPriorityTxMaxGasLimit: TypedContractEvent< + NewPriorityTxMaxGasLimitEvent.InputTuple, + NewPriorityTxMaxGasLimitEvent.OutputTuple, + NewPriorityTxMaxGasLimitEvent.OutputObject + >; + + "Unfreeze()": TypedContractEvent< + UnfreezeEvent.InputTuple, + UnfreezeEvent.OutputTuple, + UnfreezeEvent.OutputObject + >; + Unfreeze: TypedContractEvent< + UnfreezeEvent.InputTuple, + UnfreezeEvent.OutputTuple, + UnfreezeEvent.OutputObject + >; + + "ValidatorStatusUpdate(address,bool)": TypedContractEvent< + ValidatorStatusUpdateEvent.InputTuple, + ValidatorStatusUpdateEvent.OutputTuple, + ValidatorStatusUpdateEvent.OutputObject + >; + ValidatorStatusUpdate: TypedContractEvent< + ValidatorStatusUpdateEvent.InputTuple, + ValidatorStatusUpdateEvent.OutputTuple, + ValidatorStatusUpdateEvent.OutputObject + >; + }; +} diff --git a/typechain/IZkSyncHyperchain.ts b/typechain/IZkSyncHyperchain.ts new file mode 100644 index 00000000..6c605078 --- /dev/null +++ b/typechain/IZkSyncHyperchain.ts @@ -0,0 +1,2322 @@ +/* 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 type FeeParamsStruct = { + pubdataPricingMode: BigNumberish; + batchOverheadL1Gas: BigNumberish; + maxPubdataPerBatch: BigNumberish; + maxL2GasPerBatch: BigNumberish; + priorityTxMaxPubdata: BigNumberish; + minimalL2GasPrice: BigNumberish; +}; + +export type FeeParamsStructOutput = [ + pubdataPricingMode: bigint, + batchOverheadL1Gas: bigint, + maxPubdataPerBatch: bigint, + maxL2GasPerBatch: bigint, + priorityTxMaxPubdata: bigint, + minimalL2GasPrice: bigint +] & { + pubdataPricingMode: bigint; + batchOverheadL1Gas: bigint; + maxPubdataPerBatch: bigint; + maxL2GasPerBatch: bigint; + priorityTxMaxPubdata: bigint; + minimalL2GasPrice: bigint; +}; + +export type L2CanonicalTransactionStruct = { + txType: BigNumberish; + from: BigNumberish; + to: BigNumberish; + gasLimit: BigNumberish; + gasPerPubdataByteLimit: BigNumberish; + maxFeePerGas: BigNumberish; + maxPriorityFeePerGas: BigNumberish; + paymaster: BigNumberish; + nonce: BigNumberish; + value: BigNumberish; + reserved: [BigNumberish, BigNumberish, BigNumberish, BigNumberish]; + data: BytesLike; + signature: BytesLike; + factoryDeps: BigNumberish[]; + paymasterInput: BytesLike; + reservedDynamic: BytesLike; +}; + +export type L2CanonicalTransactionStructOutput = [ + txType: bigint, + from: bigint, + to: bigint, + gasLimit: bigint, + gasPerPubdataByteLimit: bigint, + maxFeePerGas: bigint, + maxPriorityFeePerGas: bigint, + paymaster: bigint, + nonce: bigint, + value: bigint, + reserved: [bigint, bigint, bigint, bigint], + data: string, + signature: string, + factoryDeps: bigint[], + paymasterInput: string, + reservedDynamic: string +] & { + txType: bigint; + from: bigint; + to: bigint; + gasLimit: bigint; + gasPerPubdataByteLimit: bigint; + maxFeePerGas: bigint; + maxPriorityFeePerGas: bigint; + paymaster: bigint; + nonce: bigint; + value: bigint; + reserved: [bigint, bigint, bigint, bigint]; + data: string; + signature: string; + factoryDeps: bigint[]; + paymasterInput: string; + reservedDynamic: string; +}; + +export type BridgehubL2TransactionRequestStruct = { + sender: AddressLike; + contractL2: AddressLike; + mintValue: BigNumberish; + l2Value: BigNumberish; + l2Calldata: BytesLike; + l2GasLimit: BigNumberish; + l2GasPerPubdataByteLimit: BigNumberish; + factoryDeps: BytesLike[]; + refundRecipient: AddressLike; +}; + +export type BridgehubL2TransactionRequestStructOutput = [ + sender: string, + contractL2: string, + mintValue: bigint, + l2Value: bigint, + l2Calldata: string, + l2GasLimit: bigint, + l2GasPerPubdataByteLimit: bigint, + factoryDeps: string[], + refundRecipient: string +] & { + sender: string; + contractL2: string; + mintValue: bigint; + l2Value: bigint; + l2Calldata: string; + l2GasLimit: bigint; + l2GasPerPubdataByteLimit: bigint; + factoryDeps: string[]; + refundRecipient: string; +}; + +export type VerifierParamsStruct = { + recursionNodeLevelVkHash: BytesLike; + recursionLeafLevelVkHash: BytesLike; + recursionCircuitsSetVksHash: BytesLike; +}; + +export type VerifierParamsStructOutput = [ + recursionNodeLevelVkHash: string, + recursionLeafLevelVkHash: string, + recursionCircuitsSetVksHash: string +] & { + recursionNodeLevelVkHash: string; + recursionLeafLevelVkHash: string; + recursionCircuitsSetVksHash: string; +}; + +export type PriorityOperationStruct = { + canonicalTxHash: BytesLike; + expirationTimestamp: BigNumberish; + layer2Tip: BigNumberish; +}; + +export type PriorityOperationStructOutput = [ + canonicalTxHash: string, + expirationTimestamp: bigint, + layer2Tip: bigint +] & { canonicalTxHash: string; expirationTimestamp: bigint; layer2Tip: bigint }; + +export type L2LogStruct = { + l2ShardId: BigNumberish; + isService: boolean; + txNumberInBatch: BigNumberish; + sender: AddressLike; + key: BytesLike; + value: BytesLike; +}; + +export type L2LogStructOutput = [ + l2ShardId: bigint, + isService: boolean, + txNumberInBatch: bigint, + sender: string, + key: string, + value: string +] & { + l2ShardId: bigint; + isService: boolean; + txNumberInBatch: bigint; + sender: string; + key: string; + value: string; +}; + +export type L2MessageStruct = { + txNumberInBatch: BigNumberish; + sender: AddressLike; + data: BytesLike; +}; + +export type L2MessageStructOutput = [ + txNumberInBatch: bigint, + sender: string, + data: string +] & { txNumberInBatch: bigint; sender: string; data: string }; + +export declare namespace Diamond { + export type FacetCutStruct = { + facet: AddressLike; + action: BigNumberish; + isFreezable: boolean; + selectors: BytesLike[]; + }; + + export type FacetCutStructOutput = [ + facet: string, + action: bigint, + isFreezable: boolean, + selectors: string[] + ] & { + facet: string; + action: bigint; + isFreezable: boolean; + selectors: string[]; + }; + + export type DiamondCutDataStruct = { + facetCuts: Diamond.FacetCutStruct[]; + initAddress: AddressLike; + initCalldata: BytesLike; + }; + + export type DiamondCutDataStructOutput = [ + facetCuts: Diamond.FacetCutStructOutput[], + initAddress: string, + initCalldata: string + ] & { + facetCuts: Diamond.FacetCutStructOutput[]; + initAddress: string; + initCalldata: string; + }; +} + +export declare namespace IExecutor { + export type StoredBatchInfoStruct = { + batchNumber: BigNumberish; + batchHash: BytesLike; + indexRepeatedStorageChanges: BigNumberish; + numberOfLayer1Txs: BigNumberish; + priorityOperationsHash: BytesLike; + l2LogsTreeRoot: BytesLike; + timestamp: BigNumberish; + commitment: BytesLike; + }; + + export type StoredBatchInfoStructOutput = [ + batchNumber: bigint, + batchHash: string, + indexRepeatedStorageChanges: bigint, + numberOfLayer1Txs: bigint, + priorityOperationsHash: string, + l2LogsTreeRoot: string, + timestamp: bigint, + commitment: string + ] & { + batchNumber: bigint; + batchHash: string; + indexRepeatedStorageChanges: bigint; + numberOfLayer1Txs: bigint; + priorityOperationsHash: string; + l2LogsTreeRoot: string; + timestamp: bigint; + commitment: string; + }; + + export type CommitBatchInfoStruct = { + batchNumber: BigNumberish; + timestamp: BigNumberish; + indexRepeatedStorageChanges: BigNumberish; + newStateRoot: BytesLike; + numberOfLayer1Txs: BigNumberish; + priorityOperationsHash: BytesLike; + bootloaderHeapInitialContentsHash: BytesLike; + eventsQueueStateHash: BytesLike; + systemLogs: BytesLike; + pubdataCommitments: BytesLike; + }; + + export type CommitBatchInfoStructOutput = [ + batchNumber: bigint, + timestamp: bigint, + indexRepeatedStorageChanges: bigint, + newStateRoot: string, + numberOfLayer1Txs: bigint, + priorityOperationsHash: string, + bootloaderHeapInitialContentsHash: string, + eventsQueueStateHash: string, + systemLogs: string, + pubdataCommitments: string + ] & { + batchNumber: bigint; + timestamp: bigint; + indexRepeatedStorageChanges: bigint; + newStateRoot: string; + numberOfLayer1Txs: bigint; + priorityOperationsHash: string; + bootloaderHeapInitialContentsHash: string; + eventsQueueStateHash: string; + systemLogs: string; + pubdataCommitments: string; + }; + + export type ProofInputStruct = { + recursiveAggregationInput: BigNumberish[]; + serializedProof: BigNumberish[]; + }; + + export type ProofInputStructOutput = [ + recursiveAggregationInput: bigint[], + serializedProof: bigint[] + ] & { recursiveAggregationInput: bigint[]; serializedProof: bigint[] }; +} + +export declare namespace IGetters { + export type FacetStruct = { addr: AddressLike; selectors: BytesLike[] }; + + export type FacetStructOutput = [addr: string, selectors: string[]] & { + addr: string; + selectors: string[]; + }; +} + +export interface IZkSyncHyperchainInterface extends Interface { + getFunction( + nameOrSignature: + | "acceptAdmin" + | "baseTokenGasPriceMultiplierDenominator" + | "baseTokenGasPriceMultiplierNominator" + | "bridgehubRequestL2Transaction" + | "changeFeeParams" + | "commitBatches" + | "commitBatchesSharedBridge" + | "executeBatches" + | "executeBatchesSharedBridge" + | "executeUpgrade" + | "facetAddress" + | "facetAddresses" + | "facetFunctionSelectors" + | "facets" + | "finalizeEthWithdrawal" + | "freezeDiamond" + | "getAdmin" + | "getBaseToken" + | "getBaseTokenBridge" + | "getBridgehub" + | "getFirstUnprocessedPriorityTx" + | "getL2BootloaderBytecodeHash" + | "getL2DefaultAccountBytecodeHash" + | "getL2SystemContractsUpgradeBatchNumber" + | "getL2SystemContractsUpgradeTxHash" + | "getName" + | "getPendingAdmin" + | "getPriorityQueueSize" + | "getPriorityTxMaxGasLimit" + | "getProtocolVersion" + | "getPubdataPricingMode" + | "getSemverProtocolVersion" + | "getStateTransitionManager" + | "getTotalBatchesCommitted" + | "getTotalBatchesExecuted" + | "getTotalBatchesVerified" + | "getTotalPriorityTxs" + | "getVerifier" + | "getVerifierParams" + | "isDiamondStorageFrozen" + | "isEthWithdrawalFinalized" + | "isFacetFreezable" + | "isFunctionFreezable" + | "isValidator" + | "l2LogsRootHash" + | "l2TransactionBaseCost" + | "priorityQueueFrontOperation" + | "proveBatches" + | "proveBatchesSharedBridge" + | "proveL1ToL2TransactionStatus" + | "proveL2LogInclusion" + | "proveL2MessageInclusion" + | "requestL2Transaction" + | "revertBatches" + | "revertBatchesSharedBridge" + | "setPendingAdmin" + | "setPorterAvailability" + | "setPriorityTxMaxGasLimit" + | "setPubdataPricingMode" + | "setTokenMultiplier" + | "setTransactionFilterer" + | "setValidator" + | "storedBatchHash" + | "transferEthToSharedBridge" + | "unfreezeDiamond" + | "upgradeChainFromVersion" + ): FunctionFragment; + + getEvent( + nameOrSignatureOrTopic: + | "BlockCommit" + | "BlockExecution" + | "BlocksRevert" + | "BlocksVerification" + | "ExecuteUpgrade" + | "Freeze" + | "IsPorterAvailableStatusUpdate" + | "NewAdmin" + | "NewBaseTokenMultiplier" + | "NewFeeParams" + | "NewPendingAdmin" + | "NewPriorityRequest" + | "NewPriorityTxMaxGasLimit" + | "NewTransactionFilterer" + | "ProposeTransparentUpgrade" + | "Unfreeze" + | "ValidatorStatusUpdate" + | "ValidiumModeStatusUpdate" + ): EventFragment; + + encodeFunctionData( + functionFragment: "acceptAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "baseTokenGasPriceMultiplierDenominator", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "baseTokenGasPriceMultiplierNominator", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "bridgehubRequestL2Transaction", + values: [BridgehubL2TransactionRequestStruct] + ): string; + encodeFunctionData( + functionFragment: "changeFeeParams", + values: [FeeParamsStruct] + ): string; + encodeFunctionData( + functionFragment: "commitBatches", + values: [IExecutor.StoredBatchInfoStruct, IExecutor.CommitBatchInfoStruct[]] + ): string; + encodeFunctionData( + functionFragment: "commitBatchesSharedBridge", + values: [ + BigNumberish, + IExecutor.StoredBatchInfoStruct, + IExecutor.CommitBatchInfoStruct[] + ] + ): string; + encodeFunctionData( + functionFragment: "executeBatches", + values: [IExecutor.StoredBatchInfoStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeBatchesSharedBridge", + values: [BigNumberish, IExecutor.StoredBatchInfoStruct[]] + ): string; + encodeFunctionData( + functionFragment: "executeUpgrade", + values: [Diamond.DiamondCutDataStruct] + ): string; + encodeFunctionData( + functionFragment: "facetAddress", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "facetAddresses", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "facetFunctionSelectors", + values: [AddressLike] + ): string; + encodeFunctionData(functionFragment: "facets", values?: undefined): string; + encodeFunctionData( + functionFragment: "finalizeEthWithdrawal", + values: [BigNumberish, BigNumberish, BigNumberish, BytesLike, BytesLike[]] + ): string; + encodeFunctionData( + functionFragment: "freezeDiamond", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "getAdmin", values?: undefined): string; + encodeFunctionData( + functionFragment: "getBaseToken", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getBaseTokenBridge", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getBridgehub", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getFirstUnprocessedPriorityTx", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getL2BootloaderBytecodeHash", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getL2DefaultAccountBytecodeHash", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getL2SystemContractsUpgradeBatchNumber", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getL2SystemContractsUpgradeTxHash", + values?: undefined + ): string; + encodeFunctionData(functionFragment: "getName", values?: undefined): string; + encodeFunctionData( + functionFragment: "getPendingAdmin", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getPriorityQueueSize", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getPriorityTxMaxGasLimit", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getProtocolVersion", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getPubdataPricingMode", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getSemverProtocolVersion", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getStateTransitionManager", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTotalBatchesCommitted", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTotalBatchesExecuted", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTotalBatchesVerified", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getTotalPriorityTxs", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getVerifier", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "getVerifierParams", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isDiamondStorageFrozen", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "isEthWithdrawalFinalized", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "isFacetFreezable", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "isFunctionFreezable", + values: [BytesLike] + ): string; + encodeFunctionData( + functionFragment: "isValidator", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "l2LogsRootHash", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "l2TransactionBaseCost", + values: [BigNumberish, BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "priorityQueueFrontOperation", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "proveBatches", + values: [ + IExecutor.StoredBatchInfoStruct, + IExecutor.StoredBatchInfoStruct[], + IExecutor.ProofInputStruct + ] + ): string; + encodeFunctionData( + functionFragment: "proveBatchesSharedBridge", + values: [ + BigNumberish, + IExecutor.StoredBatchInfoStruct, + IExecutor.StoredBatchInfoStruct[], + IExecutor.ProofInputStruct + ] + ): string; + encodeFunctionData( + functionFragment: "proveL1ToL2TransactionStatus", + values: [ + BytesLike, + BigNumberish, + BigNumberish, + BigNumberish, + BytesLike[], + BigNumberish + ] + ): string; + encodeFunctionData( + functionFragment: "proveL2LogInclusion", + values: [BigNumberish, BigNumberish, L2LogStruct, BytesLike[]] + ): string; + encodeFunctionData( + functionFragment: "proveL2MessageInclusion", + values: [BigNumberish, BigNumberish, L2MessageStruct, BytesLike[]] + ): string; + encodeFunctionData( + functionFragment: "requestL2Transaction", + values: [ + AddressLike, + BigNumberish, + BytesLike, + BigNumberish, + BigNumberish, + BytesLike[], + AddressLike + ] + ): string; + encodeFunctionData( + functionFragment: "revertBatches", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "revertBatchesSharedBridge", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPendingAdmin", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setPorterAvailability", + values: [boolean] + ): string; + encodeFunctionData( + functionFragment: "setPriorityTxMaxGasLimit", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setPubdataPricingMode", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setTokenMultiplier", + values: [BigNumberish, BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "setTransactionFilterer", + values: [AddressLike] + ): string; + encodeFunctionData( + functionFragment: "setValidator", + values: [AddressLike, boolean] + ): string; + encodeFunctionData( + functionFragment: "storedBatchHash", + values: [BigNumberish] + ): string; + encodeFunctionData( + functionFragment: "transferEthToSharedBridge", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "unfreezeDiamond", + values?: undefined + ): string; + encodeFunctionData( + functionFragment: "upgradeChainFromVersion", + values: [BigNumberish, Diamond.DiamondCutDataStruct] + ): string; + + decodeFunctionResult( + functionFragment: "acceptAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "baseTokenGasPriceMultiplierDenominator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "baseTokenGasPriceMultiplierNominator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "bridgehubRequestL2Transaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "changeFeeParams", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "commitBatches", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "commitBatchesSharedBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeBatches", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeBatchesSharedBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "executeUpgrade", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "facetAddress", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "facetAddresses", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "facetFunctionSelectors", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "facets", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "finalizeEthWithdrawal", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "freezeDiamond", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getAdmin", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getBaseToken", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBaseTokenBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getBridgehub", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getFirstUnprocessedPriorityTx", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getL2BootloaderBytecodeHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getL2DefaultAccountBytecodeHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getL2SystemContractsUpgradeBatchNumber", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getL2SystemContractsUpgradeTxHash", + data: BytesLike + ): Result; + decodeFunctionResult(functionFragment: "getName", data: BytesLike): Result; + decodeFunctionResult( + functionFragment: "getPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPriorityQueueSize", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPriorityTxMaxGasLimit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getProtocolVersion", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getPubdataPricingMode", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getSemverProtocolVersion", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getStateTransitionManager", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalBatchesCommitted", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalBatchesExecuted", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalBatchesVerified", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getTotalPriorityTxs", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVerifier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "getVerifierParams", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isDiamondStorageFrozen", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isEthWithdrawalFinalized", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFacetFreezable", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isFunctionFreezable", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "isValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2LogsRootHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "l2TransactionBaseCost", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "priorityQueueFrontOperation", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveBatches", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveBatchesSharedBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveL1ToL2TransactionStatus", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveL2LogInclusion", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "proveL2MessageInclusion", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "requestL2Transaction", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "revertBatches", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "revertBatchesSharedBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPendingAdmin", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPorterAvailability", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPriorityTxMaxGasLimit", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setPubdataPricingMode", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setTokenMultiplier", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setTransactionFilterer", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "setValidator", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "storedBatchHash", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "transferEthToSharedBridge", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "unfreezeDiamond", + data: BytesLike + ): Result; + decodeFunctionResult( + functionFragment: "upgradeChainFromVersion", + data: BytesLike + ): Result; +} + +export namespace BlockCommitEvent { + export type InputTuple = [ + batchNumber: BigNumberish, + batchHash: BytesLike, + commitment: BytesLike + ]; + export type OutputTuple = [ + batchNumber: bigint, + batchHash: string, + commitment: string + ]; + export interface OutputObject { + batchNumber: bigint; + batchHash: string; + commitment: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BlockExecutionEvent { + export type InputTuple = [ + batchNumber: BigNumberish, + batchHash: BytesLike, + commitment: BytesLike + ]; + export type OutputTuple = [ + batchNumber: bigint, + batchHash: string, + commitment: string + ]; + export interface OutputObject { + batchNumber: bigint; + batchHash: string; + commitment: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BlocksRevertEvent { + export type InputTuple = [ + totalBatchesCommitted: BigNumberish, + totalBatchesVerified: BigNumberish, + totalBatchesExecuted: BigNumberish + ]; + export type OutputTuple = [ + totalBatchesCommitted: bigint, + totalBatchesVerified: bigint, + totalBatchesExecuted: bigint + ]; + export interface OutputObject { + totalBatchesCommitted: bigint; + totalBatchesVerified: bigint; + totalBatchesExecuted: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace BlocksVerificationEvent { + export type InputTuple = [ + previousLastVerifiedBatch: BigNumberish, + currentLastVerifiedBatch: BigNumberish + ]; + export type OutputTuple = [ + previousLastVerifiedBatch: bigint, + currentLastVerifiedBatch: bigint + ]; + export interface OutputObject { + previousLastVerifiedBatch: bigint; + currentLastVerifiedBatch: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ExecuteUpgradeEvent { + export type InputTuple = [diamondCut: Diamond.DiamondCutDataStruct]; + export type OutputTuple = [diamondCut: Diamond.DiamondCutDataStructOutput]; + export interface OutputObject { + diamondCut: Diamond.DiamondCutDataStructOutput; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace FreezeEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace IsPorterAvailableStatusUpdateEvent { + export type InputTuple = [isPorterAvailable: boolean]; + export type OutputTuple = [isPorterAvailable: boolean]; + export interface OutputObject { + isPorterAvailable: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewAdminEvent { + export type InputTuple = [oldAdmin: AddressLike, newAdmin: AddressLike]; + export type OutputTuple = [oldAdmin: string, newAdmin: string]; + export interface OutputObject { + oldAdmin: string; + newAdmin: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewBaseTokenMultiplierEvent { + export type InputTuple = [ + oldNominator: BigNumberish, + oldDenominator: BigNumberish, + newNominator: BigNumberish, + newDenominator: BigNumberish + ]; + export type OutputTuple = [ + oldNominator: bigint, + oldDenominator: bigint, + newNominator: bigint, + newDenominator: bigint + ]; + export interface OutputObject { + oldNominator: bigint; + oldDenominator: bigint; + newNominator: bigint; + newDenominator: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewFeeParamsEvent { + export type InputTuple = [ + oldFeeParams: FeeParamsStruct, + newFeeParams: FeeParamsStruct + ]; + export type OutputTuple = [ + oldFeeParams: FeeParamsStructOutput, + newFeeParams: FeeParamsStructOutput + ]; + export interface OutputObject { + oldFeeParams: FeeParamsStructOutput; + newFeeParams: FeeParamsStructOutput; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewPendingAdminEvent { + export type InputTuple = [ + oldPendingAdmin: AddressLike, + newPendingAdmin: AddressLike + ]; + export type OutputTuple = [oldPendingAdmin: string, newPendingAdmin: string]; + export interface OutputObject { + oldPendingAdmin: string; + newPendingAdmin: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewPriorityRequestEvent { + export type InputTuple = [ + txId: BigNumberish, + txHash: BytesLike, + expirationTimestamp: BigNumberish, + transaction: L2CanonicalTransactionStruct, + factoryDeps: BytesLike[] + ]; + export type OutputTuple = [ + txId: bigint, + txHash: string, + expirationTimestamp: bigint, + transaction: L2CanonicalTransactionStructOutput, + factoryDeps: string[] + ]; + export interface OutputObject { + txId: bigint; + txHash: string; + expirationTimestamp: bigint; + transaction: L2CanonicalTransactionStructOutput; + factoryDeps: string[]; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewPriorityTxMaxGasLimitEvent { + export type InputTuple = [ + oldPriorityTxMaxGasLimit: BigNumberish, + newPriorityTxMaxGasLimit: BigNumberish + ]; + export type OutputTuple = [ + oldPriorityTxMaxGasLimit: bigint, + newPriorityTxMaxGasLimit: bigint + ]; + export interface OutputObject { + oldPriorityTxMaxGasLimit: bigint; + newPriorityTxMaxGasLimit: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace NewTransactionFiltererEvent { + export type InputTuple = [ + oldTransactionFilterer: AddressLike, + newTransactionFilterer: AddressLike + ]; + export type OutputTuple = [ + oldTransactionFilterer: string, + newTransactionFilterer: string + ]; + export interface OutputObject { + oldTransactionFilterer: string; + newTransactionFilterer: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ProposeTransparentUpgradeEvent { + export type InputTuple = [ + diamondCut: Diamond.DiamondCutDataStruct, + proposalId: BigNumberish, + proposalSalt: BytesLike + ]; + export type OutputTuple = [ + diamondCut: Diamond.DiamondCutDataStructOutput, + proposalId: bigint, + proposalSalt: string + ]; + export interface OutputObject { + diamondCut: Diamond.DiamondCutDataStructOutput; + proposalId: bigint; + proposalSalt: string; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace UnfreezeEvent { + export type InputTuple = []; + export type OutputTuple = []; + export interface OutputObject {} + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ValidatorStatusUpdateEvent { + export type InputTuple = [validatorAddress: AddressLike, isActive: boolean]; + export type OutputTuple = [validatorAddress: string, isActive: boolean]; + export interface OutputObject { + validatorAddress: string; + isActive: boolean; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export namespace ValidiumModeStatusUpdateEvent { + export type InputTuple = [validiumMode: BigNumberish]; + export type OutputTuple = [validiumMode: bigint]; + export interface OutputObject { + validiumMode: bigint; + } + export type Event = TypedContractEvent; + export type Filter = TypedDeferredTopicFilter; + export type Log = TypedEventLog; + export type LogDescription = TypedLogDescription; +} + +export interface IZkSyncHyperchain extends BaseContract { + connect(runner?: ContractRunner | null): IZkSyncHyperchain; + waitForDeployment(): Promise; + + interface: IZkSyncHyperchainInterface; + + queryFilter( + event: TCEvent, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + queryFilter( + filter: TypedDeferredTopicFilter, + fromBlockOrBlockhash?: string | number | undefined, + toBlock?: string | number | undefined + ): Promise>>; + + on( + event: TCEvent, + listener: TypedListener + ): Promise; + on( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + once( + event: TCEvent, + listener: TypedListener + ): Promise; + once( + filter: TypedDeferredTopicFilter, + listener: TypedListener + ): Promise; + + listeners( + event: TCEvent + ): Promise>>; + listeners(eventName?: string): Promise>; + removeAllListeners( + event?: TCEvent + ): Promise; + + acceptAdmin: TypedContractMethod<[], [void], "nonpayable">; + + baseTokenGasPriceMultiplierDenominator: TypedContractMethod< + [], + [bigint], + "view" + >; + + baseTokenGasPriceMultiplierNominator: TypedContractMethod< + [], + [bigint], + "view" + >; + + bridgehubRequestL2Transaction: TypedContractMethod< + [_request: BridgehubL2TransactionRequestStruct], + [string], + "nonpayable" + >; + + changeFeeParams: TypedContractMethod< + [_newFeeParams: FeeParamsStruct], + [void], + "nonpayable" + >; + + commitBatches: TypedContractMethod< + [ + _lastCommittedBatchData: IExecutor.StoredBatchInfoStruct, + _newBatchesData: IExecutor.CommitBatchInfoStruct[] + ], + [void], + "nonpayable" + >; + + commitBatchesSharedBridge: TypedContractMethod< + [ + _chainId: BigNumberish, + _lastCommittedBatchData: IExecutor.StoredBatchInfoStruct, + _newBatchesData: IExecutor.CommitBatchInfoStruct[] + ], + [void], + "nonpayable" + >; + + executeBatches: TypedContractMethod< + [_batchesData: IExecutor.StoredBatchInfoStruct[]], + [void], + "nonpayable" + >; + + executeBatchesSharedBridge: TypedContractMethod< + [_chainId: BigNumberish, _batchesData: IExecutor.StoredBatchInfoStruct[]], + [void], + "nonpayable" + >; + + executeUpgrade: TypedContractMethod< + [_diamondCut: Diamond.DiamondCutDataStruct], + [void], + "nonpayable" + >; + + facetAddress: TypedContractMethod<[_selector: BytesLike], [string], "view">; + + facetAddresses: TypedContractMethod<[], [string[]], "view">; + + facetFunctionSelectors: TypedContractMethod< + [_facet: AddressLike], + [string[]], + "view" + >; + + facets: TypedContractMethod<[], [IGetters.FacetStructOutput[]], "view">; + + finalizeEthWithdrawal: TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + + freezeDiamond: TypedContractMethod<[], [void], "nonpayable">; + + getAdmin: TypedContractMethod<[], [string], "view">; + + getBaseToken: TypedContractMethod<[], [string], "view">; + + getBaseTokenBridge: TypedContractMethod<[], [string], "view">; + + getBridgehub: TypedContractMethod<[], [string], "view">; + + getFirstUnprocessedPriorityTx: TypedContractMethod<[], [bigint], "view">; + + getL2BootloaderBytecodeHash: TypedContractMethod<[], [string], "view">; + + getL2DefaultAccountBytecodeHash: TypedContractMethod<[], [string], "view">; + + getL2SystemContractsUpgradeBatchNumber: TypedContractMethod< + [], + [bigint], + "view" + >; + + getL2SystemContractsUpgradeTxHash: TypedContractMethod<[], [string], "view">; + + getName: TypedContractMethod<[], [string], "view">; + + getPendingAdmin: TypedContractMethod<[], [string], "view">; + + getPriorityQueueSize: TypedContractMethod<[], [bigint], "view">; + + getPriorityTxMaxGasLimit: TypedContractMethod<[], [bigint], "view">; + + getProtocolVersion: TypedContractMethod<[], [bigint], "view">; + + getPubdataPricingMode: TypedContractMethod<[], [bigint], "view">; + + getSemverProtocolVersion: TypedContractMethod< + [], + [[bigint, bigint, bigint]], + "view" + >; + + getStateTransitionManager: TypedContractMethod<[], [string], "view">; + + getTotalBatchesCommitted: TypedContractMethod<[], [bigint], "view">; + + getTotalBatchesExecuted: TypedContractMethod<[], [bigint], "view">; + + getTotalBatchesVerified: TypedContractMethod<[], [bigint], "view">; + + getTotalPriorityTxs: TypedContractMethod<[], [bigint], "view">; + + getVerifier: TypedContractMethod<[], [string], "view">; + + getVerifierParams: TypedContractMethod< + [], + [VerifierParamsStructOutput], + "view" + >; + + isDiamondStorageFrozen: TypedContractMethod<[], [boolean], "view">; + + isEthWithdrawalFinalized: TypedContractMethod< + [_l2BatchNumber: BigNumberish, _l2MessageIndex: BigNumberish], + [boolean], + "view" + >; + + isFacetFreezable: TypedContractMethod< + [_facet: AddressLike], + [boolean], + "view" + >; + + isFunctionFreezable: TypedContractMethod< + [_selector: BytesLike], + [boolean], + "view" + >; + + isValidator: TypedContractMethod<[_address: AddressLike], [boolean], "view">; + + l2LogsRootHash: TypedContractMethod< + [_batchNumber: BigNumberish], + [string], + "view" + >; + + l2TransactionBaseCost: TypedContractMethod< + [ + _gasPrice: BigNumberish, + _l2GasLimit: BigNumberish, + _l2GasPerPubdataByteLimit: BigNumberish + ], + [bigint], + "view" + >; + + priorityQueueFrontOperation: TypedContractMethod< + [], + [PriorityOperationStructOutput], + "view" + >; + + proveBatches: TypedContractMethod< + [ + _prevBatch: IExecutor.StoredBatchInfoStruct, + _committedBatches: IExecutor.StoredBatchInfoStruct[], + _proof: IExecutor.ProofInputStruct + ], + [void], + "nonpayable" + >; + + proveBatchesSharedBridge: TypedContractMethod< + [ + _chainId: BigNumberish, + _prevBatch: IExecutor.StoredBatchInfoStruct, + _committedBatches: IExecutor.StoredBatchInfoStruct[], + _proof: IExecutor.ProofInputStruct + ], + [void], + "nonpayable" + >; + + proveL1ToL2TransactionStatus: TypedContractMethod< + [ + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[], + _status: BigNumberish + ], + [boolean], + "view" + >; + + proveL2LogInclusion: TypedContractMethod< + [ + _batchNumber: BigNumberish, + _index: BigNumberish, + _log: L2LogStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + + proveL2MessageInclusion: TypedContractMethod< + [ + _batchNumber: BigNumberish, + _index: BigNumberish, + _message: L2MessageStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + + requestL2Transaction: TypedContractMethod< + [ + _contractL2: AddressLike, + _l2Value: BigNumberish, + _calldata: BytesLike, + _l2GasLimit: BigNumberish, + _l2GasPerPubdataByteLimit: BigNumberish, + _factoryDeps: BytesLike[], + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + + revertBatches: TypedContractMethod< + [_newLastBatch: BigNumberish], + [void], + "nonpayable" + >; + + revertBatchesSharedBridge: TypedContractMethod< + [_chainId: BigNumberish, _newLastBatch: BigNumberish], + [void], + "nonpayable" + >; + + setPendingAdmin: TypedContractMethod< + [_newPendingAdmin: AddressLike], + [void], + "nonpayable" + >; + + setPorterAvailability: TypedContractMethod< + [_zkPorterIsAvailable: boolean], + [void], + "nonpayable" + >; + + setPriorityTxMaxGasLimit: TypedContractMethod< + [_newPriorityTxMaxGasLimit: BigNumberish], + [void], + "nonpayable" + >; + + setPubdataPricingMode: TypedContractMethod< + [_pricingMode: BigNumberish], + [void], + "nonpayable" + >; + + setTokenMultiplier: TypedContractMethod< + [_nominator: BigNumberish, _denominator: BigNumberish], + [void], + "nonpayable" + >; + + setTransactionFilterer: TypedContractMethod< + [_transactionFilterer: AddressLike], + [void], + "nonpayable" + >; + + setValidator: TypedContractMethod< + [_validator: AddressLike, _active: boolean], + [void], + "nonpayable" + >; + + storedBatchHash: TypedContractMethod< + [_batchNumber: BigNumberish], + [string], + "view" + >; + + transferEthToSharedBridge: TypedContractMethod<[], [void], "nonpayable">; + + unfreezeDiamond: TypedContractMethod<[], [void], "nonpayable">; + + upgradeChainFromVersion: TypedContractMethod< + [_protocolVersion: BigNumberish, _cutData: Diamond.DiamondCutDataStruct], + [void], + "nonpayable" + >; + + getFunction( + key: string | FunctionFragment + ): T; + + getFunction( + nameOrSignature: "acceptAdmin" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "baseTokenGasPriceMultiplierDenominator" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "baseTokenGasPriceMultiplierNominator" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "bridgehubRequestL2Transaction" + ): TypedContractMethod< + [_request: BridgehubL2TransactionRequestStruct], + [string], + "nonpayable" + >; + getFunction( + nameOrSignature: "changeFeeParams" + ): TypedContractMethod< + [_newFeeParams: FeeParamsStruct], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "commitBatches" + ): TypedContractMethod< + [ + _lastCommittedBatchData: IExecutor.StoredBatchInfoStruct, + _newBatchesData: IExecutor.CommitBatchInfoStruct[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "commitBatchesSharedBridge" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _lastCommittedBatchData: IExecutor.StoredBatchInfoStruct, + _newBatchesData: IExecutor.CommitBatchInfoStruct[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "executeBatches" + ): TypedContractMethod< + [_batchesData: IExecutor.StoredBatchInfoStruct[]], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "executeBatchesSharedBridge" + ): TypedContractMethod< + [_chainId: BigNumberish, _batchesData: IExecutor.StoredBatchInfoStruct[]], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "executeUpgrade" + ): TypedContractMethod< + [_diamondCut: Diamond.DiamondCutDataStruct], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "facetAddress" + ): TypedContractMethod<[_selector: BytesLike], [string], "view">; + getFunction( + nameOrSignature: "facetAddresses" + ): TypedContractMethod<[], [string[]], "view">; + getFunction( + nameOrSignature: "facetFunctionSelectors" + ): TypedContractMethod<[_facet: AddressLike], [string[]], "view">; + getFunction( + nameOrSignature: "facets" + ): TypedContractMethod<[], [IGetters.FacetStructOutput[]], "view">; + getFunction( + nameOrSignature: "finalizeEthWithdrawal" + ): TypedContractMethod< + [ + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _message: BytesLike, + _merkleProof: BytesLike[] + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "freezeDiamond" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "getAdmin" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getBaseToken" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getBaseTokenBridge" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getBridgehub" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getFirstUnprocessedPriorityTx" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getL2BootloaderBytecodeHash" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getL2DefaultAccountBytecodeHash" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getL2SystemContractsUpgradeBatchNumber" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getL2SystemContractsUpgradeTxHash" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getName" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getPendingAdmin" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getPriorityQueueSize" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getPriorityTxMaxGasLimit" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getProtocolVersion" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getPubdataPricingMode" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getSemverProtocolVersion" + ): TypedContractMethod<[], [[bigint, bigint, bigint]], "view">; + getFunction( + nameOrSignature: "getStateTransitionManager" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getTotalBatchesCommitted" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getTotalBatchesExecuted" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getTotalBatchesVerified" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getTotalPriorityTxs" + ): TypedContractMethod<[], [bigint], "view">; + getFunction( + nameOrSignature: "getVerifier" + ): TypedContractMethod<[], [string], "view">; + getFunction( + nameOrSignature: "getVerifierParams" + ): TypedContractMethod<[], [VerifierParamsStructOutput], "view">; + getFunction( + nameOrSignature: "isDiamondStorageFrozen" + ): TypedContractMethod<[], [boolean], "view">; + getFunction( + nameOrSignature: "isEthWithdrawalFinalized" + ): TypedContractMethod< + [_l2BatchNumber: BigNumberish, _l2MessageIndex: BigNumberish], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "isFacetFreezable" + ): TypedContractMethod<[_facet: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "isFunctionFreezable" + ): TypedContractMethod<[_selector: BytesLike], [boolean], "view">; + getFunction( + nameOrSignature: "isValidator" + ): TypedContractMethod<[_address: AddressLike], [boolean], "view">; + getFunction( + nameOrSignature: "l2LogsRootHash" + ): TypedContractMethod<[_batchNumber: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "l2TransactionBaseCost" + ): TypedContractMethod< + [ + _gasPrice: BigNumberish, + _l2GasLimit: BigNumberish, + _l2GasPerPubdataByteLimit: BigNumberish + ], + [bigint], + "view" + >; + getFunction( + nameOrSignature: "priorityQueueFrontOperation" + ): TypedContractMethod<[], [PriorityOperationStructOutput], "view">; + getFunction( + nameOrSignature: "proveBatches" + ): TypedContractMethod< + [ + _prevBatch: IExecutor.StoredBatchInfoStruct, + _committedBatches: IExecutor.StoredBatchInfoStruct[], + _proof: IExecutor.ProofInputStruct + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "proveBatchesSharedBridge" + ): TypedContractMethod< + [ + _chainId: BigNumberish, + _prevBatch: IExecutor.StoredBatchInfoStruct, + _committedBatches: IExecutor.StoredBatchInfoStruct[], + _proof: IExecutor.ProofInputStruct + ], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "proveL1ToL2TransactionStatus" + ): TypedContractMethod< + [ + _l2TxHash: BytesLike, + _l2BatchNumber: BigNumberish, + _l2MessageIndex: BigNumberish, + _l2TxNumberInBatch: BigNumberish, + _merkleProof: BytesLike[], + _status: BigNumberish + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "proveL2LogInclusion" + ): TypedContractMethod< + [ + _batchNumber: BigNumberish, + _index: BigNumberish, + _log: L2LogStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "proveL2MessageInclusion" + ): TypedContractMethod< + [ + _batchNumber: BigNumberish, + _index: BigNumberish, + _message: L2MessageStruct, + _proof: BytesLike[] + ], + [boolean], + "view" + >; + getFunction( + nameOrSignature: "requestL2Transaction" + ): TypedContractMethod< + [ + _contractL2: AddressLike, + _l2Value: BigNumberish, + _calldata: BytesLike, + _l2GasLimit: BigNumberish, + _l2GasPerPubdataByteLimit: BigNumberish, + _factoryDeps: BytesLike[], + _refundRecipient: AddressLike + ], + [string], + "payable" + >; + getFunction( + nameOrSignature: "revertBatches" + ): TypedContractMethod<[_newLastBatch: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "revertBatchesSharedBridge" + ): TypedContractMethod< + [_chainId: BigNumberish, _newLastBatch: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setPendingAdmin" + ): TypedContractMethod<[_newPendingAdmin: AddressLike], [void], "nonpayable">; + getFunction( + nameOrSignature: "setPorterAvailability" + ): TypedContractMethod<[_zkPorterIsAvailable: boolean], [void], "nonpayable">; + getFunction( + nameOrSignature: "setPriorityTxMaxGasLimit" + ): TypedContractMethod< + [_newPriorityTxMaxGasLimit: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setPubdataPricingMode" + ): TypedContractMethod<[_pricingMode: BigNumberish], [void], "nonpayable">; + getFunction( + nameOrSignature: "setTokenMultiplier" + ): TypedContractMethod< + [_nominator: BigNumberish, _denominator: BigNumberish], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setTransactionFilterer" + ): TypedContractMethod< + [_transactionFilterer: AddressLike], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "setValidator" + ): TypedContractMethod< + [_validator: AddressLike, _active: boolean], + [void], + "nonpayable" + >; + getFunction( + nameOrSignature: "storedBatchHash" + ): TypedContractMethod<[_batchNumber: BigNumberish], [string], "view">; + getFunction( + nameOrSignature: "transferEthToSharedBridge" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "unfreezeDiamond" + ): TypedContractMethod<[], [void], "nonpayable">; + getFunction( + nameOrSignature: "upgradeChainFromVersion" + ): TypedContractMethod< + [_protocolVersion: BigNumberish, _cutData: Diamond.DiamondCutDataStruct], + [void], + "nonpayable" + >; + + getEvent( + key: "BlockCommit" + ): TypedContractEvent< + BlockCommitEvent.InputTuple, + BlockCommitEvent.OutputTuple, + BlockCommitEvent.OutputObject + >; + getEvent( + key: "BlockExecution" + ): TypedContractEvent< + BlockExecutionEvent.InputTuple, + BlockExecutionEvent.OutputTuple, + BlockExecutionEvent.OutputObject + >; + getEvent( + key: "BlocksRevert" + ): TypedContractEvent< + BlocksRevertEvent.InputTuple, + BlocksRevertEvent.OutputTuple, + BlocksRevertEvent.OutputObject + >; + getEvent( + key: "BlocksVerification" + ): TypedContractEvent< + BlocksVerificationEvent.InputTuple, + BlocksVerificationEvent.OutputTuple, + BlocksVerificationEvent.OutputObject + >; + getEvent( + key: "ExecuteUpgrade" + ): TypedContractEvent< + ExecuteUpgradeEvent.InputTuple, + ExecuteUpgradeEvent.OutputTuple, + ExecuteUpgradeEvent.OutputObject + >; + getEvent( + key: "Freeze" + ): TypedContractEvent< + FreezeEvent.InputTuple, + FreezeEvent.OutputTuple, + FreezeEvent.OutputObject + >; + getEvent( + key: "IsPorterAvailableStatusUpdate" + ): TypedContractEvent< + IsPorterAvailableStatusUpdateEvent.InputTuple, + IsPorterAvailableStatusUpdateEvent.OutputTuple, + IsPorterAvailableStatusUpdateEvent.OutputObject + >; + getEvent( + key: "NewAdmin" + ): TypedContractEvent< + NewAdminEvent.InputTuple, + NewAdminEvent.OutputTuple, + NewAdminEvent.OutputObject + >; + getEvent( + key: "NewBaseTokenMultiplier" + ): TypedContractEvent< + NewBaseTokenMultiplierEvent.InputTuple, + NewBaseTokenMultiplierEvent.OutputTuple, + NewBaseTokenMultiplierEvent.OutputObject + >; + getEvent( + key: "NewFeeParams" + ): TypedContractEvent< + NewFeeParamsEvent.InputTuple, + NewFeeParamsEvent.OutputTuple, + NewFeeParamsEvent.OutputObject + >; + getEvent( + key: "NewPendingAdmin" + ): TypedContractEvent< + NewPendingAdminEvent.InputTuple, + NewPendingAdminEvent.OutputTuple, + NewPendingAdminEvent.OutputObject + >; + getEvent( + key: "NewPriorityRequest" + ): TypedContractEvent< + NewPriorityRequestEvent.InputTuple, + NewPriorityRequestEvent.OutputTuple, + NewPriorityRequestEvent.OutputObject + >; + getEvent( + key: "NewPriorityTxMaxGasLimit" + ): TypedContractEvent< + NewPriorityTxMaxGasLimitEvent.InputTuple, + NewPriorityTxMaxGasLimitEvent.OutputTuple, + NewPriorityTxMaxGasLimitEvent.OutputObject + >; + getEvent( + key: "NewTransactionFilterer" + ): TypedContractEvent< + NewTransactionFiltererEvent.InputTuple, + NewTransactionFiltererEvent.OutputTuple, + NewTransactionFiltererEvent.OutputObject + >; + getEvent( + key: "ProposeTransparentUpgrade" + ): TypedContractEvent< + ProposeTransparentUpgradeEvent.InputTuple, + ProposeTransparentUpgradeEvent.OutputTuple, + ProposeTransparentUpgradeEvent.OutputObject + >; + getEvent( + key: "Unfreeze" + ): TypedContractEvent< + UnfreezeEvent.InputTuple, + UnfreezeEvent.OutputTuple, + UnfreezeEvent.OutputObject + >; + getEvent( + key: "ValidatorStatusUpdate" + ): TypedContractEvent< + ValidatorStatusUpdateEvent.InputTuple, + ValidatorStatusUpdateEvent.OutputTuple, + ValidatorStatusUpdateEvent.OutputObject + >; + getEvent( + key: "ValidiumModeStatusUpdate" + ): TypedContractEvent< + ValidiumModeStatusUpdateEvent.InputTuple, + ValidiumModeStatusUpdateEvent.OutputTuple, + ValidiumModeStatusUpdateEvent.OutputObject + >; + + filters: { + "BlockCommit(uint256,bytes32,bytes32)": TypedContractEvent< + BlockCommitEvent.InputTuple, + BlockCommitEvent.OutputTuple, + BlockCommitEvent.OutputObject + >; + BlockCommit: TypedContractEvent< + BlockCommitEvent.InputTuple, + BlockCommitEvent.OutputTuple, + BlockCommitEvent.OutputObject + >; + + "BlockExecution(uint256,bytes32,bytes32)": TypedContractEvent< + BlockExecutionEvent.InputTuple, + BlockExecutionEvent.OutputTuple, + BlockExecutionEvent.OutputObject + >; + BlockExecution: TypedContractEvent< + BlockExecutionEvent.InputTuple, + BlockExecutionEvent.OutputTuple, + BlockExecutionEvent.OutputObject + >; + + "BlocksRevert(uint256,uint256,uint256)": TypedContractEvent< + BlocksRevertEvent.InputTuple, + BlocksRevertEvent.OutputTuple, + BlocksRevertEvent.OutputObject + >; + BlocksRevert: TypedContractEvent< + BlocksRevertEvent.InputTuple, + BlocksRevertEvent.OutputTuple, + BlocksRevertEvent.OutputObject + >; + + "BlocksVerification(uint256,uint256)": TypedContractEvent< + BlocksVerificationEvent.InputTuple, + BlocksVerificationEvent.OutputTuple, + BlocksVerificationEvent.OutputObject + >; + BlocksVerification: TypedContractEvent< + BlocksVerificationEvent.InputTuple, + BlocksVerificationEvent.OutputTuple, + BlocksVerificationEvent.OutputObject + >; + + "ExecuteUpgrade(tuple)": TypedContractEvent< + ExecuteUpgradeEvent.InputTuple, + ExecuteUpgradeEvent.OutputTuple, + ExecuteUpgradeEvent.OutputObject + >; + ExecuteUpgrade: TypedContractEvent< + ExecuteUpgradeEvent.InputTuple, + ExecuteUpgradeEvent.OutputTuple, + ExecuteUpgradeEvent.OutputObject + >; + + "Freeze()": TypedContractEvent< + FreezeEvent.InputTuple, + FreezeEvent.OutputTuple, + FreezeEvent.OutputObject + >; + Freeze: TypedContractEvent< + FreezeEvent.InputTuple, + FreezeEvent.OutputTuple, + FreezeEvent.OutputObject + >; + + "IsPorterAvailableStatusUpdate(bool)": TypedContractEvent< + IsPorterAvailableStatusUpdateEvent.InputTuple, + IsPorterAvailableStatusUpdateEvent.OutputTuple, + IsPorterAvailableStatusUpdateEvent.OutputObject + >; + IsPorterAvailableStatusUpdate: TypedContractEvent< + IsPorterAvailableStatusUpdateEvent.InputTuple, + IsPorterAvailableStatusUpdateEvent.OutputTuple, + IsPorterAvailableStatusUpdateEvent.OutputObject + >; + + "NewAdmin(address,address)": TypedContractEvent< + NewAdminEvent.InputTuple, + NewAdminEvent.OutputTuple, + NewAdminEvent.OutputObject + >; + NewAdmin: TypedContractEvent< + NewAdminEvent.InputTuple, + NewAdminEvent.OutputTuple, + NewAdminEvent.OutputObject + >; + + "NewBaseTokenMultiplier(uint128,uint128,uint128,uint128)": TypedContractEvent< + NewBaseTokenMultiplierEvent.InputTuple, + NewBaseTokenMultiplierEvent.OutputTuple, + NewBaseTokenMultiplierEvent.OutputObject + >; + NewBaseTokenMultiplier: TypedContractEvent< + NewBaseTokenMultiplierEvent.InputTuple, + NewBaseTokenMultiplierEvent.OutputTuple, + NewBaseTokenMultiplierEvent.OutputObject + >; + + "NewFeeParams(tuple,tuple)": TypedContractEvent< + NewFeeParamsEvent.InputTuple, + NewFeeParamsEvent.OutputTuple, + NewFeeParamsEvent.OutputObject + >; + NewFeeParams: TypedContractEvent< + NewFeeParamsEvent.InputTuple, + NewFeeParamsEvent.OutputTuple, + NewFeeParamsEvent.OutputObject + >; + + "NewPendingAdmin(address,address)": TypedContractEvent< + NewPendingAdminEvent.InputTuple, + NewPendingAdminEvent.OutputTuple, + NewPendingAdminEvent.OutputObject + >; + NewPendingAdmin: TypedContractEvent< + NewPendingAdminEvent.InputTuple, + NewPendingAdminEvent.OutputTuple, + NewPendingAdminEvent.OutputObject + >; + + "NewPriorityRequest(uint256,bytes32,uint64,tuple,bytes[])": TypedContractEvent< + NewPriorityRequestEvent.InputTuple, + NewPriorityRequestEvent.OutputTuple, + NewPriorityRequestEvent.OutputObject + >; + NewPriorityRequest: TypedContractEvent< + NewPriorityRequestEvent.InputTuple, + NewPriorityRequestEvent.OutputTuple, + NewPriorityRequestEvent.OutputObject + >; + + "NewPriorityTxMaxGasLimit(uint256,uint256)": TypedContractEvent< + NewPriorityTxMaxGasLimitEvent.InputTuple, + NewPriorityTxMaxGasLimitEvent.OutputTuple, + NewPriorityTxMaxGasLimitEvent.OutputObject + >; + NewPriorityTxMaxGasLimit: TypedContractEvent< + NewPriorityTxMaxGasLimitEvent.InputTuple, + NewPriorityTxMaxGasLimitEvent.OutputTuple, + NewPriorityTxMaxGasLimitEvent.OutputObject + >; + + "NewTransactionFilterer(address,address)": TypedContractEvent< + NewTransactionFiltererEvent.InputTuple, + NewTransactionFiltererEvent.OutputTuple, + NewTransactionFiltererEvent.OutputObject + >; + NewTransactionFilterer: TypedContractEvent< + NewTransactionFiltererEvent.InputTuple, + NewTransactionFiltererEvent.OutputTuple, + NewTransactionFiltererEvent.OutputObject + >; + + "ProposeTransparentUpgrade(tuple,uint256,bytes32)": TypedContractEvent< + ProposeTransparentUpgradeEvent.InputTuple, + ProposeTransparentUpgradeEvent.OutputTuple, + ProposeTransparentUpgradeEvent.OutputObject + >; + ProposeTransparentUpgrade: TypedContractEvent< + ProposeTransparentUpgradeEvent.InputTuple, + ProposeTransparentUpgradeEvent.OutputTuple, + ProposeTransparentUpgradeEvent.OutputObject + >; + + "Unfreeze()": TypedContractEvent< + UnfreezeEvent.InputTuple, + UnfreezeEvent.OutputTuple, + UnfreezeEvent.OutputObject + >; + Unfreeze: TypedContractEvent< + UnfreezeEvent.InputTuple, + UnfreezeEvent.OutputTuple, + UnfreezeEvent.OutputObject + >; + + "ValidatorStatusUpdate(address,bool)": TypedContractEvent< + ValidatorStatusUpdateEvent.InputTuple, + ValidatorStatusUpdateEvent.OutputTuple, + ValidatorStatusUpdateEvent.OutputObject + >; + ValidatorStatusUpdate: TypedContractEvent< + ValidatorStatusUpdateEvent.InputTuple, + ValidatorStatusUpdateEvent.OutputTuple, + ValidatorStatusUpdateEvent.OutputObject + >; + + "ValidiumModeStatusUpdate(uint8)": TypedContractEvent< + ValidiumModeStatusUpdateEvent.InputTuple, + ValidiumModeStatusUpdateEvent.OutputTuple, + ValidiumModeStatusUpdateEvent.OutputObject + >; + ValidiumModeStatusUpdate: TypedContractEvent< + ValidiumModeStatusUpdateEvent.InputTuple, + ValidiumModeStatusUpdateEvent.OutputTuple, + ValidiumModeStatusUpdateEvent.OutputObject + >; + }; +} diff --git a/typechain/common.ts b/typechain/common.ts new file mode 100644 index 00000000..56b5f21e --- /dev/null +++ b/typechain/common.ts @@ -0,0 +1,131 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +import type { + FunctionFragment, + Typed, + EventFragment, + ContractTransaction, + ContractTransactionResponse, + DeferredTopicFilter, + EventLog, + TransactionRequest, + LogDescription, +} from "ethers"; + +export interface TypedDeferredTopicFilter<_TCEvent extends TypedContractEvent> + extends DeferredTopicFilter {} + +export interface TypedContractEvent< + InputTuple extends Array = any, + OutputTuple extends Array = any, + OutputObject = any +> { + (...args: Partial): TypedDeferredTopicFilter< + TypedContractEvent + >; + name: string; + fragment: EventFragment; + getFragment(...args: Partial): EventFragment; +} + +type __TypechainAOutputTuple = T extends TypedContractEvent< + infer _U, + infer W +> + ? W + : never; +type __TypechainOutputObject = T extends TypedContractEvent< + infer _U, + infer _W, + infer V +> + ? V + : never; + +export interface TypedEventLog + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export interface TypedLogDescription + extends Omit { + args: __TypechainAOutputTuple & __TypechainOutputObject; +} + +export type TypedListener = ( + ...listenerArg: [ + ...__TypechainAOutputTuple, + TypedEventLog, + ...undefined[] + ] +) => void; + +export type MinEthersFactory = { + deploy(...a: ARGS[]): Promise; +}; + +export type GetContractTypeFromFactory = F extends MinEthersFactory< + infer C, + any +> + ? C + : never; +export type GetARGsTypeFromFactory = F extends MinEthersFactory + ? Parameters + : never; + +export type StateMutability = "nonpayable" | "payable" | "view"; + +export type BaseOverrides = Omit; +export type NonPayableOverrides = Omit< + BaseOverrides, + "value" | "blockTag" | "enableCcipRead" +>; +export type PayableOverrides = Omit< + BaseOverrides, + "blockTag" | "enableCcipRead" +>; +export type ViewOverrides = Omit; +export type Overrides = S extends "nonpayable" + ? NonPayableOverrides + : S extends "payable" + ? PayableOverrides + : ViewOverrides; + +export type PostfixOverrides, S extends StateMutability> = + | A + | [...A, Overrides]; +export type ContractMethodArgs< + A extends Array, + S extends StateMutability +> = PostfixOverrides<{ [I in keyof A]-?: A[I] | Typed }, S>; + +export type DefaultReturnType = R extends Array ? R[0] : R; + +// export interface ContractMethod = Array, R = any, D extends R | ContractTransactionResponse = R | ContractTransactionResponse> { +export interface TypedContractMethod< + A extends Array = Array, + R = any, + S extends StateMutability = "payable" +> { + (...args: ContractMethodArgs): S extends "view" + ? Promise> + : Promise; + + name: string; + + fragment: FunctionFragment; + + getFragment(...args: ContractMethodArgs): FunctionFragment; + + populateTransaction( + ...args: ContractMethodArgs + ): Promise; + staticCall( + ...args: ContractMethodArgs + ): Promise>; + send(...args: ContractMethodArgs): Promise; + estimateGas(...args: ContractMethodArgs): Promise; + staticCallResult(...args: ContractMethodArgs): Promise; +} diff --git a/typechain/factories/IAssetRouterBase__factory.ts b/typechain/factories/IAssetRouterBase__factory.ts new file mode 100644 index 00000000..a4bbf636 --- /dev/null +++ b/typechain/factories/IAssetRouterBase__factory.ts @@ -0,0 +1,272 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IAssetRouterBase, + IAssetRouterBaseInterface, +} from "../IAssetRouterBase"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "_assetAddress", + type: "address", + }, + ], + name: "AssetHandlerRegistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "assetHandlerAddress", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "additionalData", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "assetDeploymentTracker", + type: "address", + }, + ], + name: "AssetHandlerRegisteredInitial", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "BridgehubDepositBaseTokenInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes", + name: "bridgeMintCalldata", + type: "bytes", + }, + ], + name: "BridgehubDepositInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "assetDataHash", + type: "bytes32", + }, + ], + name: "BridgehubWithdrawalInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes", + name: "assetData", + type: "bytes", + }, + ], + name: "DepositFinalizedAssetRouter", + type: "event", + }, + { + inputs: [], + name: "BRIDGE_HUB", + outputs: [ + { + internalType: "contract IBridgehub", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + ], + name: "assetHandlerAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_transferData", + type: "bytes", + }, + ], + name: "finalizeDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_assetRegistrationData", + type: "bytes32", + }, + { + internalType: "address", + name: "_assetHandlerAddress", + type: "address", + }, + ], + name: "setAssetHandlerAddressThisChain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IAssetRouterBase__factory { + static readonly abi = _abi; + static createInterface(): IAssetRouterBaseInterface { + return new Interface(_abi) as IAssetRouterBaseInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IAssetRouterBase { + return new Contract(address, _abi, runner) as unknown as IAssetRouterBase; + } +} diff --git a/typechain/factories/IBridgedStandardToken__factory.ts b/typechain/factories/IBridgedStandardToken__factory.ts new file mode 100644 index 00000000..494446f5 --- /dev/null +++ b/typechain/factories/IBridgedStandardToken__factory.ts @@ -0,0 +1,199 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IBridgedStandardToken, + IBridgedStandardTokenInterface, +} from "../IBridgedStandardToken"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "BridgeBurn", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "string", + name: "name", + type: "string", + }, + { + indexed: false, + internalType: "string", + name: "symbol", + type: "string", + }, + { + indexed: false, + internalType: "uint8", + name: "decimals", + type: "uint8", + }, + ], + name: "BridgeInitialize", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "BridgeMint", + type: "event", + }, + { + inputs: [], + name: "assetId", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "bridgeBurn", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "bridgeMint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "l1Address", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "l2Bridge", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "nativeTokenVault", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "originToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class IBridgedStandardToken__factory { + static readonly abi = _abi; + static createInterface(): IBridgedStandardTokenInterface { + return new Interface(_abi) as IBridgedStandardTokenInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IBridgedStandardToken { + return new Contract( + address, + _abi, + runner + ) as unknown as IBridgedStandardToken; + } +} diff --git a/typechain/factories/IBridgehub__factory.ts b/typechain/factories/IBridgehub__factory.ts new file mode 100644 index 00000000..631830c3 --- /dev/null +++ b/typechain/factories/IBridgehub__factory.ts @@ -0,0 +1,648 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IBridgehub, IBridgehubInterface } from "../IBridgehub"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldAdmin", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: false, + internalType: "address", + name: "stateTransitionManager", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "chainGovernance", + type: "address", + }, + ], + name: "NewChain", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldPendingAdmin", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + inputs: [], + name: "acceptAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_stateTransitionManager", + type: "address", + }, + ], + name: "addStateTransitionManager", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "addToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + ], + name: "baseToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_stateTransitionManager", + type: "address", + }, + { + internalType: "address", + name: "_baseToken", + type: "address", + }, + { + internalType: "uint256", + name: "_salt", + type: "uint256", + }, + { + internalType: "address", + name: "_admin", + type: "address", + }, + { + internalType: "bytes", + name: "_initData", + type: "bytes", + }, + ], + name: "createNewChain", + outputs: [ + { + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + ], + name: "getHyperchain", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_gasPrice", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2GasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2GasPerPubdataByteLimit", + type: "uint256", + }, + ], + name: "l2TransactionBaseCost", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + { + internalType: "enum TxStatus", + name: "_status", + type: "uint8", + }, + ], + name: "proveL1ToL2TransactionStatus", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_batchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_index", + type: "uint256", + }, + { + components: [ + { + internalType: "uint8", + name: "l2ShardId", + type: "uint8", + }, + { + internalType: "bool", + name: "isService", + type: "bool", + }, + { + internalType: "uint16", + name: "txNumberInBatch", + type: "uint16", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes32", + name: "key", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "value", + type: "bytes32", + }, + ], + internalType: "struct L2Log", + name: "_log", + type: "tuple", + }, + { + internalType: "bytes32[]", + name: "_proof", + type: "bytes32[]", + }, + ], + name: "proveL2LogInclusion", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_batchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_index", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "txNumberInBatch", + type: "uint16", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + internalType: "struct L2Message", + name: "_message", + type: "tuple", + }, + { + internalType: "bytes32[]", + name: "_proof", + type: "bytes32[]", + }, + ], + name: "proveL2MessageInclusion", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_stateTransitionManager", + type: "address", + }, + ], + name: "removeStateTransitionManager", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "mintValue", + type: "uint256", + }, + { + internalType: "address", + name: "l2Contract", + type: "address", + }, + { + internalType: "uint256", + name: "l2Value", + type: "uint256", + }, + { + internalType: "bytes", + name: "l2Calldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "l2GasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "l2GasPerPubdataByteLimit", + type: "uint256", + }, + { + internalType: "bytes[]", + name: "factoryDeps", + type: "bytes[]", + }, + { + internalType: "address", + name: "refundRecipient", + type: "address", + }, + ], + internalType: "struct L2TransactionRequestDirect", + name: "_request", + type: "tuple", + }, + ], + name: "requestL2TransactionDirect", + outputs: [ + { + internalType: "bytes32", + name: "canonicalTxHash", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "mintValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "l2Value", + type: "uint256", + }, + { + internalType: "uint256", + name: "l2GasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "l2GasPerPubdataByteLimit", + type: "uint256", + }, + { + internalType: "address", + name: "refundRecipient", + type: "address", + }, + { + internalType: "address", + name: "secondBridgeAddress", + type: "address", + }, + { + internalType: "uint256", + name: "secondBridgeValue", + type: "uint256", + }, + { + internalType: "bytes", + name: "secondBridgeCalldata", + type: "bytes", + }, + ], + internalType: "struct L2TransactionRequestTwoBridgesOuter", + name: "_request", + type: "tuple", + }, + ], + name: "requestL2TransactionTwoBridges", + outputs: [ + { + internalType: "bytes32", + name: "canonicalTxHash", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newPendingAdmin", + type: "address", + }, + ], + name: "setPendingAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_sharedBridge", + type: "address", + }, + ], + name: "setSharedBridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "sharedBridge", + outputs: [ + { + internalType: "contract IL1SharedBridge", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + ], + name: "stateTransitionManager", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_stateTransitionManager", + type: "address", + }, + ], + name: "stateTransitionManagerIsRegistered", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_baseToken", + type: "address", + }, + ], + name: "tokenIsRegistered", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class IBridgehub__factory { + static readonly abi = _abi; + static createInterface(): IBridgehubInterface { + return new Interface(_abi) as IBridgehubInterface; + } + static connect(address: string, runner?: ContractRunner | null): IBridgehub { + return new Contract(address, _abi, runner) as unknown as IBridgehub; + } +} diff --git a/typechain/factories/IContractDeployer__factory.ts b/typechain/factories/IContractDeployer__factory.ts new file mode 100644 index 00000000..52ce9945 --- /dev/null +++ b/typechain/factories/IContractDeployer__factory.ts @@ -0,0 +1,329 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IContractDeployer, + IContractDeployerInterface, +} from "../IContractDeployer"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "accountAddress", + type: "address", + }, + { + indexed: false, + internalType: "enum IContractDeployer.AccountNonceOrdering", + name: "nonceOrdering", + type: "uint8", + }, + ], + name: "AccountNonceOrderingUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "accountAddress", + type: "address", + }, + { + indexed: false, + internalType: "enum IContractDeployer.AccountAbstractionVersion", + name: "aaVersion", + type: "uint8", + }, + ], + name: "AccountVersionUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "deployerAddress", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "bytecodeHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "contractAddress", + type: "address", + }, + ], + name: "ContractDeployed", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_bytecodeHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_input", + type: "bytes", + }, + ], + name: "create", + outputs: [ + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_bytecodeHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_input", + type: "bytes", + }, + ], + name: "create2", + outputs: [ + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_bytecodeHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_input", + type: "bytes", + }, + { + internalType: "enum IContractDeployer.AccountAbstractionVersion", + name: "_aaVersion", + type: "uint8", + }, + ], + name: "create2Account", + outputs: [ + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_bytecodeHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_input", + type: "bytes", + }, + { + internalType: "enum IContractDeployer.AccountAbstractionVersion", + name: "_aaVersion", + type: "uint8", + }, + ], + name: "createAccount", + outputs: [ + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getAccountInfo", + outputs: [ + { + components: [ + { + internalType: "enum IContractDeployer.AccountAbstractionVersion", + name: "supportedAAVersion", + type: "uint8", + }, + { + internalType: "enum IContractDeployer.AccountNonceOrdering", + name: "nonceOrdering", + type: "uint8", + }, + ], + internalType: "struct IContractDeployer.AccountInfo", + name: "info", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "uint256", + name: "_senderNonce", + type: "uint256", + }, + ], + name: "getNewAddressCreate", + outputs: [ + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "bytes32", + name: "_bytecodeHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_salt", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_input", + type: "bytes", + }, + ], + name: "getNewAddressCreate2", + outputs: [ + { + internalType: "address", + name: "newAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "enum IContractDeployer.AccountAbstractionVersion", + name: "_version", + type: "uint8", + }, + ], + name: "updateAccountVersion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "enum IContractDeployer.AccountNonceOrdering", + name: "_nonceOrdering", + type: "uint8", + }, + ], + name: "updateNonceOrdering", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IContractDeployer__factory { + static readonly abi = _abi; + static createInterface(): IContractDeployerInterface { + return new Interface(_abi) as IContractDeployerInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IContractDeployer { + return new Contract(address, _abi, runner) as unknown as IContractDeployer; + } +} diff --git a/typechain/factories/IERC1271__factory.ts b/typechain/factories/IERC1271__factory.ts new file mode 100644 index 00000000..dc5bdefc --- /dev/null +++ b/typechain/factories/IERC1271__factory.ts @@ -0,0 +1,43 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IERC1271, IERC1271Interface } from "../IERC1271"; + +const _abi = [ + { + inputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + ], + name: "isValidSignature", + outputs: [ + { + internalType: "bytes4", + name: "magicValue", + type: "bytes4", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class IERC1271__factory { + static readonly abi = _abi; + static createInterface(): IERC1271Interface { + return new Interface(_abi) as IERC1271Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC1271 { + return new Contract(address, _abi, runner) as unknown as IERC1271; + } +} diff --git a/typechain/factories/IERC20__factory.ts b/typechain/factories/IERC20__factory.ts new file mode 100644 index 00000000..c078496e --- /dev/null +++ b/typechain/factories/IERC20__factory.ts @@ -0,0 +1,241 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IERC20, IERC20Interface } from "../IERC20"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Approval", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address", + }, + { + internalType: "address", + name: "spender", + type: "address", + }, + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "from", + type: "address", + }, + { + internalType: "address", + name: "to", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IERC20__factory { + static readonly abi = _abi; + static createInterface(): IERC20Interface { + return new Interface(_abi) as IERC20Interface; + } + static connect(address: string, runner?: ContractRunner | null): IERC20 { + return new Contract(address, _abi, runner) as unknown as IERC20; + } +} diff --git a/typechain/factories/IEthToken__factory.ts b/typechain/factories/IEthToken__factory.ts new file mode 100644 index 00000000..d58a805f --- /dev/null +++ b/typechain/factories/IEthToken__factory.ts @@ -0,0 +1,262 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IEthToken, IEthTokenInterface } from "../IEthToken"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "account", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "Mint", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "Transfer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_l2Sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "_l1Receiver", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "Withdrawal", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_l2Sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "_l1Receiver", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes", + name: "_additionalData", + type: "bytes", + }, + ], + name: "WithdrawalWithMessage", + type: "event", + }, + { + inputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "pure", + type: "function", + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_from", + type: "address", + }, + { + internalType: "address", + name: "_to", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "transferFromTo", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Receiver", + type: "address", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Receiver", + type: "address", + }, + { + internalType: "bytes", + name: "_additionalData", + type: "bytes", + }, + ], + name: "withdrawWithMessage", + outputs: [], + stateMutability: "payable", + type: "function", + }, +] as const; + +export class IEthToken__factory { + static readonly abi = _abi; + static createInterface(): IEthTokenInterface { + return new Interface(_abi) as IEthTokenInterface; + } + static connect(address: string, runner?: ContractRunner | null): IEthToken { + return new Contract(address, _abi, runner) as unknown as IEthToken; + } +} diff --git a/typechain/factories/IL1AssetRouter__factory.ts b/typechain/factories/IL1AssetRouter__factory.ts new file mode 100644 index 00000000..aee01b98 --- /dev/null +++ b/typechain/factories/IL1AssetRouter__factory.ts @@ -0,0 +1,1245 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IL1AssetRouter, + IL1AssetRouterInterface, +} from "../IL1AssetRouter"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_l1WethAddress", + type: "address", + }, + { + internalType: "address", + name: "_bridgehub", + type: "address", + }, + { + internalType: "address", + name: "_l1Nullifier", + type: "address", + }, + { + internalType: "uint256", + name: "_eraChainId", + type: "uint256", + }, + { + internalType: "address", + name: "_eraDiamondProxy", + type: "address", + }, + ], + stateMutability: "nonpayable", + type: "constructor", + }, + { + inputs: [ + { + internalType: "address", + name: "addr", + type: "address", + }, + ], + name: "AddressAlreadyUsed", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + ], + name: "AssetHandlerDoesNotExist", + type: "error", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + ], + name: "AssetIdNotSupported", + type: "error", + }, + { + inputs: [], + name: "NotInitializedReentrancyGuard", + type: "error", + }, + { + inputs: [], + name: "Reentrancy", + type: "error", + }, + { + inputs: [], + name: "SlotOccupied", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "TokenNotSupported", + type: "error", + }, + { + inputs: [ + { + internalType: "address", + name: "caller", + type: "address", + }, + ], + name: "Unauthorized", + type: "error", + }, + { + inputs: [], + name: "UnsupportedEncodingVersion", + type: "error", + }, + { + inputs: [], + name: "ZeroAddress", + type: "error", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "assetDeploymentTracker", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "additionalData", + type: "bytes32", + }, + ], + name: "AssetDeploymentTrackerSet", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "_assetAddress", + type: "address", + }, + ], + name: "AssetHandlerRegistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "assetHandlerAddress", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "additionalData", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "assetDeploymentTracker", + type: "address", + }, + ], + name: "AssetHandlerRegisteredInitial", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "BridgehubDepositBaseTokenInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "l2DepositTxHash", + type: "bytes32", + }, + ], + name: "BridgehubDepositFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes", + name: "bridgeMintCalldata", + type: "bytes", + }, + ], + name: "BridgehubDepositInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes", + name: "bridgeMintData", + type: "bytes", + }, + ], + name: "BridgehubMintData", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "assetDataHash", + type: "bytes32", + }, + ], + name: "BridgehubWithdrawalInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes", + name: "assetData", + type: "bytes", + }, + ], + name: "ClaimedFailedDepositAssetRouter", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes", + name: "assetData", + type: "bytes", + }, + ], + name: "DepositFinalizedAssetRouter", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint8", + name: "version", + type: "uint8", + }, + ], + name: "Initialized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "l2DepositTxHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "l1Asset", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "LegacyDepositInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferStarted", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "previousOwner", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "OwnershipTransferred", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Paused", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "account", + type: "address", + }, + ], + name: "Unpaused", + type: "event", + }, + { + inputs: [], + name: "BRIDGE_HUB", + outputs: [ + { + internalType: "contract IBridgehub", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "ERA_CHAIN_ID", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "L1_CHAIN_ID", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "L1_NULLIFIER", + outputs: [ + { + internalType: "contract IL1Nullifier", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "L1_WETH_TOKEN", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "acceptOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + ], + name: "assetDeploymentTracker", + outputs: [ + { + internalType: "address", + name: "assetDeploymentTracker", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + ], + name: "assetHandlerAddress", + outputs: [ + { + internalType: "address", + name: "assetHandlerAddress", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_depositSender", + type: "address", + }, + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_assetData", + type: "bytes", + }, + ], + name: "bridgeRecoverFailedTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_depositSender", + type: "address", + }, + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_assetData", + type: "bytes", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "bridgeRecoverFailedTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_txDataHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_txHash", + type: "bytes32", + }, + ], + name: "bridgehubConfirmL2Transaction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_originalCaller", + type: "address", + }, + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "bridgehubDeposit", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "magicValue", + type: "bytes32", + }, + { + internalType: "address", + name: "l2Contract", + type: "address", + }, + { + internalType: "bytes", + name: "l2Calldata", + type: "bytes", + }, + { + internalType: "bytes[]", + name: "factoryDeps", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + ], + internalType: "struct L2TransactionRequestTwoBridgesInner", + name: "request", + type: "tuple", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "address", + name: "_originalCaller", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "bridgehubDepositBaseToken", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_depositSender", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "claimFailedDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_originalCaller", + type: "address", + }, + { + internalType: "address", + name: "_l2Receiver", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2TxGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2TxGasPerPubdataByte", + type: "uint256", + }, + { + internalType: "address", + name: "_refundRecipient", + type: "address", + }, + ], + name: "depositLegacyErc20Bridge", + outputs: [ + { + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_transferData", + type: "bytes", + }, + ], + name: "finalizeDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes", + name: "_message", + type: "bytes", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "finalizeWithdrawal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_sender", + type: "address", + }, + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_assetData", + type: "bytes", + }, + ], + name: "getDepositCalldata", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_owner", + type: "address", + }, + ], + name: "initialize", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + ], + name: "isWithdrawalFinalized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "legacyBridge", + outputs: [ + { + internalType: "contract IL1ERC20Bridge", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "nativeTokenVault", + outputs: [ + { + internalType: "contract INativeTokenVault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "owner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "paused", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "pendingOwner", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "renounceOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_assetRegistrationData", + type: "bytes32", + }, + { + internalType: "address", + name: "_assetDeploymentTracker", + type: "address", + }, + ], + name: "setAssetDeploymentTracker", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_assetRegistrationData", + type: "bytes32", + }, + { + internalType: "address", + name: "_assetHandlerAddress", + type: "address", + }, + ], + name: "setAssetHandlerAddressThisChain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IL1ERC20Bridge", + name: "_legacyBridge", + type: "address", + }, + ], + name: "setL1Erc20Bridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract INativeTokenVault", + name: "_nativeTokenVault", + type: "address", + }, + ], + name: "setNativeTokenVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_originalCaller", + type: "address", + }, + ], + name: "transferFundsToNTV", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "newOwner", + type: "address", + }, + ], + name: "transferOwnership", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unpause", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IL1AssetRouter__factory { + static readonly abi = _abi; + static createInterface(): IL1AssetRouterInterface { + return new Interface(_abi) as IL1AssetRouterInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IL1AssetRouter { + return new Contract(address, _abi, runner) as unknown as IL1AssetRouter; + } +} diff --git a/typechain/factories/IL1Bridge__factory.ts b/typechain/factories/IL1Bridge__factory.ts new file mode 100644 index 00000000..d8eddb96 --- /dev/null +++ b/typechain/factories/IL1Bridge__factory.ts @@ -0,0 +1,529 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IL1Bridge, IL1BridgeInterface } from "../IL1Bridge"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "l2DepositTxHash", + type: "bytes32", + }, + ], + name: "BridgehubDepositFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "BridgehubDepositInitiatedSharedBridge", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "ClaimedFailedDepositSharedBridge", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "l2DepositTxHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "DepositInitiatedSharedBridge", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "WithdrawalFinalizedSharedBridge", + type: "event", + }, + { + inputs: [], + name: "bridgehub", + outputs: [ + { + internalType: "contract IBridgehub", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_txDataHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_txHash", + type: "bytes32", + }, + ], + name: "bridgehubConfirmL2Transaction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_prevMsgSender", + type: "address", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "bridgehubDeposit", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "magicValue", + type: "bytes32", + }, + { + internalType: "address", + name: "l2Contract", + type: "address", + }, + { + internalType: "bytes", + name: "l2Calldata", + type: "bytes", + }, + { + internalType: "bytes[]", + name: "factoryDeps", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + ], + internalType: "struct L2TransactionRequestTwoBridgesInner", + name: "request", + type: "tuple", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_prevMsgSender", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "bridgehubDepositBaseToken", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_depositSender", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "claimFailedDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_l2Receiver", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_mintValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2TxGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2TxGasPerPubdataByte", + type: "uint256", + }, + { + internalType: "address", + name: "_refundRecipient", + type: "address", + }, + ], + name: "deposit", + outputs: [ + { + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + ], + name: "depositHappened", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes", + name: "_message", + type: "bytes", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "finalizeWithdrawal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + ], + name: "isWithdrawalFinalizedShared", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + ], + name: "l2BridgeAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class IL1Bridge__factory { + static readonly abi = _abi; + static createInterface(): IL1BridgeInterface { + return new Interface(_abi) as IL1BridgeInterface; + } + static connect(address: string, runner?: ContractRunner | null): IL1Bridge { + return new Contract(address, _abi, runner) as unknown as IL1Bridge; + } +} diff --git a/typechain/factories/IL1ERC20Bridge__factory.ts b/typechain/factories/IL1ERC20Bridge__factory.ts new file mode 100644 index 00000000..e4e35a06 --- /dev/null +++ b/typechain/factories/IL1ERC20Bridge__factory.ts @@ -0,0 +1,395 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IL1ERC20Bridge, + IL1ERC20BridgeInterface, +} from "../IL1ERC20Bridge"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "ClaimedFailedDeposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "l2DepositTxHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "DepositInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "WithdrawalFinalized", + type: "event", + }, + { + inputs: [], + name: "SHARED_BRIDGE", + outputs: [ + { + internalType: "contract IL1SharedBridge", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_depositSender", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "claimFailedDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l2Receiver", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2TxGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2TxGasPerPubdataByte", + type: "uint256", + }, + ], + name: "deposit", + outputs: [ + { + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l2Receiver", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2TxGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2TxGasPerPubdataByte", + type: "uint256", + }, + { + internalType: "address", + name: "_refundRecipient", + type: "address", + }, + ], + name: "deposit", + outputs: [ + { + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "bytes32", + name: "_depositL2TxHash", + type: "bytes32", + }, + ], + name: "depositAmount", + outputs: [ + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes", + name: "_message", + type: "bytes", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "finalizeWithdrawal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + ], + name: "isWithdrawalFinalized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "l2Bridge", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + ], + name: "l2TokenAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "l2TokenBeacon", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "transferTokenToSharedBridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IL1ERC20Bridge__factory { + static readonly abi = _abi; + static createInterface(): IL1ERC20BridgeInterface { + return new Interface(_abi) as IL1ERC20BridgeInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IL1ERC20Bridge { + return new Contract(address, _abi, runner) as unknown as IL1ERC20Bridge; + } +} diff --git a/typechain/factories/IL1Messenger__factory.ts b/typechain/factories/IL1Messenger__factory.ts new file mode 100644 index 00000000..5664fd32 --- /dev/null +++ b/typechain/factories/IL1Messenger__factory.ts @@ -0,0 +1,166 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IL1Messenger, IL1MessengerInterface } from "../IL1Messenger"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bytes32", + name: "_bytecodeHash", + type: "bytes32", + }, + ], + name: "BytecodeL1PublicationRequested", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "_sender", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "_hash", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes", + name: "_message", + type: "bytes", + }, + ], + name: "L1MessageSent", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: "uint8", + name: "l2ShardId", + type: "uint8", + }, + { + internalType: "bool", + name: "isService", + type: "bool", + }, + { + internalType: "uint16", + name: "txNumberInBlock", + type: "uint16", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes32", + name: "key", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "value", + type: "bytes32", + }, + ], + indexed: false, + internalType: "struct L2ToL1Log", + name: "_l2log", + type: "tuple", + }, + ], + name: "L2ToL1LogSent", + type: "event", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_bytecodeHash", + type: "bytes32", + }, + ], + name: "requestBytecodeL1Publication", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_isService", + type: "bool", + }, + { + internalType: "bytes32", + name: "_key", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_value", + type: "bytes32", + }, + ], + name: "sendL2ToL1Log", + outputs: [ + { + internalType: "uint256", + name: "logIdInMerkleTree", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "_message", + type: "bytes", + }, + ], + name: "sendToL1", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IL1Messenger__factory { + static readonly abi = _abi; + static createInterface(): IL1MessengerInterface { + return new Interface(_abi) as IL1MessengerInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IL1Messenger { + return new Contract(address, _abi, runner) as unknown as IL1Messenger; + } +} diff --git a/typechain/factories/IL1NativeTokenVault__factory.ts b/typechain/factories/IL1NativeTokenVault__factory.ts new file mode 100644 index 00000000..f7cbc2ac --- /dev/null +++ b/typechain/factories/IL1NativeTokenVault__factory.ts @@ -0,0 +1,273 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IL1NativeTokenVault, + IL1NativeTokenVaultInterface, +} from "../IL1NativeTokenVault"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "bridgedTokenBeacon", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "bridgedTokenProxyBytecodeHash", + type: "bytes32", + }, + ], + name: "BridgedTokenBeaconUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "l2TokenBeacon", + type: "address", + }, + ], + name: "TokenBeaconUpdated", + type: "event", + }, + { + inputs: [], + name: "ASSET_ROUTER", + outputs: [ + { + internalType: "contract IAssetRouterBase", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "L1_NULLIFIER", + outputs: [ + { + internalType: "contract IL1Nullifier", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "WETH_TOKEN", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "assetId", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + ], + name: "calculateAssetId", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_originChainId", + type: "uint256", + }, + { + internalType: "address", + name: "_originToken", + type: "address", + }, + ], + name: "calculateCreate2TokenAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + ], + name: "chainBalance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_originChainId", + type: "uint256", + }, + ], + name: "getERC20Getters", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + ], + name: "originChainId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "registerEthToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + ], + name: "registerToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + ], + name: "tokenAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class IL1NativeTokenVault__factory { + static readonly abi = _abi; + static createInterface(): IL1NativeTokenVaultInterface { + return new Interface(_abi) as IL1NativeTokenVaultInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IL1NativeTokenVault { + return new Contract( + address, + _abi, + runner + ) as unknown as IL1NativeTokenVault; + } +} diff --git a/typechain/factories/IL1Nullifier__factory.ts b/typechain/factories/IL1Nullifier__factory.ts new file mode 100644 index 00000000..0e1de137 --- /dev/null +++ b/typechain/factories/IL1Nullifier__factory.ts @@ -0,0 +1,466 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IL1Nullifier, IL1NullifierInterface } from "../IL1Nullifier"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "l2DepositTxHash", + type: "bytes32", + }, + ], + name: "BridgehubDepositFinalized", + type: "event", + }, + { + inputs: [], + name: "BRIDGE_HUB", + outputs: [ + { + internalType: "contract IBridgehub", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_depositSender", + type: "address", + }, + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_assetData", + type: "bytes", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "bridgeRecoverFailedTransfer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_txDataHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_txHash", + type: "bytes32", + }, + ], + name: "bridgehubConfirmL2TransactionForwarded", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "chainBalance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_depositSender", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "claimFailedDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_depositSender", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "claimFailedDepositLegacyErc20Bridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + ], + name: "depositHappened", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "l2MessageIndex", + type: "uint256", + }, + { + internalType: "address", + name: "l2Sender", + type: "address", + }, + { + internalType: "uint16", + name: "l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes", + name: "message", + type: "bytes", + }, + { + internalType: "bytes32[]", + name: "merkleProof", + type: "bytes32[]", + }, + ], + internalType: "struct FinalizeL1DepositParams", + name: "_finalizeWithdrawalParams", + type: "tuple", + }, + ], + name: "finalizeDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + ], + name: "isWithdrawalFinalized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "l1NativeTokenVault", + outputs: [ + { + internalType: "contract IL1NativeTokenVault", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + ], + name: "l2BridgeAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "legacyBridge", + outputs: [ + { + internalType: "contract IL1ERC20Bridge", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "nullifyChainBalanceByNTV", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1AssetRouter", + type: "address", + }, + ], + name: "setL1AssetRouter", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "contract IL1NativeTokenVault", + name: "_nativeTokenVault", + type: "address", + }, + ], + name: "setL1NativeTokenVault", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + ], + name: "transferTokenToNTV", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IL1Nullifier__factory { + static readonly abi = _abi; + static createInterface(): IL1NullifierInterface { + return new Interface(_abi) as IL1NullifierInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IL1Nullifier { + return new Contract(address, _abi, runner) as unknown as IL1Nullifier; + } +} diff --git a/typechain/factories/IL1SharedBridge__factory.ts b/typechain/factories/IL1SharedBridge__factory.ts new file mode 100644 index 00000000..56c2d8ce --- /dev/null +++ b/typechain/factories/IL1SharedBridge__factory.ts @@ -0,0 +1,746 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IL1SharedBridge, + IL1SharedBridgeInterface, +} from "../IL1SharedBridge"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "BridgehubDepositBaseTokenInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "l2DepositTxHash", + type: "bytes32", + }, + ], + name: "BridgehubDepositFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "BridgehubDepositInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "ClaimedFailedDepositSharedBridge", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "l2DepositTxHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "LegacyDepositInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l1Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "WithdrawalFinalizedSharedBridge", + type: "event", + }, + { + inputs: [], + name: "BRIDGE_HUB", + outputs: [ + { + internalType: "contract IBridgehub", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "L1_WETH_TOKEN", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_txDataHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "_txHash", + type: "bytes32", + }, + ], + name: "bridgehubConfirmL2Transaction", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_prevMsgSender", + type: "address", + }, + { + internalType: "uint256", + name: "_l2Value", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "bridgehubDeposit", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "magicValue", + type: "bytes32", + }, + { + internalType: "address", + name: "l2Contract", + type: "address", + }, + { + internalType: "bytes", + name: "l2Calldata", + type: "bytes", + }, + { + internalType: "bytes[]", + name: "factoryDeps", + type: "bytes[]", + }, + { + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + ], + internalType: "struct L2TransactionRequestTwoBridgesInner", + name: "request", + type: "tuple", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_prevMsgSender", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "bridgehubDepositBaseToken", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_depositSender", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "claimFailedDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_depositSender", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "claimFailedDepositLegacyErc20Bridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + ], + name: "depositHappened", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_msgSender", + type: "address", + }, + { + internalType: "address", + name: "_l2Receiver", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2TxGasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2TxGasPerPubdataByte", + type: "uint256", + }, + { + internalType: "address", + name: "_refundRecipient", + type: "address", + }, + ], + name: "depositLegacyErc20Bridge", + outputs: [ + { + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes", + name: "_message", + type: "bytes", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "finalizeWithdrawal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes", + name: "_message", + type: "bytes", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "finalizeWithdrawalLegacyErc20Bridge", + outputs: [ + { + internalType: "address", + name: "l1Receiver", + type: "address", + }, + { + internalType: "address", + name: "l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + ], + name: "isWithdrawalFinalized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + ], + name: "l2BridgeAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "legacyBridge", + outputs: [ + { + internalType: "contract IL1ERC20Bridge", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + ], + name: "receiveEth", + outputs: [], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_eraLegacyBridgeLastDepositBatch", + type: "uint256", + }, + { + internalType: "uint256", + name: "_eraLegacyBridgeLastDepositTxNumber", + type: "uint256", + }, + ], + name: "setEraLegacyBridgeLastDepositTime", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_eraPostDiamondUpgradeFirstBatch", + type: "uint256", + }, + ], + name: "setEraPostDiamondUpgradeFirstBatch", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_eraPostLegacyBridgeUpgradeFirstBatch", + type: "uint256", + }, + ], + name: "setEraPostLegacyBridgeUpgradeFirstBatch", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IL1SharedBridge__factory { + static readonly abi = _abi; + static createInterface(): IL1SharedBridgeInterface { + return new Interface(_abi) as IL1SharedBridgeInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IL1SharedBridge { + return new Contract(address, _abi, runner) as unknown as IL1SharedBridge; + } +} diff --git a/typechain/factories/IL2AssetRouter__factory.ts b/typechain/factories/IL2AssetRouter__factory.ts new file mode 100644 index 00000000..8294b025 --- /dev/null +++ b/typechain/factories/IL2AssetRouter__factory.ts @@ -0,0 +1,385 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IL2AssetRouter, + IL2AssetRouterInterface, +} from "../IL2AssetRouter"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "_assetAddress", + type: "address", + }, + ], + name: "AssetHandlerRegistered", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "assetHandlerAddress", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "additionalData", + type: "bytes32", + }, + { + indexed: false, + internalType: "address", + name: "assetDeploymentTracker", + type: "address", + }, + ], + name: "AssetHandlerRegisteredInitial", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "BridgehubDepositBaseTokenInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "txDataHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "address", + name: "from", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes", + name: "bridgeMintCalldata", + type: "bytes", + }, + ], + name: "BridgehubDepositInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "sender", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes32", + name: "assetDataHash", + type: "bytes32", + }, + ], + name: "BridgehubWithdrawalInitiated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes", + name: "assetData", + type: "bytes", + }, + ], + name: "DepositFinalizedAssetRouter", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "chainId", + type: "uint256", + }, + { + indexed: true, + internalType: "address", + name: "l2Sender", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + { + indexed: false, + internalType: "bytes", + name: "assetData", + type: "bytes", + }, + ], + name: "WithdrawalInitiatedAssetRouter", + type: "event", + }, + { + inputs: [], + name: "BRIDGE_HUB", + outputs: [ + { + internalType: "contract IBridgehub", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + ], + name: "assetHandlerAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_transferData", + type: "bytes", + }, + ], + name: "finalizeDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "l1AssetRouter", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_originChainId", + type: "uint256", + }, + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "address", + name: "_assetAddress", + type: "address", + }, + ], + name: "setAssetHandlerAddress", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_assetRegistrationData", + type: "bytes32", + }, + { + internalType: "address", + name: "_assetHandlerAddress", + type: "address", + }, + ], + name: "setAssetHandlerAddressThisChain", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_assetId", + type: "bytes32", + }, + { + internalType: "bytes", + name: "_transferData", + type: "bytes", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Receiver", + type: "address", + }, + { + internalType: "address", + name: "_l2Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "address", + name: "_sender", + type: "address", + }, + ], + name: "withdrawLegacyBridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IL2AssetRouter__factory { + static readonly abi = _abi; + static createInterface(): IL2AssetRouterInterface { + return new Interface(_abi) as IL2AssetRouterInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IL2AssetRouter { + return new Contract(address, _abi, runner) as unknown as IL2AssetRouter; + } +} diff --git a/typechain/factories/IL2Bridge__factory.ts b/typechain/factories/IL2Bridge__factory.ts new file mode 100644 index 00000000..8c194a7d --- /dev/null +++ b/typechain/factories/IL2Bridge__factory.ts @@ -0,0 +1,126 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IL2Bridge, IL2BridgeInterface } from "../IL2Bridge"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_l1Sender", + type: "address", + }, + { + internalType: "address", + name: "_l2Receiver", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "finalizeDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "l1Bridge", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l2Token", + type: "address", + }, + ], + name: "l1TokenAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + ], + name: "l2TokenAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Receiver", + type: "address", + }, + { + internalType: "address", + name: "_l2Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IL2Bridge__factory { + static readonly abi = _abi; + static createInterface(): IL2BridgeInterface { + return new Interface(_abi) as IL2BridgeInterface; + } + static connect(address: string, runner?: ContractRunner | null): IL2Bridge { + return new Contract(address, _abi, runner) as unknown as IL2Bridge; + } +} diff --git a/typechain/factories/IL2NativeTokenVault__factory.ts b/typechain/factories/IL2NativeTokenVault__factory.ts new file mode 100644 index 00000000..c565bece --- /dev/null +++ b/typechain/factories/IL2NativeTokenVault__factory.ts @@ -0,0 +1,316 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IL2NativeTokenVault, + IL2NativeTokenVaultInterface, +} from "../IL2NativeTokenVault"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "bridgedTokenBeacon", + type: "address", + }, + { + indexed: false, + internalType: "bytes32", + name: "bridgedTokenProxyBytecodeHash", + type: "bytes32", + }, + ], + name: "BridgedTokenBeaconUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "l1Sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l2Receiver", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l2Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "FinalizeDeposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "l2TokenBeacon", + type: "address", + }, + { + indexed: true, + internalType: "bytes32", + name: "l2TokenProxyBytecodeHash", + type: "bytes32", + }, + ], + name: "L2TokenBeaconUpdated", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "l2Sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l1Receiver", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l2Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "WithdrawalInitiated", + type: "event", + }, + { + inputs: [], + name: "ASSET_ROUTER", + outputs: [ + { + internalType: "contract IAssetRouterBase", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "WETH_TOKEN", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "token", + type: "address", + }, + ], + name: "assetId", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "address", + name: "_tokenAddress", + type: "address", + }, + ], + name: "calculateAssetId", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_originChainId", + type: "uint256", + }, + { + internalType: "address", + name: "_originToken", + type: "address", + }, + ], + name: "calculateCreate2TokenAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_originChainId", + type: "uint256", + }, + ], + name: "getERC20Getters", + outputs: [ + { + internalType: "bytes", + name: "", + type: "bytes", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + ], + name: "l2TokenAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + ], + name: "originChainId", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + ], + name: "registerToken", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "assetId", + type: "bytes32", + }, + ], + name: "tokenAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, +] as const; + +export class IL2NativeTokenVault__factory { + static readonly abi = _abi; + static createInterface(): IL2NativeTokenVaultInterface { + return new Interface(_abi) as IL2NativeTokenVaultInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IL2NativeTokenVault { + return new Contract( + address, + _abi, + runner + ) as unknown as IL2NativeTokenVault; + } +} diff --git a/typechain/factories/IL2SharedBridge__factory.ts b/typechain/factories/IL2SharedBridge__factory.ts new file mode 100644 index 00000000..2706eef1 --- /dev/null +++ b/typechain/factories/IL2SharedBridge__factory.ts @@ -0,0 +1,207 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IL2SharedBridge, + IL2SharedBridgeInterface, +} from "../IL2SharedBridge"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "l1Sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l2Receiver", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l2Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "FinalizeDeposit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "l2Sender", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l1Receiver", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "l2Token", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "WithdrawalInitiated", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Sender", + type: "address", + }, + { + internalType: "address", + name: "_l2Receiver", + type: "address", + }, + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + { + internalType: "bytes", + name: "_data", + type: "bytes", + }, + ], + name: "finalizeDeposit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "l1Bridge", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "l1SharedBridge", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l2Token", + type: "address", + }, + ], + name: "l1TokenAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Token", + type: "address", + }, + ], + name: "l2TokenAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_l1Receiver", + type: "address", + }, + { + internalType: "address", + name: "_l2Token", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "withdraw", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IL2SharedBridge__factory { + static readonly abi = _abi; + static createInterface(): IL2SharedBridgeInterface { + return new Interface(_abi) as IL2SharedBridgeInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IL2SharedBridge { + return new Contract(address, _abi, runner) as unknown as IL2SharedBridge; + } +} diff --git a/typechain/factories/INonceHolder__factory.ts b/typechain/factories/INonceHolder__factory.ts new file mode 100644 index 00000000..c965e97b --- /dev/null +++ b/typechain/factories/INonceHolder__factory.ts @@ -0,0 +1,239 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { INonceHolder, INonceHolderInterface } from "../INonceHolder"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "accountAddress", + type: "address", + }, + { + indexed: true, + internalType: "uint256", + name: "key", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256", + }, + ], + name: "ValueSetUnderNonce", + type: "event", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getDeploymentNonce", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getMinNonce", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "getRawNonce", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_key", + type: "uint256", + }, + ], + name: "getValueUnderNonce", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + ], + name: "increaseMinNonce", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "incrementDeploymentNonce", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_expectedNonce", + type: "uint256", + }, + ], + name: "incrementMinNonceIfEquals", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + { + internalType: "uint256", + name: "_nonce", + type: "uint256", + }, + ], + name: "isNonceUsed", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_key", + type: "uint256", + }, + { + internalType: "uint256", + name: "_value", + type: "uint256", + }, + ], + name: "setValueUnderNonce", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + { + internalType: "uint256", + name: "_key", + type: "uint256", + }, + { + internalType: "bool", + name: "_shouldBeUsed", + type: "bool", + }, + ], + name: "validateNonceUsage", + outputs: [], + stateMutability: "view", + type: "function", + }, +] as const; + +export class INonceHolder__factory { + static readonly abi = _abi; + static createInterface(): INonceHolderInterface { + return new Interface(_abi) as INonceHolderInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): INonceHolder { + return new Contract(address, _abi, runner) as unknown as INonceHolder; + } +} diff --git a/typechain/factories/IPaymasterFlow__factory.ts b/typechain/factories/IPaymasterFlow__factory.ts new file mode 100644 index 00000000..4abbb9d6 --- /dev/null +++ b/typechain/factories/IPaymasterFlow__factory.ts @@ -0,0 +1,61 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IPaymasterFlow, + IPaymasterFlowInterface, +} from "../IPaymasterFlow"; + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_token", + type: "address", + }, + { + internalType: "uint256", + name: "_minAllowance", + type: "uint256", + }, + { + internalType: "bytes", + name: "_innerInput", + type: "bytes", + }, + ], + name: "approvalBased", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes", + name: "input", + type: "bytes", + }, + ], + name: "general", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IPaymasterFlow__factory { + static readonly abi = _abi; + static createInterface(): IPaymasterFlowInterface { + return new Interface(_abi) as IPaymasterFlowInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IPaymasterFlow { + return new Contract(address, _abi, runner) as unknown as IPaymasterFlow; + } +} diff --git a/typechain/factories/ITestnetERC20Token__factory.ts b/typechain/factories/ITestnetERC20Token__factory.ts new file mode 100644 index 00000000..15d1a2ea --- /dev/null +++ b/typechain/factories/ITestnetERC20Token__factory.ts @@ -0,0 +1,62 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + ITestnetERC20Token, + ITestnetERC20TokenInterface, +} from "../ITestnetERC20Token"; + +const _abi = [ + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_to", + type: "address", + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256", + }, + ], + name: "mint", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class ITestnetERC20Token__factory { + static readonly abi = _abi; + static createInterface(): ITestnetERC20TokenInterface { + return new Interface(_abi) as ITestnetERC20TokenInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): ITestnetERC20Token { + return new Contract(address, _abi, runner) as unknown as ITestnetERC20Token; + } +} diff --git a/typechain/factories/IZkSyncHyperchain__factory.ts b/typechain/factories/IZkSyncHyperchain__factory.ts new file mode 100644 index 00000000..7342c502 --- /dev/null +++ b/typechain/factories/IZkSyncHyperchain__factory.ts @@ -0,0 +1,2430 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { + IZkSyncHyperchain, + IZkSyncHyperchainInterface, +} from "../IZkSyncHyperchain"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "batchNumber", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + name: "BlockCommit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "batchNumber", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + name: "BlockExecution", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "totalBatchesCommitted", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalBatchesVerified", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalBatchesExecuted", + type: "uint256", + }, + ], + name: "BlocksRevert", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "previousLastVerifiedBatch", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "currentLastVerifiedBatch", + type: "uint256", + }, + ], + name: "BlocksVerification", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "facet", + type: "address", + }, + { + internalType: "enum Diamond.Action", + name: "action", + type: "uint8", + }, + { + internalType: "bool", + name: "isFreezable", + type: "bool", + }, + { + internalType: "bytes4[]", + name: "selectors", + type: "bytes4[]", + }, + ], + internalType: "struct Diamond.FacetCut[]", + name: "facetCuts", + type: "tuple[]", + }, + { + internalType: "address", + name: "initAddress", + type: "address", + }, + { + internalType: "bytes", + name: "initCalldata", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct Diamond.DiamondCutData", + name: "diamondCut", + type: "tuple", + }, + ], + name: "ExecuteUpgrade", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Freeze", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bool", + name: "isPorterAvailable", + type: "bool", + }, + ], + name: "IsPorterAvailableStatusUpdate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldAdmin", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint128", + name: "oldNominator", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "oldDenominator", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "newNominator", + type: "uint128", + }, + { + indexed: false, + internalType: "uint128", + name: "newDenominator", + type: "uint128", + }, + ], + name: "NewBaseTokenMultiplier", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + components: [ + { + internalType: "enum PubdataPricingMode", + name: "pubdataPricingMode", + type: "uint8", + }, + { + internalType: "uint32", + name: "batchOverheadL1Gas", + type: "uint32", + }, + { + internalType: "uint32", + name: "maxPubdataPerBatch", + type: "uint32", + }, + { + internalType: "uint32", + name: "maxL2GasPerBatch", + type: "uint32", + }, + { + internalType: "uint32", + name: "priorityTxMaxPubdata", + type: "uint32", + }, + { + internalType: "uint64", + name: "minimalL2GasPrice", + type: "uint64", + }, + ], + indexed: false, + internalType: "struct FeeParams", + name: "oldFeeParams", + type: "tuple", + }, + { + components: [ + { + internalType: "enum PubdataPricingMode", + name: "pubdataPricingMode", + type: "uint8", + }, + { + internalType: "uint32", + name: "batchOverheadL1Gas", + type: "uint32", + }, + { + internalType: "uint32", + name: "maxPubdataPerBatch", + type: "uint32", + }, + { + internalType: "uint32", + name: "maxL2GasPerBatch", + type: "uint32", + }, + { + internalType: "uint32", + name: "priorityTxMaxPubdata", + type: "uint32", + }, + { + internalType: "uint64", + name: "minimalL2GasPrice", + type: "uint64", + }, + ], + indexed: false, + internalType: "struct FeeParams", + name: "newFeeParams", + type: "tuple", + }, + ], + name: "NewFeeParams", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldPendingAdmin", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "txId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint64", + name: "expirationTimestamp", + type: "uint64", + }, + { + components: [ + { + internalType: "uint256", + name: "txType", + type: "uint256", + }, + { + internalType: "uint256", + name: "from", + type: "uint256", + }, + { + internalType: "uint256", + name: "to", + type: "uint256", + }, + { + internalType: "uint256", + name: "gasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "gasPerPubdataByteLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "paymaster", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256[4]", + name: "reserved", + type: "uint256[4]", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256[]", + name: "factoryDeps", + type: "uint256[]", + }, + { + internalType: "bytes", + name: "paymasterInput", + type: "bytes", + }, + { + internalType: "bytes", + name: "reservedDynamic", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct L2CanonicalTransaction", + name: "transaction", + type: "tuple", + }, + { + indexed: false, + internalType: "bytes[]", + name: "factoryDeps", + type: "bytes[]", + }, + ], + name: "NewPriorityRequest", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldPriorityTxMaxGasLimit", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newPriorityTxMaxGasLimit", + type: "uint256", + }, + ], + name: "NewPriorityTxMaxGasLimit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "oldTransactionFilterer", + type: "address", + }, + { + indexed: false, + internalType: "address", + name: "newTransactionFilterer", + type: "address", + }, + ], + name: "NewTransactionFilterer", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "facet", + type: "address", + }, + { + internalType: "enum Diamond.Action", + name: "action", + type: "uint8", + }, + { + internalType: "bool", + name: "isFreezable", + type: "bool", + }, + { + internalType: "bytes4[]", + name: "selectors", + type: "bytes4[]", + }, + ], + internalType: "struct Diamond.FacetCut[]", + name: "facetCuts", + type: "tuple[]", + }, + { + internalType: "address", + name: "initAddress", + type: "address", + }, + { + internalType: "bytes", + name: "initCalldata", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct Diamond.DiamondCutData", + name: "diamondCut", + type: "tuple", + }, + { + indexed: true, + internalType: "uint256", + name: "proposalId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "proposalSalt", + type: "bytes32", + }, + ], + name: "ProposeTransparentUpgrade", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Unfreeze", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "validatorAddress", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "isActive", + type: "bool", + }, + ], + name: "ValidatorStatusUpdate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "enum PubdataPricingMode", + name: "validiumMode", + type: "uint8", + }, + ], + name: "ValidiumModeStatusUpdate", + type: "event", + }, + { + inputs: [], + name: "acceptAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "baseTokenGasPriceMultiplierDenominator", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "baseTokenGasPriceMultiplierNominator", + outputs: [ + { + internalType: "uint128", + name: "", + type: "uint128", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "address", + name: "contractL2", + type: "address", + }, + { + internalType: "uint256", + name: "mintValue", + type: "uint256", + }, + { + internalType: "uint256", + name: "l2Value", + type: "uint256", + }, + { + internalType: "bytes", + name: "l2Calldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "l2GasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "l2GasPerPubdataByteLimit", + type: "uint256", + }, + { + internalType: "bytes[]", + name: "factoryDeps", + type: "bytes[]", + }, + { + internalType: "address", + name: "refundRecipient", + type: "address", + }, + ], + internalType: "struct BridgehubL2TransactionRequest", + name: "_request", + type: "tuple", + }, + ], + name: "bridgehubRequestL2Transaction", + outputs: [ + { + internalType: "bytes32", + name: "canonicalTxHash", + type: "bytes32", + }, + ], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "enum PubdataPricingMode", + name: "pubdataPricingMode", + type: "uint8", + }, + { + internalType: "uint32", + name: "batchOverheadL1Gas", + type: "uint32", + }, + { + internalType: "uint32", + name: "maxPubdataPerBatch", + type: "uint32", + }, + { + internalType: "uint32", + name: "maxL2GasPerBatch", + type: "uint32", + }, + { + internalType: "uint32", + name: "priorityTxMaxPubdata", + type: "uint32", + }, + { + internalType: "uint64", + name: "minimalL2GasPrice", + type: "uint64", + }, + ], + internalType: "struct FeeParams", + name: "_newFeeParams", + type: "tuple", + }, + ], + name: "changeFeeParams", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo", + name: "_lastCommittedBatchData", + type: "tuple", + }, + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "uint64", + name: "timestamp", + type: "uint64", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "bytes32", + name: "newStateRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "bootloaderHeapInitialContentsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "eventsQueueStateHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "systemLogs", + type: "bytes", + }, + { + internalType: "bytes", + name: "pubdataCommitments", + type: "bytes", + }, + ], + internalType: "struct IExecutor.CommitBatchInfo[]", + name: "_newBatchesData", + type: "tuple[]", + }, + ], + name: "commitBatches", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo", + name: "_lastCommittedBatchData", + type: "tuple", + }, + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "uint64", + name: "timestamp", + type: "uint64", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "bytes32", + name: "newStateRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "bootloaderHeapInitialContentsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "eventsQueueStateHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "systemLogs", + type: "bytes", + }, + { + internalType: "bytes", + name: "pubdataCommitments", + type: "bytes", + }, + ], + internalType: "struct IExecutor.CommitBatchInfo[]", + name: "_newBatchesData", + type: "tuple[]", + }, + ], + name: "commitBatchesSharedBridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo[]", + name: "_batchesData", + type: "tuple[]", + }, + ], + name: "executeBatches", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo[]", + name: "_batchesData", + type: "tuple[]", + }, + ], + name: "executeBatchesSharedBridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "facet", + type: "address", + }, + { + internalType: "enum Diamond.Action", + name: "action", + type: "uint8", + }, + { + internalType: "bool", + name: "isFreezable", + type: "bool", + }, + { + internalType: "bytes4[]", + name: "selectors", + type: "bytes4[]", + }, + ], + internalType: "struct Diamond.FacetCut[]", + name: "facetCuts", + type: "tuple[]", + }, + { + internalType: "address", + name: "initAddress", + type: "address", + }, + { + internalType: "bytes", + name: "initCalldata", + type: "bytes", + }, + ], + internalType: "struct Diamond.DiamondCutData", + name: "_diamondCut", + type: "tuple", + }, + ], + name: "executeUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_selector", + type: "bytes4", + }, + ], + name: "facetAddress", + outputs: [ + { + internalType: "address", + name: "facet", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "facetAddresses", + outputs: [ + { + internalType: "address[]", + name: "facets", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_facet", + type: "address", + }, + ], + name: "facetFunctionSelectors", + outputs: [ + { + internalType: "bytes4[]", + name: "", + type: "bytes4[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "facets", + outputs: [ + { + components: [ + { + internalType: "address", + name: "addr", + type: "address", + }, + { + internalType: "bytes4[]", + name: "selectors", + type: "bytes4[]", + }, + ], + internalType: "struct IGetters.Facet[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes", + name: "_message", + type: "bytes", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "finalizeEthWithdrawal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "freezeDiamond", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBaseToken", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBaseTokenBridge", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getBridgehub", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getFirstUnprocessedPriorityTx", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getL2BootloaderBytecodeHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getL2DefaultAccountBytecodeHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getL2SystemContractsUpgradeBatchNumber", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getL2SystemContractsUpgradeTxHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getName", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPendingAdmin", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPriorityQueueSize", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPriorityTxMaxGasLimit", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getProtocolVersion", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPubdataPricingMode", + outputs: [ + { + internalType: "enum PubdataPricingMode", + name: "", + type: "uint8", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getSemverProtocolVersion", + outputs: [ + { + internalType: "uint32", + name: "", + type: "uint32", + }, + { + internalType: "uint32", + name: "", + type: "uint32", + }, + { + internalType: "uint32", + name: "", + type: "uint32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getStateTransitionManager", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalBatchesCommitted", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalBatchesExecuted", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalBatchesVerified", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalPriorityTxs", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVerifier", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVerifierParams", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "recursionNodeLevelVkHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "recursionLeafLevelVkHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "recursionCircuitsSetVksHash", + type: "bytes32", + }, + ], + internalType: "struct VerifierParams", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isDiamondStorageFrozen", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + ], + name: "isEthWithdrawalFinalized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_facet", + type: "address", + }, + ], + name: "isFacetFreezable", + outputs: [ + { + internalType: "bool", + name: "isFreezable", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_selector", + type: "bytes4", + }, + ], + name: "isFunctionFreezable", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "isValidator", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_batchNumber", + type: "uint256", + }, + ], + name: "l2LogsRootHash", + outputs: [ + { + internalType: "bytes32", + name: "merkleRoot", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_gasPrice", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2GasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2GasPerPubdataByteLimit", + type: "uint256", + }, + ], + name: "l2TransactionBaseCost", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "priorityQueueFrontOperation", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "canonicalTxHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "expirationTimestamp", + type: "uint64", + }, + { + internalType: "uint192", + name: "layer2Tip", + type: "uint192", + }, + ], + internalType: "struct PriorityOperation", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo", + name: "_prevBatch", + type: "tuple", + }, + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo[]", + name: "_committedBatches", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256[]", + name: "recursiveAggregationInput", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "serializedProof", + type: "uint256[]", + }, + ], + internalType: "struct IExecutor.ProofInput", + name: "_proof", + type: "tuple", + }, + ], + name: "proveBatches", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo", + name: "_prevBatch", + type: "tuple", + }, + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo[]", + name: "_committedBatches", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256[]", + name: "recursiveAggregationInput", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "serializedProof", + type: "uint256[]", + }, + ], + internalType: "struct IExecutor.ProofInput", + name: "_proof", + type: "tuple", + }, + ], + name: "proveBatchesSharedBridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + { + internalType: "enum TxStatus", + name: "_status", + type: "uint8", + }, + ], + name: "proveL1ToL2TransactionStatus", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_batchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_index", + type: "uint256", + }, + { + components: [ + { + internalType: "uint8", + name: "l2ShardId", + type: "uint8", + }, + { + internalType: "bool", + name: "isService", + type: "bool", + }, + { + internalType: "uint16", + name: "txNumberInBatch", + type: "uint16", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes32", + name: "key", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "value", + type: "bytes32", + }, + ], + internalType: "struct L2Log", + name: "_log", + type: "tuple", + }, + { + internalType: "bytes32[]", + name: "_proof", + type: "bytes32[]", + }, + ], + name: "proveL2LogInclusion", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_batchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_index", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "txNumberInBatch", + type: "uint16", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + internalType: "struct L2Message", + name: "_message", + type: "tuple", + }, + { + internalType: "bytes32[]", + name: "_proof", + type: "bytes32[]", + }, + ], + name: "proveL2MessageInclusion", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_contractL2", + type: "address", + }, + { + internalType: "uint256", + name: "_l2Value", + type: "uint256", + }, + { + internalType: "bytes", + name: "_calldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "_l2GasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2GasPerPubdataByteLimit", + type: "uint256", + }, + { + internalType: "bytes[]", + name: "_factoryDeps", + type: "bytes[]", + }, + { + internalType: "address", + name: "_refundRecipient", + type: "address", + }, + ], + name: "requestL2Transaction", + outputs: [ + { + internalType: "bytes32", + name: "canonicalTxHash", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_newLastBatch", + type: "uint256", + }, + ], + name: "revertBatches", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_chainId", + type: "uint256", + }, + { + internalType: "uint256", + name: "_newLastBatch", + type: "uint256", + }, + ], + name: "revertBatchesSharedBridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newPendingAdmin", + type: "address", + }, + ], + name: "setPendingAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_zkPorterIsAvailable", + type: "bool", + }, + ], + name: "setPorterAvailability", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_newPriorityTxMaxGasLimit", + type: "uint256", + }, + ], + name: "setPriorityTxMaxGasLimit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "enum PubdataPricingMode", + name: "_pricingMode", + type: "uint8", + }, + ], + name: "setPubdataPricingMode", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint128", + name: "_nominator", + type: "uint128", + }, + { + internalType: "uint128", + name: "_denominator", + type: "uint128", + }, + ], + name: "setTokenMultiplier", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_transactionFilterer", + type: "address", + }, + ], + name: "setTransactionFilterer", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_validator", + type: "address", + }, + { + internalType: "bool", + name: "_active", + type: "bool", + }, + ], + name: "setValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_batchNumber", + type: "uint256", + }, + ], + name: "storedBatchHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "transferEthToSharedBridge", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "unfreezeDiamond", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_protocolVersion", + type: "uint256", + }, + { + components: [ + { + components: [ + { + internalType: "address", + name: "facet", + type: "address", + }, + { + internalType: "enum Diamond.Action", + name: "action", + type: "uint8", + }, + { + internalType: "bool", + name: "isFreezable", + type: "bool", + }, + { + internalType: "bytes4[]", + name: "selectors", + type: "bytes4[]", + }, + ], + internalType: "struct Diamond.FacetCut[]", + name: "facetCuts", + type: "tuple[]", + }, + { + internalType: "address", + name: "initAddress", + type: "address", + }, + { + internalType: "bytes", + name: "initCalldata", + type: "bytes", + }, + ], + internalType: "struct Diamond.DiamondCutData", + name: "_cutData", + type: "tuple", + }, + ], + name: "upgradeChainFromVersion", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IZkSyncHyperchain__factory { + static readonly abi = _abi; + static createInterface(): IZkSyncHyperchainInterface { + return new Interface(_abi) as IZkSyncHyperchainInterface; + } + static connect( + address: string, + runner?: ContractRunner | null + ): IZkSyncHyperchain { + return new Contract(address, _abi, runner) as unknown as IZkSyncHyperchain; + } +} diff --git a/typechain/factories/IZkSync__factory.ts b/typechain/factories/IZkSync__factory.ts new file mode 100644 index 00000000..84c32e58 --- /dev/null +++ b/typechain/factories/IZkSync__factory.ts @@ -0,0 +1,1639 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ + +import { Contract, Interface, type ContractRunner } from "ethers"; +import type { IZkSync, IZkSyncInterface } from "../IZkSync"; + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "batchNumber", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + name: "BlockCommit", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "batchNumber", + type: "uint256", + }, + { + indexed: true, + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + indexed: true, + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + name: "BlockExecution", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "totalBatchesCommitted", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalBatchesVerified", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "totalBatchesExecuted", + type: "uint256", + }, + ], + name: "BlocksRevert", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "uint256", + name: "previousLastVerifiedBatch", + type: "uint256", + }, + { + indexed: true, + internalType: "uint256", + name: "currentLastVerifiedBatch", + type: "uint256", + }, + ], + name: "BlocksVerification", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "to", + type: "address", + }, + { + indexed: false, + internalType: "uint256", + name: "amount", + type: "uint256", + }, + ], + name: "EthWithdrawalFinalized", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "facet", + type: "address", + }, + { + internalType: "enum Diamond.Action", + name: "action", + type: "uint8", + }, + { + internalType: "bool", + name: "isFreezable", + type: "bool", + }, + { + internalType: "bytes4[]", + name: "selectors", + type: "bytes4[]", + }, + ], + internalType: "struct Diamond.FacetCut[]", + name: "facetCuts", + type: "tuple[]", + }, + { + internalType: "address", + name: "initAddress", + type: "address", + }, + { + internalType: "bytes", + name: "initCalldata", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct Diamond.DiamondCutData", + name: "diamondCut", + type: "tuple", + }, + ], + name: "ExecuteUpgrade", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Freeze", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "bool", + name: "isPorterAvailable", + type: "bool", + }, + ], + name: "IsPorterAvailableStatusUpdate", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldAdmin", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newAdmin", + type: "address", + }, + ], + name: "NewAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldGovernor", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newGovernor", + type: "address", + }, + ], + name: "NewGovernor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldPendingAdmin", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newPendingAdmin", + type: "address", + }, + ], + name: "NewPendingAdmin", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "oldPendingGovernor", + type: "address", + }, + { + indexed: true, + internalType: "address", + name: "newPendingGovernor", + type: "address", + }, + ], + name: "NewPendingGovernor", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "txId", + type: "uint256", + }, + { + indexed: false, + internalType: "bytes32", + name: "txHash", + type: "bytes32", + }, + { + indexed: false, + internalType: "uint64", + name: "expirationTimestamp", + type: "uint64", + }, + { + components: [ + { + internalType: "uint256", + name: "txType", + type: "uint256", + }, + { + internalType: "uint256", + name: "from", + type: "uint256", + }, + { + internalType: "uint256", + name: "to", + type: "uint256", + }, + { + internalType: "uint256", + name: "gasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "gasPerPubdataByteLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "maxPriorityFeePerGas", + type: "uint256", + }, + { + internalType: "uint256", + name: "paymaster", + type: "uint256", + }, + { + internalType: "uint256", + name: "nonce", + type: "uint256", + }, + { + internalType: "uint256", + name: "value", + type: "uint256", + }, + { + internalType: "uint256[4]", + name: "reserved", + type: "uint256[4]", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + { + internalType: "bytes", + name: "signature", + type: "bytes", + }, + { + internalType: "uint256[]", + name: "factoryDeps", + type: "uint256[]", + }, + { + internalType: "bytes", + name: "paymasterInput", + type: "bytes", + }, + { + internalType: "bytes", + name: "reservedDynamic", + type: "bytes", + }, + ], + indexed: false, + internalType: "struct IMailbox.L2CanonicalTransaction", + name: "transaction", + type: "tuple", + }, + { + indexed: false, + internalType: "bytes[]", + name: "factoryDeps", + type: "bytes[]", + }, + ], + name: "NewPriorityRequest", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "uint256", + name: "oldPriorityTxMaxGasLimit", + type: "uint256", + }, + { + indexed: false, + internalType: "uint256", + name: "newPriorityTxMaxGasLimit", + type: "uint256", + }, + ], + name: "NewPriorityTxMaxGasLimit", + type: "event", + }, + { + anonymous: false, + inputs: [], + name: "Unfreeze", + type: "event", + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "validatorAddress", + type: "address", + }, + { + indexed: false, + internalType: "bool", + name: "isActive", + type: "bool", + }, + ], + name: "ValidatorStatusUpdate", + type: "event", + }, + { + inputs: [], + name: "acceptAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "acceptGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo", + name: "_lastCommittedBatchData", + type: "tuple", + }, + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "uint64", + name: "timestamp", + type: "uint64", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "bytes32", + name: "newStateRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "bootloaderHeapInitialContentsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "eventsQueueStateHash", + type: "bytes32", + }, + { + internalType: "bytes", + name: "systemLogs", + type: "bytes", + }, + { + internalType: "bytes", + name: "totalL2ToL1Pubdata", + type: "bytes", + }, + ], + internalType: "struct IExecutor.CommitBatchInfo[]", + name: "_newBatchesData", + type: "tuple[]", + }, + ], + name: "commitBatches", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo[]", + name: "_batchesData", + type: "tuple[]", + }, + ], + name: "executeBatches", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + components: [ + { + components: [ + { + internalType: "address", + name: "facet", + type: "address", + }, + { + internalType: "enum Diamond.Action", + name: "action", + type: "uint8", + }, + { + internalType: "bool", + name: "isFreezable", + type: "bool", + }, + { + internalType: "bytes4[]", + name: "selectors", + type: "bytes4[]", + }, + ], + internalType: "struct Diamond.FacetCut[]", + name: "facetCuts", + type: "tuple[]", + }, + { + internalType: "address", + name: "initAddress", + type: "address", + }, + { + internalType: "bytes", + name: "initCalldata", + type: "bytes", + }, + ], + internalType: "struct Diamond.DiamondCutData", + name: "_diamondCut", + type: "tuple", + }, + ], + name: "executeUpgrade", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_selector", + type: "bytes4", + }, + ], + name: "facetAddress", + outputs: [ + { + internalType: "address", + name: "facet", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "facetAddresses", + outputs: [ + { + internalType: "address[]", + name: "facets", + type: "address[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_facet", + type: "address", + }, + ], + name: "facetFunctionSelectors", + outputs: [ + { + internalType: "bytes4[]", + name: "", + type: "bytes4[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "facets", + outputs: [ + { + components: [ + { + internalType: "address", + name: "addr", + type: "address", + }, + { + internalType: "bytes4[]", + name: "selectors", + type: "bytes4[]", + }, + ], + internalType: "struct IGetters.Facet[]", + name: "", + type: "tuple[]", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes", + name: "_message", + type: "bytes", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + ], + name: "finalizeEthWithdrawal", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "freezeDiamond", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [], + name: "getFirstUnprocessedPriorityTx", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getGovernor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getL2BootloaderBytecodeHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getL2DefaultAccountBytecodeHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getL2SystemContractsUpgradeBatchNumber", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getL2SystemContractsUpgradeTxHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getName", + outputs: [ + { + internalType: "string", + name: "", + type: "string", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPendingGovernor", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPriorityQueueSize", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getPriorityTxMaxGasLimit", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getProtocolVersion", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalBatchesCommitted", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalBatchesExecuted", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalBatchesVerified", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getTotalPriorityTxs", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVerifier", + outputs: [ + { + internalType: "address", + name: "", + type: "address", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "getVerifierParams", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "recursionNodeLevelVkHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "recursionLeafLevelVkHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "recursionCircuitsSetVksHash", + type: "bytes32", + }, + ], + internalType: "struct VerifierParams", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "isDiamondStorageFrozen", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + ], + name: "isEthWithdrawalFinalized", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_facet", + type: "address", + }, + ], + name: "isFacetFreezable", + outputs: [ + { + internalType: "bool", + name: "isFreezable", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes4", + name: "_selector", + type: "bytes4", + }, + ], + name: "isFunctionFreezable", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_address", + type: "address", + }, + ], + name: "isValidator", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_batchNumber", + type: "uint256", + }, + ], + name: "l2LogsRootHash", + outputs: [ + { + internalType: "bytes32", + name: "hash", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_gasPrice", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2GasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2GasPerPubdataByteLimit", + type: "uint256", + }, + ], + name: "l2TransactionBaseCost", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "priorityQueueFrontOperation", + outputs: [ + { + components: [ + { + internalType: "bytes32", + name: "canonicalTxHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "expirationTimestamp", + type: "uint64", + }, + { + internalType: "uint192", + name: "layer2Tip", + type: "uint192", + }, + ], + internalType: "struct PriorityOperation", + name: "", + type: "tuple", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo", + name: "_prevBatch", + type: "tuple", + }, + { + components: [ + { + internalType: "uint64", + name: "batchNumber", + type: "uint64", + }, + { + internalType: "bytes32", + name: "batchHash", + type: "bytes32", + }, + { + internalType: "uint64", + name: "indexRepeatedStorageChanges", + type: "uint64", + }, + { + internalType: "uint256", + name: "numberOfLayer1Txs", + type: "uint256", + }, + { + internalType: "bytes32", + name: "priorityOperationsHash", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "l2LogsTreeRoot", + type: "bytes32", + }, + { + internalType: "uint256", + name: "timestamp", + type: "uint256", + }, + { + internalType: "bytes32", + name: "commitment", + type: "bytes32", + }, + ], + internalType: "struct IExecutor.StoredBatchInfo[]", + name: "_committedBatches", + type: "tuple[]", + }, + { + components: [ + { + internalType: "uint256[]", + name: "recursiveAggregationInput", + type: "uint256[]", + }, + { + internalType: "uint256[]", + name: "serializedProof", + type: "uint256[]", + }, + ], + internalType: "struct IExecutor.ProofInput", + name: "_proof", + type: "tuple", + }, + ], + name: "proveBatches", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bytes32", + name: "_l2TxHash", + type: "bytes32", + }, + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2MessageIndex", + type: "uint256", + }, + { + internalType: "uint16", + name: "_l2TxNumberInBatch", + type: "uint16", + }, + { + internalType: "bytes32[]", + name: "_merkleProof", + type: "bytes32[]", + }, + { + internalType: "enum TxStatus", + name: "_status", + type: "uint8", + }, + ], + name: "proveL1ToL2TransactionStatus", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_index", + type: "uint256", + }, + { + components: [ + { + internalType: "uint8", + name: "l2ShardId", + type: "uint8", + }, + { + internalType: "bool", + name: "isService", + type: "bool", + }, + { + internalType: "uint16", + name: "txNumberInBatch", + type: "uint16", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes32", + name: "key", + type: "bytes32", + }, + { + internalType: "bytes32", + name: "value", + type: "bytes32", + }, + ], + internalType: "struct L2Log", + name: "_log", + type: "tuple", + }, + { + internalType: "bytes32[]", + name: "_proof", + type: "bytes32[]", + }, + ], + name: "proveL2LogInclusion", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_l2BatchNumber", + type: "uint256", + }, + { + internalType: "uint256", + name: "_index", + type: "uint256", + }, + { + components: [ + { + internalType: "uint16", + name: "txNumberInBatch", + type: "uint16", + }, + { + internalType: "address", + name: "sender", + type: "address", + }, + { + internalType: "bytes", + name: "data", + type: "bytes", + }, + ], + internalType: "struct L2Message", + name: "_message", + type: "tuple", + }, + { + internalType: "bytes32[]", + name: "_proof", + type: "bytes32[]", + }, + ], + name: "proveL2MessageInclusion", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_contractL2", + type: "address", + }, + { + internalType: "uint256", + name: "_l2Value", + type: "uint256", + }, + { + internalType: "bytes", + name: "_calldata", + type: "bytes", + }, + { + internalType: "uint256", + name: "_l2GasLimit", + type: "uint256", + }, + { + internalType: "uint256", + name: "_l2GasPerPubdataByteLimit", + type: "uint256", + }, + { + internalType: "bytes[]", + name: "_factoryDeps", + type: "bytes[]", + }, + { + internalType: "address", + name: "_refundRecipient", + type: "address", + }, + ], + name: "requestL2Transaction", + outputs: [ + { + internalType: "bytes32", + name: "canonicalTxHash", + type: "bytes32", + }, + ], + stateMutability: "payable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_newLastBatch", + type: "uint256", + }, + ], + name: "revertBatches", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newPendingAdmin", + type: "address", + }, + ], + name: "setPendingAdmin", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_newPendingGovernor", + type: "address", + }, + ], + name: "setPendingGovernor", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "bool", + name: "_zkPorterIsAvailable", + type: "bool", + }, + ], + name: "setPorterAvailability", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_newPriorityTxMaxGasLimit", + type: "uint256", + }, + ], + name: "setPriorityTxMaxGasLimit", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "address", + name: "_validator", + type: "address", + }, + { + internalType: "bool", + name: "_active", + type: "bool", + }, + ], + name: "setValidator", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, + { + inputs: [ + { + internalType: "uint256", + name: "_batchNumber", + type: "uint256", + }, + ], + name: "storedBatchHash", + outputs: [ + { + internalType: "bytes32", + name: "", + type: "bytes32", + }, + ], + stateMutability: "view", + type: "function", + }, + { + inputs: [], + name: "unfreezeDiamond", + outputs: [], + stateMutability: "nonpayable", + type: "function", + }, +] as const; + +export class IZkSync__factory { + static readonly abi = _abi; + static createInterface(): IZkSyncInterface { + return new Interface(_abi) as IZkSyncInterface; + } + static connect(address: string, runner?: ContractRunner | null): IZkSync { + return new Contract(address, _abi, runner) as unknown as IZkSync; + } +} diff --git a/typechain/factories/index.ts b/typechain/factories/index.ts new file mode 100644 index 00000000..f1f6acf8 --- /dev/null +++ b/typechain/factories/index.ts @@ -0,0 +1,26 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export { IAssetRouterBase__factory } from "./IAssetRouterBase__factory"; +export { IBridgedStandardToken__factory } from "./IBridgedStandardToken__factory"; +export { IBridgehub__factory } from "./IBridgehub__factory"; +export { IContractDeployer__factory } from "./IContractDeployer__factory"; +export { IERC1271__factory } from "./IERC1271__factory"; +export { IERC20__factory } from "./IERC20__factory"; +export { IEthToken__factory } from "./IEthToken__factory"; +export { IL1AssetRouter__factory } from "./IL1AssetRouter__factory"; +export { IL1Bridge__factory } from "./IL1Bridge__factory"; +export { IL1ERC20Bridge__factory } from "./IL1ERC20Bridge__factory"; +export { IL1Messenger__factory } from "./IL1Messenger__factory"; +export { IL1NativeTokenVault__factory } from "./IL1NativeTokenVault__factory"; +export { IL1Nullifier__factory } from "./IL1Nullifier__factory"; +export { IL1SharedBridge__factory } from "./IL1SharedBridge__factory"; +export { IL2AssetRouter__factory } from "./IL2AssetRouter__factory"; +export { IL2Bridge__factory } from "./IL2Bridge__factory"; +export { IL2NativeTokenVault__factory } from "./IL2NativeTokenVault__factory"; +export { IL2SharedBridge__factory } from "./IL2SharedBridge__factory"; +export { INonceHolder__factory } from "./INonceHolder__factory"; +export { IPaymasterFlow__factory } from "./IPaymasterFlow__factory"; +export { ITestnetERC20Token__factory } from "./ITestnetERC20Token__factory"; +export { IZkSync__factory } from "./IZkSync__factory"; +export { IZkSyncHyperchain__factory } from "./IZkSyncHyperchain__factory"; diff --git a/typechain/index.ts b/typechain/index.ts new file mode 100644 index 00000000..60969cba --- /dev/null +++ b/typechain/index.ts @@ -0,0 +1,50 @@ +/* Autogenerated file. Do not edit manually. */ +/* tslint:disable */ +/* eslint-disable */ +export type { IAssetRouterBase } from "./IAssetRouterBase"; +export type { IBridgedStandardToken } from "./IBridgedStandardToken"; +export type { IBridgehub } from "./IBridgehub"; +export type { IContractDeployer } from "./IContractDeployer"; +export type { IERC1271 } from "./IERC1271"; +export type { IERC20 } from "./IERC20"; +export type { IEthToken } from "./IEthToken"; +export type { IL1AssetRouter } from "./IL1AssetRouter"; +export type { IL1Bridge } from "./IL1Bridge"; +export type { IL1ERC20Bridge } from "./IL1ERC20Bridge"; +export type { IL1Messenger } from "./IL1Messenger"; +export type { IL1NativeTokenVault } from "./IL1NativeTokenVault"; +export type { IL1Nullifier } from "./IL1Nullifier"; +export type { IL1SharedBridge } from "./IL1SharedBridge"; +export type { IL2AssetRouter } from "./IL2AssetRouter"; +export type { IL2Bridge } from "./IL2Bridge"; +export type { IL2NativeTokenVault } from "./IL2NativeTokenVault"; +export type { IL2SharedBridge } from "./IL2SharedBridge"; +export type { INonceHolder } from "./INonceHolder"; +export type { IPaymasterFlow } from "./IPaymasterFlow"; +export type { ITestnetERC20Token } from "./ITestnetERC20Token"; +export type { IZkSync } from "./IZkSync"; +export type { IZkSyncHyperchain } from "./IZkSyncHyperchain"; +export * as factories from "./factories"; +export { IAssetRouterBase__factory } from "./factories/IAssetRouterBase__factory"; +export { IBridgedStandardToken__factory } from "./factories/IBridgedStandardToken__factory"; +export { IBridgehub__factory } from "./factories/IBridgehub__factory"; +export { IContractDeployer__factory } from "./factories/IContractDeployer__factory"; +export { IERC1271__factory } from "./factories/IERC1271__factory"; +export { IERC20__factory } from "./factories/IERC20__factory"; +export { IEthToken__factory } from "./factories/IEthToken__factory"; +export { IL1AssetRouter__factory } from "./factories/IL1AssetRouter__factory"; +export { IL1Bridge__factory } from "./factories/IL1Bridge__factory"; +export { IL1ERC20Bridge__factory } from "./factories/IL1ERC20Bridge__factory"; +export { IL1Messenger__factory } from "./factories/IL1Messenger__factory"; +export { IL1NativeTokenVault__factory } from "./factories/IL1NativeTokenVault__factory"; +export { IL1Nullifier__factory } from "./factories/IL1Nullifier__factory"; +export { IL1SharedBridge__factory } from "./factories/IL1SharedBridge__factory"; +export { IL2AssetRouter__factory } from "./factories/IL2AssetRouter__factory"; +export { IL2Bridge__factory } from "./factories/IL2Bridge__factory"; +export { IL2NativeTokenVault__factory } from "./factories/IL2NativeTokenVault__factory"; +export { IL2SharedBridge__factory } from "./factories/IL2SharedBridge__factory"; +export { INonceHolder__factory } from "./factories/INonceHolder__factory"; +export { IPaymasterFlow__factory } from "./factories/IPaymasterFlow__factory"; +export { ITestnetERC20Token__factory } from "./factories/ITestnetERC20Token__factory"; +export { IZkSync__factory } from "./factories/IZkSync__factory"; +export { IZkSyncHyperchain__factory } from "./factories/IZkSyncHyperchain__factory";