Skip to content

Commit

Permalink
feat: add ICA liquid staking modules (#2)
Browse files Browse the repository at this point in the history
Closes: MILK-10

---------

Co-authored-by: Riccardo Montagnin <[email protected]>
Co-authored-by: beer-1 <[email protected]>
  • Loading branch information
3 people authored May 29, 2024
1 parent abb683a commit 89c79a9
Show file tree
Hide file tree
Showing 421 changed files with 178,138 additions and 5,098 deletions.
7 changes: 7 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
issues:
exclude-rules:
- linters:
- staticcheck
text: "SA1019" # deprecated
exclude-dirs:
- x/tokenfactory
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,17 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LDFLAGS="-linkmode=external -extldflag

FROM alpine:3.18

RUN addgroup milk \
&& adduser -G milk -D -h /milk milk
RUN addgroup milkyway \
&& adduser -G milkyway -D -h /milkyway milkyway

WORKDIR /milk
WORKDIR /milkyway

COPY --from=go-builder /code/build/milkd /usr/local/bin/milkd
COPY --from=go-builder /code/build/milkywayd /usr/local/bin/milkywayd

# for new-metric setup
COPY --from=go-builder /code/contrib /milk/contrib
COPY --from=go-builder /code/contrib /milkyway/contrib

USER milk
USER milkyway

# rest server
EXPOSE 1317
Expand All @@ -57,4 +57,4 @@ EXPOSE 26656
# tendermint rpc
EXPOSE 26657

CMD ["/usr/local/bin/milkd", "version"]
CMD ["/usr/local/bin/milkywayd", "version"]
26 changes: 13 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ build_tags_comma_sep := $(subst $(whitespace),$(comma),$(build_tags))
### Linker flags ###
###############################################################################

ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=milk \
-X github.com/cosmos/cosmos-sdk/version.AppName=milkd \
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=milkyway \
-X github.com/cosmos/cosmos-sdk/version.AppName=milkywayd \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT) \
-X "github.com/cosmos/cosmos-sdk/version.BuildTags=$(build_tags_comma_sep)" \
-X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TM_VERSION)
-X github.com/cometbft/cometbft/version.TMCoreSemVer=$(TM_VERSION)

# DB backend selection
ifeq (cleveldb,$(findstring cleveldb,$(COSMOS_BUILD_OPTIONS)))
Expand Down Expand Up @@ -130,26 +130,26 @@ build: go.sum
ifeq ($(OS),Windows_NT)
exit 1
else
go build -mod=readonly $(BUILD_FLAGS) -o build/milkd ./cmd/milkd
go build -mod=readonly $(BUILD_FLAGS) -o build/milkywayd ./cmd/milkywayd
endif

build-linux:
mkdir -p $(BUILDDIR)
docker build --no-cache --tag milkyway/milk ./
docker create --name temp milkyway/milk:latest
docker cp temp:/usr/local/bin/milkd $(BUILDDIR)/
docker build --no-cache --tag milkyway/milkyway ./
docker create --name temp milkyway/milkyway:latest
docker cp temp:/usr/local/bin/milkywayd $(BUILDDIR)/
docker rm temp

build-linux-with-shared-library:
mkdir -p $(BUILDDIR)
docker build --tag milkyway/milk-shared ./ -f ./shared.Dockerfile
docker create --name temp milkyway/milk-shared:latest
docker cp temp:/usr/local/bin/milkd $(BUILDDIR)/
docker build --tag milkyway/milkyway-shared ./ -f ./shared.Dockerfile
docker create --name temp milkyway/milkyway-shared:latest
docker cp temp:/usr/local/bin/milkywayd $(BUILDDIR)/
docker cp temp:/lib/libwasmvm.so $(BUILDDIR)/
docker rm temp

install: go.sum
go install -mod=readonly $(BUILD_FLAGS) ./cmd/milkd
go install -mod=readonly $(BUILD_FLAGS) ./cmd/milkywayd

update-swagger-docs: statik
$(BINDIR)/statik -src=client/docs/swagger-ui -dest=client/docs -f -m
Expand Down Expand Up @@ -211,7 +211,7 @@ go.sum: go.mod
draw-deps:
@# requires brew install graphviz or apt-get install graphviz
@go install github.com/RobotsAndPencils/goviz
@goviz -i ./cmd/milkd -d 2 | dot -Tpng -o dependency-graph.png
@goviz -i ./cmd/milkywayd -d 2 | dot -Tpng -o dependency-graph.png

clean:
rm -rf \
Expand Down Expand Up @@ -286,5 +286,5 @@ lint-fix:
format:
find . -name '*.go' -type f -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs gofmt -w -s
find . -name '*.go' -type f -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs misspell -w
find . -name '*.go' -type f -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs goimports -w -local github.com/milkyway-labs/milk
find . -name '*.go' -type f -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name '*.pb.go' | xargs goimports -w -local github.com/milkyway-labs/milkyway
.PHONY: format

Large diffs are not rendered by default.

Loading

0 comments on commit 89c79a9

Please sign in to comment.