{"id":15927635,"url":"https://github.com/austintgriffith/fruit-market-land","last_synced_at":"2025-08-15T22:30:30.694Z","repository":{"id":205009123,"uuid":"713126805","full_name":"austintgriffith/fruit-market-land","owner":"austintgriffith","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-02T02:33:11.000Z","size":48130,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-29T03:40:37.482Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/austintgriffith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-01T22:25:40.000Z","updated_at":"2024-04-10T07:31:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"f550d39a-db14-4abc-8493-5c5013f3f32a","html_url":"https://github.com/austintgriffith/fruit-market-land","commit_stats":null,"previous_names":["austintgriffith/fruit-market-land"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austintgriffith%2Ffruit-market-land","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austintgriffith%2Ffruit-market-land/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austintgriffith%2Ffruit-market-land/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/austintgriffith%2Ffruit-market-land/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/austintgriffith","download_url":"https://codeload.github.com/austintgriffith/fruit-market-land/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229962980,"owners_count":18151935,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-06T23:03:12.211Z","updated_at":"2024-12-16T12:38:19.687Z","avatar_url":"https://github.com/austintgriffith.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🍓 Fruit Market Land\n\n🧪 this is forked from the fruit market repo [here](https://github.com/BuidlGuidl/fruit-market)\n\n💵 Buy Land and Grow Strawberries! \n\n\u003cimg width=\"719\" alt=\"image\" src=\"https://github.com/austintgriffith/fruit-market-land/assets/2653167/8ec660c1-bd7c-4e10-97b6-3d0fff5a86f5\"\u003e\n\n📱 very ugly buttons for each land tile:\n\n\u003cimg width=\"592\" alt=\"image\" src=\"https://github.com/austintgriffith/fruit-market-land/assets/2653167/c45dc837-2ecd-452a-b011-e7e584ef73b8\"\u003e\n\n🗺 check out the land contract in `packages/hardhat/contracts/Land.sol`\n\n\n\n\n```bash\n\ngit clone https://github.com/BuidlGuidl/fruit-market-land\n\ncd /fruit-market-land\n\nyarn install\n\n```\n\n\u003e ⚙️ bring up the chain and deploy your contracts \n\n```bash\n\nyarn chain\n\nyarn deploy\n\nyarn start\n\n```\n\n\u003e 🖨 copy `packages/nextjs/.env.example` to the name `.env` and edit your frontend env:\n\n\u003e 💿 you'll need to spin up a KV (key value storage) in vercel and copy/paste in the env.local fields:\n\n\n```\nNEXT_PUBLIC_DEPLOY_BLOCK=0\nNEXT_PUBLIC_LIVE_URL=https://event-wallet.vercel.app\nKV_URL=\nKV_REST_API_URL=\nKV_REST_API_TOKEN=\nKV_REST_API_READ_ONLY_TOKEN=\n```\n\n\n\u003e 📱 hit the frontend at `http://localhost:3000`\n\n\n\u003e 📝  next, inspect the `targetNetwork` var in `packages/nextjs/scaffold.config.ts` \n\n(if you are deploying locally it needs to be `chains.hardhat` or `chains.gnosis` out in prod)\n\n\n\u003e 💁‍♂️ login as with your nickname:\n\n![image](https://github.com/BuidlGuidl/event-wallet/assets/2653167/bfbbe1a3-8fee-4b73-8ff9-12954827a962)\n\n\u003e 🏷 now you can use the browser to navigate to the `/checkedIn` route to drop tokens and gas to players:\n\n![image](https://github.com/BuidlGuidl/event-wallet/assets/2653167/1d1e19e1-35fb-4302-9bd6-780fed7af7cf)\n\n⚠️ your frontend address will need to be an admin to drop tokens to players\n\n\u003e 📝 edit `packages/hardhat/deploy/00_deploy_your_contract.ts` and add your address to `dexPausers`\n\n\u003e ⚙️ redeploy the whole stack with `yarn deploy --reset`\n\n🤔 try visiting [http://localhost:3000](http://localhost:3000) from an incognito window or another browser to have a fresh burner to play with\n\n(check in with a burner and drop some funds to it using your other account and the  `/checkedIn` page)\n\n⚖️ at this point, player should be able to trade credits for resources on the dexes:\n\n![image](https://github.com/BuidlGuidl/event-wallet/assets/2653167/09a019de-8112-4912-9889-d1fa47cb0d4d)\n\n---\n\n\n## Charts and Leaderboard\n\nIf you want to keep the charts and leaderboard updated you have to run a cron job requesting /api/admin/track-prices:\n\n```\n* * * * * /usr/bin/curl https://domain/api/admin/track-prices \u003e\u003e prices.log\n```\n\nOr you can set the cron job at Vercel using the /packages/nextjs/vercel.json config file.\n\n(On localhost you can just use the browser to hit `http://localhost:3000/api/admin/track-prices` manually) \n\n\n---\n\n## Trading Bots \n\nIf you want prices to randomly fluctuate you need to run bots that have a bunch of liquidity and trade randomly:\n\n```bash\ngit clone https://github.com/BuidlGuidl/fruit-market-trader\n\ncd fruit-market-trader\n\nyarn install\n```\n\n\u003e 💾 you will need to copy your `fruit-market` `packages/nextjs/generated/deployedContracts.ts` into this `fruit-market-trader/deployedContracts.js`\n\n⚠️ notice it changes from `.ts` to `.js` - you will also have to remove the `as const` from the end\n\n(this tells your bots about the new contracts you've deployed)\n\n☢️ Notice: any time you need to redeploy, do `yarn deploy --reset` and recopy over your `deployedContracts.js` \n\n\u003e ✏️ copy the `.env.example` to `.env` file in the `fruit-market-trader` dir with the following info filled in:\n\n```\nDEPLOYER_PRIVATE_KEY=0xYOUR_PRIVATE_KEY_FROM_YOUR_LOCAL_STORAGE\nGNOSIS_RPC=http://127.0.0.1:8545\nGNOSIS_NETWORK_ID=31337\n```\n\n(you can get this private key from the local storage. it's called `scaffoldEth2.burnerWallet.sk`) \n\n⛽️ if your this address is loaded up with local funds, you should be good to run:\n\n```bash\nnode batchPrep.js\n```\n\n⚙️ this is going to generate a bunch of trader accounts, send them tokens, and save the private keys up in your `.env` file:\n\n![image](https://github.com/BuidlGuidl/event-wallet/assets/2653167/d59b9c72-0a6d-4029-8257-0f4d0b8212dd)\n\n(if anything fails here it probably means your burner is not correctly funded with credits and assets and you can debug balances using http://localhost:3000/debug)\n\n\u003e 🍎 now you can start a trading bot for each resource like:\n\n```bash\nnode tradeDex.js Apple\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustintgriffith%2Ffruit-market-land","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faustintgriffith%2Ffruit-market-land","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faustintgriffith%2Ffruit-market-land/lists"}