Skip to content
This repository was archived by the owner on Apr 1, 2024. It is now read-only.
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
# Slothunter
### A bot for Polkadot parachain auction.

<img width="400" src="https://raw.githubusercontent.com/w3f/Grants-Program/master/static/img/badge_black.svg"/>

[![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Checks](https://github.com/hack-ink/slothunter/actions/workflows/checks.yml/badge.svg?branch=main)](https://github.com/hack-ink/slothunter/actions/workflows/checks.yml)
[![Release](https://github.com/hack-ink/slothunter/actions/workflows/release.yml/badge.svg)](https://github.com/hack-ink/slothunter/actions/workflows/release.yml)
Expand Down
32 changes: 16 additions & 16 deletions test/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,34 +31,34 @@
5. Change the `type` to test different bidding type
6. Adjust the `upper-limit` and `increment` to test more situation if you want
7. Add some `webhooks` to test the notification webhook component
- You can use [webhook.site](https://webhook.site), the result should be listed on the left of the website
- You can use any other webhook listener
- You can use [webhook.site](https://webhook.site), the result should be listed on the left of the website
- You can use any other webhook listener
8. Edit the `mail` to test the notification mail component
- Add some `receivers`
- Add a `sender`
- Recommending using Gmail for testing
- Add `username`, e.g. example@gmail.com
- Add `password`, e.g. [app password](https://support.google.com/accounts/answer/185833?hl=en)
- Add some `receivers`
- Add a `sender`
- Recommending using Gmail for testing
- Add `username`, e.g. example@gmail.com
- Add `password`, e.g. [app password](https://support.google.com/accounts/answer/185833?hl=en)
#### Test
1. Go to the root directory of this repository
2. Run
- `docker-compose -f test/integration/docker-compose.yml down && rm -rf test/integration/data/db && docker-compose -f test/integration/docker-compose.yml up -d` if you have run the basic test before
- `docker-compose -f test/integration/docker-compose.yml up -d` if you haven't run the basic test before
- `docker-compose -f test/integration/docker-compose.yml down && rm -rf test/integration/data/db && docker-compose -f test/integration/docker-compose.yml up -d` if you have run the basic test before
- `docker-compose -f test/integration/docker-compose.yml up -d` if you haven't run the basic test before
3. Run `cargo run -- -c test/integration/rococo.toml`
4. Open browser and navigate to [Polkadot/Substrate Portal](https://polkadot.js.org/apps/?rpc=ws://127.0.0.1:9944#/explorer)
5. *Optional* for crowdloan
1. Navigate to `Network tab -> Parachains tab -> Crowdloan tab -> Add fund button`
2. Set `crowdfund cap` recommend `1000 UNIT`
3. Set `ending block` recommend `1000`
4. Set `periods` recommend `(0, 0)`
1. Navigate to `Network tab -> Parachains tab -> Crowdloan tab -> Add fund button`
2. Set `crowdfund cap` recommend `1000 UNIT`
3. Set `ending block` recommend `1000`
4. Set `periods` recommend `(0, 0)`
6. Navigate to `Developer tab -> Sudo tab -> auctions module -> newAuction call`
7. Submit the new auction call, remember to uncheck the `use a proxy for this call` in the pop-up window
8. A notification should appear in the webhook and mail to indicate the start of an auction
9. Additionally, a notification regarding the initial bid should be included in both the webhook and mail
10. Use `Charlie` and `Dave` to bid for `2001` and `2002` and check the results
- E.G.
- `Charlie` bid `5 UNIT` for `(0, 0)`. Slothunter should bid `7 UNIT` for `(0, 0)` with the default configurations
- `Dave` bid `1 UNIT` for `(1, 1)` first, and then `Charlie` bid `5 UNIT` for `(0, 1)`. Slothunter should bid `11 UNIT` for `(0, 0)` with the default configurations
- E.G.
- `Charlie` bid `5 UNIT` for `(0, 0)`. Slothunter should bid `7 UNIT` for `(0, 0)` with the default configurations
- `Dave` bid `1 UNIT` for `(1, 1)` first, and then `Charlie` bid `5 UNIT` for `(0, 1)`. Slothunter should bid `11 UNIT` for `(0, 0)` with the default configurations
11. Wait until the auction ends, you should receive a notification via webhook and mail indicating that the auction has ended

## Addition
Expand Down