Suimming is a location-based collection game built on Sui where players collect letters at physical locations and mint Sentence NFTs. This Move package implements the core on-chain logic following a minimal, production-ready architecture.
suimming-move/
├── sources/
│ ├── user.move # User profiles and letter inventory
│ ├── checkpoint.move # Location management and rewards
│ └── nft.move # Sentence NFT creation and trading
├── docs/
│ ├── README.md # This file
│ ├── user.md # User module documentation
│ ├── checkpoint.md # Checkpoint module documentation
│ └── nft.md # NFT module documentation
└── Move.toml # Package configuration
- Store only essential data: user inventory, visit stats, NFTs
- Heavy content (images, metadata) lives in Walrus
- Events provide complete audit trail for indexers
- user: Profile management, letter inventory, visit tracking
- checkpoint: Location lifecycle, randomized rewards, social features
- nft: Sentence NFT minting and transfers
- Package visibility for controlled inter-module access
- Atomic letter consumption prevents partial updates
- Event-driven design for transparency and indexability
- Profile Creation: Users create profiles to track inventory and stats
- Location Visits: Players visit checkpoints to claim random letters
- Letter Collection: Randomized A-Z rewards with epoch-based limits
- NFT Creation: Consume letters to mint Sentence NFTs with custom artwork
- Social Interaction: Boast NFTs at locations for discovery
- Trading: P2P transfers and marketplace integration via Sui Kiosk
Modules communicate through public(package) functions:
checkpoint -> user: append_letters(), record_visit(), set_boast()
nft -> user: can_consume(), consume_letters()
- Geofencing: Seal policy enforcement (mobile + backend)
- Rendering: JavaScript Canvas for NFT artwork
- Storage: Walrus for decentralized content
- Discovery: Event indexing for maps and galleries
- Uppercase normalization for consistency
- Whitespace-aware consumption (spaces don't count)
- Atomic multiset operations
- Deterministic counting across all operations
- Cryptographically secure via
sui::random - A-Z letter generation (ASCII 65-90)
- Per-epoch claim limits prevent abuse
- Gas-efficient single letter rewards
- Letters create scarcity and value
- Transparent consumption tracking
- Immutable content for provenance
- Standard Sui object model for trading
- Checkpoint boasting for discovery
- Visit statistics and leaderboards
- Event-driven feeds and notifications
- Community-driven content creation
- Sui CLI installed and configured
- Access to Sui testnet/mainnet
- Wallet with sufficient SUI for deployment
-
Deploy Package
sui move build sui move publish
-
Initialize Admin
sui move call --function create_admin_cap --module checkpoint
-
Create Checkpoints
sui move call --function create_checkpoint --module checkpoint \ --args $ADMIN_CAP "Location Name" "walrus_meta_id" "seal_policy_ref"
-
Configure Off-chain
- Set up geofencing policies in Seal
- Deploy indexer for event processing
- Configure Walrus gateway for content delivery
sui move call --function create_profile --module usersui move call --function claim_letters --module checkpoint \
--args $CHECKPOINT $USER_PROFILE $RANDOM_OBJECTsui move call --function mint_sentence_from_profile --module nft \
--args $USER_PROFILE "HELLO" "Hello World!" "walrus_image_cid"- User Module - Profiles, inventory, visits
- Checkpoint Module - Locations, rewards, boasting
- NFT Module - Sentence creation and trading
All state changes emit events for off-chain indexing:
ProfileCreated,VisitRecorded,LettersAppended,LettersConsumed,BoastSet
CheckpointCreated,CheckpointToggled,LettersClaimed,Boasted,Unboasted
SentenceMinted,SentenceTransferred
- Admin capabilities for checkpoint management
- Package visibility for inventory mutations
- Transaction sender validation for all user operations
- Epoch-based claim limits prevent farming
- Atomic letter consumption ensures consistency
- Transparent event emission for auditability
- Sui's secure random number generator
- Fresh entropy per transaction
- Public visibility acceptable for equal probability
- Letter normalization and counting
- Inventory consumption edge cases
- Random letter generation distribution
- Event emission verification
- End-to-end user journey flows
- Cross-module state consistency
- Error condition handling
- Gas optimization validation
- High-volume checkpoint claiming
- Concurrent user interactions
- Dynamic field scalability
- Event indexer performance
- User registration rates
- Letter claim frequency
- NFT minting volume
- Checkpoint activity distribution
- Monitor checkpoint health
- Update Walrus metadata
- Manage admin capabilities
- Coordinate upgrades
- Immutable objects for user data
- Versioned events for compatibility
- Graceful migration procedures
- Backward compatibility maintenance
- Install Sui toolchain
- Clone repository
- Run
sui move buildto verify - Check
sui move testfor validation
- Comprehensive documentation
- Event emission for all state changes
- Error handling for edge cases
- Gas optimization considerations
- Add/update relevant documentation
- Include unit tests for new features
- Verify no compilation warnings
- Update event schemas if needed