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

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more