Working tree is now the canonical repo. Off-chain play-money + trustless on-chain (FPMM AMM + CLOB via UMA settlement), AI market factory, creator/social/distribution, mobile shell + push, one-command demo + deploy-kit. Secrets excluded (see ENV-AND-KEYS.md). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
26 lines
610 B
TypeScript
26 lines
610 B
TypeScript
import { runScript } from 'run-script'
|
|
|
|
// there were only certs on dev so this is fine
|
|
|
|
if (require.main === module) {
|
|
runScript(async ({ firestore, db }) => {
|
|
// get all cert contracts
|
|
const certs = await db
|
|
.from('contracts')
|
|
.select('id')
|
|
.eq('outcome_type', 'CERT')
|
|
if (!certs.data) {
|
|
console.log('No cert contracts found')
|
|
return
|
|
}
|
|
|
|
console.log('Deleting all cert contracts')
|
|
for (const { id } of certs.data) {
|
|
console.log(id)
|
|
await firestore.collection('contracts').doc(id).delete()
|
|
}
|
|
|
|
// not deleting cert txns but idc
|
|
})
|
|
}
|