MCPcopy Create free account
hub / github.com/circlefin/arc-node / takeSnapshot

Function takeSnapshot

tests/helpers/BalanceComparator.ts:40–48  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38 addresses: M,
39) => {
40 const takeSnapshot = async () => {
41 const entries = Object.entries(addresses)
42 const balances = await Promise.all(
43 entries.map(([_, address]) =>
44 typeof address === 'function' ? address() : client.getBalance({ address: parseAddress(address) }),
45 ),
46 )
47 return Object.fromEntries(entries.map(([name, _], i) => [name, balances[i]])) as O
48 }
49 return new BalanceComparator(await takeSnapshot(), takeSnapshot)
50}
51

Callers 1

balancesSnapshotFunction · 0.85

Calls 2

parseAddressFunction · 0.90
allMethod · 0.45

Tested by

no test coverage detected