"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MockHubPoolClient = void 0;
const src_1 = require("../../src");
class MockHubPoolClient extends src_1.clients.mocks.MockHubPoolClient {
    latestBundleEndBlocks = {};
    constructor(logger, hubPool, configStoreClient, deploymentBlock = 0, chainId = 1) {
        super(logger, hubPool, configStoreClient, deploymentBlock, chainId);
    }
    setLatestBundleEndBlockForChain(chainId, latestBundleEndBlock) {
        this.latestBundleEndBlocks[chainId] = latestBundleEndBlock;
    }
    getLatestBundleEndBlockForChain(chainIdList, latestMainnetBlock, chainId) {
        return (this.latestBundleEndBlocks[chainId] ??
            super.getLatestBundleEndBlockForChain(chainIdList, latestMainnetBlock, chainId) ??
            0);
    }
    getL1TokenForDeposit(deposit) {
        return super.getL1TokenForDeposit(deposit);
    }
    getL2TokenForDeposit(deposit, l2ChainId = deposit.destinationChainId) {
        const l1Token = this.getL1TokenForDeposit(deposit);
        return l1Token
            ? this.getL2TokenForL1TokenAtBlock(l1Token, l2ChainId, deposit.quoteBlockNumber)?.toNative()
            : undefined;
    }
}
exports.MockHubPoolClient = MockHubPoolClient;
//# sourceMappingURL=MockHubPoolClient.js.map