"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.NetworkController = void 0;
class NetworkController {
    getNetworksListUseCase;
    getNetworkGasInfoUseCase;
    constructor(getNetworksListUseCase, getNetworkGasInfoUseCase) {
        this.getNetworksListUseCase = getNetworksListUseCase;
        this.getNetworkGasInfoUseCase = getNetworkGasInfoUseCase;
    }
    getAll = async (_req, res, next) => {
        try {
            const networks = await this.getNetworksListUseCase.execute();
            res.status(200).json({ success: true, data: networks });
        }
        catch (error) {
            next(error);
        }
    };
    getGasInfo = async (req, res, next) => {
        try {
            const gasInfo = await this.getNetworkGasInfoUseCase.execute(req.params.networkId);
            res.status(200).json({ success: true, data: gasInfo });
        }
        catch (error) {
            next(error);
        }
    };
}
exports.NetworkController = NetworkController;
//# sourceMappingURL=network.controller.js.map