diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..be31712 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,20 @@ +name: CI (programs pilot) +on: + pull_request: + push: + branches: [ main ] +jobs: + scaffold-checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Ensure scaffold exists + run: | + test -d programs/factory + test -d programs/master + test -d programs/bot + test -d tests + test -f README.md + test -f docs/OVERVIEW.md + test -f docs/IDS.md + test -f ops/RUNBOOK.md diff --git a/.gitignore b/.gitignore index ad67955..b2ba90b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,21 +1,19 @@ -# Generated by Cargo -# will have compiled files and executables -debug -target - -# These are backup files generated by rustfmt +# Rust/Anchor +target/ **/*.rs.bk -# MSVC Windows builds of rustc generate these, which store debugging information -*.pdb +# Node helpers (if any scripts appear) +node_modules/ +dist/ +build/ -# Generated by cargo mutants -# Contains mutation testing data -**/mutants.out*/ +# Env & secrets +.env +.env.* -# RustRover -# JetBrains specific template is maintained in a separate JetBrains.gitignore that can -# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore -# and can be added to the global gitignore or merged into this file. For a more nuclear -# option (not recommended) you can uncomment the following to ignore the entire idea folder. -#.idea/ +# OS / editor / logs +.DS_Store +.idea/ +.vscode/ +*.log +logs/ diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..5e0f9e8 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @gapview01 diff --git a/README.md b/README.md index e2ee61d..0793edc 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ -# goblin-programs -Goblin Programs — core smart contracts for the Goblin ecosystem. Includes the Factory (create bots), Master (registry & global rules), and Bot (per-bot logic). +# Goblin Programs — Factory, Master, Bot +Core on-chain programs for the Goblin ecosystem. + +- **Factory**: creates new Goblin bots with required setup (treasury, naming). +- **Master**: global registry & rules (fees, authority, pause). +- **Bot**: per-bot rulebook (sub-accounts, payouts). + +**Bucket:** On-Chain Core (Solana) +**Status:** PILOT (DEV / devnet) + +- Overview → /docs/OVERVIEW.md +- Program IDs → /docs/IDS.md +- Runbook → /ops/RUNBOOK.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..0537619 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,3 @@ +# Security Policy +- No secrets in this repo. Use cloud Secret Manager via CI. +- Report vulnerabilities to security@. diff --git a/docs/IDS.md b/docs/IDS.md new file mode 100644 index 0000000..dd4e442 --- /dev/null +++ b/docs/IDS.md @@ -0,0 +1,18 @@ +# Program IDs & Environments (record here) + +DEV (devnet) +- factory: +- master: +- bot: + +STAGE (testnet) +- factory: +- master: +- bot: + +PROD (mainnet-beta) +- factory: +- master: +- bot: + +> Never reuse IDs across environments. Update after each deploy. diff --git a/docs/OVERVIEW.md b/docs/OVERVIEW.md new file mode 100644 index 0000000..d65937c --- /dev/null +++ b/docs/OVERVIEW.md @@ -0,0 +1,11 @@ +# Overview +This repo houses the Goblin smart contracts (Anchor programs): + +- Factory: "birth certificate office" for new bots. +- Master: "head office" that tracks all bots and global policy. +- Bot: the rules each bot uses day to day. + +Day-1 scope: +- Devnet only (pilot) +- Empty program folders as placeholders +- Record IDs when deployed diff --git a/ops/RUNBOOK.md b/ops/RUNBOOK.md new file mode 100644 index 0000000..931a175 --- /dev/null +++ b/ops/RUNBOOK.md @@ -0,0 +1,14 @@ +# Runbook (Pilot) + +## Local (DEV) +1) Ensure Solana/Anchor toolchain is installed (no code yet). +2) Use devnet only during pilot. +3) When code arrives, build & test locally before any deploy. + +## Environments +- DEV: devnet (sandbox) +- STAGE: testnet (rehearsal) +- PROD: mainnet-beta (not used during pilot) + +## Rollback +- Revert to previous tag (e.g., pilot-v0.1.0) and redeploy to DEV. diff --git a/programs/bot/.gitkeep b/programs/bot/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/programs/factory/.gitkeep b/programs/factory/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/programs/master/.gitkeep b/programs/master/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/tests/.gitkeep b/tests/.gitkeep new file mode 100644 index 0000000..e69de29