- Solidity 54.1%
- TypeScript 22.8%
- JavaScript 14.1%
- Python 7.2%
- CSS 1.3%
- Other 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| app | ||
| contracts | ||
| pocketbase | ||
| scripts | ||
| .gitignore | ||
| AGENTS.md | ||
| LICENSE | ||
| README.md | ||
Dys Basilica
A dapp and Solidity contract for minting Basilica
(ΒΑΣΙΛΙΚΗ) on PulseChain by creating a LAU token — or reusing one already
held — through the CHO/LAU-factory system. Mint data (base fee, block
timestamp, pool reserves, and recent transactions) is read directly from RPC.
The optional shared prayer screen uses PocketBase for its count and live events.
The ascension intro can be enabled at /; the app pages live at /mint,
/pray, /bread, and /faq. Bread is a daily ERC20 claim for wallets
holding at least one full Basilica and one whole token from a LAU character they
own. Only LAUs created by the canonical factory qualify.
Layout
| Path | What it is |
|---|---|
contracts/ |
The Minter and Bread contracts (Foundry, Solidity 0.8.33, evm_version = "shanghai") and their tests. Bread uses pinned OpenZeppelin Contracts v5.7.0. |
app/ |
The dapp — Preact, viem, UI kit, and wallet kit. See app/README.md for configuration and deployment. |
pocketbase/ |
Prayer collection schema, server hook, setup script, and local integration check. |
scripts/ |
pack-cloudflare.sh — builds the app and zips exactly what a Cloudflare Pages direct upload needs. |
Contract
The Basilica minter is deployed and verified on PulseChain mainnet at
0x12aC6aDe3C600F7f9a1bA1a8C66434a747995c76.
cd contracts
forge test --fork-url pulsechain_local --fork-block-number <block-number>
forge build
python3 scripts/scan_opcodes.py
python3 -m unittest discover -s scripts -p 'test_scan_opcodes.py'
evm_version must stay "shanghai". The opcode gate checks both creation and
runtime bytecode for Cancun-only instructions before deployment.
Bread is deployed on PulseChain mainnet at
0x8BBAa8aD155c03aE8bA4B574ea5595c04A6ad2B0.
Its mint(uint64 lauNonce) call requires one Basilica, ownership of the selected
factory-created LAU, and one full token from that LAU. The official frontend
checks the wallet's active LAU and resolves its factory nonce from chain creation
records, caching verified mappings in the browser. Other integrations can supply
any qualifying LAU nonce. Claims are limited to one per calling wallet per UTC day.
Develop the dapp
cd app
node scripts/install-locked.mjs
npm run dev
See app/README.md for configuration, validation, preview and
release builds, and deployment.
Shared Prayer Backend
Use stock PocketBase 0.40.4. After installing the app dependencies, install
pocketbase/pb_hooks/pray.pb.js in the instance's pb_hooks directory. Set
POCKETBASE_URL, POCKETBASE_SUPERUSER_EMAIL and
POCKETBASE_SUPERUSER_PASSWORD through protected external configuration, then
run from the repository root:
node pocketbase/setup.mjs
node --test pocketbase/unused-auth.test.mjs
Setup imports the prayer schema, locks all seven API/auth rules on the unused
ordinary users collection and verifies the result. It preserves existing
records, unrelated collections and _superusers. Repeated setup is supported;
read or verification failures stop it. Do not use this setup unchanged for an
application that needs ordinary PocketBase accounts.
Prayer records can be listed publicly; the hook accepts writes through
POST /api/basilica/pray, with a one-hour cooldown per browser identifier and
idempotency per attempt. Direct collection writes are locked. Browser identifiers
are throttling signals, not authenticated identities. Setup adds a scoped native
rate limit only for loopback instances or a configured trusted proxy.
Run node pocketbase/pray.integration.mjs with the same environment only against
a disposable instance; it creates test prayer records.
License
MIT — see LICENSE.