UNPKG

@urbanisierung/flethly

Version:

easily sell digital assets with ether

15 lines 661 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PriceFeedController = void 0; const { ethers } = require('ethers'); const maker = require('@studydefi/money-legos/maker'); class PriceFeedController { static async getEthPriceUsd() { const provider = new ethers.providers.InfuraProvider('homestead'); const makerMedianizer = new ethers.Contract(maker.ethUsdPriceFeed.address, maker.ethUsdPriceFeed.abi, provider); const ethPriceUsd = await makerMedianizer.read(); return ethPriceUsd; } } exports.PriceFeedController = PriceFeedController; //# sourceMappingURL=pricefeed.controller.js.map