Peer2Play WhitePaper
  • 📜Introduction
  • ⛔Problem Statement
  • đŸ› ī¸Solution
  • đŸŽ¯Mission and Vision
  • ⚡Key Features
    • Game Tokenization
    • Developer On-Boarding
    • Player-Driven Ecosystem
    • Transparent Revenue Sharing
    • On-chain Tournaments
    • Tokenized Economy
    • Cross-Chain Integration
    • Governance and Incentives
      • GameDAO
      • Incentives
    • Co-Ownership Model
      • Tokenized Games
      • Buybacks and Burns
  • 🤖AI Agents
  • Games
    • âœ‚ī¸Punk Paper(LIVE)
    • 🏏Decentralized Cricket League (DCL)(LIVE)
    • đŸ‹ī¸Chain Duel(Coming Soon)
    • đŸ•šī¸Upcoming Games
  • 🧩Use cases
  • đŸ’ĢGetting started
    • Game Developers
    • Influencers
    • Gamers
  • 👨‍đŸ’ģTechnical Architecture
    • MPC Wallet
    • Smart contract Architecture
      • Peer2PlayGenericStakingContract
        • Chess
        • Poker
        • Ludo
      • Peer2PlayGenericNonStakingContract
        • 1. Role-Playing Game (RPG)
        • 2. City-Building Game
        • 3. Farming Simulations
      • Tokenization & Revenue distribution
    • SDKs & APIs
  • 🔐Compliance & Security
  • ❓FAQ & Troubleshooting
  • 🤝Connect with Peer2Play
Powered by GitBook
On this page
  1. Technical Architecture
  2. Smart contract Architecture
  3. Peer2PlayGenericNonStakingContract

3. Farming Simulations

Ex : FarmChain

Game Flow:

  1. Add the Game:

    • Admin calls addGame("FarmChain", gameOwner, "ipfsHash", 200).

  2. Register Player:

    • Player calls registerOnGame(gameId) to join the game.

  3. Deploy Token Contracts:

    • Game owner deploys an ERC20 contract: deployTokenContract(gameId, "ERC20", "FarmCoin", "FC").

    • Deploys an ERC721 contract: deployTokenContract(gameId, "ERC721", "FarmItems", "FI").

  4. Gameplay:

    • Player harvests crops and earns "FarmCoin" (ERC20).

    • Player buys a tractor (ERC721 NFT).

    • On-chain: Token balances, NFT ownership.

    • IPFS: Metadata for the tractor (model, image).

On-Chain Data:

  • Player balances, NFT ownership. IPFS Data:

  • Crop metadata, farm progress.

Previous2. City-Building GameNextTokenization & Revenue distribution
👨‍đŸ’ģ