Skip to content

Commit

Permalink
Merge branch 'main' of github.com:neutron-org/neutron into feat/refac…
Browse files Browse the repository at this point in the history
…tor-icq-module-documentation
  • Loading branch information
sotnikov-s committed Nov 13, 2024
2 parents a5ac098 + 954660e commit 852a6ae
Show file tree
Hide file tree
Showing 652 changed files with 28,187 additions and 14,515 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ on:
push:
tags:
- "*"
release:
types:
- created
branches:
- "main"
- "releases/v3.x"
- "chore/fix-ci"
pull_request:
branches:
- "main"
- "releases/v3.x"
- "chore/fix-ci"
workflow_dispatch:
Expand All @@ -22,7 +23,8 @@ on:

jobs:
docker:
runs-on: self-hosted
runs-on:
group: Neutron-Core
env:
DOCKER_BUILDKIT: 1

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
golangci:
name: lint
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [push, pull_request]
jobs:
tests:
name: Test
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.22
uses: actions/setup-go@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
jobs:
dispatch:
name: Dispatch Tests Workflow
runs-on: self-hosted
runs-on: ubuntu-latest
steps:
- name: Evaluate PR Merged Status and Labels
run: |
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.builder
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ ARG RUNNER_IMAGE="gcr.io/distroless/static"
# Builder
# --------------------------------------------------------

FROM golang:${GO_VERSION}-alpine3.18 as builder
FROM golang:${GO_VERSION}-alpine3.20 as builder

ARG GIT_VERSION
ARG GIT_COMMIT
ARG BUILD_TAGS
ARG ENABLED_PROPOSALS

ENV GOTOOLCHAIN go1.22.6

RUN apk add --no-cache \
ca-certificates \
build-base \
Expand Down
9 changes: 4 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -202,15 +202,14 @@ test-sim-multi-seed-short: runsim
###############################################################################

lint:
golangci-lint run
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "*_test.go" | xargs gofmt -d -s
golangci-lint run --skip-files ".*.pb.go"
find . -name '*.go' -not -name "*.pb.go" -type f -not -path "./vendor*" -not -path "*.git*" -not -path "*_test.go" | xargs gofmt -d -s

format:
@go install mvdan.cc/gofumpt@latest
@go install github.com/golangci/golangci-lint/cmd/golangci-lint@$(GOLANGCI_LINT_VERSION)
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name "*.pb.go" -not -name "*.pb.gw.go" -not -name "*.pulsar.go" -not -path "./crypto/keys/secp256k1/*" | xargs gofumpt -w -l
golangci-lint run --fix
goimports -w -local github.com/neutron-org .
find . -name '*.go' -type f -not -path "./vendor*" -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -path "./tests/mocks/*" -not -name "*.pb.go" -not -name "*.pb.gw.go" -not -name "*.pulsar.go" -not -path "./crypto/keys/secp256k1/*" | xargs -I % sh -c 'gofumpt -w -l % && goimports -w -local github.com/neutron-org %'
golangci-lint run --fix --skip-files ".*.pb.go"

.PHONY: format

Expand Down
9 changes: 7 additions & 2 deletions app/ante_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,23 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"
consumerante "github.com/cosmos/interchain-security/v5/app/consumer/ante"
ibcconsumerkeeper "github.com/cosmos/interchain-security/v5/x/ccv/consumer/keeper"
feemarketante "github.com/skip-mev/feemarket/x/feemarket/ante"

globalfeeante "github.com/neutron-org/neutron/v4/x/globalfee/ante"
globalfeekeeper "github.com/neutron-org/neutron/v4/x/globalfee/keeper"
globalfeeante "github.com/neutron-org/neutron/v5/x/globalfee/ante"
globalfeekeeper "github.com/neutron-org/neutron/v5/x/globalfee/keeper"
)

// HandlerOptions extend the SDK's AnteHandler options by requiring the IBC
// channel keeper.
type HandlerOptions struct {
ante.HandlerOptions

BankKeeper bankkeeper.Keeper
AccountKeeper feemarketante.AccountKeeper
IBCKeeper *ibckeeper.Keeper
ConsumerKeeper ibcconsumerkeeper.Keeper
Expand Down Expand Up @@ -70,6 +72,9 @@ func NewAnteHandler(options HandlerOptions, logger log.Logger) (sdk.AnteHandler,
ante.NewValidateMemoDecorator(options.AccountKeeper),
ante.NewConsumeGasForTxSizeDecorator(options.AccountKeeper),
feemarketante.NewFeeMarketCheckDecorator(
options.AccountKeeper,
options.BankKeeper,
options.FeegrantKeeper,
options.FeeMarketKeeper,
NewFeeDecoratorWithSwitch(options),
),
Expand Down
Loading

0 comments on commit 852a6ae

Please sign in to comment.