"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const PriceTool_1 = require("../../src/tools/goatTools/PriceTool");
const tokenAddresses_json_1 = __importDefault(require("../data/tokenAddresses.json"));
const tokenAddresses = tokenAddresses_json_1.default;
describe("PriceTool", () => {
    const priceTool = new PriceTool_1.PriceTool();
    let result;
    for (const chainIdStr of Object.keys(tokenAddresses)) {
        const chainId = parseInt(chainIdStr);
        for (const symbol of Object.keys(tokenAddresses[chainIdStr])) {
            const tokenAddress = tokenAddresses[chainIdStr][symbol];
            it(`should return a price for ${symbol} on chain ${chainId}`, async () => {
                result = await priceTool.tool.execute({
                    chainId,
                    tokenAddresses: tokenAddress
                });
                // Expect response shape
                expect(result).toEqual(expect.any(Object));
                expect(result).toHaveProperty(tokenAddress);
                const price = parseFloat(result[tokenAddress]);
                expect(typeof price).toBe("number");
                expect(price).toBeGreaterThan(0);
            }, 100000);
        }
    }
});
