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

add fetch genesis command #88

Merged
merged 3 commits into from
Feb 28, 2025
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
5 changes: 3 additions & 2 deletions app/ante/ante.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ package ante
import (
"cosmossdk.io/errors"
txsigning "cosmossdk.io/x/tx/signing"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"

"github.com/cosmos/cosmos-sdk/codec"
sdk "github.com/cosmos/cosmos-sdk/types"
sdkerrors "github.com/cosmos/cosmos-sdk/types/errors"
"github.com/cosmos/cosmos-sdk/x/auth/ante"
ibcante "github.com/cosmos/ibc-go/v8/modules/core/ante"
ibckeeper "github.com/cosmos/ibc-go/v8/modules/core/keeper"

opchildante "github.com/initia-labs/OPinit/x/opchild/ante"
opchildkeeper "github.com/initia-labs/OPinit/x/opchild/keeper"
Expand Down
3 changes: 2 additions & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import (

// cosmos modules
dbm "github.com/cosmos/cosmos-db"
"github.com/cosmos/gogoproto/proto"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/flags"
Expand All @@ -50,7 +52,6 @@ import (
authtx "github.com/cosmos/cosmos-sdk/x/auth/tx"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
"github.com/cosmos/cosmos-sdk/x/crisis"
"github.com/cosmos/gogoproto/proto"

// ibc modules
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
Expand Down
5 changes: 3 additions & 2 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ import (
cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
dbm "github.com/cosmos/cosmos-db"

"github.com/cosmos/ibc-go/modules/capability"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"

"github.com/cosmos/cosmos-sdk/testutil/mock"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/types/module"
Expand All @@ -21,8 +24,6 @@ import (
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
"github.com/cosmos/cosmos-sdk/x/consensus"
groupmodule "github.com/cosmos/cosmos-sdk/x/group/module"
"github.com/cosmos/ibc-go/modules/capability"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"

"cosmossdk.io/x/upgrade"

Expand Down
1 change: 1 addition & 0 deletions app/encoding.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"cosmossdk.io/core/appmodule"
"cosmossdk.io/log"
dbm "github.com/cosmos/cosmos-db"

"github.com/cosmos/cosmos-sdk/client/flags"
runtimeservices "github.com/cosmos/cosmos-sdk/runtime/services"
sdk "github.com/cosmos/cosmos-sdk/types"
Expand Down
5 changes: 3 additions & 2 deletions app/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ import (
"encoding/json"

"cosmossdk.io/core/address"
"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/types/module"
icacontrollertypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/controller/types"
icagenesistypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/genesis/types"
icahosttypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/host/types"
icatypes "github.com/cosmos/ibc-go/v8/modules/apps/27-interchain-accounts/types"
ibcexported "github.com/cosmos/ibc-go/v8/modules/core/exported"
ibctypes "github.com/cosmos/ibc-go/v8/modules/core/types"

"github.com/cosmos/cosmos-sdk/codec"
"github.com/cosmos/cosmos-sdk/types/module"

l2connect "github.com/initia-labs/OPinit/x/opchild/l2connect"
opchildtypes "github.com/initia-labs/OPinit/x/opchild/types"
"github.com/initia-labs/initia/app/genesis_markets"
Expand Down
1 change: 1 addition & 0 deletions app/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
storetypes "cosmossdk.io/store/types"

dbm "github.com/cosmos/cosmos-db"

servertypes "github.com/cosmos/cosmos-sdk/server/types"

// kvindexer
Expand Down
5 changes: 3 additions & 2 deletions app/keepers/keepers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import (
upgradekeeper "cosmossdk.io/x/upgrade/keeper"
upgradetypes "cosmossdk.io/x/upgrade/types"

capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/codec"
Expand All @@ -29,8 +32,6 @@ import (
"github.com/cosmos/cosmos-sdk/x/group"
groupkeeper "github.com/cosmos/cosmos-sdk/x/group/keeper"
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
capabilitykeeper "github.com/cosmos/ibc-go/modules/capability/keeper"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"

packetforward "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward"
packetforwardkeeper "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/keeper"
Expand Down
3 changes: 2 additions & 1 deletion app/keepers/keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ import (
upgradetypes "cosmossdk.io/x/upgrade/types"

// cosmos imports
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"

authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
authzkeeper "github.com/cosmos/cosmos-sdk/x/authz/keeper"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types"
crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types"
"github.com/cosmos/cosmos-sdk/x/group"
capabilitytypes "github.com/cosmos/ibc-go/modules/capability/types"

// ibc imports
packetforwardtypes "github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8/packetforward/types"
Expand Down
5 changes: 3 additions & 2 deletions app/test_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@ import (

"cosmossdk.io/log"
dbm "github.com/cosmos/cosmos-db"
opchildtypes "github.com/initia-labs/OPinit/x/opchild/types"
"github.com/initia-labs/minimove/types"

codectypes "github.com/cosmos/cosmos-sdk/codec/types"
cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec"
"github.com/cosmos/cosmos-sdk/crypto/keys/ed25519"
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
sdk "github.com/cosmos/cosmos-sdk/types"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
opchildtypes "github.com/initia-labs/OPinit/x/opchild/types"
"github.com/initia-labs/minimove/types"

moveconfig "github.com/initia-labs/initia/x/move/config"
)
Expand Down
1 change: 1 addition & 0 deletions app/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"

upgradetypes "cosmossdk.io/x/upgrade/types"

"github.com/cosmos/cosmos-sdk/types/module"

opchildtypes "github.com/initia-labs/OPinit/x/opchild/types"
Expand Down
1 change: 1 addition & 0 deletions cmd/minitiad/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"time"

tmcfg "github.com/cometbft/cometbft/config"

serverconfig "github.com/cosmos/cosmos-sdk/server/config"

moveconfig "github.com/initia-labs/initia/x/move/config"
Expand Down
1 change: 1 addition & 0 deletions cmd/minitiad/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/spf13/cobra"

dbm "github.com/cosmos/cosmos-db"

"github.com/cosmos/cosmos-sdk/server"
"github.com/cosmos/cosmos-sdk/server/types"
)
Expand Down
4 changes: 4 additions & 0 deletions cmd/minitiad/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import (
confixcmd "cosmossdk.io/tools/confix/cmd"
tmcli "github.com/cometbft/cometbft/libs/cli"
dbm "github.com/cosmos/cosmos-db"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/config"
"github.com/cosmos/cosmos-sdk/client/debug"
Expand Down Expand Up @@ -44,6 +45,8 @@ import (
kvindexerconfig "github.com/initia-labs/kvindexer/config"
kvindexerstore "github.com/initia-labs/kvindexer/store"
kvindexerkeeper "github.com/initia-labs/kvindexer/x/kvindexer/keeper"

cmtcmd "github.com/cometbft/cometbft/cmd/cometbft/commands"
)

// NewRootCmd creates a new root command for initiad. It is called once in the
Expand Down Expand Up @@ -180,6 +183,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig, b
// add launch commands
rootCmd.AddCommand(LaunchCommand(a, encodingConfig, basicManager))
rootCmd.AddCommand(NewMultipleRollbackCmd(a.AppCreator()))
rootCmd.AddCommand(cmtcmd.FetchGenesisCmd)
}

func addModuleInitFlags(startCmd *cobra.Command) {
Expand Down
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,8 @@ require (

// initia custom
replace (
github.com/cometbft/cometbft => github.com/initia-labs/cometbft v0.0.0-20250204072819-a4b3fcdff78f
github.com/cometbft/cometbft => github.com/initia-labs/cometbft v0.0.0-20250228024240-2ac281ba6e0c

github.com/cosmos/ibc-go/v8 => github.com/initia-labs/ibc-go/v8 v8.0.0-20250204081745-02cc37be3d29

// cosmos/relayer seems having problem with the latest version of grpc; return nil in the below line
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1421,8 +1421,8 @@ github.com/initia-labs/OPinit v0.7.0 h1:DW/NRK1Km+7E8c3O9TxR6T+QQf04RxwsD9HIOwoF
github.com/initia-labs/OPinit v0.7.0/go.mod h1:LI36A+M0RE6vSX/BvBDSRHP3zerCdsQfqE82CSMwo1o=
github.com/initia-labs/OPinit/api v0.6.2 h1:nU9Rv5s/6WbV3CfmNnW3MSSmqpk7Avgfd68qMWjYD08=
github.com/initia-labs/OPinit/api v0.6.2/go.mod h1:gHK6DEWb3/DqQD5LjKirUx9jilAh2UioXanoQdgqVfU=
github.com/initia-labs/cometbft v0.0.0-20250204072819-a4b3fcdff78f h1:0eqdBPpNDXKer6A3jNldvIkAuWIS6A1vb4ban90RmVg=
github.com/initia-labs/cometbft v0.0.0-20250204072819-a4b3fcdff78f/go.mod h1:jYP7do1++ymJ4R1NuzuS41gaVTBXqF1iM6lO3i+1NAs=
github.com/initia-labs/cometbft v0.0.0-20250228024240-2ac281ba6e0c h1:P5GQUzXRE0HrmtdnLJF6HQxSEofZ2Bkumeh6W/pV0yE=
github.com/initia-labs/cometbft v0.0.0-20250228024240-2ac281ba6e0c/go.mod h1:jYP7do1++ymJ4R1NuzuS41gaVTBXqF1iM6lO3i+1NAs=
github.com/initia-labs/ibc-go/v8 v8.0.0-20250204081745-02cc37be3d29 h1:nu1hrH424iT84cW0PJUGQvF8ShSZGhcbJTCj314ozQI=
github.com/initia-labs/ibc-go/v8 v8.0.0-20250204081745-02cc37be3d29/go.mod h1:P5hkAvq0Qbg0h18uLxDVA9q1kOJ0l36htMsskiNwXbo=
github.com/initia-labs/initia v0.7.0 h1:o+UlhFyJYn5Z1JlpDS04OK7yKSq/njBl1WeUA0g6LJE=
Expand Down
Loading