Skip to content

Commit

Permalink
feat: upgrade module to cosmos sdk v0.50 (#7)
Browse files Browse the repository at this point in the history
Co-authored-by: Luca Graziotti <luca@noble.xyz>
  • Loading branch information
johnletey and g-luca authored Sep 28, 2024
1 parent f2372b2 commit bd33925
Show file tree
Hide file tree
Showing 157 changed files with 53,434 additions and 6,278 deletions.
1 change: 1 addition & 0 deletions .changelog/unreleased/dependencies/7-sdk-eden.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Upgrade Cosmos SDK to the latest `v0.50.x` release.
1 change: 1 addition & 0 deletions .changelog/unreleased/features/7-app-wiring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Support [app wiring](https://docs.cosmos.network/v0.50/build/building-apps/app-go-v2) for compatibility with Noble's core codebase.
1 change: 1 addition & 0 deletions .changelog/unreleased/features/7-state-collections.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Utilize [collections](https://docs.cosmos.network/v0.50/build/packages/collections) for managing module state.
1 change: 1 addition & 0 deletions .changelog/unreleased/improvements/7-module-path.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Update module path for v2 release line.
1 change: 1 addition & 0 deletions .changelog/unreleased/improvements/7-repo-structure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Reorganize repository to align with Noble's standards.
6 changes: 6 additions & 0 deletions .github/license.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
header: |
// Copyright 2024 NASD Inc.
//
// Use of this source code is governed by a BSL-style
// license that can be found in the LICENSE file or at
// https://mariadb.com/bsl11.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# CHANGELOG

## Unreleased

### DEPENDENCIES

- Upgrade Cosmos SDK to the latest `v0.50.x` release.

### FEATURES

- Utilize [collections](https://docs.cosmos.network/v0.50/build/packages/collections) for managing module state.
- Support [app wiring](https://docs.cosmos.network/v0.50/build/building-apps/app-go-v2) for compatibility with Noble's core codebase.

### IMPROVEMENTS

- Reorganize repository to align with Noble's standards.
- Update module path for v2 release line.

## v1.0.1

*Sep 12, 2024*
Expand Down
26 changes: 16 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: proto-format proto-lint proto-gen format lint test-unit build
.PHONY: proto-format proto-lint proto-breaking proto-gen license format lint test-unit build
all: proto-all format lint test-unit build

###############################################################################
Expand All @@ -11,12 +11,16 @@ build:
@echo "✅ Completed build!"

###############################################################################
### Formatting & Linting ###
### Tooling ###
###############################################################################

gofumpt_cmd=mvdan.cc/gofumpt
golangci_lint_cmd=github.com/golangci/golangci-lint/cmd/golangci-lint

FILES := $(shell find $(shell go list -f '{{.Dir}}' ./...) -name "*.go" -a -not -name "*.pb.go" -a -not -name "*.pb.gw.go" -a -not -name "*.pulsar.go" | sed "s|$(shell pwd)/||g")
license:
@go-license --config .github/license.yml $(FILES)

format:
@echo "🤖 Running formatter..."
@go run $(gofumpt_cmd) -l -w .
Expand All @@ -31,9 +35,10 @@ lint:
### Protobuf ###
###############################################################################

BUF_VERSION=1.32
BUF_VERSION=1.42
BUILDER_VERSION=0.15.1

proto-all: proto-format proto-lint proto-gen
proto-all: proto-format proto-lint proto-breaking proto-gen

proto-format:
@echo "🤖 Running protobuf formatter..."
Expand All @@ -44,7 +49,7 @@ proto-format:
proto-gen:
@echo "🤖 Generating code from protobuf..."
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \
halo-proto sh ./proto/generate.sh
ghcr.io/cosmos/proto-builder:$(BUILDER_VERSION) sh ./proto/generate.sh
@echo "✅ Completed code generation!"

proto-lint:
Expand All @@ -53,16 +58,17 @@ proto-lint:
bufbuild/buf:$(BUF_VERSION) lint
@echo "✅ Completed protobuf linting!"

proto-setup:
@echo "🤖 Setting up protobuf environment..."
@docker build --rm --tag halo-proto:latest --file proto/Dockerfile .
@echo "✅ Setup protobuf environment!"
proto-breaking:
@echo "🤖 Running protobuf breaking checks..."
@docker run --rm --volume "$(PWD)":/workspace --workdir /workspace \
bufbuild/buf:$(BUF_VERSION) breaking --against "https://github.com/noble-assets/halo.git#branch=v1.0.1"
@echo "✅ Completed protobuf breaking checks!"

###############################################################################
### Testing ###
###############################################################################

test-unit:
@echo "🤖 Running unit tests..."
@go test -cover -coverprofile=coverage.out -race -v ./x/halo/keeper/...
@go test -cover -coverprofile=coverage.out -race -v ./keeper/...
@echo "✅ Completed unit tests!"
Loading

0 comments on commit bd33925

Please sign in to comment.