From 92bbcf5642295fc197a2b99310d5a521e60811c3 Mon Sep 17 00:00:00 2001 From: Denys S <150304777+dssei@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:31:29 -0800 Subject: [PATCH] Genesis draft (#1924) * Genesis draft * revert evm params * revert evm params -2 * working simple test * linting * addressing linter errors * remove creating address for now --- app/app.go | 6 + app/apptesting/test_suite.go | 5 + proto/confidentialtransfers/genesis.proto | 18 +- proto/confidentialtransfers/tx.proto | 6 +- x/confidentialtransfers/keeper/genesis.go | 54 +++ .../keeper/genesis_test.go | 18 + x/confidentialtransfers/keeper/keeper.go | 71 +++- x/confidentialtransfers/keeper/keeper_test.go | 35 ++ x/confidentialtransfers/keeper/msg_server.go | 38 ++- x/confidentialtransfers/module.go | 47 ++- .../types/expected_keepers.go | 12 + x/confidentialtransfers/types/genesis.go | 45 ++- x/confidentialtransfers/types/genesis.pb.go | 318 +++++++++++++++++- x/confidentialtransfers/types/keys.go | 16 +- x/confidentialtransfers/types/params.go | 25 ++ x/confidentialtransfers/types/tx.pb.go | 179 +++++----- 16 files changed, 723 insertions(+), 170 deletions(-) create mode 100644 x/confidentialtransfers/keeper/genesis.go create mode 100644 x/confidentialtransfers/keeper/genesis_test.go create mode 100644 x/confidentialtransfers/keeper/keeper_test.go create mode 100644 x/confidentialtransfers/types/expected_keepers.go create mode 100644 x/confidentialtransfers/types/params.go diff --git a/app/app.go b/app/app.go index 2c0f204c32..da5054fe65 100644 --- a/app/app.go +++ b/app/app.go @@ -116,6 +116,8 @@ import ( "github.com/sei-protocol/sei-chain/utils" "github.com/sei-protocol/sei-chain/utils/metrics" "github.com/sei-protocol/sei-chain/wasmbinding" + ctkeeper "github.com/sei-protocol/sei-chain/x/confidentialtransfers/keeper" + cttypes "github.com/sei-protocol/sei-chain/x/confidentialtransfers/types" epochmodule "github.com/sei-protocol/sei-chain/x/epoch" epochmodulekeeper "github.com/sei-protocol/sei-chain/x/epoch/keeper" epochmoduletypes "github.com/sei-protocol/sei-chain/x/epoch/types" @@ -339,6 +341,8 @@ type App struct { EpochKeeper epochmodulekeeper.Keeper TokenFactoryKeeper tokenfactorykeeper.Keeper + // ConfidentialTransfers module is not live yet, but we add the keeper for testing + ConfidentialTransfersKeeper ctkeeper.Keeper // mm is the module manager mm *module.Manager @@ -412,6 +416,8 @@ func New( evmtypes.StoreKey, wasm.StoreKey, epochmoduletypes.StoreKey, tokenfactorytypes.StoreKey, + // ConfidentialTransfers module is not live yet, but we add the key for testing + cttypes.StoreKey, // this line is used by starport scaffolding # stargate/app/storeKey ) tkeys := sdk.NewTransientStoreKeys(paramstypes.TStoreKey, evmtypes.TransientStoreKey) diff --git a/app/apptesting/test_suite.go b/app/apptesting/test_suite.go index 26ec97dd3d..4b81862c1f 100644 --- a/app/apptesting/test_suite.go +++ b/app/apptesting/test_suite.go @@ -116,6 +116,11 @@ func (s *KeeperTestHelper) SetupTokenFactory() { s.App.TokenFactoryKeeper.CreateModuleAccount(s.Ctx) } +// SetupConfidentialTransfers sets up a token module account for the ConfidentialTransfersKeeper. +func (s *KeeperTestHelper) SetupConfidentialTransfers() { + s.App.ConfidentialTransfersKeeper.CreateModuleAccount(s.Ctx) +} + // EndBlock ends the block. func (s *KeeperTestHelper) EndBlock() { reqEndBlock := abci.RequestEndBlock{Height: s.Ctx.BlockHeight()} diff --git a/proto/confidentialtransfers/genesis.proto b/proto/confidentialtransfers/genesis.proto index 40dd83f521..0f868f779b 100644 --- a/proto/confidentialtransfers/genesis.proto +++ b/proto/confidentialtransfers/genesis.proto @@ -3,12 +3,26 @@ package seiprotocol.seichain.confidentialtransfers; import "gogoproto/gogo.proto"; import "confidentialtransfers/params.proto"; +import "confidentialtransfers/confidential.proto"; option go_package = "github.com/sei-protocol/sei-chain/x/confidentialtransfers/types"; // GenesisState defines the confidential module's genesis state. -// TODO: Implement this. This should probably look like an array of empty Account objects. message GenesisState { - // params defines the paramaters of the module. + // params defines the parameters of the module. Params params = 1 [ (gogoproto.nullable) = false ]; + + // accounts is an array of confidential transfer accounts + repeated GenesisCtAccount accounts = 2 [ (gogoproto.nullable) = false ]; + + // TODO: consider adding total supply } + +message GenesisCtAccount { + + // account key + bytes key = 1; + + // confidential transfer account + CtAccount account = 2 [ (gogoproto.nullable) = false ]; +} \ No newline at end of file diff --git a/proto/confidentialtransfers/tx.proto b/proto/confidentialtransfers/tx.proto index d38bc4d0f8..5fe08319bd 100644 --- a/proto/confidentialtransfers/tx.proto +++ b/proto/confidentialtransfers/tx.proto @@ -14,13 +14,13 @@ service Msg { rpc Transfer(MsgTransfer) returns (MsgTransferResponse); // InitializeAccount defines a method for creating a new confidential transfers account for some denom. - rpc InitializeAccount(MsgInitializeAccount) returns (MsgInitializeAccount); + rpc InitializeAccount(MsgInitializeAccount) returns (MsgInitializeAccountResponse); // Deposit defines a method for depositing funds into a confidential transfers account. - rpc Deposit(MsgDeposit) returns (MsgDeposit); + rpc Deposit(MsgDeposit) returns (MsgDepositResponse); // Withdraw defines a method for withdrawing funds from a confidential transfers account. - rpc Withdraw(MsgWithdraw) returns (MsgWithdraw); + rpc Withdraw(MsgWithdraw) returns (MsgWithdrawResponse); // ApplyPendingBalance defines a method for applying pending balance to an account. rpc ApplyPendingBalance(MsgApplyPendingBalance) returns (MsgApplyPendingBalanceResponse); diff --git a/x/confidentialtransfers/keeper/genesis.go b/x/confidentialtransfers/keeper/genesis.go new file mode 100644 index 0000000000..1fc82c97a4 --- /dev/null +++ b/x/confidentialtransfers/keeper/genesis.go @@ -0,0 +1,54 @@ +package keeper + +import ( + "fmt" + + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + "github.com/sei-protocol/sei-chain/x/confidentialtransfers/types" +) + +func (k BaseKeeper) InitGenesis(ctx sdk.Context, gs *types.GenesisState) { + k.SetParams(ctx, gs.Params) + for i := range gs.Accounts { + genesisCtAccount := gs.Accounts[i] + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(&genesisCtAccount.Account) // Marshal the Account object into bytes + store.Set(genesisCtAccount.Key, bz) + } +} + +func (k BaseKeeper) ExportGenesis(ctx sdk.Context) *types.GenesisState { + genesisCtAccounts, _, err := k.GetPaginatedAccounts(ctx, &query.PageRequest{Limit: query.MaxLimit}) + if err != nil { + panic(fmt.Errorf("failed to fetch genesis ct accounts: %w", err)) + } + return types.NewGenesisState( + k.GetParams(ctx), + genesisCtAccounts, + ) +} + +func (k BaseKeeper) GetPaginatedAccounts(ctx sdk.Context, pagination *query.PageRequest) ([]types.GenesisCtAccount, *query.PageResponse, error) { + store := ctx.KVStore(k.storeKey) + supplyStore := prefix.NewStore(store, types.AccountsKey) + + genesisAccounts := make([]types.GenesisCtAccount, 0) + pageRes, err := query.Paginate(supplyStore, pagination, func(key, value []byte) error { + var ctAccount types.CtAccount + err := ctAccount.Unmarshal(value) + if err != nil { + return err + } + + genesisAccounts = append(genesisAccounts, types.GenesisCtAccount{Key: key, Account: ctAccount}) + return nil + }) + + if err != nil { + return nil, nil, err + } + + return genesisAccounts, pageRes, nil +} diff --git a/x/confidentialtransfers/keeper/genesis_test.go b/x/confidentialtransfers/keeper/genesis_test.go new file mode 100644 index 0000000000..fbe328e42d --- /dev/null +++ b/x/confidentialtransfers/keeper/genesis_test.go @@ -0,0 +1,18 @@ +package keeper_test + +import ( + "github.com/sei-protocol/sei-chain/x/confidentialtransfers/types" + tmproto "github.com/tendermint/tendermint/proto/tendermint/types" +) + +func (suite *KeeperTestSuite) TestDefaultGenesisState() { + genesisState := types.DefaultGenesisState() + + app := suite.App + suite.Ctx = app.BaseApp.NewContext(false, tmproto.Header{}) + + suite.App.ConfidentialTransfersKeeper.InitGenesis(suite.Ctx, genesisState) + exportedGenesis := suite.App.ConfidentialTransfersKeeper.ExportGenesis(suite.Ctx) + suite.Require().NotNil(exportedGenesis) + suite.Require().Equal(genesisState, exportedGenesis) +} diff --git a/x/confidentialtransfers/keeper/keeper.go b/x/confidentialtransfers/keeper/keeper.go index 04e3793d40..3843d3a801 100644 --- a/x/confidentialtransfers/keeper/keeper.go +++ b/x/confidentialtransfers/keeper/keeper.go @@ -4,7 +4,9 @@ import ( "bytes" "context" "fmt" + "github.com/cosmos/cosmos-sdk/store/prefix" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" "github.com/sei-protocol/sei-chain/x/confidentialtransfers/types" "github.com/tendermint/tendermint/libs/log" @@ -15,19 +17,29 @@ import ( paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" ) -// TODO: This is just scaffolding. To be implemented. -type ( - Keeper struct { - storeKey sdk.StoreKey +type Keeper interface { + InitGenesis(sdk.Context, *types.GenesisState) + ExportGenesis(sdk.Context) *types.GenesisState - cdc codec.Codec + GetAccount(ctx sdk.Context, address sdk.AccAddress, denom string) (types.Account, bool) + SetAccount(ctx sdk.Context, address sdk.AccAddress, denom string, account types.Account) - // TODO: Add any required keepers here - // accountKeeper types.AccountKeeper - } -) + GetParams(ctx sdk.Context) types.Params + SetParams(ctx sdk.Context, params types.Params) + + CreateModuleAccount(ctx sdk.Context) +} + +type BaseKeeper struct { + storeKey sdk.StoreKey + + cdc codec.Codec + + paramSpace paramtypes.Subspace + accountKeeper types.AccountKeeper +} -func (k Keeper) TestQuery(ctx context.Context, request *types.TestQueryRequest) (*types.TestQueryResponse, error) { +func (k BaseKeeper) TestQuery(ctx context.Context, request *types.TestQueryRequest) (*types.TestQueryResponse, error) { //TODO: This is not a real gRPC query. This was added to the query.proto file as a placeholder. We should remove this and add the real queries once we better define query.proto. panic("implement me") } @@ -37,14 +49,22 @@ func NewKeeper( codec codec.Codec, storeKey sdk.StoreKey, paramSpace paramtypes.Subspace, + accountKeeper types.AccountKeeper, ) Keeper { - return Keeper{ - cdc: codec, - storeKey: storeKey, + + if !paramSpace.HasKeyTable() { + paramSpace = paramSpace.WithKeyTable(types.ParamKeyTable()) + } + + return BaseKeeper{ + cdc: codec, + storeKey: storeKey, + accountKeeper: accountKeeper, + paramSpace: paramSpace, } } -func (k Keeper) GetAccount(ctx sdk.Context, address sdk.AccAddress, denom string) (types.Account, bool) { +func (k BaseKeeper) GetAccount(ctx sdk.Context, address sdk.AccAddress, denom string) (types.Account, bool) { store := ctx.KVStore(k.storeKey) key := types.GetAccountKey(address, denom) if !store.Has(key) { @@ -61,22 +81,22 @@ func (k Keeper) GetAccount(ctx sdk.Context, address sdk.AccAddress, denom string return *account, true } -func (k Keeper) SetAccount(ctx sdk.Context, address sdk.AccAddress, denom string, account types.Account) { +func (k BaseKeeper) SetAccount(ctx sdk.Context, address sdk.AccAddress, denom string, account types.Account) { store := ctx.KVStore(k.storeKey) key := types.GetAccountKey(address, denom) - ctAccount := account.ToProto() + ctAccount := types.NewCtAccount(&account) bz := k.cdc.MustMarshal(ctAccount) // Marshal the Account object into bytes store.Set(key, bz) // Store the serialized account under the key } // Logger returns a logger for the x/confidentialtransfers module -func (k Keeper) Logger(ctx sdk.Context) log.Logger { +func (k BaseKeeper) Logger(ctx sdk.Context) log.Logger { return ctx.Logger().With("module", fmt.Sprintf("x/%s", types.ModuleName)) } // GetAccountsForAddress iterates over all accounts associated with a given address // and returns a mapping of denom:account -func (k Keeper) GetAccountsForAddress(ctx sdk.Context, address sdk.AccAddress) (map[string]*types.Account, error) { +func (k BaseKeeper) GetAccountsForAddress(ctx sdk.Context, address sdk.AccAddress) (map[string]*types.Account, error) { // Create a prefix store scoped to the address store := prefix.NewStore(ctx.KVStore(k.storeKey), types.GetAddressPrefix(address)) @@ -103,3 +123,18 @@ func (k Keeper) GetAccountsForAddress(ctx sdk.Context, address sdk.AccAddress) ( return accounts, nil } + +func (k BaseKeeper) GetParams(ctx sdk.Context) (params types.Params) { + k.paramSpace.GetParamSet(ctx, ¶ms) + return params +} + +// SetParams sets the total set of bank parameters. +func (k BaseKeeper) SetParams(ctx sdk.Context, params types.Params) { + k.paramSpace.SetParamSet(ctx, ¶ms) +} + +func (k BaseKeeper) CreateModuleAccount(ctx sdk.Context) { + moduleAcc := authtypes.NewEmptyModuleAccount(types.ModuleName, authtypes.Minter, authtypes.Burner) + k.accountKeeper.SetModuleAccount(ctx, moduleAcc) +} diff --git a/x/confidentialtransfers/keeper/keeper_test.go b/x/confidentialtransfers/keeper/keeper_test.go new file mode 100644 index 0000000000..14b9065a84 --- /dev/null +++ b/x/confidentialtransfers/keeper/keeper_test.go @@ -0,0 +1,35 @@ +package keeper_test + +import ( + "github.com/sei-protocol/sei-chain/app/apptesting" + "github.com/sei-protocol/sei-chain/x/confidentialtransfers/keeper" + "github.com/sei-protocol/sei-chain/x/confidentialtransfers/types" + "github.com/stretchr/testify/suite" + "testing" +) + +type KeeperTestSuite struct { + apptesting.KeeperTestHelper + + queryClient types.QueryClient + msgServer types.MsgServer + // defaultDenom is on the suite, as it depends on the creator test address. + defaultDenom string +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(KeeperTestSuite)) +} + +func (suite *KeeperTestSuite) SetupTest() { + suite.Setup() + + suite.queryClient = types.NewQueryClient(suite.QueryHelper) + // TODO: remove this once the app initializes confidentialtransfers keeper + suite.App.ConfidentialTransfersKeeper = keeper.NewKeeper( + suite.App.AppCodec(), + suite.App.GetKey(types.StoreKey), + suite.App.GetSubspace(types.ModuleName), + suite.App.AccountKeeper) + suite.msgServer = keeper.NewMsgServerImpl(suite.App.ConfidentialTransfersKeeper) +} diff --git a/x/confidentialtransfers/keeper/msg_server.go b/x/confidentialtransfers/keeper/msg_server.go index 57b6aaf4e9..fdfd871272 100644 --- a/x/confidentialtransfers/keeper/msg_server.go +++ b/x/confidentialtransfers/keeper/msg_server.go @@ -1,15 +1,49 @@ package keeper -import "github.com/sei-protocol/sei-chain/x/confidentialtransfers/types" +import ( + "context" + + "github.com/sei-protocol/sei-chain/x/confidentialtransfers/types" +) type msgServer struct { Keeper } +func (m msgServer) Transfer(ctx context.Context, transfer *types.MsgTransfer) (*types.MsgTransferResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) InitializeAccount(ctx context.Context, account *types.MsgInitializeAccount) (*types.MsgInitializeAccountResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) Deposit(ctx context.Context, deposit *types.MsgDeposit) (*types.MsgDepositResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) Withdraw(ctx context.Context, withdraw *types.MsgWithdraw) (*types.MsgWithdrawResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) ApplyPendingBalance(ctx context.Context, balance *types.MsgApplyPendingBalance) (*types.MsgApplyPendingBalanceResponse, error) { + //TODO implement me + panic("implement me") +} + +func (m msgServer) CloseAccount(ctx context.Context, account *types.MsgCloseAccount) (*types.MsgCloseAccountResponse, error) { + //TODO implement me + panic("implement me") +} + // NewMsgServerImpl returns an implementation of the MsgServer interface // for the provided Keeper. func NewMsgServerImpl(keeper Keeper) types.MsgServer { - return &msgServer{Keeper: keeper} + return msgServer{keeper} } var _ types.MsgServer = msgServer{} diff --git a/x/confidentialtransfers/module.go b/x/confidentialtransfers/module.go index 146789c9a0..89f15ca498 100644 --- a/x/confidentialtransfers/module.go +++ b/x/confidentialtransfers/module.go @@ -13,10 +13,11 @@ import ( "context" "encoding/json" "fmt" + "math/rand" + "github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/sei-protocol/sei-chain/x/confidentialtransfers/keeper" "github.com/spf13/cobra" - "math/rand" "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" @@ -59,17 +60,17 @@ func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { } // RegisterInterfaces registers the module's interface types -func (a AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { +func (AppModuleBasic) RegisterInterfaces(reg cdctypes.InterfaceRegistry) { types.RegisterInterfaces(reg) } // DefaultGenesis returns the x/confidentialtransfers module's default genesis state. -func (AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { - return cdc.MustMarshalJSON(types.DefaultGenesis()) +func (am AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ValidateGenesis performs genesis state validation for the x/confidentialtransfers module. -func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { +func (am AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingConfig, bz json.RawMessage) error { var genState types.GenesisState if err := cdc.UnmarshalJSON(bz, &genState); err != nil { return fmt.Errorf("failed to unmarshal %s genesis state: %w", types.ModuleName, err) @@ -78,6 +79,17 @@ func (AppModuleBasic) ValidateGenesis(cdc codec.JSONCodec, _ client.TxEncodingCo return genState.Validate() } +// ValidateGenesisStream performs genesis state validation for the x/confidentialtransfers module in a streaming fashion. +func (am AppModuleBasic) ValidateGenesisStream(cdc codec.JSONCodec, config client.TxEncodingConfig, genesisCh <-chan json.RawMessage) error { + for genesis := range genesisCh { + err := am.ValidateGenesis(cdc, config, genesis) + if err != nil { + return err + } + } + return nil +} + // TODO: Look into whether we require REST endpoints // RegisterRESTRoutes registers the capability module's REST service handlers. func (AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) { @@ -91,7 +103,7 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r // TODO: Implement this when we add the CLI methods // GetTxCmd returns the x/confidentialtransfers module's root tx command. -func (a AppModuleBasic) GetTxCmd() *cobra.Command { +func (am AppModuleBasic) GetTxCmd() *cobra.Command { //return cli.GetTxCmd() return nil } @@ -147,7 +159,7 @@ func (am AppModule) LegacyQuerierHandler(_ *codec.LegacyAmino) sdk.Querier { // module-specific GRPC queries. func (am AppModule) RegisterServices(cfg module.Configurator) { types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(am.keeper)) - types.RegisterQueryServer(cfg.QueryServer(), am.keeper) + // types.RegisterQueryServer(cfg.QueryServer(), am.keeper) // TODO: Confirm that we don't need to define any Migrator here //m := keeper.NewMigrator(am.keeper) @@ -165,8 +177,7 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.Ra var genState types.GenesisState cdc.MustUnmarshalJSON(gs, &genState) - // TODO: Uncomment once we implement InitGenesis - //am.keeper.InitGenesis(ctx, genState) + am.keeper.InitGenesis(ctx, &genState) return []abci.ValidatorUpdate{} } @@ -175,9 +186,8 @@ func (am AppModule) InitGenesis(ctx sdk.Context, cdc codec.JSONCodec, gs json.Ra // JSON bytes. func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.RawMessage { // TODO: Implement once we implement keeper/Genesis - //genState := am.keeper.ExportGenesis(ctx) - //return cdc.MustMarshalJSON(genState) - return nil + genState := am.keeper.ExportGenesis(ctx) + return cdc.MustMarshalJSON(genState) } // ExportGenesisStream returns the confidentialtransfers module's exported genesis state as raw JSON bytes in a streaming fashion. @@ -190,17 +200,6 @@ func (am AppModule) ExportGenesisStream(ctx sdk.Context, cdc codec.JSONCodec) <- return ch } -// ValidateGenesisStream performs genesis state validation for the x/confidentialtransfers module in a streaming fashion. -func (am AppModuleBasic) ValidateGenesisStream(cdc codec.JSONCodec, config client.TxEncodingConfig, genesisCh <-chan json.RawMessage) error { - for genesis := range genesisCh { - err := am.ValidateGenesis(cdc, config, genesis) - if err != nil { - return err - } - } - return nil -} - // ConsensusVersion implements ConsensusVersion. func (AppModule) ConsensusVersion() uint64 { return 4 } @@ -219,7 +218,7 @@ func (am AppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.Valid // TODO: The functions below seem optional to implement. We should revisit if we need any/all of them. // GenerateGenesisState creates a randomized GenState of the confidentialtransfers module. func (am AppModule) GenerateGenesisState(simState *module.SimulationState) { - simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(types.DefaultGenesis()) + simState.GenState[types.ModuleName] = simState.Cdc.MustMarshalJSON(types.DefaultGenesisState()) } // ProposalContents doesn't return any content functions for governance proposals. diff --git a/x/confidentialtransfers/types/expected_keepers.go b/x/confidentialtransfers/types/expected_keepers.go new file mode 100644 index 0000000000..f4b4f7ddd7 --- /dev/null +++ b/x/confidentialtransfers/types/expected_keepers.go @@ -0,0 +1,12 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" +) + +type AccountKeeper interface { + GetModuleAddress(name string) sdk.AccAddress + SetModuleAccount(ctx sdk.Context, macc authtypes.ModuleAccountI) + GetAccount(sdk.Context, sdk.AccAddress) authtypes.AccountI +} diff --git a/x/confidentialtransfers/types/genesis.go b/x/confidentialtransfers/types/genesis.go index 25488311c9..cf0ee894b1 100644 --- a/x/confidentialtransfers/types/genesis.go +++ b/x/confidentialtransfers/types/genesis.go @@ -1,21 +1,44 @@ package types -// this line is used by starport scaffolding # genesis/types/import +import "fmt" -// DefaultIndex is the default capability global index -const DefaultIndex uint64 = 1 - -// DefaultGenesis returns the default Capability genesis state -// TODO: Define the Genesis State as a .proto message once it's properly fleshed out -func DefaultGenesis() *GenesisState { - return &GenesisState{ - Params: Params{}, - } +// DefaultGenesisState returns the default Capability genesis state +func DefaultGenesisState() *GenesisState { + return NewGenesisState(DefaultParams(), []GenesisCtAccount{}) } // Validate performs basic genesis state validation returning an error upon any // failure. -// TODO: Implement this method once DefaultGenesis is defined. func (gs GenesisState) Validate() error { + if err := gs.Params.Validate(); err != nil { + return err + } + + accounts := make(map[string]bool) + for _, genesisCtAccount := range gs.Accounts { + if genesisCtAccount.Key == nil { + return fmt.Errorf("genesisCtAccount key cannot be empty") + } + + if err := genesisCtAccount.Account.ValidateBasic(); err != nil { + return err + } + + account := genesisCtAccount.Account + publicKey := string(account.PublicKey) + if accounts[publicKey] { + return fmt.Errorf("duplicate genesisCtAccount for public key %s", publicKey) + } + accounts[publicKey] = true + + } return nil } + +// NewGenesisState creates a new genesis state. +func NewGenesisState(params Params, accounts []GenesisCtAccount) *GenesisState { + return &GenesisState{ + Params: params, + Accounts: accounts, + } +} diff --git a/x/confidentialtransfers/types/genesis.pb.go b/x/confidentialtransfers/types/genesis.pb.go index e66e40b176..6cc4298a70 100644 --- a/x/confidentialtransfers/types/genesis.pb.go +++ b/x/confidentialtransfers/types/genesis.pb.go @@ -24,10 +24,11 @@ var _ = math.Inf const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the confidential module's genesis state. -// TODO: Implement this. This should probably look like an array of empty Account objects. type GenesisState struct { - // params defines the paramaters of the module. + // params defines the parameters of the module. Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // accounts is an array of confidential transfer accounts + Accounts []GenesisCtAccount `protobuf:"bytes,2,rep,name=accounts,proto3" json:"accounts"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -70,8 +71,70 @@ func (m *GenesisState) GetParams() Params { return Params{} } +func (m *GenesisState) GetAccounts() []GenesisCtAccount { + if m != nil { + return m.Accounts + } + return nil +} + +type GenesisCtAccount struct { + // account key + Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` + // confidential transfer account + Account CtAccount `protobuf:"bytes,2,opt,name=account,proto3" json:"account"` +} + +func (m *GenesisCtAccount) Reset() { *m = GenesisCtAccount{} } +func (m *GenesisCtAccount) String() string { return proto.CompactTextString(m) } +func (*GenesisCtAccount) ProtoMessage() {} +func (*GenesisCtAccount) Descriptor() ([]byte, []int) { + return fileDescriptor_218b8660fccef278, []int{1} +} +func (m *GenesisCtAccount) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisCtAccount) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisCtAccount.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *GenesisCtAccount) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisCtAccount.Merge(m, src) +} +func (m *GenesisCtAccount) XXX_Size() int { + return m.Size() +} +func (m *GenesisCtAccount) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisCtAccount.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisCtAccount proto.InternalMessageInfo + +func (m *GenesisCtAccount) GetKey() []byte { + if m != nil { + return m.Key + } + return nil +} + +func (m *GenesisCtAccount) GetAccount() CtAccount { + if m != nil { + return m.Account + } + return CtAccount{} +} + func init() { proto.RegisterType((*GenesisState)(nil), "seiprotocol.seichain.confidentialtransfers.GenesisState") + proto.RegisterType((*GenesisCtAccount)(nil), "seiprotocol.seichain.confidentialtransfers.GenesisCtAccount") } func init() { @@ -79,21 +142,26 @@ func init() { } var fileDescriptor_218b8660fccef278 = []byte{ - // 216 bytes of a gzipped FileDescriptorProto + // 298 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4e, 0xce, 0xcf, 0x4b, 0xcb, 0x4c, 0x49, 0xcd, 0x2b, 0xc9, 0x4c, 0xcc, 0x29, 0x29, 0x4a, 0xcc, 0x2b, 0x4e, 0x4b, 0x2d, 0x2a, 0xd6, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xd2, 0x2a, 0x4e, 0xcd, 0x04, 0xb3, 0x92, 0xf3, 0x73, 0xf4, 0x8a, 0x53, 0x33, 0x93, 0x33, 0x12, 0x33, 0xf3, 0xf4, 0xb0, 0xea, 0x94, 0x12, 0x49, 0xcf, 0x4f, 0xcf, 0x07, 0x2b, 0xd6, 0x07, 0xb1, - 0x20, 0x26, 0x48, 0x29, 0x61, 0xb7, 0xa6, 0x20, 0xb1, 0x28, 0x31, 0x17, 0x6a, 0x8b, 0x52, 0x02, - 0x17, 0x8f, 0x3b, 0xc4, 0xda, 0xe0, 0x92, 0xc4, 0x92, 0x54, 0xa1, 0x00, 0x2e, 0x36, 0x88, 0xbc, - 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x91, 0x1e, 0xf1, 0xce, 0xd0, 0x0b, 0x00, 0xeb, 0x74, - 0x62, 0x39, 0x71, 0x4f, 0x9e, 0x21, 0x08, 0x6a, 0x8e, 0x53, 0xe4, 0x89, 0x47, 0x72, 0x8c, 0x17, - 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, - 0x37, 0x1e, 0xcb, 0x31, 0x44, 0xd9, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, - 0xea, 0x17, 0xa7, 0x66, 0xea, 0xc2, 0xac, 0x01, 0x73, 0xc0, 0xf6, 0xe8, 0x57, 0xe8, 0x63, 0xf7, - 0x43, 0x49, 0x65, 0x41, 0x6a, 0x71, 0x12, 0x1b, 0x58, 0x87, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, - 0x1a, 0x45, 0xe7, 0x8a, 0x50, 0x01, 0x00, 0x00, + 0x20, 0x26, 0x48, 0x29, 0x61, 0xb7, 0xa6, 0x20, 0xb1, 0x28, 0x31, 0x17, 0x6a, 0x8b, 0x94, 0x06, + 0x76, 0x35, 0xc8, 0xa2, 0x10, 0x95, 0x4a, 0x07, 0x18, 0xb9, 0x78, 0xdc, 0x21, 0x2e, 0x0c, 0x2e, + 0x49, 0x2c, 0x49, 0x15, 0x0a, 0xe0, 0x62, 0x83, 0x18, 0x25, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, + 0x64, 0xa4, 0x47, 0xbc, 0x8b, 0xf5, 0x02, 0xc0, 0x3a, 0x9d, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, + 0x82, 0x9a, 0x23, 0x14, 0xc7, 0xc5, 0x91, 0x98, 0x9c, 0x9c, 0x5f, 0x9a, 0x57, 0x52, 0x2c, 0xc1, + 0xa4, 0xc0, 0xac, 0xc1, 0x6d, 0x64, 0x43, 0x8a, 0x99, 0x50, 0xd7, 0x39, 0x97, 0x38, 0x42, 0x0c, + 0x81, 0x9a, 0x0e, 0x37, 0x53, 0xa9, 0x9a, 0x4b, 0x00, 0x5d, 0x8d, 0x90, 0x00, 0x17, 0x73, 0x76, + 0x6a, 0x25, 0xd8, 0x0b, 0x3c, 0x41, 0x20, 0xa6, 0x50, 0x28, 0x17, 0x3b, 0x54, 0x87, 0x04, 0x13, + 0xd8, 0x63, 0xa6, 0xa4, 0x38, 0x02, 0xdd, 0x76, 0x98, 0x59, 0x4e, 0x91, 0x27, 0x1e, 0xc9, 0x31, + 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, + 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x9f, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, + 0x9f, 0xab, 0x5f, 0x9c, 0x9a, 0xa9, 0x0b, 0xb3, 0x0a, 0xcc, 0x01, 0xdb, 0xa5, 0x5f, 0xa1, 0x8f, + 0x3d, 0x9e, 0x4a, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x3a, 0x8c, 0x01, 0x01, 0x00, 0x00, + 0xff, 0xff, 0x85, 0xf5, 0x3c, 0x9d, 0x58, 0x02, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -116,6 +184,20 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.Accounts) > 0 { + for iNdEx := len(m.Accounts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Accounts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + } { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -129,6 +211,46 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *GenesisCtAccount) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *GenesisCtAccount) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisCtAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Account.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Key) > 0 { + i -= len(m.Key) + copy(dAtA[i:], m.Key) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Key))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { offset -= sovGenesis(v) base := offset @@ -148,6 +270,27 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) + if len(m.Accounts) > 0 { + for _, e := range m.Accounts { + l = e.Size() + n += 1 + l + sovGenesis(uint64(l)) + } + } + return n +} + +func (m *GenesisCtAccount) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Key) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } + l = m.Account.Size() + n += 1 + l + sovGenesis(uint64(l)) return n } @@ -219,6 +362,157 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Accounts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Accounts = append(m.Accounts, GenesisCtAccount{}) + if err := m.Accounts[len(m.Accounts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipGenesis(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthGenesis + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *GenesisCtAccount) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: GenesisCtAccount: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisCtAccount: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Key", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Key = append(m.Key[:0], dAtA[iNdEx:postIndex]...) + if m.Key == nil { + m.Key = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Account", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Account.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/confidentialtransfers/types/keys.go b/x/confidentialtransfers/types/keys.go index de5e3d28a5..cfde6f9ce5 100644 --- a/x/confidentialtransfers/types/keys.go +++ b/x/confidentialtransfers/types/keys.go @@ -2,7 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - "strings" + "github.com/cosmos/cosmos-sdk/types/address" ) // TODO: Remove keys that are eventually not required @@ -25,18 +25,16 @@ const ( const KeySeparator = "|" var ( - AccountsKey = "account" - DenomKey = []byte("denom") + AccountsKey = []byte{0x01} + DenomKey = []byte{0x02} ) // GetAccountKey generates the key for storing Account information based on address and denom -// The key is of the form: account | | -func GetAccountKey(address sdk.AccAddress, denom string) []byte { - return []byte(strings.Join([]string{AccountsKey, address.String(), denom, ""}, KeySeparator)) +func GetAccountKey(addr sdk.AccAddress, denom string) []byte { + return append(GetAddressPrefix(addr), []byte(denom)...) } // GetAddressPrefix generates the prefix for all accounts under a specific address -// The prefix is of the form: account|| -func GetAddressPrefix(address sdk.AccAddress) []byte { - return []byte(strings.Join([]string{AccountsKey, address.String(), ""}, KeySeparator)) +func GetAddressPrefix(addr sdk.AccAddress) []byte { + return append(AccountsKey, address.MustLengthPrefix(addr)...) } diff --git a/x/confidentialtransfers/types/params.go b/x/confidentialtransfers/types/params.go new file mode 100644 index 0000000000..59966f5cff --- /dev/null +++ b/x/confidentialtransfers/types/params.go @@ -0,0 +1,25 @@ +package types + +import ( + paramtypes "github.com/cosmos/cosmos-sdk/x/params/types" +) + +// ParamKeyTable ParamTable for confidential transfers module. +func ParamKeyTable() paramtypes.KeyTable { + return paramtypes.NewKeyTable().RegisterParamSet(&Params{}) +} + +// DefaultParams default confidential transfers module parameters. +func DefaultParams() Params { + return Params{} +} + +// Validate validate params. +func (p *Params) Validate() error { + return nil +} + +// ParamSetPairs Implements params.ParamSet. +func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { + return paramtypes.ParamSetPairs{} +} diff --git a/x/confidentialtransfers/types/tx.pb.go b/x/confidentialtransfers/types/tx.pb.go index 8f3378a4d2..d15d690101 100644 --- a/x/confidentialtransfers/types/tx.pb.go +++ b/x/confidentialtransfers/types/tx.pb.go @@ -612,80 +612,81 @@ func init() { func init() { proto.RegisterFile("confidentialtransfers/tx.proto", fileDescriptor_34e86c2ca2c678f9) } var fileDescriptor_34e86c2ca2c678f9 = []byte{ - // 1164 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0xcf, 0x6f, 0x1b, 0x45, - 0x14, 0xce, 0xa6, 0x89, 0xe3, 0xbc, 0x84, 0xa4, 0xd9, 0x24, 0xd4, 0xb1, 0xc2, 0x6e, 0xba, 0x48, - 0x10, 0x50, 0x71, 0xa4, 0xb4, 0x2a, 0x52, 0x2a, 0x54, 0xec, 0x14, 0x94, 0x02, 0x16, 0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x91, 0x7a, 0x0b, 0x20, 0x24, 0xd2, 0x72, 0x9c, 0x59, 0x2e, 0x77, 0xda, - 0xfa, 0x02, 0xb7, 0xec, 0xad, 0x19, 0xe6, 0x74, 0x48, 0x84, 0xd5, 0x1b, 0x30, 0xd9, 0x40, 0x1e, - 0x69, 0x16, 0xae, 0x30, 0x83, 0xab, 0x9d, 0xb6, 0x3e, 0xcb, 0x0d, 0xd8, 0xb4, 0x61, 0xf2, 0x65, - 0xf5, 0x10, 0xe6, 0x38, 0x77, 0x93, 0x1c, 0x78, 0x61, 0xcd, 0x25, 0x85, 0x89, 0x35, 0x65, 0x7d, - 0x66, 0xf3, 0x76, 0xe9, 0xe2, 0xc7, 0x59, 0xda, 0xc6, 0xbe, 0x83, 0x82, 0x10, 0x1d, 0x85, 0x95, - 0x95, 0x4e, 0x5b, 0x5f, 0x8e, 0xfb, 0x24, 0x70, 0x0d, 0x93, 0x1d, 0x41, 0x99, 0x8d, 0x3f, 0x21, - 0xfd, 0xc4, 0x0e, 0x2e, 0x4c, 0xbe, 0x0c, 0x62, 0x07, 0x27, 0x88, 0x77, 0xb0, 0xba, 0x0f, 0xb3, - 0xdd, 0x33, 0x93, 0xfe, 0xe6, 0x46, 0xa2, 0x8d, 0xc5, 0x30, 0x8e, 0x6a, 0x98, 0x10, 0x12, 0xe9, - 0x6b, 0x82, 0xd2, 0xc1, 0x85, 0xa9, 0x17, 0x4f, 0xd9, 0xf5, 0x53, 0x52, 0xee, 0x60, 0xf5, 0x1b, - 0x05, 0x16, 0x02, 0xd4, 0xb4, 0xb0, 0x87, 0x3d, 0xbb, 0xb6, 0x6b, 0xb9, 0x96, 0x57, 0x47, 0x85, - 0xfc, 0x48, 0xc4, 0x5a, 0xa7, 0xad, 0x17, 0x45, 0x12, 0xb1, 0x5b, 0x61, 0xed, 0xba, 0x48, 0x80, - 0x1b, 0xe6, 0x55, 0x49, 0x58, 0xe1, 0x53, 0xea, 0xa7, 0xb0, 0x98, 0xb2, 0xb3, 0x30, 0xcd, 0x72, - 0xf2, 0x79, 0x70, 0x6a, 0x6c, 0x56, 0x00, 0x3a, 0x90, 0xf3, 0x03, 0x42, 0xf6, 0x68, 0x01, 0x98, - 0x2b, 0xef, 0x65, 0x71, 0x45, 0x5c, 0xc7, 0x2a, 0xb5, 0x1f, 0x30, 0x90, 0xca, 0x42, 0xa7, 0xad, - 0xbf, 0xc2, 0x25, 0x70, 0x58, 0xc3, 0x8c, 0xf0, 0xd5, 0x06, 0xe4, 0xad, 0x83, 0x06, 0x0e, 0x49, - 0x40, 0x0b, 0x33, 0x6b, 0x57, 0xd6, 0x67, 0x36, 0x6f, 0x66, 0xe1, 0x2a, 0x73, 0xdb, 0xca, 0x62, - 0xa7, 0xad, 0xcf, 0x73, 0x06, 0x01, 0x67, 0x98, 0x12, 0x79, 0x2b, 0xff, 0xfd, 0xb1, 0x3e, 0xf6, - 0xcf, 0xb1, 0x3e, 0x66, 0x2c, 0xc3, 0x62, 0xac, 0x62, 0x98, 0x88, 0xfa, 0xc4, 0xa3, 0xc8, 0xf8, - 0x71, 0x1a, 0xa6, 0x22, 0x2c, 0xf5, 0x0e, 0xcc, 0x47, 0x86, 0x7d, 0x85, 0x44, 0xed, 0xb4, 0xf5, - 0xb9, 0x88, 0x44, 0xd4, 0x82, 0xb9, 0x68, 0xab, 0x28, 0x08, 0xc7, 0x0a, 0xac, 0x22, 0x8f, 0x1d, - 0x28, 0x6a, 0xd4, 0x84, 0xd0, 0xd8, 0x3d, 0x18, 0x1f, 0x29, 0x37, 0xde, 0xec, 0xb4, 0xf5, 0xd7, - 0xb9, 0x84, 0xf3, 0x58, 0x0c, 0x73, 0x45, 0x2e, 0x0b, 0x5f, 0xe5, 0x35, 0x39, 0x5f, 0xa2, 0x83, - 0x59, 0x2d, 0x7b, 0xc9, 0x12, 0xbb, 0xf7, 0xe8, 0x2c, 0x89, 0x3b, 0x58, 0xfd, 0x55, 0x81, 0xeb, - 0x83, 0x5e, 0xd5, 0x1e, 0x59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3f, 0xda, 0x5a, 0x3e, 0xa2, 0xbb, 0x39, 0x66, 0x71, 0xf3, 0xbf, 0x00, - 0x00, 0x00, 0xff, 0xff, 0x7c, 0x6f, 0x55, 0x8d, 0x8e, 0x13, 0x00, 0x00, + // 1169 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x58, 0x4d, 0x6c, 0x1b, 0x45, + 0x14, 0xce, 0xe6, 0xc7, 0x49, 0x5e, 0x42, 0xd2, 0x6c, 0x12, 0xea, 0x58, 0x61, 0x37, 0x5d, 0x24, + 0x08, 0xa8, 0x38, 0x52, 0x5a, 0x15, 0x29, 0x15, 0x14, 0x3b, 0x05, 0xa5, 0x80, 0x45, 0xb5, 0x42, + 0x20, 0xb8, 0x58, 0x1b, 0x7b, 0xb2, 0x3b, 0xea, 0x7a, 0x67, 0xb3, 0xb3, 0x69, 0xe2, 0xde, 0x10, + 0x20, 0x71, 0xec, 0x91, 0x0b, 0x22, 0x1c, 0x7a, 0xe7, 0xce, 0x19, 0x89, 0x63, 0x8f, 0x9c, 0x0c, + 0x4a, 0x2e, 0x9c, 0x2d, 0xce, 0x08, 0x79, 0x66, 0x67, 0xbc, 0x6b, 0x6f, 0xd2, 0xac, 0xdd, 0x46, + 0xbd, 0x79, 0x76, 0xe6, 0x7d, 0xdf, 0xf7, 0xe6, 0xfd, 0xcc, 0x4b, 0x40, 0xab, 0x11, 0x6f, 0x0f, + 0xd7, 0x91, 0x17, 0x62, 0xcb, 0x0d, 0x03, 0xcb, 0xa3, 0x7b, 0x28, 0xa0, 0x1b, 0xe1, 0x51, 0xd1, + 0x0f, 0x48, 0x48, 0xd4, 0xb7, 0x29, 0xc2, 0xec, 0x57, 0x8d, 0xb8, 0x45, 0x8a, 0x70, 0xcd, 0xb1, + 0xb0, 0x57, 0x4c, 0x35, 0x2a, 0x2c, 0xd9, 0xc4, 0x26, 0xec, 0xf0, 0x46, 0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x60, 0x31, 0xad, 0xee, 0xcb, 0x19, 0x81, 0x53, + 0x30, 0x0a, 0x1f, 0x0f, 0x8f, 0x21, 0x75, 0x3e, 0x56, 0x60, 0x36, 0x51, 0xdd, 0xb7, 0x33, 0x82, + 0xc7, 0x8d, 0x0b, 0xdb, 0x43, 0x18, 0x0b, 0x49, 0xe5, 0xaf, 0xfe, 0x38, 0xd1, 0x94, 0xa7, 0x27, + 0x9a, 0xf2, 0xf7, 0x89, 0xa6, 0x3c, 0x3e, 0xd5, 0x46, 0x9e, 0x9e, 0x6a, 0x23, 0x7f, 0x9e, 0x6a, + 0x23, 0x5f, 0xdf, 0xb1, 0x71, 0xe8, 0x1c, 0xec, 0x16, 0x6b, 0xa4, 0xb1, 0x41, 0x11, 0x7e, 0x47, + 0x30, 0xb1, 0x05, 0xa3, 0xda, 0x38, 0xda, 0x38, 0xe3, 0x5f, 0x70, 0x4d, 0x1f, 0xd1, 0xdd, 0x1c, + 0xb3, 0xb8, 0xf1, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x72, 0x45, 0x61, 0x21, 0xa8, 0x13, 0x00, + 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -703,11 +704,11 @@ type MsgClient interface { // Transfer defines a method for sending coins from one account to another account. Transfer(ctx context.Context, in *MsgTransfer, opts ...grpc.CallOption) (*MsgTransferResponse, error) // InitializeAccount defines a method for creating a new confidential transfers account for some denom. - InitializeAccount(ctx context.Context, in *MsgInitializeAccount, opts ...grpc.CallOption) (*MsgInitializeAccount, error) + InitializeAccount(ctx context.Context, in *MsgInitializeAccount, opts ...grpc.CallOption) (*MsgInitializeAccountResponse, error) // Deposit defines a method for depositing funds into a confidential transfers account. - Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDeposit, error) + Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) // Withdraw defines a method for withdrawing funds from a confidential transfers account. - Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdraw, error) + Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) // ApplyPendingBalance defines a method for applying pending balance to an account. ApplyPendingBalance(ctx context.Context, in *MsgApplyPendingBalance, opts ...grpc.CallOption) (*MsgApplyPendingBalanceResponse, error) // CloseAccount defines a method for closing an account. @@ -731,8 +732,8 @@ func (c *msgClient) Transfer(ctx context.Context, in *MsgTransfer, opts ...grpc. return out, nil } -func (c *msgClient) InitializeAccount(ctx context.Context, in *MsgInitializeAccount, opts ...grpc.CallOption) (*MsgInitializeAccount, error) { - out := new(MsgInitializeAccount) +func (c *msgClient) InitializeAccount(ctx context.Context, in *MsgInitializeAccount, opts ...grpc.CallOption) (*MsgInitializeAccountResponse, error) { + out := new(MsgInitializeAccountResponse) err := c.cc.Invoke(ctx, "/seiprotocol.seichain.confidentialtransfers.Msg/InitializeAccount", in, out, opts...) if err != nil { return nil, err @@ -740,8 +741,8 @@ func (c *msgClient) InitializeAccount(ctx context.Context, in *MsgInitializeAcco return out, nil } -func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDeposit, error) { - out := new(MsgDeposit) +func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.CallOption) (*MsgDepositResponse, error) { + out := new(MsgDepositResponse) err := c.cc.Invoke(ctx, "/seiprotocol.seichain.confidentialtransfers.Msg/Deposit", in, out, opts...) if err != nil { return nil, err @@ -749,8 +750,8 @@ func (c *msgClient) Deposit(ctx context.Context, in *MsgDeposit, opts ...grpc.Ca return out, nil } -func (c *msgClient) Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdraw, error) { - out := new(MsgWithdraw) +func (c *msgClient) Withdraw(ctx context.Context, in *MsgWithdraw, opts ...grpc.CallOption) (*MsgWithdrawResponse, error) { + out := new(MsgWithdrawResponse) err := c.cc.Invoke(ctx, "/seiprotocol.seichain.confidentialtransfers.Msg/Withdraw", in, out, opts...) if err != nil { return nil, err @@ -781,11 +782,11 @@ type MsgServer interface { // Transfer defines a method for sending coins from one account to another account. Transfer(context.Context, *MsgTransfer) (*MsgTransferResponse, error) // InitializeAccount defines a method for creating a new confidential transfers account for some denom. - InitializeAccount(context.Context, *MsgInitializeAccount) (*MsgInitializeAccount, error) + InitializeAccount(context.Context, *MsgInitializeAccount) (*MsgInitializeAccountResponse, error) // Deposit defines a method for depositing funds into a confidential transfers account. - Deposit(context.Context, *MsgDeposit) (*MsgDeposit, error) + Deposit(context.Context, *MsgDeposit) (*MsgDepositResponse, error) // Withdraw defines a method for withdrawing funds from a confidential transfers account. - Withdraw(context.Context, *MsgWithdraw) (*MsgWithdraw, error) + Withdraw(context.Context, *MsgWithdraw) (*MsgWithdrawResponse, error) // ApplyPendingBalance defines a method for applying pending balance to an account. ApplyPendingBalance(context.Context, *MsgApplyPendingBalance) (*MsgApplyPendingBalanceResponse, error) // CloseAccount defines a method for closing an account. @@ -799,13 +800,13 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) Transfer(ctx context.Context, req *MsgTransfer) (*MsgTransferResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Transfer not implemented") } -func (*UnimplementedMsgServer) InitializeAccount(ctx context.Context, req *MsgInitializeAccount) (*MsgInitializeAccount, error) { +func (*UnimplementedMsgServer) InitializeAccount(ctx context.Context, req *MsgInitializeAccount) (*MsgInitializeAccountResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method InitializeAccount not implemented") } -func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDeposit, error) { +func (*UnimplementedMsgServer) Deposit(ctx context.Context, req *MsgDeposit) (*MsgDepositResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Deposit not implemented") } -func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdraw, error) { +func (*UnimplementedMsgServer) Withdraw(ctx context.Context, req *MsgWithdraw) (*MsgWithdrawResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Withdraw not implemented") } func (*UnimplementedMsgServer) ApplyPendingBalance(ctx context.Context, req *MsgApplyPendingBalance) (*MsgApplyPendingBalanceResponse, error) {