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

Function revenueBalances

packages/cardpay-cli/revenue-pool.ts:23–31  ·  view source on GitHub ↗
(network: string, merchantSafeAddress: string, mnemonic?: string)

Source from the content-addressed store, hash-verified

21}
22
23export async function revenueBalances(network: string, merchantSafeAddress: string, mnemonic?: string): Promise<void> {
24 let web3 = await getWeb3(network, mnemonic);
25 let revenuePool = await getSDK('RevenuePool', web3);
26 let balanceInfo = await revenuePool.balances(merchantSafeAddress);
27 console.log(`Merchant revenue balance for merchant safe ${merchantSafeAddress}:`);
28 for (let { tokenSymbol, balance } of balanceInfo) {
29 console.log(`${fromWei(balance)} ${tokenSymbol}`);
30 }
31}
32
33export async function claimRevenue(
34 network: string,

Callers 1

index.tsFile · 0.85

Calls 5

getWeb3Function · 0.90
getSDKFunction · 0.90
fromWeiFunction · 0.85
balancesMethod · 0.80
logMethod · 0.45

Tested by

no test coverage detected