Skip to content

Commit

Permalink
refactor: refactor keeper
Browse files Browse the repository at this point in the history
  • Loading branch information
hoank101 committed Mar 25, 2024
2 parents dc95e98 + 833f543 commit d6f2274
Show file tree
Hide file tree
Showing 11 changed files with 86 additions and 106 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: "1.22"
- run: go build ./...

tidy:
Expand All @@ -26,7 +26,7 @@ jobs:
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: "1.22"
- run: |
go mod tidy
CHANGES_IN_REPO=$(git status --porcelain)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql-cosmos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: "1.22"
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ jobs:
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.19
go-version: "1.22"
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: "go"
queries: crypto-com/cosmos-sdk-codeql@main,security-and-quality

- name: Build
run: make build

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v3
3 changes: 1 addition & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,9 @@ jobs:
steps:
- uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: "1.22"
- uses: actions/checkout@v4


- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
go-version: "1.22"
- name: Checkout code
uses: actions/checkout@v4
- name: Test
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21-alpine AS go-builder
FROM golang:1.22-alpine AS go-builder

# this comes from standard alpine nightly file
# https://github.com/rust-lang/docker-rust-nightly/blob/master/alpine3.12/Dockerfile
Expand Down Expand Up @@ -34,7 +34,7 @@ RUN LEDGER_ENABLED=false BUILD_TAGS=muslc LINK_STATICALLY=true make build \
&& (file /code/bin/migalood | grep "statically linked")

# --------------------------------------------------------
FROM alpine:3.16
FROM alpine

COPY --from=go-builder /code/bin/migalood /usr/bin/migalood
ENV HOME /.migalood
Expand Down
1 change: 0 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,6 @@ func RegisterSwaggerAPI(rtr *mux.Router) {

// Setup Upgrade Handler
func (app *MigalooApp) setupUpgradeHandlers() {

app.UpgradeKeeper.SetUpgradeHandler(
v4.UpgradeName,
v4.CreateUpgradeHandler(
Expand Down
2 changes: 1 addition & 1 deletion contrib/migalood-env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu

RUN apt-get update && \
apt-get -y upgrade && \
Expand Down
35 changes: 21 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module github.com/White-Whale-Defi-Platform/migaloo-chain/v4

go 1.21
go 1.22.1

require (
cosmossdk.io/math v1.3.0
cosmossdk.io/simapp v0.0.0-20230602123434-616841b9704d
cosmossdk.io/tools/rosetta v0.2.1
github.com/CosmWasm/wasmd v0.45.0
github.com/cometbft/cometbft v0.37.4
github.com/cometbft/cometbft v0.37.5
github.com/cometbft/cometbft-db v0.11.0
github.com/cosmos/cosmos-proto v1.0.0-beta.4
github.com/cosmos/cosmos-sdk v0.47.10
Expand All @@ -18,9 +18,9 @@ require (
github.com/grpc-ecosystem/grpc-gateway v1.16.0
github.com/prometheus/client_golang v1.18.0
github.com/rakyll/statik v0.1.7
github.com/spf13/cast v1.5.1
github.com/spf13/cast v1.6.0
github.com/spf13/cobra v1.8.0
github.com/spf13/viper v1.16.0
github.com/spf13/viper v1.18.1
github.com/stretchr/testify v1.8.4
github.com/terra-money/alliance v0.3.4
github.com/terra-money/core/v2 v2.5.0
Expand Down Expand Up @@ -94,7 +94,7 @@ require (
github.com/cosmos/rosetta-sdk-go v0.10.0 // indirect
github.com/creachadair/taskgroup v0.4.2 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/decred/dcrd/dcrec/secp256k1/v4 v4.1.0 // indirect
github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect
github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
Expand All @@ -104,7 +104,7 @@ require (
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/dvsekhvalnov/jose2go v1.6.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.6.0 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/go-kit/kit v0.12.0 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
Expand Down Expand Up @@ -142,7 +142,7 @@ require (
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jmhodges/levigo v1.0.0 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/compress v1.17.0 // indirect
github.com/lib/pq v1.10.7 // indirect
github.com/libp2p/go-buffer-pool v0.1.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
Expand All @@ -156,20 +156,22 @@ require (
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mtibben/percent v0.2.1 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_model v0.5.0 // indirect
github.com/prometheus/common v0.45.0 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rs/cors v1.8.3 // indirect
github.com/sagikazarmark/locafero v0.4.0 // indirect
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sasha-s/go-deadlock v0.3.1 // indirect
github.com/spf13/afero v1.9.5 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/subosito/gotenv v1.4.2 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d // indirect
github.com/tendermint/go-amino v0.16.0 // indirect
github.com/tidwall/btree v1.6.0 // indirect
Expand All @@ -183,8 +185,10 @@ require (
go.opentelemetry.io/otel v1.21.0 // indirect
go.opentelemetry.io/otel/metric v1.21.0 // indirect
go.opentelemetry.io/otel/trace v1.21.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/multierr v1.9.0 // indirect
golang.org/x/crypto v0.19.0 // indirect
golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb // indirect
golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
golang.org/x/net v0.20.0 // indirect
golang.org/x/oauth2 v0.16.0 // indirect
golang.org/x/sys v0.17.0 // indirect
Expand All @@ -211,10 +215,13 @@ replace (
// Fix upstream GHSA-h395-qcrw-5vmq and GHSA-3vp4-m3rf-835h vulnerabilities.
// TODO Remove it: https://github.com/cosmos/cosmos-sdk/issues/10409
github.com/gin-gonic/gin => github.com/gin-gonic/gin v1.9.0
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
// Downgraded to avoid bugs in following commits which caused simulations to fail.
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7

// use terra core 2.5.0
github.com/terra-money/core/v2 => github.com/notional-labs/terra-core/v2 v2.5.1-pfm
// stick with compatible version or x/exp in v0.47.x line
golang.org/x/exp => golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb
// stick with compatible version of rapid in v0.47.x line
pgregory.net/rapid => pgregory.net/rapid v0.5.5
)
Loading

0 comments on commit d6f2274

Please sign in to comment.