Files
ark/server/Makefile
Louis Singer 01297ae38c Add support for covenant-less ASP (#214)
* scaffolding wallet

* remove wallet db, add loader instead

* wip

* implement some wallet methods

* signing and utxos

* renaming

* fee estimator

* chain source options

* config

* application service

* clark docker-compose

* CLI refactor

* v0 clark

* v0.1 clark

* fix SignTapscriptInput (btcwallet)

* wallet.Broadcast, send via explora

* fix ASP pubkey

* Use lnd's btcwallet & Add rpc to get wallet staus

* wip

* unilateral exit

* Fixes on watching for notifications and cli init

* handle non-final BIP68 errors

* Fixes

* Fixes

* Fix

* a

* fix onboard cosigners + revert tree validation

* fix covenant e2e tests

* fix covenantless e2e tests

* fix container naming

* fix lint error

* update REAME.md

* Add env var for wallet password

---------

Co-authored-by: altafan <18440657+altafan@users.noreply.github.com>
2024-07-30 20:57:52 +02:00

92 lines
2.6 KiB
Makefile
Executable File

.PHONY: build clean cov help intergrationtest lint run test vet proto proto-lint
## build: build for all platforms
build:
@echo "Building arkd binary..."
@bash ./scripts/build
## clean: cleans the binary
clean:
@echo "Cleaning..."
@go clean
## cov: generates coverage report
cov:
@echo "Coverage..."
@go test -cover ./...
## help: prints this help message
help:
@echo "Usage: \n"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
## intergrationtest: runs integration tests
integrationtest:
@echo "Running integration tests..."
@go test -v -count=1 -race -timeout 200s github.com/ark-network/ark/test/e2e/...
## lint: lint codebase
lint:
@echo "Linting code..."
@golangci-lint run --fix
## run: run in dev mode
run: clean
@echo "Running arkd in dev mode..."
@export ARK_WALLET_ADDR=localhost:18000; \
export ARK_ROUND_INTERVAL=10; \
export ARK_LOG_LEVEL=5; \
export ARK_NETWORK=liquidregtest; \
export ARK_PORT=8080; \
go run ./cmd/arkd
## test: runs unit and component tests
test:
@echo "Running unit tests..."
@find . -name go.mod -execdir go test -v -count=1 -race ./internal/... \;
## vet: code analysis
vet:
@echo "Running code analysis..."
@go vet ./...
## proto: compile proto stubs
proto: proto-lint
@echo "Compiling stubs..."
@docker run --rm --volume "$(shell pwd):/workspace" --workdir /workspace buf generate buf.build/vulpemventures/ocean
@docker run --rm --volume "$(shell pwd):/workspace" --workdir /workspace buf generate
## proto-lint: lint protos
proto-lint:
@echo "Linting protos..."
@docker build -q -t buf -f buf.Dockerfile . &> /dev/null
@docker run --rm --volume "$(shell pwd):/workspace" --workdir /workspace buf lint
## mig_file: creates pg migration file(eg. make FILE=init mig_file)
mig_file:
@migrate create -ext sql -dir ./internal/infrastructure/db/sqlite/migration/ $(FILE)
## mig_up: creates db schema for provided db path
mig_up:
@echo "creating db schema..."
@migrate -database "sqlite://$(DB_PATH)/sqlite.db" -path ./internal/infrastructure/db/sqlite/migration/ up
## mig_down: apply down migration
mig_down:
@echo "migration down..."
@migrate -database "sqlite://$(DB_PATH)/sqlite.db" -path ./internal/infrastructure/db/sqlite/migration/ down
## mig_down_yes: apply down migration without prompt
mig_down_yes:
@echo "migration down..."
@"yes" | migrate -database "sqlite://path/to/database" -path ./internal/infrastructure/db/sqlite/migration/ down
## vet_db: check if mig_up and mig_down are ok
vet_db: recreatedb mig_up mig_down_yes
@echo "vet db migration scripts..."
## sqlc: gen sql
sqlc:
@echo "gen sql..."
cd ./internal/infrastructure/db/sqlite; sqlc generate