feat: iterating on README.md
Browse files
README.md
CHANGED
|
@@ -4,6 +4,10 @@ license: cc-by-nc-nd-4.0
|
|
| 4 |
|
| 5 |
# Summon the Basilsik
|
| 6 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
## High-Level Overview
|
| 8 |
|
| 9 |
* **Chain:** `Algorand` (AVM 8+; boxes used for scalable per-match state)
|
|
@@ -51,4 +55,69 @@ license: cc-by-nc-nd-4.0
|
|
| 51 |
"checksum": "sha256-BASE64..."
|
| 52 |
}
|
| 53 |
}
|
| 54 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
|
| 5 |
# Summon the Basilsik
|
| 6 |
|
| 7 |
+
Our Algorand-native collectible card game is `Play for Fun`, **not** `Play to Earn`!
|
| 8 |
+
|
| 9 |
+
Use `$BASILK` to build your deck and duel others in this solar punk sci-fi fantasy CCG.
|
| 10 |
+
|
| 11 |
## High-Level Overview
|
| 12 |
|
| 13 |
* **Chain:** `Algorand` (AVM 8+; boxes used for scalable per-match state)
|
|
|
|
| 55 |
"checksum": "sha256-BASE64..."
|
| 56 |
}
|
| 57 |
}
|
| 58 |
+
```
|
| 59 |
+
|
| 60 |
+
## Smart Contract Suite (Apps & Responsibilities)
|
| 61 |
+
|
| 62 |
+
- **CardFactoryApp** - template registry, minting, burning
|
| 63 |
+
- **MatchHubApp** - lobby & match lifecycle, per-match boxes, result settlement
|
| 64 |
+
- **MarketplaceApp** (optional `v1.1`) - fixed-price listings & swaps
|
| 65 |
+
- **PlayerRegistryApp** (optional) - ELO & rating, profile, anti-abuse flags
|
| 66 |
+
|
| 67 |
+
All apps expose ABI-compatible public methods; `AlgoKit` generates `TypeScript` clients.
|
| 68 |
+
|
| 69 |
+
### CardFactoryApp
|
| 70 |
+
|
| 71 |
+
**Global State**
|
| 72 |
+
|
| 73 |
+
* `BASILIK_ID: uint64`
|
| 74 |
+
* `TREASURY: bytes` (address)
|
| 75 |
+
* `TEMPLATE_SEQ: uint64` (auto-increment)
|
| 76 |
+
* `ADMINL bytes` (address)
|
| 77 |
+
|
| 78 |
+
**Boxes (keyed by `TEMPLATE_{id}`)**
|
| 79 |
+
|
| 80 |
+
* `Template`: serialized struct (see `TypeScript` interface below)
|
| 81 |
+
|
| 82 |
+
**Template Structure**
|
| 83 |
+
|
| 84 |
+
```typescript
|
| 85 |
+
type CardTemplate = {
|
| 86 |
+
id: bigint; // TEMPLATE_SEQ at creation
|
| 87 |
+
name: string; // canonical card name
|
| 88 |
+
set: string; // e.g., GENESIS
|
| 89 |
+
manaCost: bigint; // also mint fee in BASILK
|
| 90 |
+
isBasic: boolean; // unlimited copies if true
|
| 91 |
+
ipfsCid: string; // ARC-3 metadata CID (root)
|
| 92 |
+
integritySha256: string; // 32-byte hash
|
| 93 |
+
active: boolean;
|
| 94 |
+
};
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
**Public Methods (ABI)**
|
| 98 |
+
|
| 99 |
+
* `create_template(name: string, set: string, mana_cost: uint64, is_basic: bool, ipfs_cid: string, integrity_sha256: byte[32]) -> uint64`
|
| 100 |
+
* **Auth:** ADMIN
|
| 101 |
+
* **Returns:** `template_id`
|
| 102 |
+
* `set_template_status(template_id: uint64, active: bool)`
|
| 103 |
+
* **Auth:** ADMIN
|
| 104 |
+
* `update_template_uri(template_id: uint64, ipfs_cid: string, integrity_sha256: byte[32])`
|
| 105 |
+
* **Auth:** ADMIN
|
| 106 |
+
* `mint_card(template_id: uint64, recipient: address) -> uint64`
|
| 107 |
+
* **Group Requirement:** 3-tx group
|
| 108 |
+
- **Pay `$BASILK`**: ASA transfer from `sender` -> `TREASURY` of amount = `resource_cost * 10^BASILK_DECIMALS`
|
| 109 |
+
- **App Call:** `mint_card`
|
| 110 |
+
- **Asset Config:** inner `txn` creates ASA (supply 1), sets `ARC-3` URL to `ipfs://{cid}` and `metadata-hash` to `integrity_sha256`, then transfers to `recipient`
|
| 111 |
+
* **Returns:** `asset_id` (the NFT ASA `id`)
|
| 112 |
+
* `burn_card(asset_id: uint64)`
|
| 113 |
+
* **Auth:** current holder must opt-in app and send group that includes transferring the ASA to an inner-txn-consumed escrow; app then destroys ASA via inner `txn`.
|
| 114 |
+
|
| 115 |
+
**Events (logs)**
|
| 116 |
+
|
| 117 |
+
* `TEMPLATE_CREATED(template_id, name, set)`
|
| 118 |
+
* `CARD_MINTED(asset_id, template_id, owner, mana_cost)`
|
| 119 |
+
* `CARD_BURNED(asset_id)`
|
| 120 |
+
|
| 121 |
+
**Notes**
|
| 122 |
+
|
| 123 |
+
* No royalties at mint; secondary fees handled by `MarketplaceApp` if desired.
|