To The Moon is a little web3 community game originally created for the Ternoa L2 ZKEVM testnet. The goal is to give enough fuel to a rocket to reach the moon.The rocket is controlled by a smart contract and the fuel token is an ERC20 SC. It also use the CapsToTheMoon ERC20 token as a way to swap to Fuel.
The game is a simple example of how a community can interact with a smart contract to achieve a common goal. The game is open-source and can be used as a template for other community games.
- Connect your wallet
- Do quests to earn CapsToTheMoon tokens
- Swap CapsToTheMoon tokens for Fuel tokens
- Send Fuel tokens to the rocket smart contract
- Watch the rocket fly to the moon
Wallet who will have made move the rocket the will be the winner of the game.
git clone https://github.com/quentin72000/tothemoon-dapp.git
cd tothemoon-dapp
2.1 Install the dependencies
cd contracts
npm install
2.2 Compile the smart contract and check for errors
npx hardhat compile
2.3 Configure your private key into hardhat variables
Warning
If deploying on a testnet, make sure to use an account with no real funds.
npx hardhat vars set TERNOA_PRIVATE_KEY
# Enter your hexadecimal private key
2.3 Modify the deployment script
Open the contracts/ignition/modules/Rocket.js
file and modify the constant. TOKEN_ADDRESS should be the address of the ERC20 token you want to use as swap token.
2.4 Deploy the smart contract
npx hardhat ignition deploy ./ignition/modules/Rocket.js --network ternoa
SOON
SOON
This project is licensed under the MIT License - see the LICENSE file for details.