MCPcopy Create free account
hub / github.com/cardstack/cardstack / priceOracleUpdatedAt

Function priceOracleUpdatedAt

packages/cardpay-cli/exchange-rate.ts:22–27  ·  view source on GitHub ↗
(network: string, token: string, mnemonic?: string)

Source from the content-addressed store, hash-verified

20 console.log(`ETH value: ${fromWei(ethWeiPrice)} ETH`);
21}
22export async function priceOracleUpdatedAt(network: string, token: string, mnemonic?: string): Promise<void> {
23 let web3 = await getWeb3(network, mnemonic);
24 let exchangeRate = await getSDK('ExchangeRate', web3);
25 let date = await exchangeRate.getUpdatedAt(token);
26 console.log(`The ${token} rate was last updated at ${date.toString()}`);
27}

Callers 1

index.tsFile · 0.90

Calls 4

getWeb3Function · 0.90
getSDKFunction · 0.90
getUpdatedAtMethod · 0.80
logMethod · 0.45

Tested by

no test coverage detected