Skip to content

Commit

Permalink
docs: readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcr committed Jul 1, 2024
1 parent 4a4178c commit 0abce02
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 24 deletions.
2 changes: 2 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[alias]
runehook-install = "install --path . --locked --force"
19 changes: 19 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Contributing

Thank you for considering contributing to this product! We welcome any contributions, whether it's bug fixes, new features, or improvements to the existing codebase.

### Your First Pull Request

Working on your first Pull Request? You can learn how from this free video series:

[How to Contribute to an Open Source Project on GitHub](https://egghead.io/courses/how-to-contribute-to-an-open-source-project-on-github)

To help you get familiar with our contribution process, we have a list of [good first issues](../../issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) that contain bugs that have a relatively limited scope. This is a great place to get started.

If you decide to fix an issue, please be sure to check the comment thread in case somebody is already working on a fix. If nobody is working on it at the moment, please leave a comment stating that you intend to work on it so other people don’t accidentally duplicate your effort.

If somebody claims an issue but doesn’t follow up for more than two weeks, it’s fine to take it over but you should still leave a comment. **Issues won't be assigned to anyone outside the core team**.

### Contribution Prerequisites

... 🚧 Work in progress 🚧 ...
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: 'Bug'

---

**Describe the bug**
A clear and concise description of what the bug is.

Transaction ID
Address
Block#
Time stamp

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots or consol.log to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here:
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: Ask the community
url: https://discord.gg/KrqnVg8D
about: Ask and discuss questions with other Stacks community developers.
23 changes: 23 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: 'enhancement'

---

**Please review the existing enhancement issues at the link below before creating a new one to ensure you do not create a duplicate request.**
If you see an [existing enhancement issues](https://github.com/blockstack/explorer/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement) please comment on the issue or upvote the issue with a :thumbsup:


**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
19 changes: 19 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
### Description

<!-- Describe the bug this PR fixes or the feature it adds. Link to any related issues and PRs -->

#### Breaking change?

<!-- If applicable, list the APIs/functionality which this PR breaks -->

### Example

<!-- If applicable, add an example on how this improves the application -->

---

### Checklist

- [ ] All tests pass
- [ ] Tests added in this PR (if applicable)

32 changes: 10 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
/ /

* [Features](#features)
* [API Documentation](#api-documentation)
* [Quick Start](#quick-start)
* [System Requirements](#system-requirements)
* [Indexing Runes](#indexing-runes)
Expand All @@ -25,12 +24,10 @@
* Rune activity per block, transaction, account
* Balances and holders

# API Documentation
# Quick Start

For instructions to run the REST API or endpoint reference, take a look at the [API README](./api/README.md).

# Quick Start

## System Requirements

To run runehook, you will need:
Expand All @@ -39,31 +36,22 @@ To run runehook, you will need:
1. A local writeable Postgres database for data storage.
* We recommended a 1TB volume size.

## Indexing Runes

1. Clone the repo.
## Getting started

1. Create an `.env` file and specify the appropriate values to configure the local
API server, postgres DB and Ordhook node reachability. See
[`env.ts`](https://github.com/hirosystems/ordinals-api/blob/develop/src/env.ts)
for all available configuration options.

1. Build the app (NodeJS v18+ is required)
1. Clone the repo and install runehook
```
npm install
npm run build
cargo runehook-install
```
1. Start the service
1. Generate a new config file. Make sure to fill in the correct information.
```
npm run start
runehook config new
```
### Stopping the API
When shutting down, you should always prefer to send the `SIGINT` signal instead
of `SIGKILL` so the service has time to finish any pending background work and
all dependencies are gracefully disconnected.
1. Start the indexing service
```
runehook service start --config-path Runehook.toml
```
# Bugs and feature requests
Expand Down
2 changes: 1 addition & 1 deletion src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ async fn handle_command(opts: Opts, ctx: Context) -> Result<(), String> {
.map_err(|e| format!("unable to open file {}\n{}", file_path.display(), e))?;
file.write_all(config_content.as_bytes())
.map_err(|e| format!("unable to write file {}\n{}", file_path.display(), e))?;
println!("Created file Chainhook.toml");
println!("Created file Runehook.toml");
}
Command::Service(ServiceCommand::Start(cmd)) => {
let config = Config::from_file_path(&cmd.config_path)?;
Expand Down
23 changes: 22 additions & 1 deletion src/config/generator.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
pub fn generate_config() -> String {
let conf = format!(r#""#);
let conf = format!(r#"
[postgres]
username = "postgres"
password = "postgres"
database = "postgres"
host = "localhost"
port = 5432
[network]
bitcoin_network = "mainnet"
bitcoind_rpc_url = "http://0.0.0.0:8332"
bitcoind_rpc_username = "user"
bitcoind_rpc_password = "pass"
bitcoind_zmq_url = "tcp://0.0.0.0:18543"
[resources]
lru_cache_size = 50000
[logs]
runes_internals = true
chainhook_internals = false
"#);
return conf;
}

0 comments on commit 0abce02

Please sign in to comment.