You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CGO_ENABLED=0 go build -v -o ./utils/update_provider_url ./cmd/utils/update_provider_url/update_provider_url.go
10
+
CGO_ENABLED=0 go build -v -o ./utils/register_pegin ./cmd/utils/register_pegin/register_pegin.go
11
+
CGO_ENABLED=0 go build -v -o ./utils/refund_user_pegout ./cmd/utils/refund_user_pegout/refund_user_pegout.go
12
+
CGO_ENABLED=0 go build -v -o ./utils/key_conversion ./cmd/utils/key_conversion/key_conversion.go
13
+
endef
14
+
8
15
tools: download
9
16
go install github.com/parvez3019/go-swagger3@fef3d30b0707883c389261bf26297eebd10d7216 #v1.0.3
10
17
go install golang.org/x/vuln/cmd/govulncheck@latest
11
18
pip3 install pre-commit && pre-commit install
12
-
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.55.2
19
+
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(shell go env GOPATH)/bin v1.63.4
13
20
brew install mockery && brew upgrade mockery # installation with brew is because mockery team doesnt recommend to install with go install, if you don't have brew feel free to comment this line and install mockery with other method
14
21
15
22
download:
@@ -23,12 +30,17 @@ validation: lint
23
30
go mod verify
24
31
govulncheck ./... # should fail on non informational vulnerabilities
go test -v -race -covermode=atomic -coverpkg=./pkg/...,./internal/...,./cmd/... -coverprofile=$(TEMPORAL_COVER_FILE) ./pkg/... ./internal/... ./cmd/...
53
+
go test -timeout 30m -v -race -covermode=atomic -coverpkg=./pkg/...,./internal/...,./cmd/... -coverprofile=$(TEMPORAL_COVER_FILE) ./pkg/... ./internal/... ./cmd/...
go tool cover -func "$(TEMPORAL_COVER_FILE)"&& go tool cover -html="$(TEMPORAL_COVER_FILE)"
44
56
rm $(TEMPORAL_COVER_FILE)
45
57
46
58
coverage-report: clean
47
59
mkdir -p coverage
48
-
go test -v -race -covermode=atomic -coverpkg=./pkg/...,./internal/...,./cmd/... -coverprofile=$(COVER_FILE) ./pkg/... ./internal/... ./cmd/...
60
+
go test -timeout 30m -v -race -covermode=atomic -coverpkg=./pkg/...,./internal/...,./cmd/... -coverprofile=$(COVER_FILE) ./pkg/... ./internal/... ./cmd/...
49
61
$(call filter_coverage_file, $(COVER_FILE))
50
62
51
63
test: clean
52
64
mkdir -p coverage
53
-
go test -v -race -covermode=atomic -coverpkg=./pkg/...,./internal/...,./cmd/... -coverprofile=$(TEMPORAL_COVER_FILE) ./pkg/... ./internal/... ./cmd/...
65
+
go test -timeout 30m -v -race -covermode=atomic -coverpkg=./pkg/...,./internal/...,./cmd/... -coverprofile=$(TEMPORAL_COVER_FILE) ./pkg/... ./internal/... ./cmd/...
Copy file name to clipboardExpand all lines: README.md
+29Lines changed: 29 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -56,6 +56,35 @@ mentioned before are the minimal dependencies, but in order to run a fully funct
56
56
The [cmd/utils](cmd/utils) directory contains scripts with different utilities for the liquidity providers. You can either run them directly
57
57
with `go run` or build them with `make utils`. You can run the scripts with the `--help` flag to see the available options. The current utilities are:
58
58
-**update_provider_url**: updates the URL of a liquidity provider provided when the discovery function of the Liquidity Bridge Contract is executed.
59
+
-**register_pegin**: register a PegIn transaction within the Liquidity Bridge Contract. Most times, this script is only required to execute refunds
60
+
on special cases. This script requires an input file whose structure can be found [the input-example.json](cmd/utils/register_pegin/input-example.json) file.
61
+
-**refund_user_pegout**: executes a refund for a user's peg-out operation through the Liquidity Bridge Contract. This is used when a peg-out operation needs to be refunded back to the user's RSK address. The script requires the quote hash of the operation to refund.
62
+
-**key_conversion**: shows the corresponding BTC and RSK address for a given private key and encrypts it into a keystore, accepts the key either in WIF or hex format. The key can be provided through the terminal, a file or an existing keystore.
63
+
64
+
### Monitoring Service
65
+
The project includes a Bitcoin balance monitoring service that tracks specified BTC addresses and exposes metrics at `http://<host>:8080/metrics` using Prometheus `https://prometheus.io/`.
66
+
67
+
To run the monitoring service with the default port (8090):
68
+
```bash
69
+
make monitoring
70
+
```
71
+
72
+
To run the monitoring service with a custom port (e.g., 8091):
73
+
```bash
74
+
make monitoring MONITOR_PORT=8091
75
+
```
76
+
77
+
The service is configured in `docker-compose/monitoring/src/config.ts` and supports both testnet and mainnet monitoring:
78
+
79
+
- MONITORED_ADDRESSES: The set of addresses to be monitored. Each address should have an alias that will be used in the metrics.
80
+
- MONITOR_CONFIG: The configuration for the monitoring service.
81
+
- pollingIntervalSeconds: How often the service will check the bitcoin balance of the monitored addresses in seconds.
82
+
- monitorName: The name of the monitoring service.
83
+
- network: The network to monitor (mainnet or testnet).
84
+
- port: The port where the service will be exposed.
85
+
86
+
The service can be configured to monitor other addresses by modifying the `MONITORED_ADDRESSES` array in `docker-compose/monitoring/src/config.ts`.
87
+
59
88
60
89
### More information
61
90
If you're looking forward to integrate with Flyover Protocol then you can check the [Flyover SDK repository](https://github.com/rsksmart/unified-bridges-sdk/tree/main/packages/flyover-sdk).
0 commit comments