Skip to content
Merged
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ jobs:
go.sum
- name: Build AtomOne Docker Image
run: make docker-build-debug
- name: Build Hermes Docker Image
run: make docker-build-hermes
- name: Test E2E
run: make test-e2e

Expand Down
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
### FEATURES

- Fork the gaia codebase and renamed it to AtomOne [d49b8634](https://github.com/atomone-hub/atomone/commit/d49b86344c3ee42f5182278601c6ce2bd1eff48e)
- Remove ibc, ibc-middleware, ica and ics [9e75d78b](https://github.com/atomone-hub/atomone/commit/9e75d78bd6adc490acee869ac98217a1623a9c6d)
- Remove ICS [9e75d78b](https://github.com/atomone-hub/atomone/commit/9e75d78bd6adc490acee869ac98217a1623a9c6d)
- Remove x/metaprotocols module [8cc9a025](https://github.com/atomone-hub/atomone/commit/8cc9a02587c96f819d346673e40b4b683f3c0f5b)
- Add reproducible builds [707f1426](https://github.com/atomone-hub/atomone/commit/707f142613794e1fc8dc6371390d003f9245a457) [#24](https://github.com/atomone-hub/atomone/pull/24)
- Fork x/gov [ca0724f0](https://github.com/atomone-hub/atomone/commit/ca0724f036f077ffd3b2efc2a43db2ed98ad885e)
Expand All @@ -34,4 +34,3 @@
- Add late quorum voting period extension [#13](https://github.com/atomone-hub/atomone/pull/12)
- Add a minimum amount per deposit [#13](https://github.com/atomone-hub/atomone/pull/13)
- Add constitution to x/gov [#15](https://github.com/atomone-hub/atomone/pull/15)
- Remove usage of x/params module [#21](https://github.com/atomone-hub/atomone/pull/21)
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,12 @@ endif
.PHONY: run-tests $(TEST_TARGETS)

docker-build-debug:
@docker build -t cosmos/atomoned-e2e -f e2e.Dockerfile .
@docker build -t cosmos/atomoned-e2e -f e2e.Dockerfile --build-arg GO_VERSION=$(REQUIRE_GO_VERSION) .

docker-build-hermes:
@cd tests/e2e/docker; docker build -t ghcr.io/cosmos/hermes-e2e:1.0.0 -f hermes.Dockerfile .

docker-build-all: docker-build-debug docker-build-hermes

###############################################################################
### Linting ###
Expand Down
9 changes: 9 additions & 0 deletions ante/ante.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package ante

import (
ibcante "github.com/cosmos/ibc-go/v7/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"

errorsmod "cosmossdk.io/errors"

"github.com/cosmos/cosmos-sdk/codec"
Expand All @@ -16,6 +19,7 @@ import (
type HandlerOptions struct {
ante.HandlerOptions
Codec codec.BinaryCodec
IBCkeeper *ibckeeper.Keeper
StakingKeeper *stakingkeeper.Keeper
TxFeeChecker ante.TxFeeChecker
}
Expand All @@ -30,6 +34,10 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
if opts.SignModeHandler == nil {
return nil, errorsmod.Wrap(atomoneerrors.ErrLogic, "sign mode handler is required for AnteHandler")
}
if opts.IBCkeeper == nil {
return nil, errorsmod.Wrap(atomoneerrors.ErrLogic, "IBC keeper is required for AnteHandler")
}

if opts.StakingKeeper == nil {
return nil, errorsmod.Wrap(atomoneerrors.ErrNotFound, "staking param store is required for AnteHandler")
}
Expand All @@ -52,6 +60,7 @@ func NewAnteHandler(opts HandlerOptions) (sdk.AnteHandler, error) {
ante.NewSigGasConsumeDecorator(opts.AccountKeeper, sigGasConsumer),
ante.NewSigVerificationDecorator(opts.AccountKeeper, opts.SignModeHandler),
ante.NewIncrementSequenceDecorator(opts.AccountKeeper),
ibcante.NewRedundantRelayDecorator(opts.IBCkeeper),
}

return sdk.ChainAnteDecorators(anteDecorators...), nil
Expand Down
4 changes: 4 additions & 0 deletions app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import (
"github.com/cometbft/cometbft/libs/log"
tmos "github.com/cometbft/cometbft/libs/os"

ibctesting "github.com/cosmos/ibc-go/v7/testing"

autocliv1 "cosmossdk.io/api/cosmos/autocli/v1"
reflectionv1 "cosmossdk.io/api/cosmos/reflection/v1"

Expand Down Expand Up @@ -62,6 +64,7 @@ var (
var (
_ runtime.AppI = (*AtomOneApp)(nil)
_ servertypes.Application = (*AtomOneApp)(nil)
_ ibctesting.TestingApp = (*AtomOneApp)(nil)
)

// AtomOneApp extends an ABCI application, but with most of its parameters exported.
Expand Down Expand Up @@ -216,6 +219,7 @@ func NewAtomOneApp(
SigGasConsumer: ante.DefaultSigVerificationGasConsumer,
},
Codec: appCodec,
IBCkeeper: app.IBCKeeper,
StakingKeeper: app.StakingKeeper,
// If TxFeeChecker is nil the default ante TxFeeChecker is used
TxFeeChecker: nil,
Expand Down
23 changes: 23 additions & 0 deletions app/app_helpers.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package atomone

import (
ibckeeper "github.com/cosmos/ibc-go/v7/modules/core/keeper"
ibctestingtypes "github.com/cosmos/ibc-go/v7/testing/types"

capabilitykeeper "github.com/cosmos/cosmos-sdk/x/capability/keeper"
)

// GetStakingKeeper implements the TestingApp interface. Needed for ICS.
func (app *AtomOneApp) GetStakingKeeper() ibctestingtypes.StakingKeeper { //nolint:nolintlint
return app.StakingKeeper
}

// GetIBCKeeper implements the TestingApp interface.
func (app *AtomOneApp) GetIBCKeeper() *ibckeeper.Keeper { //nolint:nolintlint
return app.IBCKeeper
}

// GetScopedIBCKeeper implements the TestingApp interface.
func (app *AtomOneApp) GetScopedIBCKeeper() capabilitykeeper.ScopedKeeper { //nolint:nolintlint
return app.ScopedIBCKeeper
}
Loading
Loading