"use strict";
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
    function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
    return new (P || (P = Promise))(function (resolve, reject) {
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
        function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
        function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
        step((generator = generator.apply(thisArg, _arguments || [])).next());
    });
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.CurveFactoryCryptoPoolGaugeContractPositionFetcher = void 0;
const curve_pool_gauge_contract_position_fetcher_1 = require("./curve.pool-gauge.contract-position-fetcher");
class CurveFactoryCryptoPoolGaugeContractPositionFetcher extends curve_pool_gauge_contract_position_fetcher_1.CurvePoolGaugeContractPositionFetcher {
    resolveRegistry(address) {
        return this.contractFactory.curveCryptoFactory({ address, network: this.network });
    }
    resolvePoolCount({ contract }) {
        return __awaiter(this, void 0, void 0, function* () {
            return contract.pool_count();
        });
    }
    resolveSwapAddress({ contract, poolIndex }) {
        return __awaiter(this, void 0, void 0, function* () {
            return contract.pool_list(poolIndex);
        });
    }
    resolveTokenAddress({ contract, swapAddress }) {
        return __awaiter(this, void 0, void 0, function* () {
            return contract.get_token(swapAddress);
        });
    }
    resolveGaugeAddresses({ contract, swapAddress }) {
        return __awaiter(this, void 0, void 0, function* () {
            return contract.get_gauge(swapAddress).then(v => [v]);
        });
    }
}
exports.CurveFactoryCryptoPoolGaugeContractPositionFetcher = CurveFactoryCryptoPoolGaugeContractPositionFetcher;
//# sourceMappingURL=curve.factory-crypto-pool-gauge.contract-position-fetcher.js.map