Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

min amount per deposit #4

Closed
wants to merge 38 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ linters-settings:
# print struct with more effective memory layout or not, false by default
suggest-new: true
nolintlint:
allow-unused: false
allow-unused: true
allow-leading-space: true
require-explanation: false
require-specific: false
30 changes: 28 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -217,13 +217,13 @@ endif
.PHONY: run-tests $(TEST_TARGETS)

docker-build-debug:
@docker build -t cosmos/atomoned-e2e -f e2e.Dockerfile .
@docker build -t atomone/atomoned-e2e -f e2e.Dockerfile .

###############################################################################
### Linting ###
###############################################################################
golangci_lint_cmd=golangci-lint
golangci_version=v1.53.3
golangci_version=v1.56.0 # note: needed to bump from v1.53.3 bc go.tmz.dev/musttag (A dep of golangci-lint) was no longer resolving

lint:
@echo "--> Running linter"
Expand All @@ -242,6 +242,32 @@ format:
$(golangci_lint_cmd) run --fix
.PHONY: format

# Get a list of all directories containing Go files, excluding vendor and other paths
GO_DIRS=$(shell find . -name '*.go' -not -path "./vendor*" -not -path "*.git*" \
-not -path "./client/docs/statik/statik.go" \
-not -path "./tests/mocks/*" \
-not -path "./crypto/keys/secp256k1/*" \
-not -name "*.pb.go" \
-not -name "*.pb.gw.go" \
-not -name "*.pulsar.go" | xargs -n1 dirname | sort -u)

format-batch:
@go install mvdan.cc/gofumpt@latest
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(golangci_version)

# Run gofumpt in a loop over each directory
@for dir in $(GO_DIRS); do \
echo "Running gofumpt on $$dir"; \
find $$dir -name '*.go' -type f -print0 | xargs -0 gofumpt -w -l; \
done

# Run golangci-lint separately for each directory
@for dir in $(GO_DIRS); do \
$(golangci_lint_cmd) run --fix $$dir || exit 1; \
done

.PHONY: format-batch

###############################################################################
### Localnet ###
###############################################################################
Expand Down
9 changes: 4 additions & 5 deletions ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@ package ante
import (
errorsmod "cosmossdk.io/errors"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"

"github.com/atomone-hub/atomone/codec"
sdk "github.com/atomone-hub/atomone/types"
atomoneerrors "github.com/atomone-hub/atomone/types/errors"
"github.com/atomone-hub/atomone/x/auth/ante"
stakingkeeper "github.com/atomone-hub/atomone/x/staking/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
Expand Down
11 changes: 5 additions & 6 deletions ante/gov_vote_ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@ package ante
import (
errorsmod "cosmossdk.io/errors"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/authz"
stakingkeeper "github.com/cosmos/cosmos-sdk/x/staking/keeper"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/atomone-hub/atomone/codec"
sdk "github.com/atomone-hub/atomone/types"
atomoneerrors "github.com/atomone-hub/atomone/types/errors"
"github.com/atomone-hub/atomone/x/authz"
govv1 "github.com/atomone-hub/atomone/x/gov/types/v1"
govv1beta1 "github.com/atomone-hub/atomone/x/gov/types/v1beta1"
stakingkeeper "github.com/atomone-hub/atomone/x/staking/keeper"
stakingtypes "github.com/atomone-hub/atomone/x/staking/types"
)

var (
Expand Down
17 changes: 7 additions & 10 deletions ante/gov_vote_ante_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,17 @@ package ante_test
import (
"testing"

"github.com/stretchr/testify/require"

tmproto "github.com/cometbft/cometbft/proto/tendermint/types"

"cosmossdk.io/math"

"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
sdk "github.com/cosmos/cosmos-sdk/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"

"github.com/atomone-hub/atomone/ante"
"github.com/atomone-hub/atomone/app/helpers"
govv1 "github.com/atomone-hub/atomone/x/gov/types/v1"

"cosmossdk.io/math"
"github.com/atomone-hub/atomone/crypto/keys/ed25519"
sdk "github.com/atomone-hub/atomone/types"
govv1beta1 "github.com/atomone-hub/atomone/x/gov/types/v1beta1"
stakingtypes "github.com/atomone-hub/atomone/x/staking/types"
tmproto "github.com/cometbft/cometbft/proto/tendermint/types"
"github.com/stretchr/testify/require"
)

// Test that the GovVoteDecorator rejects v1beta1 vote messages from accounts with less than 1 atom staked
Expand Down
224 changes: 224 additions & 0 deletions api/amino/amino.pulsar.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading