UNPKG

zksync-ethers

Version:

A Web3 library for interacting with the ZkSync Layer 2 scaling solution.

867 lines (863 loc) 17.1 kB
/* 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 = [ { anonymous: false, inputs: [ { indexed: true, internalType: "bytes32", name: "assetId", type: "bytes32", }, { indexed: true, internalType: "bytes32", name: "additionalData", type: "bytes32", }, { indexed: false, internalType: "address", name: "assetDeploymentTracker", type: "address", }, ], name: "AssetDeploymentTrackerRegistered", type: "event", }, { 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: "_assetHandlerAddress", type: "address", }, ], name: "AssetHandlerRegistered", 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: 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", }, { inputs: [], name: "BRIDGE_HUB", outputs: [ { internalType: "contract IBridgehub", name: "", type: "address", }, ], 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: [ { 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: "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: "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: "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: "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: "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: "nativeTokenVault", outputs: [ { internalType: "contract INativeTokenVault", name: "", type: "address", }, ], stateMutability: "view", 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", }, ] 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; } }