Guldo is a Go-based application that connects to a blockchain and a PostgreSQL database to fetch and store event probabilities. It utilizes several packages for database interaction, blockchain communication, and utility functions.
-
Clone the repository:
git clone https://github.com/yourusername/guldo.git cd guldo -
Install dependencies:
Ensure you have Go installed, then run:
go mod tidy
-
Set up the environment variables:
Create a
.envfile in the root directory and add the necessary environment variables (see Environment Variables section).
Run the application using:
main.go: The entry point of the application.utils/banner.go: Contains utility functions, such as printing the application banner.db/db.go: Handles database connections using GORM.blockchain/blockchain.go: Manages blockchain client creation and interaction.repository/odds_repository.go: Manages CRUD operations for odds data.models/odds.go: Defines the data model for odds history.
The application requires the following environment variables:
DB_HOST: Database host.DB_PORT: Database port.DB_USER: Database user.DB_PASSWORD: Database password.DB_NAME: Database name.DB_SSLMODE: SSL mode for database connection.RPC_URL: URL for the blockchain RPC.
The project uses the following Go packages:
github.com/NethermindEth/starknet.go: For blockchain interaction.github.com/joho/godotenv: For loading environment variables.gorm.io/driver/postgresandgorm.io/gorm: For database interaction.
For a complete list of dependencies, see the go.mod file.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
