Published
Edited
Apr 22, 2022
Insert cell
Insert cell
Insert cell
Insert cell
ledger = await loadLedger("sourcecred/cred/addresses-merge")
Insert cell
md`<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
# Behind the Scenes`
Insert cell
flatEarnings2 = {
const map = new Map();
ledger
.accounts()
.filter((x) =>
x.payoutAddresses.get(
'{"chainId":"1","tokenAddress":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","type":"EVM"}'
)
)
.forEach((account) => {
const name = account.identity.name;
map.set(name, [
name,
account.payoutAddresses.get(
'{"chainId":"1","tokenAddress":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","type":"EVM"}'
)
]);
});
return map;
}
Insert cell
import {
// Our Instance Data
// Instance Data Getters
loadLedger, // Function for getting a ledger using a repo/branch string
loadCredGrainView, // Function for getting a ledger using a repo/branch string
// Libraries
sc, // The SourceCred API Library
// Input Modules. Example usage: viewof repoAndBranch = html`${repoAndBranchInput}`
repoAndBranchInput, // A URL query string parser and input box combo for user-provided repo/branch string
buildCsvDownload,
credGrainViewCredTable
} from "@sourcecred/quick-imports"
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more