A vending machine for EVE Frontier smart storage units, powered by ef_guard access control.
Frontier Market turns any Smart Storage Unit into a player-operated shop:
- Owner stocks items and sets prices per item type
- Customers buy items by paying with a configured currency (e.g. Transaction Chips)
- Access control is delegated to ef_guard — only players who pass the policy can buy
- Revenue (payments) stays in the SSU for the owner to withdraw
Frontier Market demonstrates ef_guard as middleware. The market contract doesn't implement its own access control — it calls ef_guard::assembly_binding::resolve_role() before allowing a purchase:
Player wants to buy
→ Frontier Market calls ef_guard::resolve_role(binding, ssu_id, char_game_id, tribe_id)
→ ef_guard evaluates rules: tribe membership, character ID, blocklist
→ Allow → proceed with purchase
→ Deny → abort transaction
This separation means:
- The market focuses on trade logic (prices, inventory, payments)
- ef_guard handles who can trade (tribes, characters, blocklist)
- The owner configures both independently
┌─────────────────────────────────────────┐
│ Frontier Market │
│ ┌───────────┐ ┌────────────────────┐ │
│ │ MarketConfig │ │ Prices (dynamic │ │
│ │ - ssu_id │ │ fields per │ │
│ │ - binding_id │ │ item type) │ │
│ │ - currency │ │ │ │
│ └───────────┘ └────────────────────┘ │
│ │ │
│ ▼ │
│ ┌─────────────────┐ │
│ │ buy() / stock() │ │
│ └────────┬────────┘ │
│ │ │
└───────────┼─────────────────────────────┘
│ resolve_role()
▼
┌─────────────────────────────────────────┐
│ ef_guard │
│ AssemblyBinding → Policy → Rules │
│ Blocklist check → first-match-wins │
└─────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────┐
│ EVE Frontier World Contracts │
│ StorageUnit.deposit_item<Auth>() │
│ StorageUnit.withdraw_item<Auth>() │
└─────────────────────────────────────────┘
Based on the EVE Frontier builder-scaffold.
| Area | Purpose |
|---|---|
| move-contracts/frontier_market/ | Sui Move contract: market logic, prices, ef_guard integration |
| dapps/ | DApp for customers to browse and buy items (TODO) |
| ts-scripts/ | TypeScript scripts for deployment and interaction |
| docker/ | Dev container for local Sui node |
cd move-contracts/frontier_market
sui move build
sui move test# After deploying ef_guard and world-contracts:
cd move-contracts/frontier_market
sui client publishCreates a market on an SSU. Returns (MarketConfig, MarketAdminCap). Share the config, keep the cap.
Set or update the price for an item type. amount is in units of the currency per item.
Remove the price — item becomes unbuyable.
Customer buys items. Checks ef_guard access, validates payment, deposits payment, withdraws items.
Admin deposits items into the market SSU.
Admin withdraws collected payments from the SSU.
| Test | What it verifies |
|---|---|
set_and_get_price |
Price CRUD: set, read, update, remove |
multiple_prices_independent |
Multiple item types with independent prices |
set_price_with_wrong_cap_aborts |
Admin auth: wrong MarketAdminCap rejected |
get_price_without_setting_aborts |
Error: reading unset price aborts |
config_accessors_return_correct_values |
Config fields match constructor args |
ef_guard_resolve_role_allows_tribe_member |
ef_guard allows tribe member, denies others |
ef_guard_blocklist_overrides_tribe_allow |
ef_guard blocklist overrides tribe allow rule |
remove_price_on_nonexistent_is_noop |
Removing unset price doesn't abort |
Built for the EVE Frontier x Sui Hackathon 2026 — "A Toolkit for Civilization."
Demonstrates ef_guard as reusable access control middleware for any EVE Frontier smart assembly extension.
MIT