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.

Last updated