Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update readme and add installation guide #160

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Installing and Running Pagu

This document provides detailed instructions on how to install and run Pagu for development purposes.

## Prerequisites

Ensure you have the following installed on your system before proceeding:

- **Go**: Pagu is developed using the Go programming language. You can find installation instructions [here](https://go.dev/doc/install).
- **MySQL**: Pagu uses MySQL as its primary database. Download and install MySQL from [here](https://dev.mysql.com/downloads/workbench/).

## Installation Steps

Follow the steps below to install and configure Pagu on your local machine.

### 1. Clone the Repository

First, clone the Pagu repository to your local machine:

```bash
git clone https://github.com/pagu-project/Pagu.git
cd Pagu
```

### 2. Install Development Tools

Install the necessary development tools by running the following commands:

```bash
make devtools
cp ./config/config-sample.yml ./config/config.yml
```

Modify `config.yml` with the appropriate values for your setup.

### 3. Running Local Pactus Nodes

To run local nodes and configure them in your `config.yml`, refer to the [Pactus Daemon documentation](https://docs.pactus.org/get-started/pactus-daemon/).

### 4. Wallet Requirements

Pagu requires a Pactus wallet to manage transactions. If you don’t have a wallet, follow the instructions to create one [here](https://docs.pactus.org/tutorials/pactus-wallet/#create-a-wallet).

### 5. Discord Setup

If you plan to run Pagu in a Discord server, you will need a Guild ID and a Discord application token. You can obtain these by following the [Discord Developer Guide](https://discord.com/developers/docs/quick-start/getting-started).

## Running Pagu

Once the installation and configuration are complete, you can run Pagu using the following commands.

### 1. Discord Engine

Run the Discord engine using:

```bash
make check
go run ./cmd/discord -c ./config/config.main.yml run
```

## Contributing

We welcome contributions to Pagu! Please follow the steps below to get started:

1. Fork the repository.
2. Create a new branch (`git checkout -b feature/YourFeature`).
3. Make your changes.
4. Commit your changes (`git commit -m 'Add some feature'`).
5. Push to the branch (`git push origin feature/YourFeature`).
6. Open a Pull Request.
91 changes: 21 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,81 +1,32 @@
# Pagu
Pagu is a Bot engine that provides support and information about the [Pactus](https://pactus.org) Blockchain.
# Pagu - Pactus Guardian Bot

<p align="center">
<img alt="Pagu" src="./assets/PAGU.png" width="150" height="150" />
</p>
Pagu is the intelligent guardian bot designed to interact with and monitor the [Pactus](https://pactus.org) Blockchain.
It operates as a single engine that seamlessly supports various interfaces, including Discord, Telegram, Web, and more.

## Table of Contents
### Key Features

- [Features](#features)
- [Installation](#installation)
- [Run](#run)
- [Contributing](#contributing)
Pagu empowers users with several essential tools and services to interact with the Pactus blockchain:

## Features
- **Real-time Network Monitoring**: Stay informed with the latest network health, status, and performance metrics of the Pactus blockchain.
- **Transaction Fee Calculations**: Easily determine the transaction fees.
- **Block Reward Estimation**: Estimate block rewards for validators based on their stake.
- **PAC Coin Market Prices**: Keep track of the latest market prices for PAC coins.
- **Phoenix Testnet Integration**: Monitor the health and status of the Phoenix (Pactus testnet) network.
- **Phoenix Testnet Faucet**: Obtain testnet tokens through the Phoenix faucet for development and testing purposes.

- Pactus network health, status and statistics
- Pactus fee and reward calculation
- PAC coin market prices
- Phoenix (Pactus testnet) health and status
- Phoenix faucet

## Installation
### Multi-Platform Support

To get started with Pagu, follow these steps:
Pagu is designed to be flexible, allowing it to be used across different platforms with the same powerful engine.
You can access Pagu on the following platforms:

1. **Clone the repository**:
```bash
git clone https://github.com/pagu-project/Pagu.git
cd Pagu
```
- **Discord**: Join the [Pactus Discord server](https://discord.gg/H5vZkNnXCu) and interact with Pagu directly.
- **Telegram**: Pagu will soon be available on Telegram—stay tuned for the release.

2. **Install dependencies**:
### Contributing

Install [Go](https://go.dev/doc/install) if you have not installed before and also install [Mysql](https://dev.mysql.com/downloads/workbench/) as main database of Pagu
then run below commands

```bash
make devtools
cp ./config/config-sample.yml ./config/config.yml # fill the file with correct values
```
3. **Run Local Nodes**

To run local node and set thier address in config file please follow below instruction
We welcome contributions to Pagu! If you would like to help improve the bot, please feel free to contribute.
You can find the development details, including installation and running instructions, in the [INSTALL.md](./INSTALL.md) file.

https://docs.pactus.org/get-started/pactus-daemon/
---


4. **Wallet requirements**:

Pagu needs a Pactus wallet to call transaction methods. If you have no wallet follow bellow instruction to make one.

https://docs.pactus.org/tutorials/pactus-wallet/#create-a-wallet


5. **Discord Server**:

To run Pagu in Discord server you need a GuildID of server and discord application token. To make them please follow below link

https://discord.com/developers/docs/quick-start/getting-started

## Run
1. **Discord Engine**

```bash
make check
go run ./cmd/discord -c ./config/config.main.yml run
```

## Contributing

We welcome contributions! If you'd like to contribute to Pagu, please follow these guidelines:

1. Fork the repository.
2. Create a new branch (`git checkout -b feature/YourFeature`).
3. Make your changes.
4. Commit your changes (`git commit -m 'Add some feature'`).
5. Push to the branch (`git push origin feature/YourFeature`).
6. Open a Pull Request.

---
<p align="center"> <img alt="Pagu" src="./assets/pagu-3d.png" /> </p>
Binary file added assets/pagu-3d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed assets/pagu-icon-white-512x512_2.png
Binary file not shown.
File renamed without changes
Loading