Contract Storage
Registry
Global state
| Key | Type | Description |
|---|---|---|
admin_addr | address | Registry admin |
fee_addr | address | Fee admin, copied into new benches |
default_fee_bps | uint64 | Platform fee for new benches, in basis points |
setup_fee | uint64 | Setup fee for new benches, in microALGO |
abel_app_id | uint64 | Asset labeling app used for eligibility checks; 0 disables the checks |
allowlist_labels | string[] (ABI-encoded) | See Asset Eligibility |
banlist_labels | string[] (ABI-encoded) | See Asset Eligibility |
id_counter | uint64 | Last assigned bench ID |
Boxes: the bench directory
One box per bench. The box name is the ABI-encoded RegistryKey struct (44 bytes) and the box value the ABI-encoded RegistryValue:
RegistryKey {
id: uint32 // bench ID
original_time_start: uint32 // configured start time, 0 = none
original_time_end: uint32 // configured end time, 0 = none
selling_asset_id: uint64 // 0 = ALGO
selling_amount: uint64
purchase_asset_id: uint64 // 0 = ALGO
purchase_price_per_100m: uint64
}
RegistryValue {
bench_app_id: uint64
meta: string // up to 1014 bytes, see Metadata
}
Since the key contains the sale parameters, listing the registry's boxes (algod GET /v2/applications/{registry_app_id}/boxes) is enough to enumerate all benches with their basic parameters, without reading each bench.
Bench
Global state
| Key | Type | Description |
|---|---|---|
id | uint64 | Bench ID |
owner_addr | address | Owner (beneficiary) |
fee_addr | address | Fee admin |
fee_bps | uint64 | Platform fee, in basis points |
fees_accrued | uint64 | Platform fees accrued and not yet withdrawn, in purchase asset base units |
selling_asset | uint64 | Asset for sale, 0 = ALGO |
selling_amount | uint64 | Total amount for sale |
remaining_amount | uint64 | Amount left for sale |
purchase_asset | uint64 | Purchase asset, 0 = ALGO |
purchase_price_per_100m | uint64 | Price, see Pricing |
purchase_limit | uint64 | Maximum spend per account in purchase asset base units, 0 = unlimited |
time_start | uint64 | Configured start time, or time of the first sale if none was configured |
original_time_start | uint64 | Configured start time, 0 = none |
time_end | uint64 | Configured end time, or actual end time once sold out or ended manually |
original_time_end | uint64 | Configured end time, 0 = none |
cancellable | uint64 | Whether the owner may end the bench before its end time. Always 1 for benches created by the current registry, see ABI notes |
version | uint64 | Bench contract version, 2 |
Boxes: purchase tracking
Only used when purchase_limit > 0. One box per buyer account: the box name is the buyer's 32-byte public key, and the value the buyer's cumulative spend as a uint64, in purchase asset base units. Minimum balance requirement 0.0185 ALGO per box, funded by the buyer on first purchase.