Skip to content

Commit 1f01c20

Browse files
committed
add documentation to README
1 parent 58722bc commit 1f01c20

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

README.md

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# CoW Protocol: Solver Reimbursement & Rewards Distributor
1+
# CoW Protocol: Solver Accounting
22

33
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
44

@@ -11,13 +11,19 @@ cp .env.sample .env <----- Copy your Dune and orderbook credentials here!
1111

1212
Fill out your Dune credentials in the `.env` file.
1313

14-
Generate the solver-payouts with for the accounting period 7 days with today as end date).
14+
Generate the solver-payouts with for the accounting period 7 days (with today as end date).
1515

1616
```shell
1717
python -m src.fetch.transfer_file
1818
```
1919

20-
For more advanced usage of this payout script see below.
20+
To generate order data for the current month to upload to Dune run the following command.
21+
22+
```shell
23+
python -m src.data_sync.sync_data --sync-table order_data
24+
```
25+
26+
For more advanced usage of these scripts see below.
2127

2228
# Summary of Accounting Procedure
2329

@@ -150,6 +156,18 @@ docker run --pull=always -it --rm \
150156

151157
and (usually after about 30 seconds) find the transfer file written to your current working directory.
152158

153-
### Managing Dependencies
159+
# Creating payment data for syncing
160+
161+
The script `src/data_sync/sync_data.py` creates tables for syncing to dune. The scripts can be called with a table to sync, start and end times, and a flag for dropping old data.
162+
163+
To create order rewards tables with data from `2024-12-30` to `2025-01-02` use
164+
```shell
165+
python -m src.data_sync.sync_data --sync_table order_data --start-time 2024-12-30 --end-time 2025-01-02
166+
```
167+
This will update (or create, if they do not exist yet) the tables `order_data_{NETWORK}_2024_12` and `order_data_{NETWORK}_2025_01`.
168+
169+
The script requires the additional environment variable `ANALYTICS_DB_URL`.
170+
171+
# Managing Dependencies
154172
Python libraries can be added to the `requirements.in` file. After this `pip-compile` or `python -m pip-compile` will update the `requirements.txt` for you (you may have to install the libry manually first).
155173
Warning: this might take a long time for large changes or when you run pip-compile for the first time. Running the command with the `-v` flag can help keep track of what's happening.

0 commit comments

Comments
 (0)