Skip to content

Commit

Permalink
Merge pull request #66 from stabilitydao/alien-dev
Browse files Browse the repository at this point in the history
calculate contests with images in `overview.ts`, show in `overview-full.ts`
  • Loading branch information
a17 authored Oct 20, 2024
2 parents 6ba1d6a + 3d622db commit 5216b24
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/overview-full.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,6 @@ for (const contestId of Object.keys(contests).filter(c => !contests[c].hidden))
const startDateArr = new Date(contest.start * 1000).toUTCString().split(' ')
const endDateArr = new Date(contest.end * 1000).toUTCString().split(' ')
const dates = `${startDateArr[1]} ${startDateArr[2]} ${startDateArr[3]} - ${endDateArr[1]} ${endDateArr[2]} ${endDateArr[3]}`
console.log(`[${contestId}] ${contest.name}. ${dates}. Rewards: ${contest.rewards.map(r => r.type).join(', ')}.`)
console.log(`[${contestId}] ${contest.name}. ${dates}. Rewards: ${Array.isArray(contest.rewards) ? contest.rewards.map(r => r.type).join(', ') : contest.rewards}.${!!contest.img ? ` Image: ${contest.img}.` : ''}`)
}
console.log('')
2 changes: 1 addition & 1 deletion tools/overview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@ console.log(`Chains: ${Object.keys(chains).length}. ChainLib: ${networkTotal.AWA
console.log(`DeFi organizations: ${Object.keys(integrations).length}. Protocols: ${protocolsTotal}.`)
console.log(`Assets: ${assets.length}. Tokenlist ${tokenlist.version.major}.${tokenlist.version.minor}.${tokenlist.version.patch}: ${tokenlist.tokens.length} tokens for ${tokenlist.tokens.map(t => t.chainId).filter((value, index, array) => array.indexOf(value) === index).length} chains.`)
console.log(`Seed nodes: ${seeds.length}`)
console.log(`Contests: ${Object.keys(contests).filter(c => !contests[c].hidden).length}`)
console.log(`Contests: ${Object.keys(contests).filter(c => !contests[c].hidden).length}. Contests with images: ${Object.keys(contests).filter(c => !contests[c].hidden).filter(c => !!contests[c].img).length}.`)
console.log(``)

0 comments on commit 5216b24

Please sign in to comment.