InsertCoin is a space to empower gamers and their communities to crowdfund their events.
InsertCoin
├─ README.md
├─ bot
│ ├─ .env
│ ├─ APICounter.py
│ ├─ config_strings.py
│ ├─ contractABI.json
│ ├─ lib.py
│ ├─ main.py
│ └─ requirements.txt
├─ contracts
│ └─ InsertCoin.sol
└─ server
├─ .env
├─ .gcloudignore
├─ app.yaml
├─ main.py
├─ requirements.txt
└─ static
├─ contractABI.js
├─ js
│ └─ contractABI.js
└─ lobby.html
Before you begin, ensure you have the following installed on your system:
- Python 3.8 or higher
- Google Cloud SDK (for deploying the server)
-
Navigate to the bot directory:
cd InsertCoin/bot
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Configure environment variables:
- Update the
.env
with your configuration details.
- Update the
-
Navigate to the server directory:
cd InsertCoin/server
-
Create a virtual environment and activate it:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Configure environment variables:
- Update
.env
with your configuration details.
- Update
-
Ensure you are in the bot directory and the virtual environment is activated:
cd InsertCoin/bot source venv/bin/activate # If not already activated
-
Run the bot:
python main.py
-
Ensure you are in the server directory and the virtual environment is activated:
cd InsertCoin/server source venv/bin/activate # If not already activated
-
Run the server locally:
python main.py
-
Deploy the server to Google Cloud:
- Ensure you are logged in to your Google Cloud account and have initialized the Google Cloud SDK.
- Deploy the application:
gcloud app deploy
- APICounter.py: Manages API call counts.
- config_strings.py: Configuration strings used in the bot.
- contractABI.json: ABI for interacting with the smart contract.
- lib.py: Library functions used in the bot.
- main.py: Main entry point for running the bot.
- requirements.txt: Python dependencies for the bot.
- app.yaml: Configuration file for Google App Engine.
- main.py: Main entry point for the server application.
- static: Contains static files for the frontend.
- contractABI.js: JavaScript version of the contract ABI.
- lobby.html: HTML file for the lobby page.
- requirements.txt: Python dependencies for the server.
- InsertCoin.sol: Solidity smart contract code for InsertCoin.