UNPKG

zksync-ethers

Version:

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

530 lines (526 loc) 10.6 kB
/* 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; } }