"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
var __param = (this && this.__param) || function (paramIndex, decorator) {
    return function (target, key) { decorator(target, key, paramIndex); }
};
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.EthereumTokemakReactorTokenFetcher = void 0;
const common_1 = require("@nestjs/common");
const app_toolkit_interface_1 = require("../../../app-toolkit/app-toolkit.interface");
const position_template_decorator_1 = require("../../../app-toolkit/decorators/position-template.decorator");
const image_present_1 = require("../../../app-toolkit/helpers/presentation/image.present");
const app_token_template_position_fetcher_1 = require("../../../position/template/app-token.template.position-fetcher");
const contracts_1 = require("../contracts");
let EthereumTokemakReactorTokenFetcher = class EthereumTokemakReactorTokenFetcher extends app_token_template_position_fetcher_1.AppTokenTemplatePositionFetcher {
    constructor(appToolkit, contractFactory) {
        super(appToolkit);
        this.appToolkit = appToolkit;
        this.contractFactory = contractFactory;
        this.groupLabel = 'Reactors';
    }
    getContract(address) {
        return this.contractFactory.tokemakReactor({ network: this.network, address });
    }
    getAddresses() {
        return __awaiter(this, void 0, void 0, function* () {
            return [
                '0xd3d13a578a53685b4ac36a1bab31912d2b2a2f36',
                '0x04bda0cf6ad025948af830e75228ed420b0e860d',
                '0xa760e26aa76747020171fcf8bda108dfde8eb930',
                '0x1b429e75369ea5cd84421c1cc182cee5f3192fd3',
                '0x8858a739ea1dd3d80fe577ef4e0d03e88561faa3',
                '0xe7a7d17e2177f66d035d9d50a7f48d8d8e31532d',
                '0xd3b5d9a561c293fb42b446fe7e237daa9bf9aa84',
                '0x15a629f0665a3eb97d7ae9a7ce7abf73aeb79415',
                '0xadf15ec41689fc5b6dca0db7c53c9bfe7981e655',
                '0xf49764c9c5d644ece6ae2d18ffd9f1e902629777',
                '0x808d3e6b23516967ceae4f17a5f9038383ed5311',
                '0xdc0b02849bb8e0f126a216a2840275da829709b0',
                '0x41f6a95bacf9bc43704c4a4902ba5473a8b00263',
                '0x0ce34f4c26ba69158bc2eb8bf513221e44fdfb75',
                '0xeff721eae19885e17f5b80187d6527aad3ffc8de',
                '0x2fc6e9c1b2c07e18632efe51879415a580ad22e1',
                '0x03dcccd17cc36ee61f9004bcfd7a85f58b2d360d',
                '0x2e9f9becf5229379825d0d3c1299759943bd4fed',
                '0x482258099de8de2d0bda84215864800ea7e6b03d',
                '0x9eee9ee0cbd35014e12e1283d9388a40f69797a3',
                '0x94671a3cee8c7a12ea72602978d1bb84e920efb2',
                '0x7211508d283353e77b9a7ed2f22334c219ad4b4c',
                '0x061aee9ab655e73719577ea1df116d7139b2a7e7',
            ];
        });
    }
    getUnderlyingTokenDefinitions({ contract }) {
        return __awaiter(this, void 0, void 0, function* () {
            return [{ address: yield contract.underlyer(), network: this.network }];
        });
    }
    getPricePerShare() {
        return __awaiter(this, void 0, void 0, function* () {
            return [1];
        });
    }
    getLabel({ appToken }) {
        return __awaiter(this, void 0, void 0, function* () {
            return `${(0, image_present_1.getLabelFromToken)(appToken.tokens[0])} Reactor`;
        });
    }
};
EthereumTokemakReactorTokenFetcher = __decorate([
    (0, position_template_decorator_1.PositionTemplate)(),
    __param(0, (0, common_1.Inject)(app_toolkit_interface_1.APP_TOOLKIT)),
    __param(1, (0, common_1.Inject)(contracts_1.TokemakContractFactory)),
    __metadata("design:paramtypes", [Object, contracts_1.TokemakContractFactory])
], EthereumTokemakReactorTokenFetcher);
exports.EthereumTokemakReactorTokenFetcher = EthereumTokemakReactorTokenFetcher;
//# sourceMappingURL=tokemak.reactor.token-fetcher.js.map