From 97e7e0f50b397bfa328612f16f556fd1933e56a2 Mon Sep 17 00:00:00 2001 From: C H Date: Thu, 25 Jul 2024 14:20:57 +0800 Subject: [PATCH 1/8] Added clock module --- proto/cyber/clock/v1/clock.proto | 13 + proto/cyber/clock/v1/genesis.proto | 26 + proto/cyber/clock/v1/query.proto | 65 + proto/cyber/clock/v1/tx.proto | 99 ++ x/clock/README.md | 5 + x/clock/abci.go | 120 ++ x/clock/abci_test.go | 267 +++++ x/clock/client/cli/query.go | 111 ++ x/clock/client/cli/tx.go | 132 +++ x/clock/genesis.go | 70 ++ x/clock/genesis_test.go | 89 ++ x/clock/keeper/clock.go | 231 ++++ x/clock/keeper/keeper.go | 91 ++ x/clock/keeper/keeper_test.go | 137 +++ x/clock/keeper/msg_server.go | 75 ++ x/clock/keeper/msg_server_test.go | 323 +++++ x/clock/keeper/querier.go | 64 + x/clock/keeper/querier_test.go | 234 ++++ x/clock/module.go | 155 +++ x/clock/spec/01_concepts.md | 45 + x/clock/spec/02_state.md | 53 + x/clock/spec/03_integration.md | 91 ++ x/clock/spec/04_clients.md | 25 + x/clock/spec/README.md | 16 + x/clock/types/clock.pb.go | 361 ++++++ x/clock/types/codec.go | 48 + x/clock/types/codec_test.go | 33 + x/clock/types/errors.go | 11 + x/clock/types/genesis.pb.go | 485 ++++++++ x/clock/types/keys.go | 13 + x/clock/types/msgs.go | 144 +++ x/clock/types/msgs_test.go | 41 + x/clock/types/params.go | 36 + x/clock/types/params_test.go | 63 + x/clock/types/query.pb.go | 1406 ++++++++++++++++++++++ x/clock/types/query.pb.gw.go | 337 ++++++ x/clock/types/tx.pb.go | 1774 ++++++++++++++++++++++++++++ x/clock/types/tx.pb.gw.go | 337 ++++++ 38 files changed, 7626 insertions(+) create mode 100644 proto/cyber/clock/v1/clock.proto create mode 100644 proto/cyber/clock/v1/genesis.proto create mode 100644 proto/cyber/clock/v1/query.proto create mode 100644 proto/cyber/clock/v1/tx.proto create mode 100644 x/clock/README.md create mode 100644 x/clock/abci.go create mode 100644 x/clock/abci_test.go create mode 100644 x/clock/client/cli/query.go create mode 100644 x/clock/client/cli/tx.go create mode 100644 x/clock/genesis.go create mode 100644 x/clock/genesis_test.go create mode 100644 x/clock/keeper/clock.go create mode 100644 x/clock/keeper/keeper.go create mode 100644 x/clock/keeper/keeper_test.go create mode 100644 x/clock/keeper/msg_server.go create mode 100644 x/clock/keeper/msg_server_test.go create mode 100644 x/clock/keeper/querier.go create mode 100644 x/clock/keeper/querier_test.go create mode 100644 x/clock/module.go create mode 100644 x/clock/spec/01_concepts.md create mode 100644 x/clock/spec/02_state.md create mode 100644 x/clock/spec/03_integration.md create mode 100644 x/clock/spec/04_clients.md create mode 100644 x/clock/spec/README.md create mode 100644 x/clock/types/clock.pb.go create mode 100644 x/clock/types/codec.go create mode 100644 x/clock/types/codec_test.go create mode 100644 x/clock/types/errors.go create mode 100644 x/clock/types/genesis.pb.go create mode 100644 x/clock/types/keys.go create mode 100644 x/clock/types/msgs.go create mode 100644 x/clock/types/msgs_test.go create mode 100644 x/clock/types/params.go create mode 100644 x/clock/types/params_test.go create mode 100644 x/clock/types/query.pb.go create mode 100644 x/clock/types/query.pb.gw.go create mode 100644 x/clock/types/tx.pb.go create mode 100644 x/clock/types/tx.pb.gw.go diff --git a/proto/cyber/clock/v1/clock.proto b/proto/cyber/clock/v1/clock.proto new file mode 100644 index 00000000..a80197d3 --- /dev/null +++ b/proto/cyber/clock/v1/clock.proto @@ -0,0 +1,13 @@ +syntax = "proto3"; +package juno.clock.v1; + +option go_package = "github.com/CosmosContracts/juno/x/clock/types"; + +// This object is used to store the contract address and the +// jail status of the contract. +message ClockContract { + // The address of the contract. + string contract_address = 1; + // The jail status of the contract. + bool is_jailed = 2; +} \ No newline at end of file diff --git a/proto/cyber/clock/v1/genesis.proto b/proto/cyber/clock/v1/genesis.proto new file mode 100644 index 00000000..66c1d821 --- /dev/null +++ b/proto/cyber/clock/v1/genesis.proto @@ -0,0 +1,26 @@ +syntax = "proto3"; +package juno.clock.v1; + +import "gogoproto/gogo.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "juno/clock/v1/clock.proto"; + +option go_package = "github.com/CosmosContracts/juno/x/clock/types"; + +// GenesisState - initial state of module +message GenesisState { + // Params of this module + Params params = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params,omitempty" + ]; +} + +// Params defines the set of module parameters. +message Params { + // contract_gas_limit defines the maximum amount of gas that can be used by a contract. + uint64 contract_gas_limit = 1 [ + (gogoproto.jsontag) = "contract_gas_limit,omitempty", + (gogoproto.moretags) = "yaml:\"contract_gas_limit\"" + ]; +} diff --git a/proto/cyber/clock/v1/query.proto b/proto/cyber/clock/v1/query.proto new file mode 100644 index 00000000..b392978b --- /dev/null +++ b/proto/cyber/clock/v1/query.proto @@ -0,0 +1,65 @@ +syntax = "proto3"; +package juno.clock.v1; + +import "cosmos/base/query/v1beta1/pagination.proto"; +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "cosmos/base/v1beta1/coin.proto"; +import "juno/clock/v1/genesis.proto"; +import "juno/clock/v1/clock.proto"; + +option go_package = "github.com/CosmosContracts/juno/x/clock/types"; + +// Query defines the gRPC querier service. +service Query { + // ClockContracts + rpc ClockContracts(QueryClockContracts) + returns (QueryClockContractsResponse) { + option (google.api.http).get = + "/juno/clock/v1/contracts"; + } + // ClockContract + rpc ClockContract(QueryClockContract) + returns (QueryClockContractResponse) { + option (google.api.http).get = + "/juno/clock/v1/contracts/{contract_address}"; + } + // Params + rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + option (google.api.http).get = "/juno/clock/v1/params"; + } +} + +// QueryClockContracts is the request type to get all contracts. +message QueryClockContracts { + // pagination defines an optional pagination for the request. + cosmos.base.query.v1beta1.PageRequest pagination = 1; +} + +// QueryClockContractsResponse is the response type for the Query/ClockContracts RPC method. +message QueryClockContractsResponse { + // clock_contracts are the clock contracts. + repeated ClockContract clock_contracts = 1 [ (gogoproto.nullable) = false ]; + // pagination defines the pagination in the response. + cosmos.base.query.v1beta1.PageResponse pagination = 2; +} + +// QueryClockContract is the request type to get a single contract. +message QueryClockContract { + // contract_address is the address of the contract to query. + string contract_address = 1; +} + +// QueryClockContractResponse is the response type for the Query/ClockContract RPC method. +message QueryClockContractResponse { + // contract is the clock contract. + ClockContract clock_contract = 1 [(gogoproto.nullable) = false]; +} + +// QueryParams is the request type to get all module params. +message QueryParamsRequest {} + +// QueryClockContractsResponse is the response type for the Query/ClockContracts RPC method. +message QueryParamsResponse { + Params params = 1 [(gogoproto.jsontag) = "params", (gogoproto.moretags) = "yaml:\"params\""]; +} diff --git a/proto/cyber/clock/v1/tx.proto b/proto/cyber/clock/v1/tx.proto new file mode 100644 index 00000000..8604aec3 --- /dev/null +++ b/proto/cyber/clock/v1/tx.proto @@ -0,0 +1,99 @@ +syntax = "proto3"; +package juno.clock.v1; + +option go_package = "github.com/CosmosContracts/juno/x/clock/types"; + +import "google/api/annotations.proto"; +import "cosmos/msg/v1/msg.proto"; +import "juno/clock/v1/genesis.proto"; +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "amino/amino.proto"; + +// Msg defines the Msg service. +service Msg { + + // RegisterClockContract defines the endpoint for + // registering a new clock contract. + rpc RegisterClockContract(MsgRegisterClockContract) + returns (MsgRegisterClockContractResponse) { + option (google.api.http).post = "/juno/clock/v1/tx/register"; + }; + + // UnregisterClockContract defines the endpoint for + // unregistering a clock contract. + rpc UnregisterClockContract(MsgUnregisterClockContract) + returns (MsgUnregisterClockContractResponse) { + option (google.api.http).post = "/juno/clock/v1/tx/unregister"; + }; + + // UnjailClockContract defines the endpoint for + // unjailing a clock contract. + rpc UnjailClockContract(MsgUnjailClockContract) + returns (MsgUnjailClockContractResponse) { + option (google.api.http).post = "/juno/clock/v1/tx/unjail"; + }; + + // UpdateParams defines a governance operation for updating the x/clock module + // parameters. The authority is hard-coded to the x/gov module account. + // + // Since: cosmos-sdk 0.47 + rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse); +} + +// MsgRegisterClockContract is the Msg/RegisterClockContract request type. +message MsgRegisterClockContract { + // The address of the sender. + string sender_address = 1; + // The address of the contract to register. + string contract_address = 2; +} + +// MsgRegisterClockContractResponse defines the response structure for executing a +// MsgRegisterClockContract message. +message MsgRegisterClockContractResponse {} + +// MsgUnregisterClockContract is the Msg/UnregisterClockContract request type. +message MsgUnregisterClockContract { + // The address of the sender. + string sender_address = 1; + // The address of the contract to unregister. + string contract_address = 2; +} + +// MsgUnregisterClockContractResponse defines the response structure for executing a +// MsgUnregisterClockContract message. +message MsgUnregisterClockContractResponse {} + +// MsgUnjailClockContract is the Msg/UnjailClockContract request type. +message MsgUnjailClockContract { + // The address of the sender. + string sender_address = 1; + // The address of the contract to unjail. + string contract_address = 2; +} + +// MsgUnjailClockContractResponse defines the response structure for executing a +// MsgUnjailClockContract message. +message MsgUnjailClockContractResponse {} + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParams { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address of the governance account. + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + + // params defines the x/clock parameters to update. + // + // NOTE: All parameters must be supplied. + Params params = 2 [(gogoproto.nullable) = false]; +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +message MsgUpdateParamsResponse {} diff --git a/x/clock/README.md b/x/clock/README.md new file mode 100644 index 00000000..ba05f64b --- /dev/null +++ b/x/clock/README.md @@ -0,0 +1,5 @@ +# Clock + +This module allows smart contracts to execute logic at the end of every block without an external bot. + +[Clock Spec](./spec/README.md) diff --git a/x/clock/abci.go b/x/clock/abci.go new file mode 100644 index 00000000..8ceacece --- /dev/null +++ b/x/clock/abci.go @@ -0,0 +1,120 @@ +package clock + +import ( + abci "github.com/cometbft/cometbft/abci/types" + "github.com/cybercongress/go-cyber/v4/app/helpers" + "time" + + "github.com/cometbft/cometbft/libs/log" + + "github.com/cosmos/cosmos-sdk/telemetry" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cybercongress/go-cyber/v4/x/clock/keeper" + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +var endBlockSudoMessage = []byte(types.EndBlockSudoMessage) +var beginBlockSudoMessage = []byte(types.EndBlockSudoMessage) + +func BeginBlocker(ctx sdk.Context, k keeper.Keeper) { + defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) + CallContracts(ctx, k, beginBlockSudoMessage) +} + +// EndBlocker executes on contracts at the end of the block. +func EndBlocker(ctx sdk.Context, k keeper.Keeper) []abci.ValidatorUpdate { + defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyEndBlocker) + CallContracts(ctx, k, endBlockSudoMessage) + + return nil +} + +func CallContracts(ctx sdk.Context, k keeper.Keeper, msg []byte) { + logger := k.Logger(ctx) + p := k.GetParams(ctx) + + // Get all contracts + contracts, err := k.GetAllContracts(ctx) + if err != nil { + logger.Error("Failed to get contracts", "error", err) + return + } + + // Track errors + errorExecs := make([]string, len(contracts)) + errorExists := false + + // Execute all contracts that are not jailed + for idx, contract := range contracts { + + // Skip jailed contracts + if contract.IsJailed { + continue + } + + // Get sdk.AccAddress from contract address + contractAddr := sdk.MustAccAddressFromBech32(contract.ContractAddress) + if handleError(ctx, k, logger, errorExecs, &errorExists, err, idx, contract.ContractAddress, msg) { + continue + } + + // Create context with gas limit + childCtx := ctx.WithGasMeter(sdk.NewGasMeter(p.ContractGasLimit)) + + // Execute contract + helpers.ExecuteContract(k.GetContractKeeper(), childCtx, contractAddr, msg, &err) + + if handleError(ctx, k, logger, errorExecs, &errorExists, err, idx, contract.ContractAddress, msg) { + continue + } + + logger.Info( + "abci callback to clock contract", + "type", string(msg), + "cause", err, + "contract-address", contract.ContractAddress, + ) + } + + // Log errors if present + if errorExists { + logger.Error("Failed to execute contracts", "contracts", errorExecs) + } +} + +// Function to handle contract execution errors. Returns true if error is present, false otherwise. +func handleError( + ctx sdk.Context, + k keeper.Keeper, + logger log.Logger, + errorExecs []string, + errorExists *bool, + err error, + idx int, + contractAddress string, + msg []byte, +) bool { + // Check if error is present + if err != nil { + + // Flag error + *errorExists = true + errorExecs[idx] = contractAddress + + logger.Error( + "abci callback to clock contract failed", + "type", string(msg), + "cause", err, + "contract-address", contractAddress, + ) + + // Attempt to jail contract, log error if present + err := k.SetJailStatus(ctx, contractAddress, true) + if err != nil { + logger.Error("Failed to jail contract", "contract", contractAddress, "error", err) + } + } + + return err != nil +} diff --git a/x/clock/abci_test.go b/x/clock/abci_test.go new file mode 100644 index 00000000..39e93e73 --- /dev/null +++ b/x/clock/abci_test.go @@ -0,0 +1,267 @@ +package clock_test + +import ( + "crypto/sha256" + "encoding/json" + "testing" + "time" + + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/stretchr/testify/suite" + + _ "embed" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + + "github.com/cybercongress/go-cyber/v4/app" + clock "github.com/cybercongress/go-cyber/v4/x/clock" + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +type EndBlockerTestSuite struct { + suite.Suite + + ctx sdk.Context + + app *app.App +} + +func TestEndBlockerTestSuite(t *testing.T) { + suite.Run(t, new(EndBlockerTestSuite)) +} + +func (s *EndBlockerTestSuite) SetupTest() { + app := app.Setup(s.T()) + ctx := app.BaseApp.NewContext(false, tmproto.Header{ + ChainID: "testing", + Height: 10, + Time: time.Now(), + }) + + s.app = app + s.ctx = ctx +} + +//go:embed keeper/testdata/clock_example.wasm +var clockContract []byte + +//go:embed keeper/testdata/cw_testburn.wasm +var burnContract []byte + +func (s *EndBlockerTestSuite) StoreCode(wasmContract []byte) { + _, _, sender := testdata.KeyTestPubAddr() + msg := wasmtypes.MsgStoreCodeFixture(func(m *wasmtypes.MsgStoreCode) { + m.WASMByteCode = wasmContract + m.Sender = sender.String() + }) + rsp, err := s.app.MsgServiceRouter().Handler(msg)(s.ctx, msg) + s.Require().NoError(err) + var result wasmtypes.MsgStoreCodeResponse + s.Require().NoError(s.app.AppCodec().Unmarshal(rsp.Data, &result)) + s.Require().Equal(uint64(1), result.CodeID) + expHash := sha256.Sum256(wasmContract) + s.Require().Equal(expHash[:], result.Checksum) + // and + info := s.app.AppKeepers.WasmKeeper.GetCodeInfo(s.ctx, 1) + s.Require().NotNil(info) + s.Require().Equal(expHash[:], info.CodeHash) + s.Require().Equal(sender.String(), info.Creator) + s.Require().Equal(wasmtypes.DefaultParams().InstantiateDefaultPermission.With(sender), info.InstantiateConfig) +} + +func (s *EndBlockerTestSuite) InstantiateContract(sender string, admin string) string { + msgStoreCode := wasmtypes.MsgStoreCodeFixture(func(m *wasmtypes.MsgStoreCode) { + m.WASMByteCode = clockContract + m.Sender = sender + }) + _, err := s.app.MsgServiceRouter().Handler(msgStoreCode)(s.ctx, msgStoreCode) + s.Require().NoError(err) + + msgInstantiate := wasmtypes.MsgInstantiateContractFixture(func(m *wasmtypes.MsgInstantiateContract) { + m.Sender = sender + m.Admin = admin + m.Msg = []byte(`{}`) + }) + resp, err := s.app.MsgServiceRouter().Handler(msgInstantiate)(s.ctx, msgInstantiate) + s.Require().NoError(err) + var result wasmtypes.MsgInstantiateContractResponse + s.Require().NoError(s.app.AppCodec().Unmarshal(resp.Data, &result)) + contractInfo := s.app.AppKeepers.WasmKeeper.GetContractInfo(s.ctx, sdk.MustAccAddressFromBech32(result.Address)) + s.Require().Equal(contractInfo.CodeID, uint64(1)) + s.Require().Equal(contractInfo.Admin, admin) + s.Require().Equal(contractInfo.Creator, sender) + + return result.Address +} + +func (s *EndBlockerTestSuite) FundAccount(ctx sdk.Context, addr sdk.AccAddress, amounts sdk.Coins) error { + if err := s.app.AppKeepers.BankKeeper.MintCoins(ctx, minttypes.ModuleName, amounts); err != nil { + return err + } + + return s.app.AppKeepers.BankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr, amounts) +} + +// Register a contract. You must store the contract code before registering. +func (s *EndBlockerTestSuite) registerContract() string { + // Create & fund accounts + _, _, sender := testdata.KeyTestPubAddr() + _, _, admin := testdata.KeyTestPubAddr() + _ = s.FundAccount(s.ctx, sender, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1_000_000)))) + _ = s.FundAccount(s.ctx, admin, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1_000_000)))) + + // Instantiate contract + contractAddress := s.InstantiateContract(sender.String(), admin.String()) + + // Register contract + clockKeeper := s.app.AppKeepers.ClockKeeper + err := clockKeeper.RegisterContract(s.ctx, admin.String(), contractAddress) + s.Require().NoError(err) + + // Assert contract is registered + contract, err := clockKeeper.GetClockContract(s.ctx, contractAddress) + s.Require().NoError(err) + s.Require().Equal(contractAddress, contract.ContractAddress) + + // Increment block height + s.ctx = s.ctx.WithBlockHeight(11) + + return contract.ContractAddress +} + +// Test the end blocker. This test registers a contract, executes it with enough gas, +// too little gas, and also ensures the unjailing process functions. +func (s *EndBlockerTestSuite) TestEndBlocker() { + // Setup test + clockKeeper := s.app.AppKeepers.ClockKeeper + s.StoreCode(clockContract) + contractAddress := s.registerContract() + + // Query contract + val := s.queryContract(contractAddress) + s.Require().Equal(int64(0), val) + + // Call end blocker + s.callEndBlocker() + + // Query contract + val = s.queryContract(contractAddress) + s.Require().Equal(int64(1), val) + + // Update params with 10 gas limit + s.updateGasLimit(65_000) + + // Call end blocker + s.callEndBlocker() + + // Ensure contract is now jailed + contract, err := clockKeeper.GetClockContract(s.ctx, contractAddress) + s.Require().NoError(err) + s.Require().True(contract.IsJailed) + + // Update params to regular + s.updateGasLimit(types.DefaultParams().ContractGasLimit) + + // Call end blocker + s.callEndBlocker() + + // Unjail contract + err = clockKeeper.SetJailStatus(s.ctx, contractAddress, false) + s.Require().NoError(err) + + // Ensure contract is no longer jailed + contract, err = clockKeeper.GetClockContract(s.ctx, contractAddress) + s.Require().NoError(err) + s.Require().False(contract.IsJailed) + + // Call end blocker + s.callEndBlocker() + + // Query contract + val = s.queryContract(contractAddress) + s.Require().Equal(int64(2), val) +} + +// Test a contract which does not handle the sudo EndBlock msg. +func (s *EndBlockerTestSuite) TestInvalidContract() { + // Setup test + clockKeeper := s.app.AppKeepers.ClockKeeper + s.StoreCode(burnContract) + contractAddress := s.registerContract() + + // Run the end blocker + s.callEndBlocker() + + // Ensure contract is now jailed + contract, err := clockKeeper.GetClockContract(s.ctx, contractAddress) + s.Require().NoError(err) + s.Require().True(contract.IsJailed) +} + +// Test the endblocker with numerous contracts that all panic +func (s *EndBlockerTestSuite) TestPerformance() { + s.StoreCode(burnContract) + + numContracts := 1000 + + // Register numerous contracts + for x := 0; x < numContracts; x++ { + // Register contract + _ = s.registerContract() + } + + // Ensure contracts exist + clockKeeper := s.app.AppKeepers.ClockKeeper + contracts, err := clockKeeper.GetAllContracts(s.ctx) + s.Require().NoError(err) + s.Require().Len(contracts, numContracts) + + // Call end blocker + s.callEndBlocker() + + // Ensure contracts are jailed + contracts, err = clockKeeper.GetAllContracts(s.ctx) + s.Require().NoError(err) + for _, contract := range contracts { + s.Require().True(contract.IsJailed) + } +} + +// Update the gas limit +func (s *EndBlockerTestSuite) updateGasLimit(gasLimit uint64) { + params := types.DefaultParams() + params.ContractGasLimit = gasLimit + k := s.app.AppKeepers.ClockKeeper + + store := s.ctx.KVStore(k.GetStore()) + bz := k.GetCdc().MustMarshal(¶ms) + store.Set(types.ParamsKey, bz) + + s.ctx = s.ctx.WithBlockHeight(s.ctx.BlockHeight() + 1) +} + +// Call the end blocker, incrementing the block height +func (s *EndBlockerTestSuite) callEndBlocker() { + clock.EndBlocker(s.ctx, s.app.AppKeepers.ClockKeeper) + s.ctx = s.ctx.WithBlockHeight(s.ctx.BlockHeight() + 1) +} + +// Query the clock contract +func (s *EndBlockerTestSuite) queryContract(contractAddress string) int64 { + query := `{"get_config":{}}` + output, err := s.app.AppKeepers.WasmKeeper.QuerySmart(s.ctx, sdk.MustAccAddressFromBech32(contractAddress), []byte(query)) + s.Require().NoError(err) + + var val struct { + Val int64 `json:"val"` + } + + err = json.Unmarshal(output, &val) + s.Require().NoError(err) + + return val.Val +} diff --git a/x/clock/client/cli/query.go b/x/clock/client/cli/query.go new file mode 100644 index 00000000..8d74196e --- /dev/null +++ b/x/clock/client/cli/query.go @@ -0,0 +1,111 @@ +package cli + +import ( + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +func GetQueryCmd() *cobra.Command { + queryCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Querying commands for clock modules", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + queryCmd.AddCommand( + GetCmdShowContracts(), + GetCmdShowContract(), + GetCmdParams(), + ) + return queryCmd +} + +func GetCmdShowContracts() *cobra.Command { + cmd := &cobra.Command{ + Use: "contracts", + Short: "Show addresses of all current clock contracts", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, _ []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + queryClient := types.NewQueryClient(clientCtx) + + pageReq, err := client.ReadPageRequest(cmd.Flags()) + if err != nil { + return err + } + + res, err := queryClient.ClockContracts(cmd.Context(), &types.QueryClockContracts{ + Pagination: pageReq, + }) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + flags.AddQueryFlagsToCmd(cmd) + flags.AddPaginationFlagsToCmd(cmd, "contracts") + return cmd +} + +func GetCmdShowContract() *cobra.Command { + cmd := &cobra.Command{ + Use: "contract [contract_address]", + Short: "Get contract by address", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + + req := &types.QueryClockContract{ + ContractAddress: args[0], + } + + res, err := queryClient.ClockContract(cmd.Context(), req) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + flags.AddQueryFlagsToCmd(cmd) + return cmd +} + +func GetCmdParams() *cobra.Command { + cmd := &cobra.Command{ + Use: "params", + Short: "Show all module params", + Args: cobra.ExactArgs(0), + RunE: func(cmd *cobra.Command, _ []string) error { + clientCtx, err := client.GetClientQueryContext(cmd) + if err != nil { + return err + } + + queryClient := types.NewQueryClient(clientCtx) + res, err := queryClient.Params(cmd.Context(), &types.QueryParamsRequest{}) + if err != nil { + return err + } + + return clientCtx.PrintProto(res) + }, + } + flags.AddQueryFlagsToCmd(cmd) + return cmd +} diff --git a/x/clock/client/cli/tx.go b/x/clock/client/cli/tx.go new file mode 100644 index 00000000..ba039349 --- /dev/null +++ b/x/clock/client/cli/tx.go @@ -0,0 +1,132 @@ +package cli + +import ( + "github.com/spf13/cobra" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/client/flags" + "github.com/cosmos/cosmos-sdk/client/tx" + + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +// NewTxCmd returns a root CLI command handler for certain modules/Clock +// transaction commands. +func NewTxCmd() *cobra.Command { + txCmd := &cobra.Command{ + Use: types.ModuleName, + Short: "Clock subcommands.", + DisableFlagParsing: true, + SuggestionsMinimumDistance: 2, + RunE: client.ValidateCmd, + } + + txCmd.AddCommand( + NewRegisterClockContract(), + NewUnregisterClockContract(), + NewUnjailClockContract(), + ) + return txCmd +} + +// NewRegisterClockContract returns a CLI command handler for registering a +// contract for the clock module. +func NewRegisterClockContract() *cobra.Command { + cmd := &cobra.Command{ + Use: "register [contract_bech32]", + Short: "Register a clock contract.", + Long: "Register a clock contract. Sender must be admin of the contract.", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + cliCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + senderAddress := cliCtx.GetFromAddress() + contractAddress := args[0] + + msg := &types.MsgRegisterClockContract{ + SenderAddress: senderAddress.String(), + ContractAddress: contractAddress, + } + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(cliCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +// NewUnregisterClockContract returns a CLI command handler for unregistering a +// contract for the clock module. +func NewUnregisterClockContract() *cobra.Command { + cmd := &cobra.Command{ + Use: "unregister [contract_bech32]", + Short: "Unregister a clock contract.", + Long: "Unregister a clock contract. Sender must be admin of the contract.", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + cliCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + senderAddress := cliCtx.GetFromAddress() + contractAddress := args[0] + + msg := &types.MsgUnregisterClockContract{ + SenderAddress: senderAddress.String(), + ContractAddress: contractAddress, + } + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(cliCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} + +// NewUnjailClockContract returns a CLI command handler for unjailing a +// contract for the clock module. +func NewUnjailClockContract() *cobra.Command { + cmd := &cobra.Command{ + Use: "unjail [contract_bech32]", + Short: "Unjail a clock contract.", + Long: "Unjail a clock contract. Sender must be admin of the contract.", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + cliCtx, err := client.GetClientTxContext(cmd) + if err != nil { + return err + } + + senderAddress := cliCtx.GetFromAddress() + contractAddress := args[0] + + msg := &types.MsgUnjailClockContract{ + SenderAddress: senderAddress.String(), + ContractAddress: contractAddress, + } + + if err := msg.ValidateBasic(); err != nil { + return err + } + + return tx.GenerateOrBroadcastTxCLI(cliCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + return cmd +} diff --git a/x/clock/genesis.go b/x/clock/genesis.go new file mode 100644 index 00000000..660ea677 --- /dev/null +++ b/x/clock/genesis.go @@ -0,0 +1,70 @@ +package clock + +import ( + "encoding/json" + + "github.com/cosmos/cosmos-sdk/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cybercongress/go-cyber/v4/x/clock/keeper" + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +// NewGenesisState - Create a new genesis state +func NewGenesisState(params types.Params) *types.GenesisState { + return &types.GenesisState{ + Params: params, + } +} + +// DefaultGenesisState - Return a default genesis state +func DefaultGenesisState() *types.GenesisState { + return NewGenesisState(types.DefaultParams()) +} + +// GetGenesisStateFromAppState returns x/auth GenesisState given raw application +// genesis state. +func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMessage) *types.GenesisState { + var genesisState types.GenesisState + + if appState[ModuleName] != nil { + cdc.MustUnmarshalJSON(appState[ModuleName], &genesisState) + } + + return &genesisState +} + +func ValidateGenesis(data types.GenesisState) error { + err := data.Params.Validate() + if err != nil { + return err + } + + return nil +} + +// InitGenesis import module genesis +func InitGenesis( + ctx sdk.Context, + k keeper.Keeper, + data types.GenesisState, +) { + // Validate init contents + if err := ValidateGenesis(data); err != nil { + panic(err) + } + + // Set params + if err := k.SetParams(ctx, data.Params); err != nil { + panic(err) + } +} + +// ExportGenesis export module state +func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { + params := k.GetParams(ctx) + + return &types.GenesisState{ + Params: params, + } +} diff --git a/x/clock/genesis_test.go b/x/clock/genesis_test.go new file mode 100644 index 00000000..ffca7543 --- /dev/null +++ b/x/clock/genesis_test.go @@ -0,0 +1,89 @@ +package clock_test + +import ( + "fmt" + "testing" + + "github.com/stretchr/testify/suite" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cybercongress/go-cyber/v4/app" + clock "github.com/cybercongress/go-cyber/v4/x/clock" + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +type GenesisTestSuite struct { + suite.Suite + + ctx sdk.Context + + app *app.App +} + +func TestGenesisTestSuite(t *testing.T) { + suite.Run(t, new(GenesisTestSuite)) +} + +func (suite *GenesisTestSuite) SetupTest() { + app := app.Setup(suite.T()) + ctx := app.BaseApp.NewContext(false, tmproto.Header{ + ChainID: "testing", + }) + + suite.app = app + suite.ctx = ctx +} + +func (suite *GenesisTestSuite) TestClockInitGenesis() { + testCases := []struct { + name string + genesis types.GenesisState + success bool + }{ + { + "Success - Default Genesis", + *clock.DefaultGenesisState(), + true, + }, + { + "Success - Custom Genesis", + types.GenesisState{ + Params: types.Params{ + ContractGasLimit: 500_000, + }, + }, + true, + }, + { + "Fail - Invalid Gas Amount", + types.GenesisState{ + Params: types.Params{ + ContractGasLimit: 1, + }, + }, + false, + }, + } + + for _, tc := range testCases { + suite.Run(fmt.Sprintf("Case %s", tc.name), func() { + suite.SetupTest() // reset + + if tc.success { + suite.Require().NotPanics(func() { + clock.InitGenesis(suite.ctx, suite.app.AppKeepers.ClockKeeper, tc.genesis) + }) + + params := suite.app.AppKeepers.ClockKeeper.GetParams(suite.ctx) + suite.Require().Equal(tc.genesis.Params, params) + } else { + suite.Require().Panics(func() { + clock.InitGenesis(suite.ctx, suite.app.AppKeepers.ClockKeeper, tc.genesis) + }) + } + }) + } +} diff --git a/x/clock/keeper/clock.go b/x/clock/keeper/clock.go new file mode 100644 index 00000000..7b690ff1 --- /dev/null +++ b/x/clock/keeper/clock.go @@ -0,0 +1,231 @@ +package keeper + +import ( + "github.com/cosmos/cosmos-sdk/store/prefix" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/query" + + globalerrors "github.com/cybercongress/go-cyber/v4/app/helpers" + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +// Store Keys for clock contracts (both jailed and unjailed) +var ( + StoreKeyContracts = []byte("contracts") +) + +// Get the store for the clock contracts. +func (k Keeper) getContractsStore(ctx sdk.Context) prefix.Store { + return prefix.NewStore(ctx.KVStore(k.storeKey), StoreKeyContracts) +} + +// Set a clock contract address in the KV store. +func (k Keeper) SetClockContract(ctx sdk.Context, contract types.ClockContract) error { + // Get store, marshal content + store := k.getContractsStore(ctx) + bz, err := k.cdc.Marshal(&contract) + if err != nil { + return err + } + + // Set the contract + store.Set([]byte(contract.ContractAddress), bz) + return nil +} + +// Check if a clock contract address is in the KV store. +func (k Keeper) IsClockContract(ctx sdk.Context, contractAddress string) bool { + store := k.getContractsStore(ctx) + return store.Has([]byte(contractAddress)) +} + +// Get a clock contract address from the KV store. +func (k Keeper) GetClockContract(ctx sdk.Context, contractAddress string) (*types.ClockContract, error) { + // Check if the contract is registered + if !k.IsClockContract(ctx, contractAddress) { + return nil, globalerrors.ErrContractNotRegistered + } + + // Get the KV store + store := k.getContractsStore(ctx) + bz := store.Get([]byte(contractAddress)) + + // Unmarshal the contract + var contract types.ClockContract + err := k.cdc.Unmarshal(bz, &contract) + if err != nil { + return nil, err + } + + // Return the contract + return &contract, nil +} + +// Get all clock contract addresses from the KV store. +func (k Keeper) GetAllContracts(ctx sdk.Context) ([]types.ClockContract, error) { + // Get the KV store + store := k.getContractsStore(ctx) + + // Create iterator for contracts + iterator := sdk.KVStorePrefixIterator(store, []byte(nil)) + defer iterator.Close() + + // Iterate over all contracts + contracts := []types.ClockContract{} + for ; iterator.Valid(); iterator.Next() { + + // Unmarshal iterator + var contract types.ClockContract + err := k.cdc.Unmarshal(iterator.Value(), &contract) + if err != nil { + return nil, err + } + + contracts = append(contracts, contract) + } + + // Return array of contracts + return contracts, nil +} + +// Get all registered fee pay contracts +func (k Keeper) GetPaginatedContracts(ctx sdk.Context, pag *query.PageRequest) (*types.QueryClockContractsResponse, error) { + store := k.getContractsStore(ctx) + + // Filter and paginate all contracts + results, pageRes, err := query.GenericFilteredPaginate( + k.cdc, + store, + pag, + func(_ []byte, value *types.ClockContract) (*types.ClockContract, error) { + return value, nil + }, + func() *types.ClockContract { + return &types.ClockContract{} + }, + ) + if err != nil { + return nil, err + } + + // Dereference pointer array of contracts + var contracts []types.ClockContract + for _, contract := range results { + contracts = append(contracts, *contract) + } + + // Return paginated contracts + return &types.QueryClockContractsResponse{ + ClockContracts: contracts, + Pagination: pageRes, + }, nil +} + +// Remove a clock contract address from the KV store. +func (k Keeper) RemoveContract(ctx sdk.Context, contractAddress string) { + store := k.getContractsStore(ctx) + key := []byte(contractAddress) + + if store.Has(key) { + store.Delete(key) + } +} + +// Register a clock contract address in the KV store. +func (k Keeper) RegisterContract(ctx sdk.Context, senderAddress string, contractAddress string) error { + // Check if the contract is already registered + if k.IsClockContract(ctx, contractAddress) { + return globalerrors.ErrContractAlreadyRegistered + } + + // Ensure the sender is the contract admin or creator + if ok, err := k.IsContractManager(ctx, senderAddress, contractAddress); !ok { + return err + } + + // Register contract + return k.SetClockContract(ctx, types.ClockContract{ + ContractAddress: contractAddress, + IsJailed: false, + }) +} + +// Unregister a clock contract from either the jailed or unjailed KV store. +func (k Keeper) UnregisterContract(ctx sdk.Context, senderAddress string, contractAddress string) error { + // Check if the contract is registered in either store + if !k.IsClockContract(ctx, contractAddress) { + return globalerrors.ErrContractNotRegistered + } + + // Ensure the sender is the contract admin or creator + if ok, err := k.IsContractManager(ctx, senderAddress, contractAddress); !ok { + return err + } + + // Remove contract from both stores + k.RemoveContract(ctx, contractAddress) + return nil +} + +// Set the jail status of a clock contract in the KV store. +func (k Keeper) SetJailStatus(ctx sdk.Context, contractAddress string, isJailed bool) error { + // Get the contract + contract, err := k.GetClockContract(ctx, contractAddress) + if err != nil { + return err + } + + // Check if the contract is already jailed or unjailed + if contract.IsJailed == isJailed { + if isJailed { + return types.ErrContractAlreadyJailed + } + + return types.ErrContractNotJailed + } + + // Set the jail status + contract.IsJailed = isJailed + + // Set the contract + return k.SetClockContract(ctx, *contract) +} + +// Set the jail status of a clock contract by the sender address. +func (k Keeper) SetJailStatusBySender(ctx sdk.Context, senderAddress string, contractAddress string, jailStatus bool) error { + // Ensure the sender is the contract admin or creator + if ok, err := k.IsContractManager(ctx, senderAddress, contractAddress); !ok { + return err + } + + return k.SetJailStatus(ctx, contractAddress, jailStatus) +} + +// Check if the sender is the designated contract manager for the FeePay contract. If +// an admin is present, they are considered the manager. If there is no admin, the +// contract creator is considered the manager. +func (k Keeper) IsContractManager(ctx sdk.Context, senderAddress string, contractAddress string) (bool, error) { + contractAddr := sdk.MustAccAddressFromBech32(contractAddress) + + // Ensure the contract is a cosm wasm contract + if ok := k.wasmKeeper.HasContractInfo(ctx, contractAddr); !ok { + return false, globalerrors.ErrInvalidCWContract + } + + // Get the contract info + contractInfo := k.wasmKeeper.GetContractInfo(ctx, contractAddr) + + // Flags for admin existence & sender being admin/creator + adminExists := len(contractInfo.Admin) > 0 + isSenderAdmin := contractInfo.Admin == senderAddress + isSenderCreator := contractInfo.Creator == senderAddress + + // Check if the sender is the admin or creator + if adminExists && !isSenderAdmin { + return false, globalerrors.ErrContractNotAdmin + } else if !adminExists && !isSenderCreator { + return false, globalerrors.ErrContractNotCreator + } + + return true, nil +} diff --git a/x/clock/keeper/keeper.go b/x/clock/keeper/keeper.go new file mode 100644 index 00000000..380cf9e5 --- /dev/null +++ b/x/clock/keeper/keeper.go @@ -0,0 +1,91 @@ +package keeper + +import ( + wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper" + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + + "github.com/cometbft/cometbft/libs/log" + + "github.com/cosmos/cosmos-sdk/codec" + storetypes "github.com/cosmos/cosmos-sdk/store/types" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +// Keeper of the clock store +type Keeper struct { + storeKey storetypes.StoreKey + cdc codec.BinaryCodec + + wasmKeeper wasmkeeper.Keeper + contractKeeper wasmtypes.ContractOpsKeeper + + authority string +} + +func NewKeeper( + key storetypes.StoreKey, + cdc codec.BinaryCodec, + wasmKeeper wasmkeeper.Keeper, + contractKeeper wasmtypes.ContractOpsKeeper, + authority string, +) Keeper { + return Keeper{ + cdc: cdc, + storeKey: key, + wasmKeeper: wasmKeeper, + contractKeeper: contractKeeper, + authority: authority, + } +} + +// Logger returns a module-specific logger. +func (k Keeper) Logger(ctx sdk.Context) log.Logger { + return ctx.Logger().With("module", "x/"+types.ModuleName) +} + +// GetAuthority returns the x/clock module's authority. +func (k Keeper) GetAuthority() string { + return k.authority +} + +// SetParams sets the x/clock module parameters. +func (k Keeper) SetParams(ctx sdk.Context, p types.Params) error { + if err := p.Validate(); err != nil { + return err + } + + store := ctx.KVStore(k.storeKey) + bz := k.cdc.MustMarshal(&p) + store.Set(types.ParamsKey, bz) + + return nil +} + +// GetParams returns the current x/clock module parameters. +func (k Keeper) GetParams(ctx sdk.Context) (p types.Params) { + store := ctx.KVStore(k.storeKey) + bz := store.Get(types.ParamsKey) + if bz == nil { + return p + } + + k.cdc.MustUnmarshal(bz, &p) + return p +} + +// GetContractKeeper returns the x/wasm module's contract keeper. +func (k Keeper) GetContractKeeper() wasmtypes.ContractOpsKeeper { + return k.contractKeeper +} + +// GetCdc returns the x/clock module's codec. +func (k Keeper) GetCdc() codec.BinaryCodec { + return k.cdc +} + +// GetStore returns the x/clock module's store key. +func (k Keeper) GetStore() storetypes.StoreKey { + return k.storeKey +} diff --git a/x/clock/keeper/keeper_test.go b/x/clock/keeper/keeper_test.go new file mode 100644 index 00000000..a84f85c9 --- /dev/null +++ b/x/clock/keeper/keeper_test.go @@ -0,0 +1,137 @@ +package keeper_test + +import ( + "crypto/sha256" + "testing" + "time" + + wasmtypes "github.com/CosmWasm/wasmd/x/wasm/types" + "github.com/stretchr/testify/suite" + + _ "embed" + + tmproto "github.com/cometbft/cometbft/proto/tendermint/types" + + "github.com/cosmos/cosmos-sdk/baseapp" + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + bankkeeper "github.com/cosmos/cosmos-sdk/x/bank/keeper" + minttypes "github.com/cosmos/cosmos-sdk/x/mint/types" + + "github.com/cybercongress/go-cyber/v4/app" + "github.com/cybercongress/go-cyber/v4/x/clock/keeper" + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +type IntegrationTestSuite struct { + suite.Suite + + ctx sdk.Context + app *app.App + bankKeeper bankkeeper.Keeper + queryClient types.QueryClient + clockMsgServer types.MsgServer +} + +func (s *IntegrationTestSuite) SetupTest() { + isCheckTx := false + s.app = app.Setup(s.T()) + + s.ctx = s.app.BaseApp.NewContext(isCheckTx, tmproto.Header{ + ChainID: "testing", + Height: 1, + Time: time.Now().UTC(), + }) + + queryHelper := baseapp.NewQueryServerTestHelper(s.ctx, s.app.InterfaceRegistry()) + types.RegisterQueryServer(queryHelper, keeper.NewQuerier(s.app.AppKeepers.ClockKeeper)) + + s.queryClient = types.NewQueryClient(queryHelper) + s.bankKeeper = s.app.AppKeepers.BankKeeper + s.clockMsgServer = keeper.NewMsgServerImpl(s.app.AppKeepers.ClockKeeper) +} + +func (s *IntegrationTestSuite) FundAccount(ctx sdk.Context, addr sdk.AccAddress, amounts sdk.Coins) error { + if err := s.bankKeeper.MintCoins(ctx, minttypes.ModuleName, amounts); err != nil { + return err + } + + return s.bankKeeper.SendCoinsFromModuleToAccount(ctx, minttypes.ModuleName, addr, amounts) +} + +func TestKeeperTestSuite(t *testing.T) { + suite.Run(t, new(IntegrationTestSuite)) +} + +//go:embed testdata/clock_example.wasm +var wasmContract []byte + +func (s *IntegrationTestSuite) StoreCode() { + _, _, sender := testdata.KeyTestPubAddr() + msg := wasmtypes.MsgStoreCodeFixture(func(m *wasmtypes.MsgStoreCode) { + m.WASMByteCode = wasmContract + m.Sender = sender.String() + }) + rsp, err := s.app.MsgServiceRouter().Handler(msg)(s.ctx, msg) + s.Require().NoError(err) + var result wasmtypes.MsgStoreCodeResponse + s.Require().NoError(s.app.AppCodec().Unmarshal(rsp.Data, &result)) + s.Require().Equal(uint64(1), result.CodeID) + expHash := sha256.Sum256(wasmContract) + s.Require().Equal(expHash[:], result.Checksum) + // and + info := s.app.AppKeepers.WasmKeeper.GetCodeInfo(s.ctx, 1) + s.Require().NotNil(info) + s.Require().Equal(expHash[:], info.CodeHash) + s.Require().Equal(sender.String(), info.Creator) + s.Require().Equal(wasmtypes.DefaultParams().InstantiateDefaultPermission.With(sender), info.InstantiateConfig) +} + +func (s *IntegrationTestSuite) InstantiateContract(sender string, admin string) string { + msgStoreCode := wasmtypes.MsgStoreCodeFixture(func(m *wasmtypes.MsgStoreCode) { + m.WASMByteCode = wasmContract + m.Sender = sender + }) + _, err := s.app.MsgServiceRouter().Handler(msgStoreCode)(s.ctx, msgStoreCode) + s.Require().NoError(err) + + msgInstantiate := wasmtypes.MsgInstantiateContractFixture(func(m *wasmtypes.MsgInstantiateContract) { + m.Sender = sender + m.Admin = admin + m.Msg = []byte(`{}`) + }) + resp, err := s.app.MsgServiceRouter().Handler(msgInstantiate)(s.ctx, msgInstantiate) + s.Require().NoError(err) + var result wasmtypes.MsgInstantiateContractResponse + s.Require().NoError(s.app.AppCodec().Unmarshal(resp.Data, &result)) + contractInfo := s.app.AppKeepers.WasmKeeper.GetContractInfo(s.ctx, sdk.MustAccAddressFromBech32(result.Address)) + s.Require().Equal(contractInfo.CodeID, uint64(1)) + s.Require().Equal(contractInfo.Admin, admin) + s.Require().Equal(contractInfo.Creator, sender) + + return result.Address +} + +// Helper method for quickly registering a clock contract +func (s *IntegrationTestSuite) RegisterClockContract(senderAddress string, contractAddress string) { + err := s.app.AppKeepers.ClockKeeper.RegisterContract(s.ctx, senderAddress, contractAddress) + s.Require().NoError(err) +} + +// Helper method for quickly unregistering a clock contract +func (s *IntegrationTestSuite) UnregisterClockContract(senderAddress string, contractAddress string) { + err := s.app.AppKeepers.ClockKeeper.UnregisterContract(s.ctx, senderAddress, contractAddress) + s.Require().NoError(err) +} + +// Helper method for quickly jailing a clock contract +func (s *IntegrationTestSuite) JailClockContract(contractAddress string) { + err := s.app.AppKeepers.ClockKeeper.SetJailStatus(s.ctx, contractAddress, true) + s.Require().NoError(err) +} + +// Helper method for quickly unjailing a clock contract +func (s *IntegrationTestSuite) UnjailClockContract(senderAddress string, contractAddress string) { + err := s.app.AppKeepers.ClockKeeper.SetJailStatusBySender(s.ctx, senderAddress, contractAddress, false) + s.Require().NoError(err) +} diff --git a/x/clock/keeper/msg_server.go b/x/clock/keeper/msg_server.go new file mode 100644 index 00000000..8ff4ff38 --- /dev/null +++ b/x/clock/keeper/msg_server.go @@ -0,0 +1,75 @@ +package keeper + +import ( + "context" + + errorsmod "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + govtypes "github.com/cosmos/cosmos-sdk/x/gov/types" + + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +var _ types.MsgServer = &msgServer{} + +// msgServer is a wrapper of Keeper. +type msgServer struct { + Keeper +} + +// NewMsgServerImpl returns an implementation of the x/clock MsgServer interface. +func NewMsgServerImpl(k Keeper) types.MsgServer { + return &msgServer{ + Keeper: k, + } +} + +// RegisterClockContract handles incoming transactions to register clock contracts. +func (k msgServer) RegisterClockContract(goCtx context.Context, req *types.MsgRegisterClockContract) (*types.MsgRegisterClockContractResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // Validate request + if err := req.ValidateBasic(); err != nil { + return nil, err + } + + return &types.MsgRegisterClockContractResponse{}, k.RegisterContract(ctx, req.SenderAddress, req.ContractAddress) +} + +// UnregisterClockContract handles incoming transactions to unregister clock contracts. +func (k msgServer) UnregisterClockContract(goCtx context.Context, req *types.MsgUnregisterClockContract) (*types.MsgUnregisterClockContractResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // Validate request + if err := req.ValidateBasic(); err != nil { + return nil, err + } + + return &types.MsgUnregisterClockContractResponse{}, k.UnregisterContract(ctx, req.SenderAddress, req.ContractAddress) +} + +// UnjailClockContract handles incoming transactions to unjail clock contracts. +func (k msgServer) UnjailClockContract(goCtx context.Context, req *types.MsgUnjailClockContract) (*types.MsgUnjailClockContractResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // Validate request + if err := req.ValidateBasic(); err != nil { + return nil, err + } + + return &types.MsgUnjailClockContractResponse{}, k.SetJailStatusBySender(ctx, req.SenderAddress, req.ContractAddress, false) +} + +func (k msgServer) UpdateParams(goCtx context.Context, req *types.MsgUpdateParams) (*types.MsgUpdateParamsResponse, error) { + if k.authority != req.Authority { + return nil, errorsmod.Wrapf(govtypes.ErrInvalidSigner, "invalid authority; expected %s, got %s", k.authority, req.Authority) + } + + ctx := sdk.UnwrapSDKContext(goCtx) + if err := k.SetParams(ctx, req.Params); err != nil { + return nil, err + } + + return &types.MsgUpdateParamsResponse{}, nil +} diff --git a/x/clock/keeper/msg_server_test.go b/x/clock/keeper/msg_server_test.go new file mode 100644 index 00000000..882ea68b --- /dev/null +++ b/x/clock/keeper/msg_server_test.go @@ -0,0 +1,323 @@ +package keeper_test + +import ( + _ "embed" + + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +// Test register clock contract. +func (s *IntegrationTestSuite) TestRegisterClockContract() { + _, _, addr := testdata.KeyTestPubAddr() + _, _, addr2 := testdata.KeyTestPubAddr() + _ = s.FundAccount(s.ctx, addr, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1_000_000)))) + + // Store code + s.StoreCode() + contractAddress := s.InstantiateContract(addr.String(), "") + contractAddressWithAdmin := s.InstantiateContract(addr.String(), addr2.String()) + + for _, tc := range []struct { + desc string + sender string + contract string + isJailed bool + success bool + }{ + { + desc: "Success - Register Contract", + sender: addr.String(), + contract: contractAddress, + success: true, + }, + { + desc: "Success - Register Contract With Admin", + sender: addr2.String(), + contract: contractAddressWithAdmin, + success: true, + }, + { + desc: "Fail - Register Contract With Admin, But With Creator Addr", + sender: addr.String(), + contract: contractAddressWithAdmin, + success: false, + }, + { + desc: "Error - Invalid Sender", + sender: addr2.String(), + contract: contractAddress, + success: false, + }, + { + desc: "Fail - Invalid Contract Address", + sender: addr.String(), + contract: "Invalid", + success: false, + }, + { + desc: "Fail - Invalid Sender Address", + sender: "Invalid", + contract: contractAddress, + success: false, + }, + { + desc: "Fail - Contract Already Jailed", + sender: addr.String(), + contract: contractAddress, + isJailed: true, + success: false, + }, + } { + tc := tc + s.Run(tc.desc, func() { + // Set params + params := types.DefaultParams() + err := s.app.AppKeepers.ClockKeeper.SetParams(s.ctx, params) + s.Require().NoError(err) + + // Jail contract if needed + if tc.isJailed { + s.RegisterClockContract(tc.sender, tc.contract) + err := s.app.AppKeepers.ClockKeeper.SetJailStatus(s.ctx, tc.contract, true) + s.Require().NoError(err) + } + + // Try to register contract + res, err := s.clockMsgServer.RegisterClockContract(s.ctx, &types.MsgRegisterClockContract{ + SenderAddress: tc.sender, + ContractAddress: tc.contract, + }) + + if !tc.success { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().Equal(res, &types.MsgRegisterClockContractResponse{}) + } + + // Ensure contract is unregistered + s.app.AppKeepers.ClockKeeper.RemoveContract(s.ctx, contractAddress) + s.app.AppKeepers.ClockKeeper.RemoveContract(s.ctx, contractAddressWithAdmin) + }) + } +} + +// Test standard unregistration of clock contracts. +func (s *IntegrationTestSuite) TestUnregisterClockContract() { + _, _, addr := testdata.KeyTestPubAddr() + _, _, addr2 := testdata.KeyTestPubAddr() + _ = s.FundAccount(s.ctx, addr, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1_000_000)))) + + s.StoreCode() + contractAddress := s.InstantiateContract(addr.String(), "") + contractAddressWithAdmin := s.InstantiateContract(addr.String(), addr2.String()) + + for _, tc := range []struct { + desc string + sender string + contract string + success bool + }{ + { + desc: "Success - Unregister Contract", + sender: addr.String(), + contract: contractAddress, + success: true, + }, + { + desc: "Success - Unregister Contract With Admin", + sender: addr2.String(), + contract: contractAddressWithAdmin, + success: true, + }, + { + desc: "Fail - Unregister Contract With Admin, But With Creator Addr", + sender: addr.String(), + contract: contractAddressWithAdmin, + success: false, + }, + { + desc: "Error - Invalid Sender", + sender: addr2.String(), + contract: contractAddress, + success: false, + }, + { + desc: "Fail - Invalid Contract Address", + sender: addr.String(), + contract: "Invalid", + success: false, + }, + { + desc: "Fail - Invalid Sender Address", + sender: "Invalid", + contract: contractAddress, + success: false, + }, + } { + tc := tc + s.Run(tc.desc, func() { + s.RegisterClockContract(addr.String(), contractAddress) + s.RegisterClockContract(addr2.String(), contractAddressWithAdmin) + + // Set params + params := types.DefaultParams() + err := s.app.AppKeepers.ClockKeeper.SetParams(s.ctx, params) + s.Require().NoError(err) + + // Try to register all contracts + res, err := s.clockMsgServer.UnregisterClockContract(s.ctx, &types.MsgUnregisterClockContract{ + SenderAddress: tc.sender, + ContractAddress: tc.contract, + }) + + if !tc.success { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().Equal(res, &types.MsgUnregisterClockContractResponse{}) + } + + // Ensure contract is unregistered + s.app.AppKeepers.ClockKeeper.RemoveContract(s.ctx, contractAddress) + s.app.AppKeepers.ClockKeeper.RemoveContract(s.ctx, contractAddressWithAdmin) + }) + } +} + +// Test duplicate register/unregister clock contracts. +func (s *IntegrationTestSuite) TestDuplicateRegistrationChecks() { + _, _, addr := testdata.KeyTestPubAddr() + _ = s.FundAccount(s.ctx, addr, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1_000_000)))) + + s.StoreCode() + contractAddress := s.InstantiateContract(addr.String(), "") + + // Test double register, first succeed, second fail + _, err := s.clockMsgServer.RegisterClockContract(s.ctx, &types.MsgRegisterClockContract{ + SenderAddress: addr.String(), + ContractAddress: contractAddress, + }) + s.Require().NoError(err) + + _, err = s.clockMsgServer.RegisterClockContract(s.ctx, &types.MsgRegisterClockContract{ + SenderAddress: addr.String(), + ContractAddress: contractAddress, + }) + s.Require().Error(err) + + // Test double unregister, first succeed, second fail + _, err = s.clockMsgServer.UnregisterClockContract(s.ctx, &types.MsgUnregisterClockContract{ + SenderAddress: addr.String(), + ContractAddress: contractAddress, + }) + s.Require().NoError(err) + + _, err = s.clockMsgServer.UnregisterClockContract(s.ctx, &types.MsgUnregisterClockContract{ + SenderAddress: addr.String(), + ContractAddress: contractAddress, + }) + s.Require().Error(err) +} + +// Test unjailing clock contracts. +func (s *IntegrationTestSuite) TestUnjailClockContract() { + _, _, addr := testdata.KeyTestPubAddr() + _, _, addr2 := testdata.KeyTestPubAddr() + _ = s.FundAccount(s.ctx, addr, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1_000_000)))) + + s.StoreCode() + contractAddress := s.InstantiateContract(addr.String(), "") + contractAddressWithAdmin := s.InstantiateContract(addr.String(), addr2.String()) + + for _, tc := range []struct { + desc string + sender string + contract string + unjail bool + success bool + }{ + { + desc: "Success - Unjail Contract", + sender: addr.String(), + contract: contractAddress, + success: true, + }, + { + desc: "Success - Unjail Contract With Admin", + sender: addr2.String(), + contract: contractAddressWithAdmin, + success: true, + }, + { + desc: "Fail - Unjail Contract With Admin, But With Creator Addr", + sender: addr.String(), + contract: contractAddressWithAdmin, + success: false, + }, + { + desc: "Error - Invalid Sender", + sender: addr2.String(), + contract: contractAddress, + success: false, + }, + { + desc: "Fail - Invalid Contract Address", + sender: addr.String(), + contract: "Invalid", + success: false, + }, + { + desc: "Fail - Invalid Sender Address", + sender: "Invalid", + contract: contractAddress, + success: false, + }, + { + desc: "Fail - Contract Not Jailed", + sender: addr.String(), + contract: contractAddress, + unjail: true, + success: false, + }, + } { + tc := tc + s.Run(tc.desc, func() { + s.RegisterClockContract(addr.String(), contractAddress) + s.JailClockContract(contractAddress) + s.RegisterClockContract(addr2.String(), contractAddressWithAdmin) + s.JailClockContract(contractAddressWithAdmin) + + // Unjail contract if needed + if tc.unjail { + s.UnjailClockContract(addr.String(), contractAddress) + s.UnjailClockContract(addr2.String(), contractAddressWithAdmin) + } + + // Set params + params := types.DefaultParams() + err := s.app.AppKeepers.ClockKeeper.SetParams(s.ctx, params) + s.Require().NoError(err) + + // Try to register all contracts + res, err := s.clockMsgServer.UnjailClockContract(s.ctx, &types.MsgUnjailClockContract{ + SenderAddress: tc.sender, + ContractAddress: tc.contract, + }) + + if !tc.success { + s.Require().Error(err) + } else { + s.Require().NoError(err) + s.Require().Equal(res, &types.MsgUnjailClockContractResponse{}) + } + + // Ensure contract is unregistered + s.app.AppKeepers.ClockKeeper.RemoveContract(s.ctx, contractAddress) + s.app.AppKeepers.ClockKeeper.RemoveContract(s.ctx, contractAddressWithAdmin) + }) + } +} diff --git a/x/clock/keeper/querier.go b/x/clock/keeper/querier.go new file mode 100644 index 00000000..c90c7cc3 --- /dev/null +++ b/x/clock/keeper/querier.go @@ -0,0 +1,64 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + + globalerrors "github.com/cybercongress/go-cyber/v4/app/helpers" + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +var _ types.QueryServer = &Querier{} + +type Querier struct { + keeper Keeper +} + +func NewQuerier(k Keeper) Querier { + return Querier{ + keeper: k, + } +} + +// ContractModules returns contract addresses which are using the clock +func (q Querier) ClockContracts(stdCtx context.Context, req *types.QueryClockContracts) (*types.QueryClockContractsResponse, error) { + ctx := sdk.UnwrapSDKContext(stdCtx) + + contracts, err := q.keeper.GetPaginatedContracts(ctx, req.Pagination) + if err != nil { + return nil, err + } + + return contracts, nil +} + +// ClockContract returns the clock contract information +func (q Querier) ClockContract(stdCtx context.Context, req *types.QueryClockContract) (*types.QueryClockContractResponse, error) { + ctx := sdk.UnwrapSDKContext(stdCtx) + + // Ensure the contract address is valid + if _, err := sdk.AccAddressFromBech32(req.ContractAddress); err != nil { + return nil, globalerrors.ErrInvalidAddress + } + + contract, err := q.keeper.GetClockContract(ctx, req.ContractAddress) + if err != nil { + return nil, err + } + + return &types.QueryClockContractResponse{ + ClockContract: *contract, + }, nil +} + +// Params returns the total set of clock parameters. +func (q Querier) Params(stdCtx context.Context, _ *types.QueryParamsRequest) (*types.QueryParamsResponse, error) { + ctx := sdk.UnwrapSDKContext(stdCtx) + + p := q.keeper.GetParams(ctx) + + return &types.QueryParamsResponse{ + Params: &p, + }, nil +} diff --git a/x/clock/keeper/querier_test.go b/x/clock/keeper/querier_test.go new file mode 100644 index 00000000..fffdc890 --- /dev/null +++ b/x/clock/keeper/querier_test.go @@ -0,0 +1,234 @@ +package keeper_test + +import ( + "github.com/cosmos/cosmos-sdk/testutil/testdata" + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +// Query Clock Params +func (s *IntegrationTestSuite) TestQueryClockParams() { + for _, tc := range []struct { + desc string + params types.Params + }{ + { + desc: "On default", + params: types.DefaultParams(), + }, + { + desc: "On 500_000", + params: types.Params{ + ContractGasLimit: 500_000, + }, + }, + { + desc: "On 1_000_000", + params: types.Params{ + ContractGasLimit: 1_000_000, + }, + }, + } { + tc := tc + s.Run(tc.desc, func() { + // Set params + err := s.app.AppKeepers.ClockKeeper.SetParams(s.ctx, tc.params) + s.Require().NoError(err) + + // Query params + goCtx := sdk.WrapSDKContext(s.ctx) + resp, err := s.queryClient.Params(goCtx, &types.QueryParamsRequest{}) + + // Response check + s.Require().NoError(err) + s.Require().NotNil(resp) + s.Require().Equal(tc.params, *resp.Params) + }) + } +} + +// Query Clock Contracts +func (s *IntegrationTestSuite) TestQueryClockContracts() { + _, _, addr := testdata.KeyTestPubAddr() + _ = s.FundAccount(s.ctx, addr, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1_000_000)))) + + s.StoreCode() + + for _, tc := range []struct { + desc string + contracts []string + }{ + { + desc: "On empty", + contracts: []string(nil), + }, + { + desc: "On Single", + contracts: []string{ + s.InstantiateContract(addr.String(), ""), + }, + }, + { + desc: "On Multiple", + contracts: []string{ + s.InstantiateContract(addr.String(), ""), + s.InstantiateContract(addr.String(), ""), + s.InstantiateContract(addr.String(), ""), + }, + }, + } { + tc := tc + s.Run(tc.desc, func() { + // Loop through contracts & register + for _, contract := range tc.contracts { + s.RegisterClockContract(addr.String(), contract) + } + + // Contracts check + goCtx := sdk.WrapSDKContext(s.ctx) + resp, err := s.queryClient.ClockContracts(goCtx, &types.QueryClockContracts{}) + + // Response check + s.Require().NoError(err) + s.Require().NotNil(resp) + for _, contract := range resp.ClockContracts { + s.Require().Contains(tc.contracts, contract.ContractAddress) + s.Require().False(contract.IsJailed) + } + + // Remove all contracts + for _, contract := range tc.contracts { + s.app.AppKeepers.ClockKeeper.RemoveContract(s.ctx, contract) + } + }) + } +} + +// Query Jailed Clock Contracts +func (s *IntegrationTestSuite) TestQueryJailedClockContracts() { + _, _, addr := testdata.KeyTestPubAddr() + _ = s.FundAccount(s.ctx, addr, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1_000_000)))) + + s.StoreCode() + + for _, tc := range []struct { + desc string + contracts []string + }{ + { + desc: "On empty", + contracts: []string(nil), + }, + { + desc: "On Single", + contracts: []string{ + s.InstantiateContract(addr.String(), ""), + }, + }, + { + desc: "On Multiple", + contracts: []string{ + s.InstantiateContract(addr.String(), ""), + s.InstantiateContract(addr.String(), ""), + s.InstantiateContract(addr.String(), ""), + }, + }, + } { + tc := tc + s.Run(tc.desc, func() { + // Loop through contracts & register + for _, contract := range tc.contracts { + s.RegisterClockContract(addr.String(), contract) + s.JailClockContract(contract) + } + + // Contracts check + goCtx := sdk.WrapSDKContext(s.ctx) + resp, err := s.queryClient.ClockContracts(goCtx, &types.QueryClockContracts{}) + + // Response check + s.Require().NoError(err) + s.Require().NotNil(resp) + for _, contract := range resp.ClockContracts { + s.Require().Contains(tc.contracts, contract.ContractAddress) + s.Require().True(contract.IsJailed) + } + + // Remove all contracts + for _, contract := range tc.contracts { + s.app.AppKeepers.ClockKeeper.RemoveContract(s.ctx, contract) + } + }) + } +} + +// Query Clock Contract +func (s *IntegrationTestSuite) TestQueryClockContract() { + _, _, addr := testdata.KeyTestPubAddr() + _ = s.FundAccount(s.ctx, addr, sdk.NewCoins(sdk.NewCoin("stake", sdk.NewInt(1_000_000)))) + _, _, invalidAddr := testdata.KeyTestPubAddr() + + s.StoreCode() + + unjailedContract := s.InstantiateContract(addr.String(), "") + _ = s.app.AppKeepers.ClockKeeper.SetClockContract(s.ctx, types.ClockContract{ + ContractAddress: unjailedContract, + IsJailed: false, + }) + + jailedContract := s.InstantiateContract(addr.String(), "") + _ = s.app.AppKeepers.ClockKeeper.SetClockContract(s.ctx, types.ClockContract{ + ContractAddress: jailedContract, + IsJailed: true, + }) + + for _, tc := range []struct { + desc string + contract string + isJailed bool + success bool + }{ + { + desc: "On Unjailed", + contract: unjailedContract, + isJailed: false, + success: true, + }, + { + desc: "On Jailed", + contract: jailedContract, + isJailed: true, + success: true, + }, + { + desc: "Invalid Contract - Unjailed", + contract: invalidAddr.String(), + isJailed: false, + success: false, + }, + { + desc: "Invalid Contract - Jailed", + contract: invalidAddr.String(), + isJailed: true, + success: false, + }, + } { + tc := tc + s.Run(tc.desc, func() { + // Query contract + resp, err := s.queryClient.ClockContract(s.ctx, &types.QueryClockContract{ + ContractAddress: tc.contract, + }) + + // Validate responses + if tc.success { + s.Require().NoError(err) + s.Require().Equal(resp.ClockContract.ContractAddress, tc.contract) + s.Require().Equal(resp.ClockContract.IsJailed, tc.isJailed) + } else { + s.Require().Error(err) + } + }) + } +} diff --git a/x/clock/module.go b/x/clock/module.go new file mode 100644 index 00000000..a191ee99 --- /dev/null +++ b/x/clock/module.go @@ -0,0 +1,155 @@ +package clock + +import ( + "context" + "encoding/json" + + "github.com/gorilla/mux" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/spf13/cobra" + + abci "github.com/cometbft/cometbft/abci/types" + + errorsmod "cosmossdk.io/errors" + + "github.com/cosmos/cosmos-sdk/client" + "github.com/cosmos/cosmos-sdk/codec" + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/module" + + "github.com/cybercongress/go-cyber/v4/x/clock/client/cli" + "github.com/cybercongress/go-cyber/v4/x/clock/keeper" + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +const ( + ModuleName = types.ModuleName + + // ConsensusVersion defines the current x/clock module consensus version. + ConsensusVersion = 1 +) + +var ( + _ module.AppModuleBasic = AppModuleBasic{} + _ module.AppModuleGenesis = AppModule{} + _ module.AppModule = AppModule{} +) + +// AppModuleBasic defines the basic application module used by the wasm module. +type AppModuleBasic struct { + cdc codec.Codec +} + +func (a AppModuleBasic) Name() string { + return types.ModuleName +} + +func (a AppModuleBasic) DefaultGenesis(cdc codec.JSONCodec) json.RawMessage { + return cdc.MustMarshalJSON(&types.GenesisState{ + Params: types.DefaultParams(), + }) +} + +func (a AppModuleBasic) ValidateGenesis(marshaler codec.JSONCodec, _ client.TxEncodingConfig, message json.RawMessage) error { + var data types.GenesisState + err := marshaler.UnmarshalJSON(message, &data) + if err != nil { + return err + } + if err := data.Params.Validate(); err != nil { + return errorsmod.Wrap(err, "params") + } + return nil +} + +func (a AppModuleBasic) RegisterRESTRoutes(_ client.Context, _ *mux.Router) { +} + +func (a AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *runtime.ServeMux) { + err := types.RegisterQueryHandlerClient(context.Background(), mux, types.NewQueryClient(clientCtx)) + if err != nil { + // same behavior as in cosmos-sdk + panic(err) + } +} + +func (a AppModuleBasic) GetTxCmd() *cobra.Command { + return cli.NewTxCmd() +} + +func (a AppModuleBasic) GetQueryCmd() *cobra.Command { + return cli.GetQueryCmd() +} + +func (AppModuleBasic) RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + types.RegisterLegacyAminoCodec(cdc) +} + +func (a AppModuleBasic) RegisterInterfaces(r codectypes.InterfaceRegistry) { + types.RegisterInterfaces(r) +} + +type AppModule struct { + AppModuleBasic + + keeper keeper.Keeper +} + +// NewAppModule constructor +func NewAppModule( + cdc codec.Codec, + keeper keeper.Keeper, +) *AppModule { + return &AppModule{ + AppModuleBasic: AppModuleBasic{cdc: cdc}, + keeper: keeper, + } +} + +func (a AppModule) QuerierRoute() string { + return types.QuerierRoute +} + +func (a AppModule) RegisterServices(cfg module.Configurator) { + types.RegisterMsgServer(cfg.MsgServer(), keeper.NewMsgServerImpl(a.keeper)) + types.RegisterQueryServer(cfg.QueryServer(), keeper.NewQuerier(a.keeper)) +} + +func (a AppModule) RegisterInvariants(_ sdk.InvariantRegistry) { +} + +func (a AppModule) InitGenesis(ctx sdk.Context, marshaler codec.JSONCodec, message json.RawMessage) []abci.ValidatorUpdate { + var genesisState types.GenesisState + marshaler.MustUnmarshalJSON(message, &genesisState) + _ = a.keeper.SetParams(ctx, genesisState.Params) + return nil +} + +func (a AppModule) ExportGenesis(ctx sdk.Context, marshaler codec.JSONCodec) json.RawMessage { + genState := ExportGenesis(ctx, a.keeper) + return marshaler.MustMarshalJSON(genState) +} + +// ConsensusVersion is a sequence number for state-breaking change of the +// module. It should be incremented on each consensus-breaking change +// introduced by the module. To avoid wrong/empty versions, the initial version +// should be set to 1. +func (a AppModule) ConsensusVersion() uint64 { + return ConsensusVersion +} + +func (a AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { + BeginBlocker(ctx, a.keeper) +} + +func (a AppModule) EndBlock(ctx sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { + EndBlocker(ctx, a.keeper) + return nil +} + +// IsOnePerModuleType implements the depinject.OnePerModuleType interface. +func (am AppModule) IsOnePerModuleType() {} + +// IsAppModule implements the appmodule.AppModule interface. +func (am AppModule) IsAppModule() {} diff --git a/x/clock/spec/01_concepts.md b/x/clock/spec/01_concepts.md new file mode 100644 index 00000000..8a9ada6f --- /dev/null +++ b/x/clock/spec/01_concepts.md @@ -0,0 +1,45 @@ + + +# Concepts + +## Clock + +The Clock module allows registered contracts to be executed at the end of every block. This allows the smart contract to perform regular and routine actions without the need for external bots. Developers can setup their contract with x/Clock by registering their contract with the module. Once registered, the contract will be executed at the end of every block. If the contract throws an error during execution or exceeds the gas limit defined in the module's parameters, the contract will be jailed and no longer executed. The contract can be unjailed by the contract admin. + +## Registering a Contract + +Register a contract with x/Clock by executing the following transaction: + +```bash +junod tx clock register [contract_address] +``` + +> Note: the sender of this transaction must be the contract admin, if exists, or else the contract creator. + +The `contract_address` is the bech32 address of the contract to be executed at the end of every block. Once registered, the contract will be executed at the end of every block. Please ensure that your contract follows the guidelines outlined in [Integration](03_integration.md). + +## Unjailing a Contract + +A contract can be unjailed by executing the following transaction: + +```bash +junod tx clock unjail [contract_address] +``` + +> Note: the sender of this transaction must be the contract admin, if exists, or else the contract creator. + +The `contract_address` is the bech32 address of the contract to be unjailed. Unjailing a contract will allow it to be executed at the end of every block. If your contract becomes jailed, please see [Integration](03_integration.md) to ensure the contract is setup with a Sudo message. + +## Unregistering a Contract + +A contract can be unregistered by executing the following transaction: + +```bash +junod tx clock unregister [contract_address] +``` + +> Note: the sender of this transaction must be the contract admin, if exists, or else the contract creator. + +The `contract_address` is the bech32 address of the contract to be unregistered. Unregistering a contract will remove it from the Clock module. This means that the contract will no longer be executed at the end of every block. \ No newline at end of file diff --git a/x/clock/spec/02_state.md b/x/clock/spec/02_state.md new file mode 100644 index 00000000..11da3d5a --- /dev/null +++ b/x/clock/spec/02_state.md @@ -0,0 +1,53 @@ + + +# State + +## State Objects + +The `x/clock` module only manages the following object in state: ClockContract. This object is used to store the address of the contract and its jail status. The jail status is used to determine if the contract should be executed at the end of every block. If the contract is jailed, it will not be executed. + +```go +// This object is used to store the contract address and the +// jail status of the contract. +message ClockContract { + // The address of the contract. + string contract_address = 1; + // The jail status of the contract. + bool is_jailed = 2; +} +``` + +## Genesis & Params + +The `x/clock` module's `GenesisState` defines the state necessary for initializing the chain from a previously exported height. It simply contains the gas limit parameter which is used to determine the maximum amount of gas that can be used by a contract. This value can be modified with a governance proposal. + +```go +// GenesisState - initial state of module +message GenesisState { + // Params of this module + Params params = 1 [ + (gogoproto.nullable) = false, + (gogoproto.jsontag) = "params,omitempty" + ]; +} + +// Params defines the set of module parameters. +message Params { + // contract_gas_limit defines the maximum amount of gas that can be used by a contract. + uint64 contract_gas_limit = 1 [ + (gogoproto.jsontag) = "contract_gas_limit,omitempty", + (gogoproto.moretags) = "yaml:\"contract_gas_limit\"" + ]; +} +``` + +## State Transitions + +The following state transitions are possible: + +- Register a contract creates a new ClockContract object in state. +- Jailing a contract updates the is_jailed field of a ClockContract object in state. +- Unjailing a contract updates the is_jailed field of a ClockContract object in state. +- Unregister a contract deletes a ClockContract object from state. \ No newline at end of file diff --git a/x/clock/spec/03_integration.md b/x/clock/spec/03_integration.md new file mode 100644 index 00000000..a7031d53 --- /dev/null +++ b/x/clock/spec/03_integration.md @@ -0,0 +1,91 @@ + + +# CosmWasm Integration + +This `x/clock` module does not require any custom bindings. Rather, you must add a Sudo message to your contract. If your contract does not implement this Sudo message, it will be jailed. Please review the following sections below for more information. + +> Note: you can find a basic [cw-clock contract here](https://github.com/Reecepbcups/cw-clock-example). + +## Implementation + +To satisfy the module's requirements, add the following message and entry point to your contract: + +```rust +// msg.rs +#[cw_serde] +pub enum SudoMsg { + ClockEndBlock { }, +} + +// contract.rs +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn sudo(deps: DepsMut, _env: Env, msg: SudoMsg) -> Result { + match msg { + SudoMsg::ClockEndBlock { } => { + + // TODO: PERFORM LOGIC HERE + + Ok(Response::new()) + } + } +} +``` + +At the end of every block, registered contracts will execute the `ClockEndBlock` Sudo message. This is where all of the contract's custom end block logic can be performed. Please keep in mind that contracts which exceed the gas limit specified in the params will be jailed. + +## Examples + +In the example below, at the end of every block the `val` Config variable will increase by 1. This is a simple example, but one can extrapolate upon this idea and perform actions such as cleanup, auto compounding, etc. + +```rust +// msg.rs +#[cw_serde] +pub enum SudoMsg { + ClockEndBlock { }, +} + +// contract.rs +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn sudo(deps: DepsMut, _env: Env, msg: SudoMsg) -> Result { + match msg { + SudoMsg::ClockEndBlock { } => { + let mut config = CONFIG.load(deps.storage)?; + config.val += 1; + CONFIG.save(deps.storage, &config)?; + + Ok(Response::new()) + } + } +} +``` + +To perform an action occasionally rather than every block, use the `env` variable in the Sudo message to check the block height and then perform logic accordingly. The contract below will only increase the `val` Config variable by 1 if the block height is divisible by 10. + +```rust +// msg.rs +#[cw_serde] +pub enum SudoMsg { + ClockEndBlock { }, +} + +// contract.rs +#[cfg_attr(not(feature = "library"), entry_point)] +pub fn sudo(deps: DepsMut, env: Env, msg: SudoMsg) -> Result { + match msg { + SudoMsg::ClockEndBlock { } => { + // If the block is not divisible by ten, do nothing. + if env.block.height % 10 != 0 { + return Ok(Response::new()); + } + + let mut config = CONFIG.load(deps.storage)?; + config.val += 1; + CONFIG.save(deps.storage, &config)?; + + Ok(Response::new()) + } + } +} +``` diff --git a/x/clock/spec/04_clients.md b/x/clock/spec/04_clients.md new file mode 100644 index 00000000..58ec871d --- /dev/null +++ b/x/clock/spec/04_clients.md @@ -0,0 +1,25 @@ + + +# Clients + +## Command Line Interface (CLI) + +The CLI has been updated with new queries and transactions for the `x/clock` module. View the entire list below. + +### Queries + +| Command | Subcommand | Arguments | Description | +| :------------------ | :---------- | :----------------- | :---------------------- | +| `junod query clock` | `params` | | Get Clock params | +| `junod query clock` | `contract` | [contract_address] | Get a Clock contract | +| `junod query clock` | `contracts` | | Get all Clock contracts | + +### Transactions + +| Command | Subcommand | Arguments | Description | +| :--------------- | :----------- | :----------------- | :-------------------------- | +| `junod tx clock` | `register` | [contract_address] | Register a Clock contract | +| `junod tx clock` | `unjail` | [contract_address] | Unjail a Clock contract | +| `junod tx clock` | `unregister` | [contract_address] | Unregister a Clock contract | \ No newline at end of file diff --git a/x/clock/spec/README.md b/x/clock/spec/README.md new file mode 100644 index 00000000..735d8ae0 --- /dev/null +++ b/x/clock/spec/README.md @@ -0,0 +1,16 @@ +# `clock` + +## Abstract + +This document specifies the internal `x/clock` module of Juno Network. + +The `x/clock` module allows specific contracts to be executed at the end of every block. This allows the smart contract to perform actions that may need to happen every block or at set block intervals. + +By using this module, your application can remove the headache of external whitelisted bots and instead depend on the chain itself for constant executions. + +## Contents + +1. **[Concepts](01_concepts.md)** +2. **[State](02_state.md)** +3. **[Contract Integration](03_integration.md)** +4. **[Clients](04_clients.md)** diff --git a/x/clock/types/clock.pb.go b/x/clock/types/clock.pb.go new file mode 100644 index 00000000..4dc2be18 --- /dev/null +++ b/x/clock/types/clock.pb.go @@ -0,0 +1,361 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: juno/clock/v1/clock.proto + +package types + +import ( + fmt "fmt" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// This object is used to store the contract address and the +// jail status of the contract. +type ClockContract struct { + // The address of the contract. + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + // The jail status of the contract. + IsJailed bool `protobuf:"varint,2,opt,name=is_jailed,json=isJailed,proto3" json:"is_jailed,omitempty"` +} + +func (m *ClockContract) Reset() { *m = ClockContract{} } +func (m *ClockContract) String() string { return proto.CompactTextString(m) } +func (*ClockContract) ProtoMessage() {} +func (*ClockContract) Descriptor() ([]byte, []int) { + return fileDescriptor_ae7dc6f78089f30c, []int{0} +} +func (m *ClockContract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ClockContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ClockContract.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 *ClockContract) XXX_Merge(src proto.Message) { + xxx_messageInfo_ClockContract.Merge(m, src) +} +func (m *ClockContract) XXX_Size() int { + return m.Size() +} +func (m *ClockContract) XXX_DiscardUnknown() { + xxx_messageInfo_ClockContract.DiscardUnknown(m) +} + +var xxx_messageInfo_ClockContract proto.InternalMessageInfo + +func (m *ClockContract) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +func (m *ClockContract) GetIsJailed() bool { + if m != nil { + return m.IsJailed + } + return false +} + +func init() { + proto.RegisterType((*ClockContract)(nil), "juno.clock.v1.ClockContract") +} + +func init() { proto.RegisterFile("juno/clock/v1/clock.proto", fileDescriptor_ae7dc6f78089f30c) } + +var fileDescriptor_ae7dc6f78089f30c = []byte{ + // 190 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x2a, 0xcd, 0xcb, + 0xd7, 0x4f, 0xce, 0xc9, 0x4f, 0xce, 0xd6, 0x2f, 0x33, 0x84, 0x30, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, + 0xf2, 0x85, 0x78, 0x41, 0x52, 0x7a, 0x10, 0x91, 0x32, 0x43, 0xa5, 0x70, 0x2e, 0x5e, 0x67, 0x10, + 0xdb, 0x39, 0x3f, 0xaf, 0xa4, 0x28, 0x31, 0xb9, 0x44, 0x48, 0x93, 0x4b, 0x20, 0x19, 0xca, 0x8e, + 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0xe2, 0x87, + 0x89, 0x3b, 0x42, 0x84, 0x85, 0xa4, 0xb9, 0x38, 0x33, 0x8b, 0xe3, 0xb3, 0x12, 0x33, 0x73, 0x52, + 0x53, 0x24, 0x98, 0x14, 0x18, 0x35, 0x38, 0x82, 0x38, 0x32, 0x8b, 0xbd, 0xc0, 0x7c, 0x27, 0xf7, + 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, + 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, + 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x77, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x86, 0x59, 0x5e, 0xac, + 0x0f, 0x76, 0x77, 0x05, 0xd4, 0xe5, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x77, 0x1b, + 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xd7, 0x4c, 0x19, 0xd4, 0x00, 0x00, 0x00, +} + +func (m *ClockContract) 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 *ClockContract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ClockContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.IsJailed { + i-- + if m.IsJailed { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 + } + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintClock(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintClock(dAtA []byte, offset int, v uint64) int { + offset -= sovClock(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *ClockContract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovClock(uint64(l)) + } + if m.IsJailed { + n += 2 + } + return n +} + +func sovClock(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozClock(x uint64) (n int) { + return sovClock(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ClockContract) 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 ErrIntOverflowClock + } + 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: ClockContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ClockContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowClock + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthClock + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthClock + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field IsJailed", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowClock + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.IsJailed = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipClock(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthClock + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipClock(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowClock + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowClock + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowClock + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthClock + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupClock + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthClock + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthClock = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowClock = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupClock = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/clock/types/codec.go b/x/clock/types/codec.go new file mode 100644 index 00000000..bad84425 --- /dev/null +++ b/x/clock/types/codec.go @@ -0,0 +1,48 @@ +package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/types" + cryptocodec "github.com/cosmos/cosmos-sdk/crypto/codec" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" + authzcodec "github.com/cosmos/cosmos-sdk/x/authz/codec" + govcodec "github.com/cosmos/cosmos-sdk/x/gov/codec" +) + +var ( + amino = codec.NewLegacyAmino() + AminoCdc = codec.NewAminoCodec(amino) +) + +func init() { + RegisterLegacyAminoCodec(amino) + cryptocodec.RegisterCrypto(amino) + sdk.RegisterLegacyAminoCodec(amino) + + // Register all Amino interfaces and concrete types on the authz and gov Amino codec + // so that this can later be used to properly serialize MsgGrant and MsgExec + // instances. + RegisterLegacyAminoCodec(authzcodec.Amino) + RegisterLegacyAminoCodec(govcodec.Amino) +} + +// RegisterLegacyAminoCodec registers concrete types on the LegacyAmino codec +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + cdc.RegisterConcrete(&MsgRegisterClockContract{}, "clock/MsgRegisterClockContract", nil) + cdc.RegisterConcrete(&MsgUnregisterClockContract{}, "clock/MsgUnregisterClockContract", nil) + cdc.RegisterConcrete(&MsgUnjailClockContract{}, "clock/MsgUnjailClockContract", nil) + cdc.RegisterConcrete(&MsgUpdateParams{}, "clock/MsgUpdateParams", nil) +} + +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations( + (*sdk.Msg)(nil), + &MsgRegisterClockContract{}, + &MsgUnregisterClockContract{}, + &MsgUnjailClockContract{}, + &MsgUpdateParams{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} diff --git a/x/clock/types/codec_test.go b/x/clock/types/codec_test.go new file mode 100644 index 00000000..120d534d --- /dev/null +++ b/x/clock/types/codec_test.go @@ -0,0 +1,33 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + codectypes "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type CodecTestSuite struct { + suite.Suite +} + +func TestCodecSuite(t *testing.T) { + suite.Run(t, new(CodecTestSuite)) +} + +func (suite *CodecTestSuite) TestRegisterInterfaces() { + registry := codectypes.NewInterfaceRegistry() + registry.RegisterInterface(sdk.MsgInterfaceProtoName, (*sdk.Msg)(nil)) + RegisterInterfaces(registry) + + impls := registry.ListImplementations(sdk.MsgInterfaceProtoName) + suite.Require().Equal(4, len(impls)) + suite.Require().ElementsMatch([]string{ + "/juno.clock.v1.MsgUpdateParams", + "/juno.clock.v1.MsgRegisterClockContract", + "/juno.clock.v1.MsgUnregisterClockContract", + "/juno.clock.v1.MsgUnjailClockContract", + }, impls) +} diff --git a/x/clock/types/errors.go b/x/clock/types/errors.go new file mode 100644 index 00000000..d8d05404 --- /dev/null +++ b/x/clock/types/errors.go @@ -0,0 +1,11 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" +) + +var ( + ErrContractJailed = errorsmod.Register(ModuleName, 1, "contract is jailed") + ErrContractNotJailed = errorsmod.Register(ModuleName, 2, "contract is not jailed") + ErrContractAlreadyJailed = errorsmod.Register(ModuleName, 3, "contract is already jailed") +) diff --git a/x/clock/types/genesis.pb.go b/x/clock/types/genesis.pb.go new file mode 100644 index 00000000..ecc8feeb --- /dev/null +++ b/x/clock/types/genesis.pb.go @@ -0,0 +1,485 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: juno/clock/v1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types" + _ "github.com/cosmos/gogoproto/gogoproto" + proto "github.com/cosmos/gogoproto/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// GenesisState - initial state of module +type GenesisState struct { + // Params of this module + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` +} + +func (m *GenesisState) Reset() { *m = GenesisState{} } +func (m *GenesisState) String() string { return proto.CompactTextString(m) } +func (*GenesisState) ProtoMessage() {} +func (*GenesisState) Descriptor() ([]byte, []int) { + return fileDescriptor_c31a7855fe794abe, []int{0} +} +func (m *GenesisState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *GenesisState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_GenesisState.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 *GenesisState) XXX_Merge(src proto.Message) { + xxx_messageInfo_GenesisState.Merge(m, src) +} +func (m *GenesisState) XXX_Size() int { + return m.Size() +} +func (m *GenesisState) XXX_DiscardUnknown() { + xxx_messageInfo_GenesisState.DiscardUnknown(m) +} + +var xxx_messageInfo_GenesisState proto.InternalMessageInfo + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// Params defines the set of module parameters. +type Params struct { + // contract_gas_limit defines the maximum amount of gas that can be used by a contract. + ContractGasLimit uint64 `protobuf:"varint,1,opt,name=contract_gas_limit,json=contractGasLimit,proto3" json:"contract_gas_limit,omitempty" yaml:"contract_gas_limit"` +} + +func (m *Params) Reset() { *m = Params{} } +func (m *Params) String() string { return proto.CompactTextString(m) } +func (*Params) ProtoMessage() {} +func (*Params) Descriptor() ([]byte, []int) { + return fileDescriptor_c31a7855fe794abe, []int{1} +} +func (m *Params) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Params) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Params.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 *Params) XXX_Merge(src proto.Message) { + xxx_messageInfo_Params.Merge(m, src) +} +func (m *Params) XXX_Size() int { + return m.Size() +} +func (m *Params) XXX_DiscardUnknown() { + xxx_messageInfo_Params.DiscardUnknown(m) +} + +var xxx_messageInfo_Params proto.InternalMessageInfo + +func (m *Params) GetContractGasLimit() uint64 { + if m != nil { + return m.ContractGasLimit + } + return 0 +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "juno.clock.v1.GenesisState") + proto.RegisterType((*Params)(nil), "juno.clock.v1.Params") +} + +func init() { proto.RegisterFile("juno/clock/v1/genesis.proto", fileDescriptor_c31a7855fe794abe) } + +var fileDescriptor_c31a7855fe794abe = []byte{ + // 301 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x31, 0x4b, 0xf3, 0x40, + 0x18, 0xc7, 0x13, 0x78, 0xe9, 0x90, 0x57, 0xa1, 0x04, 0x85, 0xb6, 0xca, 0x45, 0x32, 0x39, 0xe8, + 0x1d, 0xd1, 0x4d, 0x70, 0x69, 0x87, 0x2c, 0x0e, 0x52, 0x07, 0xc1, 0xa5, 0x5c, 0x8e, 0x23, 0x9e, + 0xcd, 0xe5, 0x09, 0xb9, 0x4b, 0x30, 0xdf, 0xc2, 0x8f, 0xd5, 0xb1, 0xa3, 0x53, 0x90, 0x64, 0xeb, + 0xe8, 0x27, 0x90, 0x5c, 0x22, 0x52, 0xba, 0x1d, 0xcf, 0xef, 0xff, 0xfc, 0x9f, 0xe3, 0xe7, 0x9c, + 0xbd, 0x15, 0x29, 0x10, 0x96, 0x00, 0x5b, 0x93, 0x32, 0x20, 0x31, 0x4f, 0xb9, 0x12, 0x0a, 0x67, + 0x39, 0x68, 0x70, 0x8f, 0x3b, 0x88, 0x0d, 0xc4, 0x65, 0x30, 0x3b, 0x89, 0x21, 0x06, 0x43, 0x48, + 0xf7, 0xea, 0x43, 0x33, 0xc4, 0x40, 0x49, 0x50, 0x24, 0xa2, 0x8a, 0x93, 0x32, 0x88, 0xb8, 0xa6, + 0x01, 0x61, 0x20, 0xd2, 0x81, 0x4f, 0xf7, 0x2f, 0xf4, 0x6d, 0x06, 0xf9, 0xcf, 0xce, 0x51, 0xd8, + 0x1f, 0x7c, 0xd2, 0x54, 0x73, 0x37, 0x74, 0x46, 0x19, 0xcd, 0xa9, 0x54, 0x13, 0xfb, 0xc2, 0xbe, + 0xfc, 0x7f, 0x73, 0x8a, 0xf7, 0x3e, 0x80, 0x1f, 0x0d, 0x9c, 0x4f, 0x36, 0xb5, 0x67, 0xed, 0x6a, + 0x6f, 0xdc, 0x87, 0xaf, 0x40, 0x0a, 0xcd, 0x65, 0xa6, 0xab, 0xe5, 0xb0, 0xee, 0x17, 0xce, 0xa8, + 0xcf, 0xba, 0x6b, 0xc7, 0x65, 0x90, 0xea, 0x9c, 0x32, 0xbd, 0x8a, 0xa9, 0x5a, 0x25, 0x42, 0x0a, + 0x6d, 0xea, 0xff, 0xcd, 0xef, 0x77, 0xb5, 0x77, 0x7e, 0x48, 0xff, 0xfa, 0xbe, 0x6b, 0x6f, 0x5a, + 0x51, 0x99, 0xdc, 0xf9, 0x87, 0x29, 0x7f, 0x39, 0xfe, 0x1d, 0x86, 0x54, 0x3d, 0x74, 0xa3, 0x79, + 0xb8, 0x69, 0x90, 0xbd, 0x6d, 0x90, 0xfd, 0xd5, 0x20, 0xfb, 0xa3, 0x45, 0xd6, 0xb6, 0x45, 0xd6, + 0x67, 0x8b, 0xac, 0x97, 0xeb, 0x58, 0xe8, 0xd7, 0x22, 0xc2, 0x0c, 0x24, 0x59, 0x18, 0x5f, 0x8b, + 0x61, 0x59, 0x11, 0xe3, 0xe7, 0x7d, 0x30, 0xa4, 0xab, 0x8c, 0xab, 0x68, 0x64, 0xfc, 0xdc, 0xfe, + 0x04, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x09, 0x34, 0x28, 0x9e, 0x01, 0x00, 0x00, +} + +func (m *GenesisState) 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 *GenesisState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *Params) 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 *Params) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.ContractGasLimit != 0 { + i = encodeVarintGenesis(dAtA, i, uint64(m.ContractGasLimit)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintGenesis(dAtA []byte, offset int, v uint64) int { + offset -= sovGenesis(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *GenesisState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovGenesis(uint64(l)) + return n +} + +func (m *Params) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.ContractGasLimit != 0 { + n += 1 + sovGenesis(uint64(m.ContractGasLimit)) + } + return n +} + +func sovGenesis(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozGenesis(x uint64) (n int) { + return sovGenesis(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *GenesisState) 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: GenesisState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: GenesisState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params.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 *Params) 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: Params: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractGasLimit", wireType) + } + m.ContractGasLimit = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ContractGasLimit |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 skipGenesis(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowGenesis + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthGenesis + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupGenesis + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthGenesis + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthGenesis = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowGenesis = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupGenesis = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/clock/types/keys.go b/x/clock/types/keys.go new file mode 100644 index 00000000..88dc89ab --- /dev/null +++ b/x/clock/types/keys.go @@ -0,0 +1,13 @@ +package types + +var ParamsKey = []byte{0x00} + +const ( + ModuleName = "clock" + + RouterKey = ModuleName + + StoreKey = ModuleName + + QuerierRoute = ModuleName +) diff --git a/x/clock/types/msgs.go b/x/clock/types/msgs.go new file mode 100644 index 00000000..4871459c --- /dev/null +++ b/x/clock/types/msgs.go @@ -0,0 +1,144 @@ +package types + +import ( + "cosmossdk.io/errors" + + sdk "github.com/cosmos/cosmos-sdk/types" + + globalerrors "github.com/cybercongress/go-cyber/v4/app/helpers" +) + +const ( + // Sudo Message called on the contracts + BeginBlockSudoMessage = `{"clock_begin_block":{}}` + EndBlockSudoMessage = `{"clock_end_block":{}}` +) + +// == MsgUpdateParams == +const ( + TypeMsgRegisterFeePayContract = "register_clock_contract" + TypeMsgUnregisterFeePayContract = "unregister_clock_contract" + TypeMsgUnjailFeePayContract = "unjail_clock_contract" + TypeMsgUpdateParams = "update_clock_params" +) + +var ( + _ sdk.Msg = &MsgRegisterClockContract{} + _ sdk.Msg = &MsgUnregisterClockContract{} + _ sdk.Msg = &MsgUnjailClockContract{} + _ sdk.Msg = &MsgUpdateParams{} +) + +// Route returns the name of the module +func (msg MsgRegisterClockContract) Route() string { return RouterKey } + +// Type returns the the action +func (msg MsgRegisterClockContract) Type() string { return TypeMsgRegisterFeePayContract } + +// ValidateBasic runs stateless checks on the message +func (msg MsgRegisterClockContract) ValidateBasic() error { + return validateAddresses(msg.SenderAddress, msg.ContractAddress) +} + +// GetSignBytes encodes the message for signing +func (msg *MsgRegisterClockContract) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgRegisterClockContract) GetSigners() []sdk.AccAddress { + from, _ := sdk.AccAddressFromBech32(msg.SenderAddress) + return []sdk.AccAddress{from} +} + +// Route returns the name of the module +func (msg MsgUnregisterClockContract) Route() string { return RouterKey } + +// Type returns the the action +func (msg MsgUnregisterClockContract) Type() string { return TypeMsgRegisterFeePayContract } + +// ValidateBasic runs stateless checks on the message +func (msg MsgUnregisterClockContract) ValidateBasic() error { + return validateAddresses(msg.SenderAddress, msg.ContractAddress) +} + +// GetSignBytes encodes the message for signing +func (msg *MsgUnregisterClockContract) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgUnregisterClockContract) GetSigners() []sdk.AccAddress { + from, _ := sdk.AccAddressFromBech32(msg.SenderAddress) + return []sdk.AccAddress{from} +} + +// Route returns the name of the module +func (msg MsgUnjailClockContract) Route() string { return RouterKey } + +// Type returns the the action +func (msg MsgUnjailClockContract) Type() string { return TypeMsgRegisterFeePayContract } + +// ValidateBasic runs stateless checks on the message +func (msg MsgUnjailClockContract) ValidateBasic() error { + return validateAddresses(msg.SenderAddress, msg.ContractAddress) +} + +// GetSignBytes encodes the message for signing +func (msg *MsgUnjailClockContract) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(msg)) +} + +// GetSigners defines whose signature is required +func (msg MsgUnjailClockContract) GetSigners() []sdk.AccAddress { + from, _ := sdk.AccAddressFromBech32(msg.SenderAddress) + return []sdk.AccAddress{from} +} + +// NewMsgUpdateParams creates new instance of MsgUpdateParams +func NewMsgUpdateParams( + sender sdk.Address, + contractGasLimit uint64, +) *MsgUpdateParams { + return &MsgUpdateParams{ + Authority: sender.String(), + Params: NewParams(contractGasLimit), + } +} + +// Route returns the name of the module +func (msg MsgUpdateParams) Route() string { return RouterKey } + +// Type returns the the action +func (msg MsgUpdateParams) Type() string { return TypeMsgUpdateParams } + +// GetSignBytes implements the LegacyMsg interface. +func (msg MsgUpdateParams) GetSignBytes() []byte { + return sdk.MustSortJSON(AminoCdc.MustMarshalJSON(&msg)) +} + +// GetSigners returns the expected signers for a MsgUpdateParams message. +func (msg *MsgUpdateParams) GetSigners() []sdk.AccAddress { + addr, _ := sdk.AccAddressFromBech32(msg.Authority) + return []sdk.AccAddress{addr} +} + +// ValidateBasic does a sanity check on the provided data. +func (msg *MsgUpdateParams) ValidateBasic() error { + if _, err := sdk.AccAddressFromBech32(msg.Authority); err != nil { + return errors.Wrap(err, "invalid authority address") + } + + return msg.Params.Validate() +} + +// ValidateAddresses validates the provided addresses +func validateAddresses(addresses ...string) error { + for _, address := range addresses { + if _, err := sdk.AccAddressFromBech32(address); err != nil { + return errors.Wrapf(globalerrors.ErrInvalidAddress, "invalid address: %s", address) + } + } + + return nil +} diff --git a/x/clock/types/msgs_test.go b/x/clock/types/msgs_test.go new file mode 100644 index 00000000..4cc09075 --- /dev/null +++ b/x/clock/types/msgs_test.go @@ -0,0 +1,41 @@ +package types + +import ( + "testing" + + "github.com/stretchr/testify/suite" + + sdk "github.com/cosmos/cosmos-sdk/types" +) + +type MsgsTestSuite struct { + suite.Suite + govModule string +} + +func TestMsgsTestSuite(t *testing.T) { + suite.Run(t, new(MsgsTestSuite)) +} + +func (suite *MsgsTestSuite) SetupTest() { + suite.govModule = "juno10d07y265gmmuvt4z0w9aw880jnsr700jvss730" +} + +func (suite *MsgsTestSuite) TestMsgUpdateParams() { + var limit uint64 = 100_000 + + p := MsgUpdateParams{ + Authority: suite.govModule, + Params: Params{ + ContractGasLimit: limit, + }, + } + + acc, _ := sdk.AccAddressFromBech32(p.Authority) + + msg := NewMsgUpdateParams(acc, limit) + + suite.Require().Equal(RouterKey, msg.Route()) + suite.Require().Equal(TypeMsgUpdateParams, msg.Type()) + suite.Require().NotNil(msg.GetSigners()) +} diff --git a/x/clock/types/params.go b/x/clock/types/params.go new file mode 100644 index 00000000..9a8a356e --- /dev/null +++ b/x/clock/types/params.go @@ -0,0 +1,36 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +// DefaultParams returns default parameters +func DefaultParams() Params { + return Params{ + ContractGasLimit: 100_000, + } +} + +// NewParams creates a new Params object +func NewParams( + contractGasLimit uint64, +) Params { + return Params{ + ContractGasLimit: contractGasLimit, + } +} + +// Validate performs basic validation. +func (p Params) Validate() error { + minimumGas := uint64(100_000) + if p.ContractGasLimit < minimumGas { + return errorsmod.Wrapf( + sdkerrors.ErrInvalidRequest, + "invalid contract gas limit: %d. Must be above %d", p.ContractGasLimit, minimumGas, + ) + } + + return nil +} diff --git a/x/clock/types/params_test.go b/x/clock/types/params_test.go new file mode 100644 index 00000000..fea75df7 --- /dev/null +++ b/x/clock/types/params_test.go @@ -0,0 +1,63 @@ +package types_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + "github.com/cybercongress/go-cyber/v4/x/clock/types" +) + +func TestParamsValidate(t *testing.T) { + testCases := []struct { + name string + params types.Params + success bool + }{ + { + "Success - Default", + types.DefaultParams(), + true, + }, + { + "Success - Meets min Gas", + types.NewParams(100_000), + true, + }, + { + "Success - Meets min Gas", + types.NewParams(500_000), + true, + }, + { + "Fail - Not Enough Gas", + types.NewParams(1), + false, + }, + { + "Fail - Not Enough Gas", + types.NewParams(100), + false, + }, + { + "Fail - Not Enough Gas", + types.NewParams(1_000), + false, + }, + { + "Fail - Not Enough Gas", + types.NewParams(10_000), + false, + }, + } + + for _, tc := range testCases { + err := tc.params.Validate() + + if tc.success { + require.NoError(t, err, tc.name) + } else { + require.Error(t, err, tc.name) + } + } +} diff --git a/x/clock/types/query.pb.go b/x/clock/types/query.pb.go new file mode 100644 index 00000000..cebef785 --- /dev/null +++ b/x/clock/types/query.pb.go @@ -0,0 +1,1406 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: juno/clock/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-sdk/types" + query "github.com/cosmos/cosmos-sdk/types/query" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// QueryClockContracts is the request type to get all contracts. +type QueryClockContracts struct { + // pagination defines an optional pagination for the request. + Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryClockContracts) Reset() { *m = QueryClockContracts{} } +func (m *QueryClockContracts) String() string { return proto.CompactTextString(m) } +func (*QueryClockContracts) ProtoMessage() {} +func (*QueryClockContracts) Descriptor() ([]byte, []int) { + return fileDescriptor_7da208f579d775c8, []int{0} +} +func (m *QueryClockContracts) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryClockContracts) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryClockContracts.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 *QueryClockContracts) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryClockContracts.Merge(m, src) +} +func (m *QueryClockContracts) XXX_Size() int { + return m.Size() +} +func (m *QueryClockContracts) XXX_DiscardUnknown() { + xxx_messageInfo_QueryClockContracts.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryClockContracts proto.InternalMessageInfo + +func (m *QueryClockContracts) GetPagination() *query.PageRequest { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryClockContractsResponse is the response type for the Query/ClockContracts RPC method. +type QueryClockContractsResponse struct { + // clock_contracts are the clock contracts. + ClockContracts []ClockContract `protobuf:"bytes,1,rep,name=clock_contracts,json=clockContracts,proto3" json:"clock_contracts"` + // pagination defines the pagination in the response. + Pagination *query.PageResponse `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` +} + +func (m *QueryClockContractsResponse) Reset() { *m = QueryClockContractsResponse{} } +func (m *QueryClockContractsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryClockContractsResponse) ProtoMessage() {} +func (*QueryClockContractsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7da208f579d775c8, []int{1} +} +func (m *QueryClockContractsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryClockContractsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryClockContractsResponse.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 *QueryClockContractsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryClockContractsResponse.Merge(m, src) +} +func (m *QueryClockContractsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryClockContractsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryClockContractsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryClockContractsResponse proto.InternalMessageInfo + +func (m *QueryClockContractsResponse) GetClockContracts() []ClockContract { + if m != nil { + return m.ClockContracts + } + return nil +} + +func (m *QueryClockContractsResponse) GetPagination() *query.PageResponse { + if m != nil { + return m.Pagination + } + return nil +} + +// QueryClockContract is the request type to get a single contract. +type QueryClockContract struct { + // contract_address is the address of the contract to query. + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (m *QueryClockContract) Reset() { *m = QueryClockContract{} } +func (m *QueryClockContract) String() string { return proto.CompactTextString(m) } +func (*QueryClockContract) ProtoMessage() {} +func (*QueryClockContract) Descriptor() ([]byte, []int) { + return fileDescriptor_7da208f579d775c8, []int{2} +} +func (m *QueryClockContract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryClockContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryClockContract.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 *QueryClockContract) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryClockContract.Merge(m, src) +} +func (m *QueryClockContract) XXX_Size() int { + return m.Size() +} +func (m *QueryClockContract) XXX_DiscardUnknown() { + xxx_messageInfo_QueryClockContract.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryClockContract proto.InternalMessageInfo + +func (m *QueryClockContract) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +// QueryClockContractResponse is the response type for the Query/ClockContract RPC method. +type QueryClockContractResponse struct { + // contract is the clock contract. + ClockContract ClockContract `protobuf:"bytes,1,opt,name=clock_contract,json=clockContract,proto3" json:"clock_contract"` +} + +func (m *QueryClockContractResponse) Reset() { *m = QueryClockContractResponse{} } +func (m *QueryClockContractResponse) String() string { return proto.CompactTextString(m) } +func (*QueryClockContractResponse) ProtoMessage() {} +func (*QueryClockContractResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7da208f579d775c8, []int{3} +} +func (m *QueryClockContractResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryClockContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryClockContractResponse.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 *QueryClockContractResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryClockContractResponse.Merge(m, src) +} +func (m *QueryClockContractResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryClockContractResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryClockContractResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryClockContractResponse proto.InternalMessageInfo + +func (m *QueryClockContractResponse) GetClockContract() ClockContract { + if m != nil { + return m.ClockContract + } + return ClockContract{} +} + +// QueryParams is the request type to get all module params. +type QueryParamsRequest struct { +} + +func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } +func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } +func (*QueryParamsRequest) ProtoMessage() {} +func (*QueryParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_7da208f579d775c8, []int{4} +} +func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsRequest.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 *QueryParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsRequest.Merge(m, src) +} +func (m *QueryParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo + +// QueryClockContractsResponse is the response type for the Query/ClockContracts RPC method. +type QueryParamsResponse struct { + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` +} + +func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } +func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } +func (*QueryParamsResponse) ProtoMessage() {} +func (*QueryParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_7da208f579d775c8, []int{5} +} +func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_QueryParamsResponse.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 *QueryParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryParamsResponse.Merge(m, src) +} +func (m *QueryParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryParamsResponse proto.InternalMessageInfo + +func (m *QueryParamsResponse) GetParams() *Params { + if m != nil { + return m.Params + } + return nil +} + +func init() { + proto.RegisterType((*QueryClockContracts)(nil), "juno.clock.v1.QueryClockContracts") + proto.RegisterType((*QueryClockContractsResponse)(nil), "juno.clock.v1.QueryClockContractsResponse") + proto.RegisterType((*QueryClockContract)(nil), "juno.clock.v1.QueryClockContract") + proto.RegisterType((*QueryClockContractResponse)(nil), "juno.clock.v1.QueryClockContractResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "juno.clock.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "juno.clock.v1.QueryParamsResponse") +} + +func init() { proto.RegisterFile("juno/clock/v1/query.proto", fileDescriptor_7da208f579d775c8) } + +var fileDescriptor_7da208f579d775c8 = []byte{ + // 542 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4d, 0x6f, 0xd3, 0x30, + 0x18, 0xc7, 0x9b, 0x0d, 0x2a, 0xe1, 0xa9, 0x1d, 0x32, 0x9b, 0x28, 0xe9, 0x48, 0x8b, 0x0f, 0xb0, + 0x0d, 0xcd, 0x56, 0xbb, 0x1b, 0x17, 0x44, 0x2b, 0x31, 0x01, 0x97, 0x91, 0x23, 0x12, 0x9a, 0xdc, + 0xcc, 0x0a, 0x81, 0x36, 0xce, 0x62, 0xb7, 0xa2, 0x42, 0x5c, 0xf6, 0x09, 0x78, 0xf9, 0x28, 0x7c, + 0x89, 0x1d, 0x27, 0x71, 0xe1, 0x54, 0xa1, 0x96, 0x13, 0x47, 0x3e, 0x01, 0x8a, 0xed, 0x94, 0x39, + 0x2b, 0x94, 0x9b, 0xfb, 0xbc, 0xfc, 0x9f, 0xdf, 0xf3, 0xd2, 0x80, 0x5b, 0xaf, 0x87, 0x31, 0x27, + 0x41, 0x9f, 0x07, 0x6f, 0xc8, 0xa8, 0x45, 0x4e, 0x86, 0x2c, 0x1d, 0xe3, 0x24, 0xe5, 0x92, 0xc3, + 0x4a, 0xe6, 0xc2, 0xca, 0x85, 0x47, 0x2d, 0x77, 0x37, 0xe0, 0x62, 0xc0, 0x05, 0xe9, 0x51, 0xc1, + 0x74, 0x1c, 0x19, 0xb5, 0x7a, 0x4c, 0xd2, 0x16, 0x49, 0x68, 0x18, 0xc5, 0x54, 0x46, 0x3c, 0xd6, + 0xa9, 0xee, 0x46, 0xc8, 0x43, 0xae, 0x9e, 0x24, 0x7b, 0x19, 0xeb, 0x56, 0xc8, 0x79, 0xd8, 0x67, + 0x84, 0x26, 0x11, 0xa1, 0x71, 0xcc, 0xa5, 0x4a, 0x11, 0xc6, 0xeb, 0x5d, 0xd4, 0xcf, 0x95, 0x03, + 0x1e, 0xe5, 0x9a, 0x75, 0x9b, 0x34, 0x64, 0x31, 0x13, 0x51, 0x9e, 0x5c, 0x68, 0x43, 0x43, 0x2b, + 0x17, 0x7a, 0x09, 0x6e, 0x3c, 0xcf, 0x68, 0xbb, 0x99, 0xad, 0xcb, 0x63, 0x99, 0xd2, 0x40, 0x0a, + 0xf8, 0x18, 0x80, 0x3f, 0xd8, 0x35, 0xa7, 0xe9, 0x6c, 0xaf, 0xb5, 0xef, 0x62, 0xcd, 0x80, 0x33, + 0x06, 0xac, 0x67, 0x61, 0x48, 0xf0, 0x21, 0x0d, 0x99, 0xcf, 0x4e, 0x86, 0x4c, 0x48, 0xff, 0x42, + 0x26, 0xfa, 0xe2, 0x80, 0xfa, 0x02, 0x7d, 0x9f, 0x89, 0x84, 0xc7, 0x82, 0xc1, 0x67, 0x60, 0x5d, + 0xd1, 0x1c, 0x05, 0xb9, 0xab, 0xe6, 0x34, 0x57, 0xb7, 0xd7, 0xda, 0x5b, 0xd8, 0x9a, 0x2f, 0xb6, + 0xf2, 0x3b, 0x57, 0xce, 0x26, 0x8d, 0x92, 0x5f, 0x0d, 0x6c, 0xe8, 0x03, 0x0b, 0x7a, 0x45, 0x41, + 0xdf, 0x5b, 0x0a, 0xad, 0x49, 0x2c, 0xea, 0x87, 0x00, 0x5e, 0x86, 0x86, 0x3b, 0xe0, 0x7a, 0x4e, + 0x79, 0x44, 0x8f, 0x8f, 0x53, 0x26, 0x84, 0x9a, 0xcc, 0x35, 0x7f, 0x3d, 0xb7, 0x3f, 0xd2, 0x66, + 0x14, 0x02, 0xf7, 0xb2, 0xc0, 0xbc, 0xe9, 0x27, 0xa0, 0x6a, 0x37, 0x6d, 0x06, 0xfc, 0x3f, 0x3d, + 0x57, 0xac, 0x9e, 0xd1, 0x86, 0x21, 0x3d, 0xa4, 0x29, 0x1d, 0x08, 0xb3, 0x01, 0x44, 0xcd, 0x52, + 0x73, 0xab, 0xa9, 0xfb, 0x14, 0x94, 0x13, 0x65, 0x31, 0xf5, 0x36, 0x0b, 0xf5, 0x74, 0x78, 0xa7, + 0xfe, 0x73, 0xd2, 0x30, 0x81, 0xbf, 0x26, 0x8d, 0xca, 0x98, 0x0e, 0xfa, 0x0f, 0x90, 0xfe, 0x8d, + 0x7c, 0xe3, 0x68, 0x7f, 0x5c, 0x05, 0x57, 0x55, 0x0d, 0x78, 0xea, 0x80, 0x6a, 0xe1, 0x7a, 0x50, + 0x41, 0x78, 0xc1, 0x05, 0xb8, 0xbb, 0xcb, 0x63, 0x72, 0x70, 0xd4, 0x3c, 0xfd, 0xfa, 0xe3, 0xf3, + 0x8a, 0x0b, 0x6b, 0xa4, 0x70, 0xc8, 0xf3, 0x8a, 0x9f, 0x1c, 0x50, 0xb1, 0xb7, 0x75, 0x67, 0xa9, + 0xbe, 0xbb, 0xb3, 0x34, 0x64, 0x4e, 0xb0, 0xaf, 0x08, 0xf6, 0xe0, 0xfd, 0xbf, 0x11, 0x90, 0x77, + 0xc5, 0xdb, 0x78, 0x0f, 0x63, 0x50, 0xd6, 0x23, 0x5d, 0x0c, 0x63, 0xed, 0xcc, 0x45, 0xff, 0x0a, + 0x31, 0x14, 0xb7, 0x15, 0xc5, 0x4d, 0xb8, 0x59, 0xa0, 0xd0, 0x3b, 0xe9, 0x1c, 0x9c, 0x4d, 0x3d, + 0xe7, 0x7c, 0xea, 0x39, 0xdf, 0xa7, 0x9e, 0xf3, 0x61, 0xe6, 0x95, 0xce, 0x67, 0x5e, 0xe9, 0xdb, + 0xcc, 0x2b, 0xbd, 0xd8, 0x0b, 0x23, 0xf9, 0x6a, 0xd8, 0xc3, 0x01, 0x1f, 0x90, 0xae, 0xfa, 0x3f, + 0xcc, 0x87, 0xac, 0xa5, 0xde, 0x1a, 0x31, 0x39, 0x4e, 0x98, 0xe8, 0x95, 0xd5, 0xb7, 0x61, 0xff, + 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x8e, 0x06, 0x27, 0xff, 0x04, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// QueryClient is the client API for Query service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type QueryClient interface { + // ClockContracts + ClockContracts(ctx context.Context, in *QueryClockContracts, opts ...grpc.CallOption) (*QueryClockContractsResponse, error) + // ClockContract + ClockContract(ctx context.Context, in *QueryClockContract, opts ...grpc.CallOption) (*QueryClockContractResponse, error) + // Params + Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) ClockContracts(ctx context.Context, in *QueryClockContracts, opts ...grpc.CallOption) (*QueryClockContractsResponse, error) { + out := new(QueryClockContractsResponse) + err := c.cc.Invoke(ctx, "/juno.clock.v1.Query/ClockContracts", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) ClockContract(ctx context.Context, in *QueryClockContract, opts ...grpc.CallOption) (*QueryClockContractResponse, error) { + out := new(QueryClockContractResponse) + err := c.cc.Invoke(ctx, "/juno.clock.v1.Query/ClockContract", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { + out := new(QueryParamsResponse) + err := c.cc.Invoke(ctx, "/juno.clock.v1.Query/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// QueryServer is the server API for Query service. +type QueryServer interface { + // ClockContracts + ClockContracts(context.Context, *QueryClockContracts) (*QueryClockContractsResponse, error) + // ClockContract + ClockContract(context.Context, *QueryClockContract) (*QueryClockContractResponse, error) + // Params + Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) ClockContracts(ctx context.Context, req *QueryClockContracts) (*QueryClockContractsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClockContracts not implemented") +} +func (*UnimplementedQueryServer) ClockContract(ctx context.Context, req *QueryClockContract) (*QueryClockContractResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClockContract not implemented") +} +func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterQueryServer(s grpc1.Server, srv QueryServer) { + s.RegisterService(&_Query_serviceDesc, srv) +} + +func _Query_ClockContracts_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryClockContracts) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ClockContracts(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/juno.clock.v1.Query/ClockContracts", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ClockContracts(ctx, req.(*QueryClockContracts)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_ClockContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryClockContract) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).ClockContract(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/juno.clock.v1.Query/ClockContract", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).ClockContract(ctx, req.(*QueryClockContract)) + } + return interceptor(ctx, in, info, handler) +} + +func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/juno.clock.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "juno.clock.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "ClockContracts", + Handler: _Query_ClockContracts_Handler, + }, + { + MethodName: "ClockContract", + Handler: _Query_ClockContract_Handler, + }, + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "juno/clock/v1/query.proto", +} + +func (m *QueryClockContracts) 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 *QueryClockContracts) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryClockContracts) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryClockContractsResponse) 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 *QueryClockContractsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryClockContractsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Pagination != nil { + { + size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.ClockContracts) > 0 { + for iNdEx := len(m.ClockContracts) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.ClockContracts[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + } + return len(dAtA) - i, nil +} + +func (m *QueryClockContract) 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 *QueryClockContract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryClockContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintQuery(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *QueryClockContractResponse) 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 *QueryClockContractResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryClockContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.ClockContract.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *QueryParamsRequest) 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 *QueryParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryParamsResponse) 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 *QueryParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Params != nil { + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { + offset -= sovQuery(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *QueryClockContracts) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryClockContractsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if len(m.ClockContracts) > 0 { + for _, e := range m.ClockContracts { + l = e.Size() + n += 1 + l + sovQuery(uint64(l)) + } + } + if m.Pagination != nil { + l = m.Pagination.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryClockContract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func (m *QueryClockContractResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.ClockContract.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + +func (m *QueryParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Params != nil { + l = m.Params.Size() + n += 1 + l + sovQuery(uint64(l)) + } + return n +} + +func sovQuery(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozQuery(x uint64) (n int) { + return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *QueryClockContracts) 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 ErrIntOverflowQuery + } + 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: QueryClockContracts: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryClockContracts: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageRequest{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryClockContractsResponse) 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 ErrIntOverflowQuery + } + 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: QueryClockContractsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryClockContractsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClockContracts", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ClockContracts = append(m.ClockContracts, ClockContract{}) + if err := m.ClockContracts[len(m.ClockContracts)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Pagination == nil { + m.Pagination = &query.PageResponse{} + } + if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryClockContract) 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 ErrIntOverflowQuery + } + 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: QueryClockContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryClockContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryClockContractResponse) 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 ErrIntOverflowQuery + } + 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: QueryClockContractResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryClockContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ClockContract", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.ClockContract.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsRequest) 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 ErrIntOverflowQuery + } + 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: QueryParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryParamsResponse) 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 ErrIntOverflowQuery + } + 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: QueryParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Params == nil { + m.Params = &Params{} + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipQuery(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowQuery + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthQuery + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupQuery + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthQuery + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/clock/types/query.pb.gw.go b/x/clock/types/query.pb.gw.go new file mode 100644 index 00000000..cddeb596 --- /dev/null +++ b/x/clock/types/query.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: juno/clock/v1/query.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Query_ClockContracts_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Query_ClockContracts_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryClockContracts + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ClockContracts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.ClockContracts(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ClockContracts_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryClockContracts + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Query_ClockContracts_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.ClockContracts(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_ClockContract_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryClockContract + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["contract_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "contract_address") + } + + protoReq.ContractAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "contract_address", err) + } + + msg, err := client.ClockContract(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_ClockContract_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryClockContract + var metadata runtime.ServerMetadata + + var ( + val string + ok bool + err error + _ = err + ) + + val, ok = pathParams["contract_address"] + if !ok { + return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "contract_address") + } + + protoReq.ContractAddress, err = runtime.String(val) + + if err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "contract_address", err) + } + + msg, err := server.ClockContract(ctx, &protoReq) + return msg, metadata, err + +} + +func request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := client.Params(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryParamsRequest + var metadata runtime.ServerMetadata + + msg, err := server.Params(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterQueryHandlerServer registers the http handlers for service Query to "mux". +// UnaryRPC :call QueryServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, server QueryServer) error { + + mux.Handle("GET", pattern_Query_ClockContracts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ClockContracts_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ClockContracts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ClockContract_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_ClockContract_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ClockContract_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_Params_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterQueryHandlerFromEndpoint is same as RegisterQueryHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterQueryHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterQueryHandler(ctx, mux, conn) +} + +// RegisterQueryHandler registers the http handlers for service Query to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterQueryHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterQueryHandlerClient(ctx, mux, NewQueryClient(conn)) +} + +// RegisterQueryHandlerClient registers the http handlers for service Query +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "QueryClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "QueryClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "QueryClient" to call the correct interceptors. +func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, client QueryClient) error { + + mux.Handle("GET", pattern_Query_ClockContracts_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ClockContracts_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ClockContracts_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_ClockContract_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_ClockContract_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_ClockContract_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("GET", pattern_Query_Params_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_Params_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_Params_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Query_ClockContracts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"juno", "clock", "v1", "contracts"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_ClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"juno", "clock", "v1", "contracts", "contract_address"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"juno", "clock", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_ClockContracts_0 = runtime.ForwardResponseMessage + + forward_Query_ClockContract_0 = runtime.ForwardResponseMessage + + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/clock/types/tx.pb.go b/x/clock/types/tx.pb.go new file mode 100644 index 00000000..22725c90 --- /dev/null +++ b/x/clock/types/tx.pb.go @@ -0,0 +1,1774 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: juno/clock/v1/tx.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/msgservice" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + _ "github.com/cosmos/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + _ "google.golang.org/genproto/googleapis/api/annotations" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package + +// MsgRegisterClockContract is the Msg/RegisterClockContract request type. +type MsgRegisterClockContract struct { + // The address of the sender. + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The address of the contract to register. + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (m *MsgRegisterClockContract) Reset() { *m = MsgRegisterClockContract{} } +func (m *MsgRegisterClockContract) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterClockContract) ProtoMessage() {} +func (*MsgRegisterClockContract) Descriptor() ([]byte, []int) { + return fileDescriptor_76642a1e9a85f94b, []int{0} +} +func (m *MsgRegisterClockContract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterClockContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterClockContract.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 *MsgRegisterClockContract) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterClockContract.Merge(m, src) +} +func (m *MsgRegisterClockContract) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterClockContract) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterClockContract.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterClockContract proto.InternalMessageInfo + +func (m *MsgRegisterClockContract) GetSenderAddress() string { + if m != nil { + return m.SenderAddress + } + return "" +} + +func (m *MsgRegisterClockContract) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +// MsgRegisterClockContractResponse defines the response structure for executing a +// MsgRegisterClockContract message. +type MsgRegisterClockContractResponse struct { +} + +func (m *MsgRegisterClockContractResponse) Reset() { *m = MsgRegisterClockContractResponse{} } +func (m *MsgRegisterClockContractResponse) String() string { return proto.CompactTextString(m) } +func (*MsgRegisterClockContractResponse) ProtoMessage() {} +func (*MsgRegisterClockContractResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_76642a1e9a85f94b, []int{1} +} +func (m *MsgRegisterClockContractResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgRegisterClockContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgRegisterClockContractResponse.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 *MsgRegisterClockContractResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgRegisterClockContractResponse.Merge(m, src) +} +func (m *MsgRegisterClockContractResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgRegisterClockContractResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgRegisterClockContractResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgRegisterClockContractResponse proto.InternalMessageInfo + +// MsgUnregisterClockContract is the Msg/UnregisterClockContract request type. +type MsgUnregisterClockContract struct { + // The address of the sender. + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The address of the contract to unregister. + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (m *MsgUnregisterClockContract) Reset() { *m = MsgUnregisterClockContract{} } +func (m *MsgUnregisterClockContract) String() string { return proto.CompactTextString(m) } +func (*MsgUnregisterClockContract) ProtoMessage() {} +func (*MsgUnregisterClockContract) Descriptor() ([]byte, []int) { + return fileDescriptor_76642a1e9a85f94b, []int{2} +} +func (m *MsgUnregisterClockContract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnregisterClockContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUnregisterClockContract.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 *MsgUnregisterClockContract) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnregisterClockContract.Merge(m, src) +} +func (m *MsgUnregisterClockContract) XXX_Size() int { + return m.Size() +} +func (m *MsgUnregisterClockContract) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnregisterClockContract.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnregisterClockContract proto.InternalMessageInfo + +func (m *MsgUnregisterClockContract) GetSenderAddress() string { + if m != nil { + return m.SenderAddress + } + return "" +} + +func (m *MsgUnregisterClockContract) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +// MsgUnregisterClockContractResponse defines the response structure for executing a +// MsgUnregisterClockContract message. +type MsgUnregisterClockContractResponse struct { +} + +func (m *MsgUnregisterClockContractResponse) Reset() { *m = MsgUnregisterClockContractResponse{} } +func (m *MsgUnregisterClockContractResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUnregisterClockContractResponse) ProtoMessage() {} +func (*MsgUnregisterClockContractResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_76642a1e9a85f94b, []int{3} +} +func (m *MsgUnregisterClockContractResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnregisterClockContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUnregisterClockContractResponse.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 *MsgUnregisterClockContractResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnregisterClockContractResponse.Merge(m, src) +} +func (m *MsgUnregisterClockContractResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUnregisterClockContractResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnregisterClockContractResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnregisterClockContractResponse proto.InternalMessageInfo + +// MsgUnjailClockContract is the Msg/UnjailClockContract request type. +type MsgUnjailClockContract struct { + // The address of the sender. + SenderAddress string `protobuf:"bytes,1,opt,name=sender_address,json=senderAddress,proto3" json:"sender_address,omitempty"` + // The address of the contract to unjail. + ContractAddress string `protobuf:"bytes,2,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` +} + +func (m *MsgUnjailClockContract) Reset() { *m = MsgUnjailClockContract{} } +func (m *MsgUnjailClockContract) String() string { return proto.CompactTextString(m) } +func (*MsgUnjailClockContract) ProtoMessage() {} +func (*MsgUnjailClockContract) Descriptor() ([]byte, []int) { + return fileDescriptor_76642a1e9a85f94b, []int{4} +} +func (m *MsgUnjailClockContract) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnjailClockContract) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUnjailClockContract.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 *MsgUnjailClockContract) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnjailClockContract.Merge(m, src) +} +func (m *MsgUnjailClockContract) XXX_Size() int { + return m.Size() +} +func (m *MsgUnjailClockContract) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnjailClockContract.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnjailClockContract proto.InternalMessageInfo + +func (m *MsgUnjailClockContract) GetSenderAddress() string { + if m != nil { + return m.SenderAddress + } + return "" +} + +func (m *MsgUnjailClockContract) GetContractAddress() string { + if m != nil { + return m.ContractAddress + } + return "" +} + +// MsgUnjailClockContractResponse defines the response structure for executing a +// MsgUnjailClockContract message. +type MsgUnjailClockContractResponse struct { +} + +func (m *MsgUnjailClockContractResponse) Reset() { *m = MsgUnjailClockContractResponse{} } +func (m *MsgUnjailClockContractResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUnjailClockContractResponse) ProtoMessage() {} +func (*MsgUnjailClockContractResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_76642a1e9a85f94b, []int{5} +} +func (m *MsgUnjailClockContractResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUnjailClockContractResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUnjailClockContractResponse.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 *MsgUnjailClockContractResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUnjailClockContractResponse.Merge(m, src) +} +func (m *MsgUnjailClockContractResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUnjailClockContractResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUnjailClockContractResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUnjailClockContractResponse proto.InternalMessageInfo + +// MsgUpdateParams is the Msg/UpdateParams request type. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParams struct { + // authority is the address of the governance account. + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + // params defines the x/clock parameters to update. + // + // NOTE: All parameters must be supplied. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } +func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParams) ProtoMessage() {} +func (*MsgUpdateParams) Descriptor() ([]byte, []int) { + return fileDescriptor_76642a1e9a85f94b, []int{6} +} +func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParams.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 *MsgUpdateParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParams.Merge(m, src) +} +func (m *MsgUpdateParams) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParams proto.InternalMessageInfo + +func (m *MsgUpdateParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgUpdateParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// MsgUpdateParamsResponse defines the response structure for executing a +// MsgUpdateParams message. +// +// Since: cosmos-sdk 0.47 +type MsgUpdateParamsResponse struct { +} + +func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse{} } +func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgUpdateParamsResponse) ProtoMessage() {} +func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_76642a1e9a85f94b, []int{7} +} +func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgUpdateParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgUpdateParamsResponse.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 *MsgUpdateParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgUpdateParamsResponse.Merge(m, src) +} +func (m *MsgUpdateParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgUpdateParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgRegisterClockContract)(nil), "juno.clock.v1.MsgRegisterClockContract") + proto.RegisterType((*MsgRegisterClockContractResponse)(nil), "juno.clock.v1.MsgRegisterClockContractResponse") + proto.RegisterType((*MsgUnregisterClockContract)(nil), "juno.clock.v1.MsgUnregisterClockContract") + proto.RegisterType((*MsgUnregisterClockContractResponse)(nil), "juno.clock.v1.MsgUnregisterClockContractResponse") + proto.RegisterType((*MsgUnjailClockContract)(nil), "juno.clock.v1.MsgUnjailClockContract") + proto.RegisterType((*MsgUnjailClockContractResponse)(nil), "juno.clock.v1.MsgUnjailClockContractResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "juno.clock.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "juno.clock.v1.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("juno/clock/v1/tx.proto", fileDescriptor_76642a1e9a85f94b) } + +var fileDescriptor_76642a1e9a85f94b = []byte{ + // 542 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x3f, 0x6f, 0xd3, 0x40, + 0x18, 0xc6, 0xe3, 0x52, 0x55, 0xea, 0x41, 0x5b, 0x30, 0x6d, 0x93, 0x9a, 0xc8, 0x44, 0xa7, 0xf2, + 0xa7, 0x48, 0xf1, 0x29, 0xad, 0xc4, 0xc0, 0x46, 0x32, 0x30, 0x45, 0x42, 0x46, 0x30, 0xb0, 0x54, + 0x57, 0xe7, 0x74, 0x75, 0x88, 0xef, 0x2c, 0xdf, 0xa5, 0x6a, 0xd7, 0xee, 0x20, 0x24, 0xc4, 0xc8, + 0xc8, 0xce, 0xc0, 0x87, 0xe8, 0x58, 0xc1, 0xc2, 0x84, 0x50, 0x82, 0xc4, 0xd7, 0x40, 0xbe, 0x3b, + 0x3b, 0x24, 0xb1, 0x51, 0x16, 0x58, 0xac, 0xf3, 0xfb, 0x3e, 0xef, 0xfb, 0xfc, 0x64, 0x3f, 0x36, + 0xd8, 0xee, 0x0f, 0x19, 0x47, 0xc1, 0x80, 0x07, 0xaf, 0xd0, 0x49, 0x0b, 0xc9, 0x53, 0x2f, 0x4e, + 0xb8, 0xe4, 0xf6, 0x5a, 0x5a, 0xf7, 0x54, 0xdd, 0x3b, 0x69, 0x39, 0x75, 0xca, 0x39, 0x1d, 0x10, + 0x84, 0xe3, 0x10, 0x61, 0xc6, 0xb8, 0xc4, 0x32, 0xe4, 0x4c, 0x68, 0xb1, 0x53, 0x0d, 0xb8, 0x88, + 0xb8, 0x40, 0x91, 0xa0, 0xe9, 0x92, 0x48, 0x50, 0xd3, 0xb8, 0x35, 0xbd, 0x9d, 0x12, 0x46, 0x44, + 0x98, 0x4d, 0x6d, 0x52, 0x4e, 0xb9, 0x3a, 0xa2, 0xf4, 0x64, 0xaa, 0x3b, 0x7a, 0xd7, 0xa1, 0x6e, + 0xe8, 0x1b, 0xd3, 0xba, 0x81, 0xa3, 0x90, 0x71, 0xa4, 0xae, 0xba, 0x04, 0x07, 0xa0, 0xd6, 0x15, + 0xd4, 0x27, 0x34, 0x14, 0x92, 0x24, 0x9d, 0xd4, 0xa8, 0xc3, 0x99, 0x4c, 0x70, 0x20, 0xed, 0x3b, + 0x60, 0x5d, 0x10, 0xd6, 0x23, 0xc9, 0x21, 0xee, 0xf5, 0x12, 0x22, 0x44, 0xcd, 0x6a, 0x58, 0xf7, + 0x57, 0xfd, 0x35, 0x5d, 0x7d, 0xac, 0x8b, 0xf6, 0x1e, 0xb8, 0x1e, 0x98, 0x91, 0x5c, 0xb8, 0xa4, + 0x84, 0x1b, 0x59, 0xdd, 0x48, 0x21, 0x04, 0x8d, 0x32, 0x37, 0x9f, 0x88, 0x98, 0x33, 0x41, 0x20, + 0x03, 0x4e, 0x57, 0xd0, 0xe7, 0x2c, 0xf9, 0x4f, 0x4c, 0xbb, 0x00, 0x96, 0xfb, 0xe5, 0x54, 0x7d, + 0xb0, 0xad, 0x54, 0x7d, 0x1c, 0x0e, 0xfe, 0x35, 0x51, 0x03, 0xb8, 0xc5, 0x5e, 0x39, 0xcd, 0x1b, + 0x0b, 0x6c, 0xa4, 0x92, 0xb8, 0x87, 0x25, 0x79, 0x8a, 0x13, 0x1c, 0x09, 0xfb, 0x21, 0x58, 0xc5, + 0x43, 0x79, 0xcc, 0x93, 0x50, 0x9e, 0x69, 0x84, 0x76, 0xed, 0xcb, 0xe7, 0xe6, 0xa6, 0x49, 0x80, + 0x59, 0xfe, 0x4c, 0x26, 0x21, 0xa3, 0xfe, 0x44, 0x6a, 0x1f, 0x80, 0x95, 0x58, 0x6d, 0x50, 0x38, + 0x57, 0xf7, 0xb7, 0xbc, 0xa9, 0xe4, 0x7a, 0x7a, 0x7d, 0x7b, 0xf9, 0xe2, 0xfb, 0xed, 0x8a, 0x6f, + 0xa4, 0x8f, 0xd6, 0xcf, 0x7f, 0x7d, 0x7a, 0x30, 0x59, 0x02, 0x77, 0x40, 0x75, 0x86, 0x27, 0x63, + 0xdd, 0xff, 0xb8, 0x0c, 0xae, 0x74, 0x05, 0xb5, 0xdf, 0x5b, 0x60, 0xab, 0x38, 0x67, 0xf7, 0x66, + 0x1c, 0xcb, 0x22, 0xe2, 0xa0, 0x05, 0x85, 0xf9, 0x73, 0x82, 0xe7, 0x5f, 0x7f, 0xbe, 0x5b, 0xaa, + 0x43, 0x07, 0xcd, 0x7e, 0xa5, 0x28, 0x7b, 0xdd, 0xf6, 0x07, 0x0b, 0x54, 0xcb, 0xd2, 0xb6, 0x37, + 0x6f, 0x58, 0x22, 0x75, 0x5a, 0x0b, 0x4b, 0x73, 0xba, 0x5d, 0x45, 0xe7, 0xc2, 0xfa, 0x3c, 0xdd, + 0x30, 0x1f, 0xb5, 0x5f, 0x5b, 0xe0, 0x66, 0x61, 0xee, 0x8a, 0x0c, 0xe7, 0x64, 0x4e, 0x73, 0x21, + 0x59, 0xce, 0xd4, 0x50, 0x4c, 0x0e, 0xac, 0x15, 0x31, 0xa5, 0x63, 0xf6, 0x0b, 0x70, 0x6d, 0x2a, + 0x77, 0x6e, 0x81, 0xc1, 0x1f, 0x7d, 0xe7, 0xee, 0xdf, 0xfb, 0x99, 0x73, 0xfb, 0xc9, 0xc5, 0xc8, + 0xb5, 0x2e, 0x47, 0xae, 0xf5, 0x63, 0xe4, 0x5a, 0x6f, 0xc7, 0x6e, 0xe5, 0x72, 0xec, 0x56, 0xbe, + 0x8d, 0xdd, 0xca, 0xcb, 0x26, 0x0d, 0xe5, 0xf1, 0xf0, 0xc8, 0x0b, 0x78, 0x84, 0x3a, 0x2a, 0xcd, + 0x19, 0xb6, 0xd0, 0x94, 0xa7, 0x86, 0x53, 0x9e, 0xc5, 0x44, 0x1c, 0xad, 0xa8, 0x3f, 0xdb, 0xc1, + 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x84, 0xfe, 0x6c, 0x9a, 0x05, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConn + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion4 + +// MsgClient is the client API for Msg service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. +type MsgClient interface { + // RegisterClockContract defines the endpoint for + // registering a new clock contract. + RegisterClockContract(ctx context.Context, in *MsgRegisterClockContract, opts ...grpc.CallOption) (*MsgRegisterClockContractResponse, error) + // UnregisterClockContract defines the endpoint for + // unregistering a clock contract. + UnregisterClockContract(ctx context.Context, in *MsgUnregisterClockContract, opts ...grpc.CallOption) (*MsgUnregisterClockContractResponse, error) + // UnjailClockContract defines the endpoint for + // unjailing a clock contract. + UnjailClockContract(ctx context.Context, in *MsgUnjailClockContract, opts ...grpc.CallOption) (*MsgUnjailClockContractResponse, error) + // UpdateParams defines a governance operation for updating the x/clock module + // parameters. The authority is hard-coded to the x/gov module account. + // + // Since: cosmos-sdk 0.47 + UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) RegisterClockContract(ctx context.Context, in *MsgRegisterClockContract, opts ...grpc.CallOption) (*MsgRegisterClockContractResponse, error) { + out := new(MsgRegisterClockContractResponse) + err := c.cc.Invoke(ctx, "/juno.clock.v1.Msg/RegisterClockContract", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnregisterClockContract(ctx context.Context, in *MsgUnregisterClockContract, opts ...grpc.CallOption) (*MsgUnregisterClockContractResponse, error) { + out := new(MsgUnregisterClockContractResponse) + err := c.cc.Invoke(ctx, "/juno.clock.v1.Msg/UnregisterClockContract", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UnjailClockContract(ctx context.Context, in *MsgUnjailClockContract, opts ...grpc.CallOption) (*MsgUnjailClockContractResponse, error) { + out := new(MsgUnjailClockContractResponse) + err := c.cc.Invoke(ctx, "/juno.clock.v1.Msg/UnjailClockContract", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { + out := new(MsgUpdateParamsResponse) + err := c.cc.Invoke(ctx, "/juno.clock.v1.Msg/UpdateParams", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // RegisterClockContract defines the endpoint for + // registering a new clock contract. + RegisterClockContract(context.Context, *MsgRegisterClockContract) (*MsgRegisterClockContractResponse, error) + // UnregisterClockContract defines the endpoint for + // unregistering a clock contract. + UnregisterClockContract(context.Context, *MsgUnregisterClockContract) (*MsgUnregisterClockContractResponse, error) + // UnjailClockContract defines the endpoint for + // unjailing a clock contract. + UnjailClockContract(context.Context, *MsgUnjailClockContract) (*MsgUnjailClockContractResponse, error) + // UpdateParams defines a governance operation for updating the x/clock module + // parameters. The authority is hard-coded to the x/gov module account. + // + // Since: cosmos-sdk 0.47 + UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) RegisterClockContract(ctx context.Context, req *MsgRegisterClockContract) (*MsgRegisterClockContractResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method RegisterClockContract not implemented") +} +func (*UnimplementedMsgServer) UnregisterClockContract(ctx context.Context, req *MsgUnregisterClockContract) (*MsgUnregisterClockContractResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnregisterClockContract not implemented") +} +func (*UnimplementedMsgServer) UnjailClockContract(ctx context.Context, req *MsgUnjailClockContract) (*MsgUnjailClockContractResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UnjailClockContract not implemented") +} +func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_RegisterClockContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgRegisterClockContract) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).RegisterClockContract(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/juno.clock.v1.Msg/RegisterClockContract", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).RegisterClockContract(ctx, req.(*MsgRegisterClockContract)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnregisterClockContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnregisterClockContract) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnregisterClockContract(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/juno.clock.v1.Msg/UnregisterClockContract", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnregisterClockContract(ctx, req.(*MsgUnregisterClockContract)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UnjailClockContract_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUnjailClockContract) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UnjailClockContract(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/juno.clock.v1.Msg/UnjailClockContract", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UnjailClockContract(ctx, req.(*MsgUnjailClockContract)) + } + return interceptor(ctx, in, info, handler) +} + +func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgUpdateParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).UpdateParams(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/juno.clock.v1.Msg/UpdateParams", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "juno.clock.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "RegisterClockContract", + Handler: _Msg_RegisterClockContract_Handler, + }, + { + MethodName: "UnregisterClockContract", + Handler: _Msg_UnregisterClockContract_Handler, + }, + { + MethodName: "UnjailClockContract", + Handler: _Msg_UnjailClockContract_Handler, + }, + { + MethodName: "UpdateParams", + Handler: _Msg_UpdateParams_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "juno/clock/v1/tx.proto", +} + +func (m *MsgRegisterClockContract) 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 *MsgRegisterClockContract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterClockContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgRegisterClockContractResponse) 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 *MsgRegisterClockContractResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgRegisterClockContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUnregisterClockContract) 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 *MsgUnregisterClockContract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnregisterClockContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUnregisterClockContractResponse) 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 *MsgUnregisterClockContractResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnregisterClockContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUnjailClockContract) 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 *MsgUnjailClockContract) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnjailClockContract) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.ContractAddress) > 0 { + i -= len(m.ContractAddress) + copy(dAtA[i:], m.ContractAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ContractAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SenderAddress) > 0 { + i -= len(m.SenderAddress) + copy(dAtA[i:], m.SenderAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.SenderAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUnjailClockContractResponse) 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 *MsgUnjailClockContractResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUnjailClockContractResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParams) 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 *MsgUpdateParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgUpdateParamsResponse) 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 *MsgUpdateParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintTx(dAtA []byte, offset int, v uint64) int { + offset -= sovTx(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MsgRegisterClockContract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgRegisterClockContractResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUnregisterClockContract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUnregisterClockContractResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUnjailClockContract) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SenderAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.ContractAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgUnjailClockContractResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *MsgUpdateParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgUpdateParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovTx(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozTx(x uint64) (n int) { + return sovTx(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MsgRegisterClockContract) 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 ErrIntOverflowTx + } + 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: MsgRegisterClockContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterClockContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgRegisterClockContractResponse) 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 ErrIntOverflowTx + } + 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: MsgRegisterClockContractResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgRegisterClockContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUnregisterClockContract) 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 ErrIntOverflowTx + } + 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: MsgUnregisterClockContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnregisterClockContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUnregisterClockContractResponse) 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 ErrIntOverflowTx + } + 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: MsgUnregisterClockContractResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnregisterClockContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUnjailClockContract) 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 ErrIntOverflowTx + } + 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: MsgUnjailClockContract: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnjailClockContract: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SenderAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SenderAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ContractAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.ContractAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUnjailClockContractResponse) 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 ErrIntOverflowTx + } + 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: MsgUnjailClockContractResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUnjailClockContractResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParams) 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 ErrIntOverflowTx + } + 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: MsgUpdateParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Params", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.Params.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgUpdateParamsResponse) 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 ErrIntOverflowTx + } + 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: MsgUpdateParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgUpdateParamsResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipTx(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowTx + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthTx + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupTx + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthTx + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthTx = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowTx = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupTx = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/clock/types/tx.pb.gw.go b/x/clock/types/tx.pb.gw.go new file mode 100644 index 00000000..13af0301 --- /dev/null +++ b/x/clock/types/tx.pb.gw.go @@ -0,0 +1,337 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: juno/clock/v1/tx.proto + +/* +Package types is a reverse proxy. + +It translates gRPC into RESTful JSON APIs. +*/ +package types + +import ( + "context" + "io" + "net/http" + + "github.com/golang/protobuf/descriptor" + "github.com/golang/protobuf/proto" + "github.com/grpc-ecosystem/grpc-gateway/runtime" + "github.com/grpc-ecosystem/grpc-gateway/utilities" + "google.golang.org/grpc" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" +) + +// Suppress "imported and not used" errors +var _ codes.Code +var _ io.Reader +var _ status.Status +var _ = runtime.String +var _ = utilities.NewDoubleArray +var _ = descriptor.ForMessage +var _ = metadata.Join + +var ( + filter_Msg_RegisterClockContract_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_RegisterClockContract_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgRegisterClockContract + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_RegisterClockContract_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.RegisterClockContract(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_RegisterClockContract_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgRegisterClockContract + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_RegisterClockContract_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.RegisterClockContract(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_UnregisterClockContract_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_UnregisterClockContract_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUnregisterClockContract + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_UnregisterClockContract_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UnregisterClockContract(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_UnregisterClockContract_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUnregisterClockContract + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_UnregisterClockContract_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UnregisterClockContract(ctx, &protoReq) + return msg, metadata, err + +} + +var ( + filter_Msg_UnjailClockContract_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} +) + +func request_Msg_UnjailClockContract_0(ctx context.Context, marshaler runtime.Marshaler, client MsgClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUnjailClockContract + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_UnjailClockContract_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := client.UnjailClockContract(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Msg_UnjailClockContract_0(ctx context.Context, marshaler runtime.Marshaler, server MsgServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq MsgUnjailClockContract + var metadata runtime.ServerMetadata + + if err := req.ParseForm(); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Msg_UnjailClockContract_0); err != nil { + return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) + } + + msg, err := server.UnjailClockContract(ctx, &protoReq) + return msg, metadata, err + +} + +// RegisterMsgHandlerServer registers the http handlers for service Msg to "mux". +// UnaryRPC :call MsgServer directly. +// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. +// Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterMsgHandlerFromEndpoint instead. +func RegisterMsgHandlerServer(ctx context.Context, mux *runtime.ServeMux, server MsgServer) error { + + mux.Handle("POST", pattern_Msg_RegisterClockContract_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_RegisterClockContract_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_RegisterClockContract_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_UnregisterClockContract_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_UnregisterClockContract_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_UnregisterClockContract_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_UnjailClockContract_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Msg_UnjailClockContract_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_UnjailClockContract_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +// RegisterMsgHandlerFromEndpoint is same as RegisterMsgHandler but +// automatically dials to "endpoint" and closes the connection when "ctx" gets done. +func RegisterMsgHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { + conn, err := grpc.Dial(endpoint, opts...) + if err != nil { + return err + } + defer func() { + if err != nil { + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + return + } + go func() { + <-ctx.Done() + if cerr := conn.Close(); cerr != nil { + grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) + } + }() + }() + + return RegisterMsgHandler(ctx, mux, conn) +} + +// RegisterMsgHandler registers the http handlers for service Msg to "mux". +// The handlers forward requests to the grpc endpoint over "conn". +func RegisterMsgHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { + return RegisterMsgHandlerClient(ctx, mux, NewMsgClient(conn)) +} + +// RegisterMsgHandlerClient registers the http handlers for service Msg +// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "MsgClient". +// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "MsgClient" +// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in +// "MsgClient" to call the correct interceptors. +func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client MsgClient) error { + + mux.Handle("POST", pattern_Msg_RegisterClockContract_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_RegisterClockContract_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_RegisterClockContract_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_UnregisterClockContract_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_UnregisterClockContract_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_UnregisterClockContract_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + mux.Handle("POST", pattern_Msg_UnjailClockContract_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Msg_UnjailClockContract_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Msg_UnjailClockContract_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + + return nil +} + +var ( + pattern_Msg_RegisterClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"juno", "clock", "v1", "tx", "register"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Msg_UnregisterClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"juno", "clock", "v1", "tx", "unregister"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Msg_UnjailClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"juno", "clock", "v1", "tx", "unjail"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Msg_RegisterClockContract_0 = runtime.ForwardResponseMessage + + forward_Msg_UnregisterClockContract_0 = runtime.ForwardResponseMessage + + forward_Msg_UnjailClockContract_0 = runtime.ForwardResponseMessage +) From 13d2d3d8fc3a2d89e21eaf8c8e2d20685b9e5629 Mon Sep 17 00:00:00 2001 From: C H Date: Thu, 25 Jul 2024 14:22:33 +0800 Subject: [PATCH 2/8] Added integration for clock module --- app/helpers/global_errors.go | 2 +- app/keepers/keepers.go | 14 ++++ app/keepers/keys.go | 2 + app/modules.go | 13 +++- app/upgrades/v4/constants.go | 2 + app/upgrades/v4/upgrades.go | 9 +++ go.mod | 53 +++++++------- go.sum | 129 ++++++++++++++++++++--------------- 8 files changed, 139 insertions(+), 85 deletions(-) diff --git a/app/helpers/global_errors.go b/app/helpers/global_errors.go index 385ddb54..8506bf35 100644 --- a/app/helpers/global_errors.go +++ b/app/helpers/global_errors.go @@ -6,7 +6,7 @@ import ( sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" ) -const codespace = "juno-global" +const codespace = "cyber-global" var ( ErrInvalidAddress = sdkerrors.ErrInvalidAddress diff --git a/app/keepers/keepers.go b/app/keepers/keepers.go index ab41619a..3ade3b13 100644 --- a/app/keepers/keepers.go +++ b/app/keepers/keepers.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/cosmos/cosmos-sdk/x/nft" nftkeeper "github.com/cosmos/cosmos-sdk/x/nft/keeper" + clocktypes "github.com/cybercongress/go-cyber/v4/x/clock/types" tokenfactorykeeper "github.com/cybercongress/go-cyber/v4/x/tokenfactory/keeper" tokenfactorytypes "github.com/cybercongress/go-cyber/v4/x/tokenfactory/types" "path/filepath" @@ -87,6 +88,8 @@ import ( consensusparamtypes "github.com/cosmos/cosmos-sdk/x/consensus/types" govv1beta "github.com/cosmos/cosmos-sdk/x/gov/types/v1beta1" + + clockkeeper "github.com/cybercongress/go-cyber/v4/x/clock/keeper" ) var ( @@ -156,6 +159,8 @@ type AppKeepers struct { GridKeeper gridkeeper.Keeper DmnKeeper *dmnkeeper.Keeper ResourcesKeeper resourceskeeper.Keeper + ContractKeeper wasmtypes.ContractOpsKeeper + ClockKeeper clockkeeper.Keeper ScopedIBCKeeper capabilitykeeper.ScopedKeeper ScopedTransferKeeper capabilitykeeper.ScopedKeeper @@ -523,6 +528,15 @@ func NewAppKeepers( wasmOpts..., ) + appKeepers.ContractKeeper = wasmkeeper.NewDefaultPermissionKeeper(&appKeepers.WasmKeeper) + appKeepers.ClockKeeper = clockkeeper.NewKeeper( + appKeepers.keys[clocktypes.StoreKey], + appCodec, + appKeepers.WasmKeeper, + appKeepers.ContractKeeper, + govModAddress, + ) + appKeepers.DmnKeeper.SetWasmKeeper(appKeepers.WasmKeeper) // register wasm gov proposal types diff --git a/app/keepers/keys.go b/app/keepers/keys.go index d3003529..d74288bd 100644 --- a/app/keepers/keys.go +++ b/app/keepers/keys.go @@ -23,6 +23,7 @@ import ( ibcfeetypes "github.com/cosmos/ibc-go/v7/modules/apps/29-fee/types" ibctransfertypes "github.com/cosmos/ibc-go/v7/modules/apps/transfer/types" ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" + clocktypes "github.com/cybercongress/go-cyber/v4/x/clock/types" tokenfactorytypes "github.com/cybercongress/go-cyber/v4/x/tokenfactory/types" liquiditytypes "github.com/cybercongress/go-cyber/v4/x/liquidity/types" @@ -49,6 +50,7 @@ func (appKeepers *AppKeepers) GenerateKeys() { ibctransfertypes.StoreKey, ibcfeetypes.StoreKey, wasmtypes.StoreKey, + clocktypes.StoreKey, // our additions liquiditytypes.StoreKey, bandwidthtypes.StoreKey, diff --git a/app/modules.go b/app/modules.go index 70bf695d..5c2b0976 100644 --- a/app/modules.go +++ b/app/modules.go @@ -49,6 +49,7 @@ import ( ibcexported "github.com/cosmos/ibc-go/v7/modules/core/exported" solomachine "github.com/cosmos/ibc-go/v7/modules/light-clients/06-solomachine" ibctm "github.com/cosmos/ibc-go/v7/modules/light-clients/07-tendermint" + "github.com/cybercongress/go-cyber/v4/x/clock" "github.com/cybercongress/go-cyber/v4/x/tokenfactory" tokenfactorytypes "github.com/cybercongress/go-cyber/v4/x/tokenfactory/types" @@ -72,6 +73,7 @@ import ( stakingwrap "github.com/cybercongress/go-cyber/v4/x/staking" authsims "github.com/cosmos/cosmos-sdk/x/auth/simulation" + clocktypes "github.com/cybercongress/go-cyber/v4/x/clock/types" ) // ModuleBasics TODO add notes which modules have functional blockers @@ -110,6 +112,7 @@ var ModuleBasics = module.NewBasicManager( dmn.AppModuleBasic{}, resources.AppModuleBasic{}, tokenfactory.AppModuleBasic{}, + clock.AppModuleBasic{}, // https://github.com/cosmos/ibc-go/blob/main/docs/docs/05-migrations/08-v6-to-v7.md ibctm.AppModuleBasic{}, solomachine.AppModuleBasic{}, @@ -164,6 +167,7 @@ func appModules( // NOTE add Bank Proxy here to resolve issue when new neuron is created during token-factory token transfer // TODO add storage listener to update neurons memory index out of cyberbank proxy tokenfactory.NewAppModule(app.AppKeepers.TokenFactoryKeeper, app.AppKeepers.AccountKeeper, app.CyberbankKeeper.Proxy, app.GetSubspace(tokenfactorytypes.ModuleName)), + clock.NewAppModule(appCodec, app.AppKeepers.ClockKeeper), } } @@ -220,14 +224,15 @@ func orderBeginBlockers() []string { nft.ModuleName, consensusparamtypes.ModuleName, // additional modules + ibctransfertypes.ModuleName, + ibcexported.ModuleName, liquiditytypes.ModuleName, dmntypes.ModuleName, + clocktypes.ModuleName, bandwidthtypes.ModuleName, cyberbanktypes.ModuleName, graphtypes.ModuleName, gridtypes.ModuleName, - ibctransfertypes.ModuleName, - ibcexported.ModuleName, ranktypes.ModuleName, resourcestypes.ModuleName, ibcfeetypes.ModuleName, @@ -260,8 +265,8 @@ func orderEndBlockers() []string { ibctransfertypes.ModuleName, ibcexported.ModuleName, ibcfeetypes.ModuleName, + clocktypes.ModuleName, tokenfactorytypes.ModuleName, - graphtypes.ModuleName, dmntypes.ModuleName, gridtypes.ModuleName, resourcestypes.ModuleName, @@ -269,6 +274,7 @@ func orderEndBlockers() []string { wasm.ModuleName, cyberbanktypes.ModuleName, bandwidthtypes.ModuleName, + graphtypes.ModuleName, ranktypes.ModuleName, } } @@ -298,6 +304,7 @@ func orderInitBlockers() []string { ibcexported.ModuleName, liquiditytypes.ModuleName, ibcfeetypes.ModuleName, + clocktypes.ModuleName, tokenfactorytypes.ModuleName, wasm.ModuleName, bandwidthtypes.ModuleName, diff --git a/app/upgrades/v4/constants.go b/app/upgrades/v4/constants.go index 0bda4971..5be971b4 100644 --- a/app/upgrades/v4/constants.go +++ b/app/upgrades/v4/constants.go @@ -5,6 +5,7 @@ import ( consensustypes "github.com/cosmos/cosmos-sdk/x/consensus/types" crisistypes "github.com/cosmos/cosmos-sdk/x/crisis/types" "github.com/cosmos/cosmos-sdk/x/nft" + clocktypes "github.com/cybercongress/go-cyber/v4/x/clock/types" tokenfactorytypes "github.com/cybercongress/go-cyber/v4/x/tokenfactory/types" resourcestypes "github.com/cybercongress/go-cyber/v4/x/resources/types" @@ -24,6 +25,7 @@ var Upgrade = upgrades.Upgrade{ resourcestypes.ModuleName, tokenfactorytypes.ModuleName, nft.ModuleName, + clocktypes.ModuleName, }, }, } diff --git a/app/upgrades/v4/upgrades.go b/app/upgrades/v4/upgrades.go index 0ee47ef6..e1ba4118 100644 --- a/app/upgrades/v4/upgrades.go +++ b/app/upgrades/v4/upgrades.go @@ -4,6 +4,7 @@ import ( "fmt" "github.com/cosmos/ibc-go/v7/modules/core/exported" generaltypes "github.com/cybercongress/go-cyber/v4/types" + clocktypes "github.com/cybercongress/go-cyber/v4/x/clock/types" tokenfactorytypes "github.com/cybercongress/go-cyber/v4/x/tokenfactory/types" "time" @@ -129,6 +130,14 @@ func CreateV4UpgradeHandler( } logger.Info("set tokenfactory params") + // x/clock + if err := keepers.ClockKeeper.SetParams(ctx, clocktypes.Params{ + ContractGasLimit: 250_000, // TODO update + }); err != nil { + return nil, err + } + logger.Info("set clock params") + after := time.Now() ctx.Logger().Info("migration time", "duration_ms", after.Sub(before).Milliseconds()) diff --git a/go.mod b/go.mod index ec7fb4c1..90645722 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/CosmWasm/wasmd v0.45.0 github.com/CosmWasm/wasmvm v1.5.2 github.com/armon/go-metrics v0.4.1 - github.com/cometbft/cometbft v0.37.6 + github.com/cometbft/cometbft v0.37.8 github.com/cometbft/cometbft-db v0.12.0 github.com/cosmos/cosmos-proto v1.0.0-beta.5 github.com/cosmos/cosmos-sdk v0.47.12 @@ -26,37 +26,36 @@ require ( github.com/prometheus/client_golang v1.16.0 github.com/rakyll/statik v0.1.7 // indirect github.com/spf13/cast v1.6.0 - github.com/spf13/cobra v1.8.0 + github.com/spf13/cobra v1.8.1 github.com/spf13/pflag v1.0.5 github.com/spf13/viper v1.18.2 github.com/stretchr/testify v1.9.0 github.com/syndtr/goleveldb v1.0.1-0.20220721030215-126854af5e6d - google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 - google.golang.org/grpc v1.62.1 + google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 + google.golang.org/grpc v1.65.0 gopkg.in/yaml.v2 v2.4.0 ) require ( cloud.google.com/go v0.112.0 // indirect - cloud.google.com/go/compute v1.23.3 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/iam v1.1.5 // indirect cloud.google.com/go/storage v1.36.0 // indirect - cosmossdk.io/core v0.5.1 // indirect + cosmossdk.io/core v0.6.1 // indirect cosmossdk.io/depinject v1.0.0-alpha.4 // indirect cosmossdk.io/log v1.3.1 // indirect filippo.io/edwards25519 v1.0.0 // indirect github.com/99designs/go-keychain v0.0.0-20191008050251-8e49817e8af4 // indirect - github.com/99designs/keyring v1.2.1 // indirect + github.com/99designs/keyring v1.2.2 // indirect github.com/ChainSafe/go-schnorrkel v1.0.0 // indirect - github.com/DataDog/zstd v1.4.5 // indirect + github.com/DataDog/zstd v1.5.2 // indirect github.com/aws/aws-sdk-go v1.44.203 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect github.com/bgentry/speakeasy v0.1.1-0.20220910012023-760eaf8b6816 // indirect github.com/btcsuite/btcd/btcec/v2 v2.3.2 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cenkalti/backoff/v4 v4.2.1 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/chzyer/readline v1.5.1 // indirect github.com/cockroachdb/apd/v2 v2.0.2 // indirect github.com/cockroachdb/errors v1.11.1 // indirect @@ -92,7 +91,7 @@ require ( github.com/go-logr/stdr v1.2.2 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/gogo/googleapis v1.4.1 // indirect - github.com/golang/glog v1.2.0 // indirect + github.com/golang/glog v1.2.1 // indirect github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect github.com/golang/mock v1.6.0 // indirect github.com/golang/snappy v0.0.4 // indirect @@ -117,6 +116,7 @@ require ( github.com/hashicorp/go-safetemp v1.0.0 // indirect github.com/hashicorp/go-version v1.6.0 // indirect github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d // indirect + github.com/hashicorp/golang-lru/v2 v2.0.7 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hdevalence/ed25519consensus v0.1.0 // indirect github.com/huandu/skiplist v1.2.0 // indirect @@ -150,13 +150,14 @@ require ( github.com/multiformats/go-multihash v0.0.13 // indirect github.com/multiformats/go-varint v0.0.5 // indirect github.com/opencontainers/go-digest v1.0.0 // indirect + github.com/opencontainers/runc v1.1.5 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20230317030725-371a4b8eda08 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_model v0.3.0 // indirect github.com/prometheus/common v0.42.0 // indirect - github.com/prometheus/procfs v0.10.1 // indirect + github.com/prometheus/procfs v0.12.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/cors v1.8.3 // indirect @@ -180,25 +181,23 @@ require ( go.opentelemetry.io/otel v1.21.0 // indirect go.opentelemetry.io/otel/metric v1.21.0 // indirect go.opentelemetry.io/otel/trace v1.21.0 // indirect - go.uber.org/atomic v1.10.0 // indirect - go.uber.org/multierr v1.9.0 // indirect - golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/net v0.23.0 // indirect - golang.org/x/oauth2 v0.16.0 // indirect - golang.org/x/sync v0.6.0 // indirect - golang.org/x/sys v0.18.0 // indirect - golang.org/x/term v0.18.0 // indirect - golang.org/x/text v0.14.0 // indirect + go.uber.org/multierr v1.10.0 // indirect + golang.org/x/crypto v0.23.0 // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect + golang.org/x/net v0.25.0 // indirect + golang.org/x/oauth2 v0.20.0 // indirect + golang.org/x/sync v0.7.0 // indirect + golang.org/x/sys v0.20.0 // indirect + golang.org/x/term v0.20.0 // indirect + golang.org/x/text v0.15.0 // indirect golang.org/x/time v0.5.0 // indirect google.golang.org/api v0.155.0 // indirect - google.golang.org/appengine v1.6.8 // indirect google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 // indirect - google.golang.org/protobuf v1.33.0 // indirect + google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 // indirect + google.golang.org/protobuf v1.34.1 // indirect gopkg.in/ini.v1 v1.67.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect - nhooyr.io/websocket v1.8.6 // indirect + nhooyr.io/websocket v1.8.7 // indirect pgregory.net/rapid v1.1.0 // indirect sigs.k8s.io/yaml v1.4.0 // indirect ) diff --git a/go.sum b/go.sum index 810e7ca3..9bd117f3 100644 --- a/go.sum +++ b/go.sum @@ -68,10 +68,8 @@ cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU= cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U= cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU= -cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk= -cloud.google.com/go/compute v1.23.3/go.mod h1:VCgBUoMnIVIR0CscqQiPJLAG25E3ZRZMzcFZeQ+h8CI= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/containeranalysis v0.5.1/go.mod h1:1D92jd8gRR/c0fGMlymRgxWD3Qw9C1ff6/T7mLgVL8I= cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4= cloud.google.com/go/datacatalog v1.3.0/go.mod h1:g9svFY6tuR+j+hrTw3J2dNcmI0dzmSiyOzm8kpLq0a0= @@ -186,8 +184,8 @@ cloud.google.com/go/workflows v1.6.0/go.mod h1:6t9F5h/unJz41YqfBmqSASJSXccBLtD1V cloud.google.com/go/workflows v1.7.0/go.mod h1:JhSrZuVZWuiDfKEFxU0/F1PQjmpnpcoISEXH2bcHC3M= cosmossdk.io/api v0.3.1 h1:NNiOclKRR0AOlO4KIqeaG6PS6kswOMhHD0ir0SscNXE= cosmossdk.io/api v0.3.1/go.mod h1:DfHfMkiNA2Uhy8fj0JJlOCYOBp4eWUUJ1te5zBGNyIw= -cosmossdk.io/core v0.5.1 h1:vQVtFrIYOQJDV3f7rw4pjjVqc1id4+mE0L9hHP66pyI= -cosmossdk.io/core v0.5.1/go.mod h1:KZtwHCLjcFuo0nmDc24Xy6CRNEL9Vl/MeimQ2aC7NLE= +cosmossdk.io/core v0.6.1 h1:OBy7TI2W+/gyn2z40vVvruK3di+cAluinA6cybFbE7s= +cosmossdk.io/core v0.6.1/go.mod h1:g3MMBCBXtxbDWBURDVnJE7XML4BG5qENhs0gzkcpuFA= cosmossdk.io/depinject v1.0.0-alpha.4 h1:PLNp8ZYAMPTUKyG9IK2hsbciDWqna2z1Wsl98okJopc= cosmossdk.io/depinject v1.0.0-alpha.4/go.mod h1:HeDk7IkR5ckZ3lMGs/o91AVUc7E596vMaOmslGFM3yU= cosmossdk.io/errors v1.0.1 h1:bzu+Kcr0kS/1DuPBtUFdWjzLqyUuCiyHjyJB6srBV/0= @@ -214,8 +212,8 @@ github.com/CosmWasm/wasmd v0.45.0/go.mod h1:RnSAiqbNIZu4QhO+0pd7qGZgnYAMBPGmXpzT github.com/CosmWasm/wasmvm v1.5.2 h1:+pKB1Mz9GZVt1vadxB+EDdD1FOz3dMNjIKq/58/lrag= github.com/CosmWasm/wasmvm v1.5.2/go.mod h1:Q0bSEtlktzh7W2hhEaifrFp1Erx11ckQZmjq8FLCyys= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/DataDog/zstd v1.4.5 h1:EndNeuB0l9syBZhut0wns3gV1hL8zX8LIu6ZiVHWLIQ= -github.com/DataDog/zstd v1.4.5/go.mod h1:1jcaCB/ufaK+sKp1NBhlGmpz41jOoPQ35bpF36t7BBo= +github.com/DataDog/zstd v1.5.2 h1:vUG4lAyuPCXO0TLbXvPv7EB7cNK1QV/luu55UHLrrn8= +github.com/DataDog/zstd v1.5.2/go.mod h1:g4AWEaM3yOg3HYfnJ3YIawPnVdXJh9QME85blwSAmyw= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= @@ -273,13 +271,14 @@ github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= +github.com/cenkalti/backoff/v4 v4.2.1 h1:y4OZtCnogmCPw98Zjyt5a6+QwPLGkiQsYW5oUqylYbM= +github.com/cenkalti/backoff/v4 v4.2.1/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/checkpoint-restore/go-criu/v5 v5.3.0/go.mod h1:E/eQpaFtUKGOOSEBZgmKAcn+zUUwWxqcaKZlF54wK8E= github.com/cheggaaa/pb v1.0.27/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s= github.com/chenzhuoyu/base64x v0.0.0-20211019084208-fb5309c8db06/go.mod h1:DH46F32mSOjUmXrMHnKwZdA8wcEefY7UVqBKYGjpdQY= github.com/chenzhuoyu/base64x v0.0.0-20221115062448-fe3a3abad311 h1:qSGYFH7+jGhDF8vLC+iwCD4WpbV1EBDSzWkJODFLams= @@ -293,6 +292,7 @@ github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObk github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= +github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= @@ -306,8 +306,8 @@ github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWH github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa h1:jQCWAUqqlij9Pgj2i/PB79y4KOPYVyFYdROxgaCwdTQ= -github.com/cncf/xds/go v0.0.0-20231128003011-0fa0005c9caa/go.mod h1:x/1Gn8zydmfq8dk6e9PdstVsDgu9RuyIIJqAaF//0IM= +github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b h1:ga8SEFjZ60pxLcmhnThWgvH2wg8376yUJmPhEH4H3kw= +github.com/cncf/xds/go v0.0.0-20240423153145-555b57ec207b/go.mod h1:W+zGtBO5Y1IgJhy4+A9GOqVhqLpfZi+vwmdNXUehLA8= github.com/cockroachdb/apd/v2 v2.0.2 h1:weh8u7Cneje73dDh+2tEVLUvyBc89iwepWCD8b8034E= github.com/cockroachdb/apd/v2 v2.0.2/go.mod h1:DDxRlzC2lo3/vSlmSoS7JkqbbrARPuFOGr0B9pvN3Gw= github.com/cockroachdb/datadriven v0.0.0-20190809214429-80d97fb3cbaa/go.mod h1:zn76sxSg3SzpJ0PPJaLDCu+Bu0Lg3sKTORVIj19EIF8= @@ -326,16 +326,18 @@ github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06/go.mod h1: github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd/go.mod h1:sE/e/2PUdi/liOCUjSTXgM1o87ZssimdTWN964YiIeI= github.com/coinbase/rosetta-sdk-go/types v1.0.0 h1:jpVIwLcPoOeCR6o1tU+Xv7r5bMONNbHU7MuEHboiFuA= github.com/coinbase/rosetta-sdk-go/types v1.0.0/go.mod h1:eq7W2TMRH22GTW0N0beDnN931DW0/WOI1R2sdHNHG4c= -github.com/cometbft/cometbft v0.37.6 h1:2BSD0lGPbcIyRd99Pf1zH0Sa8o0pbfqVWEDbZ4Ec2Uc= -github.com/cometbft/cometbft v0.37.6/go.mod h1:5FRkFil9uagHZogIX9x8z51c3GIPpQmdIN8Mq46HfzY= +github.com/cometbft/cometbft v0.37.8 h1:/LLlJd+XilMSGjBGWBGQ1EvLVU//9C5SADWEwvV8cRM= +github.com/cometbft/cometbft v0.37.8/go.mod h1:gFGCFXNGDci6tMLemANPGTfU+j4+oH63PjeLe0iIjJk= github.com/cometbft/cometbft-db v0.12.0 h1:v77/z0VyfSU7k682IzZeZPFZrQAKiQwkqGN0QzAjMi0= github.com/cometbft/cometbft-db v0.12.0/go.mod h1:aX2NbCrjNVd2ZajYxt1BsiFf/Z+TQ2MN0VxdicheYuw= github.com/confio/ics23/go v0.9.0 h1:cWs+wdbS2KRPZezoaaj+qBleXgUk5WOQFMP3CQFGTr4= github.com/confio/ics23/go v0.9.0/go.mod h1:4LPZ2NYqnYIVRklaozjNR1FScgDJ2s5Xrp+e/mYVRak= +github.com/containerd/console v1.0.3/go.mod h1:7LqA/THxQ86k76b8c/EMSiaJ3h1eZkMkXar0TQ1gf3U= github.com/containerd/continuity v0.3.0 h1:nisirsYROK15TAMVukJOUyGJjz4BNQJBVsNvAXZJ/eg= github.com/containerd/continuity v0.3.0/go.mod h1:wJEAIwKOm/pBZuBd0JmeTvnLquTB1Ag8espWhkykbPM= github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/btcutil v1.0.5 h1:t+ZFcX77LpKtDBhjucvnOH8C2l2ioGsBNEQ3jef8xFk= @@ -365,11 +367,12 @@ github.com/cosmos/ledger-cosmos-go v0.12.4/go.mod h1:fjfVWRf++Xkygt9wzCsjEBdjcf7 github.com/cosmos/rosetta-sdk-go v0.10.0 h1:E5RhTruuoA7KTIXUcMicL76cffyeoyvNybzUGSKFTcM= github.com/cosmos/rosetta-sdk-go v0.10.0/go.mod h1:SImAZkb96YbwvoRkzSMQB6noNJXFgWl/ENIznEoYQI4= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= -github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= +github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= github.com/creachadair/taskgroup v0.4.2 h1:jsBLdAJE42asreGss2xZGZ8fJra7WtwnHWeJFxv2Li8= github.com/creachadair/taskgroup v0.4.2/go.mod h1:qiXUOSrbwAY3u0JPGTzObbE3yf9hcXHDKBZ2ZjpCbgM= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= +github.com/cyphar/filepath-securejoin v0.2.3/go.mod h1:aPGpWjXOXUn2NCNjFvBE6aRxGGx79pTxQpKOJNYHHl4= github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0= github.com/danieljoos/wincred v1.1.2/go.mod h1:GijpziifJoIBfYh+S7BbkdUTU4LfM+QnGqR5Vl2tAx0= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -393,6 +396,7 @@ github.com/docker/distribution v2.8.2+incompatible h1:T3de5rq0dB1j30rp0sA2rER+m3 github.com/docker/distribution v2.8.2+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ= github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec= +github.com/docker/go-units v0.4.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4= github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk= github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= @@ -426,6 +430,7 @@ github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8 github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g= github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= +github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8= github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= @@ -478,6 +483,7 @@ github.com/goccy/go-json v0.10.0/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MG github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= +github.com/godbus/dbus/v5 v5.0.6/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s= github.com/gogo/googleapis v1.4.1-0.20201022092350-68b0159b7869/go.mod h1:5YRNX2z1oM5gXdAkurHa942MDgEJyk02w4OecKY87+c= github.com/gogo/googleapis v1.4.1 h1:1Yx4Myt7BxzvUr5ldGSbwYiZG6t9wGBZ+8/fX3Wvtq0= @@ -490,8 +496,8 @@ github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= github.com/gogo/protobuf v1.3.2/go.mod h1:P1XiOD3dCwIKUDQYPy72D8LYyHL2YPYrpS2s69NZV8Q= github.com/golang-jwt/jwt/v4 v4.4.2/go.mod h1:m21LjoU+eqJr34lmDMbreY2eSTRJ1cv77w39/MY0Ch0= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= -github.com/golang/glog v1.2.0 h1:uCdmnmatrKCgMBlM4rMuJZWOkPDqdbZPnrMXDY4gI68= -github.com/golang/glog v1.2.0/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/glog v1.2.1 h1:OptwRhECazUx5ix5TTWC3EZhsZEHWcYWY4FQHTIubm4= +github.com/golang/glog v1.2.1/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= @@ -665,6 +671,8 @@ github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d h1:dg1dEPuWpEqDnvIw251EVy4zlP8gWbsGj4BsUKCRpYs= github.com/hashicorp/golang-lru v0.5.5-0.20210104140557-80c98217689d/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4= +github.com/hashicorp/golang-lru/v2 v2.0.7 h1:a+bsQ5rvGLjzHuww6tVxozPZFVghXaHOwFs4luLUK2k= +github.com/hashicorp/golang-lru/v2 v2.0.7/go.mod h1:QeFd9opnmA6QUJc5vARoKUSoFhyfM2/ZepoAG6RGpeM= github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= @@ -788,6 +796,7 @@ github.com/mitchellh/mapstructure v0.0.0-20160808181253-ca63d7c062ee/go.mod h1:F github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y= github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY= github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo= +github.com/moby/sys/mountinfo v0.5.0/go.mod h1:3bMD3Rg+zkqx8MRYPi7Pyb0Ie97QEBmdxbhnCLlSvSU= github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg= github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q= @@ -798,6 +807,7 @@ github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjY github.com/mr-tron/base58 v1.1.0/go.mod h1:xcD2VGqlgYjBdcBLw+TuYLr8afG+Hj8g2eTVqeSzSU8= github.com/mr-tron/base58 v1.1.3 h1:v+sk57XuaCKGXpWtVBX8YJzO7hMGx4Aajh4TQbdEFdc= github.com/mr-tron/base58 v1.1.3/go.mod h1:BinMc/sQntlIE1frQmRFPUoPA1Zkr8VRgBdjWI2mNwc= +github.com/mrunalp/fileutils v0.5.0/go.mod h1:M1WthSahJixYnrXQl/DFQuteStB1weuxD2QJNHXfbSQ= github.com/mtibben/percent v0.2.1 h1:5gssi8Nqo8QU/r2pynCm+hBQHpkB/uNK7BJCFogWdzs= github.com/mtibben/percent v0.2.1/go.mod h1:KG9uO+SZkUp+VkRHsCdYQV3XSZrrSpR3O9ibNBTZrns= github.com/multiformats/go-base32 v0.0.3 h1:tw5+NhuwaOjJCC5Pp82QuXbrmLzWg7uxlMFp8Nq/kkI= @@ -844,8 +854,10 @@ github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8 github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ= -github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= -github.com/opencontainers/runc v1.1.3/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= +github.com/opencontainers/runc v1.1.5/go.mod h1:1J5XiS+vdZ3wCyZybsuxXZWGrgSr8fFJHLXuG2PsnNg= +github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417/go.mod h1:jwyrGlmzljRJv/Fgzds9SsS/C5hL+LL3ko9hs6T5lQ0= +github.com/opencontainers/selinux v1.10.0/go.mod h1:2i0OySw99QjzBBQByd1Gr9gSjvuho1lHsJxIJ3gGbJI= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -912,8 +924,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg= -github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM= +github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= +github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/rakyll/statik v0.1.7 h1:OF3QCZUuyPxuGEP7B4ypUa7sB/iHtqOTDYZXGM8KOdQ= github.com/rakyll/statik v0.1.7/go.mod h1:AlZONWzMtEnMs7W4e/1LURLiI49pIMmp6V9Unghqrcc= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -944,11 +956,13 @@ github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0 github.com/sasha-s/go-deadlock v0.3.1 h1:sqv7fDNShgjcaxkO0JNcOAlr8B9+cV5Ey/OB71efZx0= github.com/sasha-s/go-deadlock v0.3.1/go.mod h1:F73l+cr82YSh10GxyRI6qZiCgK64VaZjwesgfQ1/iLM= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= +github.com/seccomp/libseccomp-golang v0.9.2-0.20220502022130-f33da4d89646/go.mod h1:JA8cRccbGaA1s33RQf7Y1+q9gHmZX1yB/z9WDN1C6fg= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= +github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -965,8 +979,8 @@ github.com/spf13/afero v1.11.0/go.mod h1:GH9Y3pIexgf1MTIWtNGyogA5MwRIDXGUr+hbWNo github.com/spf13/cast v1.6.0 h1:GEiTHELF+vaR5dhz3VqZfFSzZjYbgeKDpBxQVS4GYJ0= github.com/spf13/cast v1.6.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo= github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ= -github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= -github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= +github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= +github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= @@ -995,6 +1009,7 @@ github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsT github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/subosito/gotenv v1.6.0 h1:9NlTDc1FTs4qu0DDq7AEtTPNw6SVm7uBMsUCUjABIf8= github.com/subosito/gotenv v1.6.0/go.mod h1:Dk4QP5c2W3ibzajGcXpNraDfq2IrhjMIvMSWPKKo0FU= +github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635/go.mod h1:hkRG7XYTFWNJGYcbNJQlaLq0fg1yr4J4t/NcTQtrfww= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7 h1:epCh84lMvA70Z7CTTCmYQn2CKbY8j86K7/FAIr141uY= github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7/go.mod h1:q4W45IWZaF22tdD+VEXcAWRA037jwmWEB5VWYORlTpc= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= @@ -1012,6 +1027,8 @@ github.com/ulikunitz/xz v0.5.11 h1:kpFauv27b6ynzBNT/Xy+1k+fK4WswhN/6PN5WhFAGw8= github.com/ulikunitz/xz v0.5.11/go.mod h1:nbz6k7qbPmH4IRqmfOplQw/tblSgqTqBwxkY0oWt/14= github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA= github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= +github.com/vishvananda/netlink v1.1.0/go.mod h1:cTgwzPIzzgDAYoQrMm0EdrjRUBkTqKYppBueQtXaqoE= +github.com/vishvananda/netns v0.0.0-20191106174202-0a2b9b5464df/go.mod h1:JP3t17pCcGlemwknint6hfoeCVQrEMVwxRLRjXpq+BU= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -1054,12 +1071,10 @@ go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqe go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= -go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ= -go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= -go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI= -go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ= +go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ= +go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= @@ -1079,8 +1094,8 @@ golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.1.0/go.mod h1:RecgLatLF4+eUMCP1PoPZQb+cVrJcOPbHkTkbkB9sbw= golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU= -golang.org/x/crypto v0.21.0 h1:X31++rzVUdKhX5sWmSOFZxx8UW/ldWx55cbf08iNAMA= -golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOMs= +golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb h1:xIApU0ow1zwMa2uL1VDNeQlNVFTWMQxZUZCMDy0Q4Us= golang.org/x/exp v0.0.0-20230711153332-06a737ee72cb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= @@ -1148,6 +1163,7 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc= @@ -1168,8 +1184,8 @@ golang.org/x/net v0.0.0-20221014081412-f15817d10f9b/go.mod h1:YDH+HFinaLZZlnHAfS golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.5.0/go.mod h1:DivGGAXEgPSlEBzxGzZI+ZLohi+xUj054jfeKui00ws= golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.23.0 h1:7EYJ93RZ9vYSZAIb2x3lnuvqO5zneoD6IvWjuhfxjTs= -golang.org/x/net v0.23.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1195,8 +1211,8 @@ golang.org/x/oauth2 v0.0.0-20220822191816-0ebed06d0094/go.mod h1:h4gKUeWbJ4rQPri golang.org/x/oauth2 v0.0.0-20220909003341-f21342109be1/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.0.0-20221014153046-6fdb5e3db783/go.mod h1:h4gKUeWbJ4rQPri7E0u6Gs4e9Ri2zaLxzw5DI5XGrYg= golang.org/x/oauth2 v0.1.0/go.mod h1:G9FE4dLTsbXUu90h/Pf85g4w1D+SSAgR+q46nJZ8M4A= -golang.org/x/oauth2 v0.16.0 h1:aDkGMBSYxElaoP81NpoUoz2oo2R2wHdZpGToUxfyQrQ= -golang.org/x/oauth2 v0.16.0/go.mod h1:hqZ+0LWXsiVoZpeld6jVt06P3adbS2Uu911W1SsJv2o= +golang.org/x/oauth2 v0.20.0 h1:4mQdhULixXKP1rwYBW0vAijoXnkTG0BLCDRzfe1idMo= +golang.org/x/oauth2 v0.20.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1211,8 +1227,8 @@ golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220929204114-8fcdb60fdcc0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ= -golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1228,12 +1244,14 @@ golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606203320-7fc4e5ec1444/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191115151921-52ab43148777/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1263,6 +1281,7 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -1279,7 +1298,10 @@ golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210819135213-f52c844e1c1c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210906170528-6f6e22806c34/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211025201205-69cdffdb9359/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20211116061358-0a5406a5449c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= @@ -1305,15 +1327,15 @@ golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.18.0 h1:DBdB3niSjOA/O0blCZBqDefyWNYveAYMNF1Wum0DYQ4= -golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.4.0/go.mod h1:9P2UbLfCdcvo3p/nzKvsmas4TnlujnuoV9hGgYzW1lQ= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.18.0 h1:FcHjZXDMxI8mM3nwhX9HlKop4C0YQvCVCdwYl2wOtE8= -golang.org/x/term v0.18.0/go.mod h1:ILwASektA3OnRv7amZ1xhE/KTR+u50pbXfZ03+6Nx58= +golang.org/x/term v0.20.0 h1:VnkxpohqXaOBYJtBmEppKUG6mXpi+4O6purfc2+sMhw= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1327,8 +1349,8 @@ golang.org/x/text v0.3.8/go.mod h1:E6s5w1FMmriuDzIBO73fBruAKo1PCIq6d2Q6DHfQ8WQ= golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= -golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -1463,8 +1485,6 @@ google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= -google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= -google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -1573,10 +1593,10 @@ google.golang.org/genproto v0.0.0-20221014213838-99cd37c6964a/go.mod h1:1vXfmgAz google.golang.org/genproto v0.0.0-20221025140454-527a21cfbd71/go.mod h1:9qHF0xnpdSfF6knlcsnpzUu5y+rpwgbvsyGAZPBMg4s= google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80 h1:Lj5rbfG876hIAYFjqiJnPHfhXbv+nzTWfm04Fg/XSVU= -google.golang.org/genproto/googleapis/api v0.0.0-20240123012728-ef4313101c80/go.mod h1:4jWUdICTdgc3Ibxmr8nAJiiLHwQBY0UI0XZcEMaFKaA= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80 h1:AjyfHzEPEFp/NpvfN5g+KDla3EMojjhRVZc1i7cj+oM= -google.golang.org/genproto/googleapis/rpc v0.0.0-20240123012728-ef4313101c80/go.mod h1:PAREbraiVEVGVdTZsVWjSbbTtSyGbAgIIvni8a8CD5s= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157 h1:7whR9kGa5LUwFtpLm2ArCEejtnxlGeLbAyjFY8sGNFw= +google.golang.org/genproto/googleapis/api v0.0.0-20240528184218-531527333157/go.mod h1:99sLkeliLXfdj2J75X3Ho+rrVCaJze0uwN7zDDkjPVU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157 h1:Zy9XzmMEflZ/MAaA7vNcoebnRAld7FsPW1EeBB7V0m8= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240528184218-531527333157/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs= google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c= google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM= @@ -1618,8 +1638,8 @@ google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACu google.golang.org/grpc v1.49.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.0/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= google.golang.org/grpc v1.50.1/go.mod h1:ZgQEeidpAuNRZ8iRrlBKXZQP1ghovWIVhdJRyCDK+GI= -google.golang.org/grpc v1.62.1 h1:B4n+nfKzOICUXMgyrNd19h/I9oH0L1pizfk1d4zSgTk= -google.golang.org/grpc v1.62.1/go.mod h1:IWTG0VlJLCh1SkC58F7np9ka9mx/WNkjl4PGJaiq+QE= +google.golang.org/grpc v1.65.0 h1:bs/cUb4lp1G5iImFFd3u5ixQzweKizoZJAwBNLR42lc= +google.golang.org/grpc v1.65.0/go.mod h1:WgYC2ypjlB0EiQi6wdKixMqukr6lBc0Vo+oOgjrM5ZQ= google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= @@ -1636,8 +1656,8 @@ google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQ google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= -google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI= -google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1 h1:9ddQBjfCyZPOHPUiPxpYESBLc+T8P3E+Vo4IbKZgFWg= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= @@ -1681,8 +1701,9 @@ honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= -nhooyr.io/websocket v1.8.6 h1:s+C3xAMLwGmlI31Nyn/eAehUlZPwfYZu2JXM621Q5/k= nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= +nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g= +nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0= pgregory.net/rapid v1.1.0 h1:CMa0sjHSru3puNx+J0MIAuiiEV4N0qj8/cMWGBBCsjw= pgregory.net/rapid v1.1.0/go.mod h1:PY5XlDGj0+V1FCq0o192FdRhpKHGTRIWBgqjDBTrq04= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= From 8ee26c073af6b82caa98988aea6d873c90635543 Mon Sep 17 00:00:00 2001 From: C H Date: Thu, 25 Jul 2024 14:24:34 +0800 Subject: [PATCH 3/8] Added clock proto files --- proto/cyber/clock/v1/clock.proto | 4 ++-- proto/cyber/clock/v1/genesis.proto | 6 +++--- proto/cyber/clock/v1/query.proto | 14 +++++++------- proto/cyber/clock/v1/tx.proto | 10 +++++----- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/proto/cyber/clock/v1/clock.proto b/proto/cyber/clock/v1/clock.proto index a80197d3..73b2a124 100644 --- a/proto/cyber/clock/v1/clock.proto +++ b/proto/cyber/clock/v1/clock.proto @@ -1,7 +1,7 @@ syntax = "proto3"; -package juno.clock.v1; +package cyber.clock.v1; -option go_package = "github.com/CosmosContracts/juno/x/clock/types"; +option go_package = "github.com/cybercongress/go-cyber/x/clock/types"; // This object is used to store the contract address and the // jail status of the contract. diff --git a/proto/cyber/clock/v1/genesis.proto b/proto/cyber/clock/v1/genesis.proto index 66c1d821..371bff75 100644 --- a/proto/cyber/clock/v1/genesis.proto +++ b/proto/cyber/clock/v1/genesis.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package juno.clock.v1; +package cyber.clock.v1; import "gogoproto/gogo.proto"; import "cosmos/base/v1beta1/coin.proto"; -import "juno/clock/v1/clock.proto"; +import "cyber/clock/v1/clock.proto"; -option go_package = "github.com/CosmosContracts/juno/x/clock/types"; +option go_package = "github.com/cybercongress/go-cyber/x/clock/types"; // GenesisState - initial state of module message GenesisState { diff --git a/proto/cyber/clock/v1/query.proto b/proto/cyber/clock/v1/query.proto index b392978b..3935e204 100644 --- a/proto/cyber/clock/v1/query.proto +++ b/proto/cyber/clock/v1/query.proto @@ -1,14 +1,14 @@ syntax = "proto3"; -package juno.clock.v1; +package cyber.clock.v1; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/v1beta1/coin.proto"; -import "juno/clock/v1/genesis.proto"; -import "juno/clock/v1/clock.proto"; +import "cyber/clock/v1/genesis.proto"; +import "cyber/clock/v1/clock.proto"; -option go_package = "github.com/CosmosContracts/juno/x/clock/types"; +option go_package = "github.com/cybercongress/go-cyber/x/clock/types"; // Query defines the gRPC querier service. service Query { @@ -16,17 +16,17 @@ service Query { rpc ClockContracts(QueryClockContracts) returns (QueryClockContractsResponse) { option (google.api.http).get = - "/juno/clock/v1/contracts"; + "/cyber/clock/v1/contracts"; } // ClockContract rpc ClockContract(QueryClockContract) returns (QueryClockContractResponse) { option (google.api.http).get = - "/juno/clock/v1/contracts/{contract_address}"; + "/cyber/clock/v1/contracts/{contract_address}"; } // Params rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { - option (google.api.http).get = "/juno/clock/v1/params"; + option (google.api.http).get = "/cyber/clock/v1/params"; } } diff --git a/proto/cyber/clock/v1/tx.proto b/proto/cyber/clock/v1/tx.proto index 8604aec3..9cfeb754 100644 --- a/proto/cyber/clock/v1/tx.proto +++ b/proto/cyber/clock/v1/tx.proto @@ -1,11 +1,11 @@ syntax = "proto3"; -package juno.clock.v1; +package cyber.clock.v1; option go_package = "github.com/CosmosContracts/juno/x/clock/types"; import "google/api/annotations.proto"; import "cosmos/msg/v1/msg.proto"; -import "juno/clock/v1/genesis.proto"; +import "cyber/clock/v1/genesis.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; import "amino/amino.proto"; @@ -17,21 +17,21 @@ service Msg { // registering a new clock contract. rpc RegisterClockContract(MsgRegisterClockContract) returns (MsgRegisterClockContractResponse) { - option (google.api.http).post = "/juno/clock/v1/tx/register"; + option (google.api.http).post = "/cyber/clock/v1/tx/register"; }; // UnregisterClockContract defines the endpoint for // unregistering a clock contract. rpc UnregisterClockContract(MsgUnregisterClockContract) returns (MsgUnregisterClockContractResponse) { - option (google.api.http).post = "/juno/clock/v1/tx/unregister"; + option (google.api.http).post = "/cyber/clock/v1/tx/unregister"; }; // UnjailClockContract defines the endpoint for // unjailing a clock contract. rpc UnjailClockContract(MsgUnjailClockContract) returns (MsgUnjailClockContractResponse) { - option (google.api.http).post = "/juno/clock/v1/tx/unjail"; + option (google.api.http).post = "/cyber/clock/v1/tx/unjail"; }; // UpdateParams defines a governance operation for updating the x/clock module From daa315db9d3839dc024fc12539a3b647448e69eb Mon Sep 17 00:00:00 2001 From: C H Date: Thu, 25 Jul 2024 14:26:24 +0800 Subject: [PATCH 4/8] Regenerated clock proto files --- docs/proto/proto-docs.md | 2758 ++++++++++++++++++---------- proto/cyber/clock/v1/clock.proto | 8 +- proto/cyber/clock/v1/genesis.proto | 5 +- proto/cyber/clock/v1/query.proto | 23 +- proto/cyber/clock/v1/tx.proto | 21 +- x/clock/types/clock.pb.go | 37 +- x/clock/types/genesis.pb.go | 57 +- x/clock/types/query.pb.go | 132 +- x/clock/types/query.pb.gw.go | 8 +- x/clock/types/tx.pb.go | 143 +- x/clock/types/tx.pb.gw.go | 8 +- 11 files changed, 2045 insertions(+), 1155 deletions(-) diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index 78da7451..313fe7a6 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -32,6 +32,35 @@ - [Msg](#cyber.bandwidth.v1beta1.Msg) +- [cyber/clock/v1/clock.proto](#cyber/clock/v1/clock.proto) + - [ClockContract](#cyber.clock.v1.ClockContract) + +- [cyber/clock/v1/genesis.proto](#cyber/clock/v1/genesis.proto) + - [GenesisState](#cyber.clock.v1.GenesisState) + - [Params](#cyber.clock.v1.Params) + +- [cyber/clock/v1/query.proto](#cyber/clock/v1/query.proto) + - [QueryClockContract](#cyber.clock.v1.QueryClockContract) + - [QueryClockContractResponse](#cyber.clock.v1.QueryClockContractResponse) + - [QueryClockContracts](#cyber.clock.v1.QueryClockContracts) + - [QueryClockContractsResponse](#cyber.clock.v1.QueryClockContractsResponse) + - [QueryParamsRequest](#cyber.clock.v1.QueryParamsRequest) + - [QueryParamsResponse](#cyber.clock.v1.QueryParamsResponse) + + - [Query](#cyber.clock.v1.Query) + +- [cyber/clock/v1/tx.proto](#cyber/clock/v1/tx.proto) + - [MsgRegisterClockContract](#cyber.clock.v1.MsgRegisterClockContract) + - [MsgRegisterClockContractResponse](#cyber.clock.v1.MsgRegisterClockContractResponse) + - [MsgUnjailClockContract](#cyber.clock.v1.MsgUnjailClockContract) + - [MsgUnjailClockContractResponse](#cyber.clock.v1.MsgUnjailClockContractResponse) + - [MsgUnregisterClockContract](#cyber.clock.v1.MsgUnregisterClockContract) + - [MsgUnregisterClockContractResponse](#cyber.clock.v1.MsgUnregisterClockContractResponse) + - [MsgUpdateParams](#cyber.clock.v1.MsgUpdateParams) + - [MsgUpdateParamsResponse](#cyber.clock.v1.MsgUpdateParamsResponse) + + - [Msg](#cyber.clock.v1.Msg) + - [cyber/dmn/v1beta1/types.proto](#cyber/dmn/v1beta1/types.proto) - [Load](#cyber.dmn.v1beta1.Load) - [Params](#cyber.dmn.v1beta1.Params) @@ -240,6 +269,44 @@ - [Msg](#cyber.resources.v1beta1.Msg) +- [osmosis/tokenfactory/v1beta1/authorityMetadata.proto](#osmosis/tokenfactory/v1beta1/authorityMetadata.proto) + - [DenomAuthorityMetadata](#osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata) + +- [osmosis/tokenfactory/v1beta1/params.proto](#osmosis/tokenfactory/v1beta1/params.proto) + - [Params](#osmosis.tokenfactory.v1beta1.Params) + +- [osmosis/tokenfactory/v1beta1/genesis.proto](#osmosis/tokenfactory/v1beta1/genesis.proto) + - [GenesisDenom](#osmosis.tokenfactory.v1beta1.GenesisDenom) + - [GenesisState](#osmosis.tokenfactory.v1beta1.GenesisState) + +- [osmosis/tokenfactory/v1beta1/query.proto](#osmosis/tokenfactory/v1beta1/query.proto) + - [QueryDenomAuthorityMetadataRequest](#osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest) + - [QueryDenomAuthorityMetadataResponse](#osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse) + - [QueryDenomsFromCreatorRequest](#osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest) + - [QueryDenomsFromCreatorResponse](#osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse) + - [QueryParamsRequest](#osmosis.tokenfactory.v1beta1.QueryParamsRequest) + - [QueryParamsResponse](#osmosis.tokenfactory.v1beta1.QueryParamsResponse) + + - [Query](#osmosis.tokenfactory.v1beta1.Query) + +- [osmosis/tokenfactory/v1beta1/tx.proto](#osmosis/tokenfactory/v1beta1/tx.proto) + - [MsgBurn](#osmosis.tokenfactory.v1beta1.MsgBurn) + - [MsgBurnResponse](#osmosis.tokenfactory.v1beta1.MsgBurnResponse) + - [MsgChangeAdmin](#osmosis.tokenfactory.v1beta1.MsgChangeAdmin) + - [MsgChangeAdminResponse](#osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse) + - [MsgCreateDenom](#osmosis.tokenfactory.v1beta1.MsgCreateDenom) + - [MsgCreateDenomResponse](#osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse) + - [MsgForceTransfer](#osmosis.tokenfactory.v1beta1.MsgForceTransfer) + - [MsgForceTransferResponse](#osmosis.tokenfactory.v1beta1.MsgForceTransferResponse) + - [MsgMint](#osmosis.tokenfactory.v1beta1.MsgMint) + - [MsgMintResponse](#osmosis.tokenfactory.v1beta1.MsgMintResponse) + - [MsgSetDenomMetadata](#osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata) + - [MsgSetDenomMetadataResponse](#osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse) + - [MsgUpdateParams](#osmosis.tokenfactory.v1beta1.MsgUpdateParams) + - [MsgUpdateParamsResponse](#osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse) + + - [Msg](#osmosis.tokenfactory.v1beta1.Msg) + - [Scalar Value Types](#scalar-value-types) @@ -555,95 +622,70 @@ - +

Top

-## cyber/dmn/v1beta1/types.proto - - - - - -### Load - - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `input` | [string](#string) | | | -| `gas_price` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - - - +## cyber/clock/v1/clock.proto - -### Params + +### ClockContract +This object is used to store the contract address and the +jail status of the contract. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `max_slots` | [uint32](#uint32) | | | -| `max_gas` | [uint32](#uint32) | | | -| `fee_ttl` | [uint32](#uint32) | | | - +| `contract_address` | [string](#string) | | The address of the contract. | +| `is_jailed` | [bool](#bool) | | The jail status of the contract. | - - -### Thought + + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `program` | [string](#string) | | | -| `trigger` | [Trigger](#cyber.dmn.v1beta1.Trigger) | | | -| `load` | [Load](#cyber.dmn.v1beta1.Load) | | | -| `name` | [string](#string) | | | -| `particle` | [string](#string) | | | + + +

Top

+## cyber/clock/v1/genesis.proto - -### ThoughtStats + +### GenesisState +GenesisState - initial state of module | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `program` | [string](#string) | | | -| `name` | [string](#string) | | | -| `calls` | [uint64](#uint64) | | | -| `fees` | [uint64](#uint64) | | | -| `gas` | [uint64](#uint64) | | | -| `last_block` | [uint64](#uint64) | | | +| `params` | [Params](#cyber.clock.v1.Params) | | Params of this module | - - -### Trigger + +### Params +Params defines the set of module parameters. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `period` | [uint64](#uint64) | | | -| `block` | [uint64](#uint64) | | | +| `contract_gas_limit` | [uint64](#uint64) | | contract_gas_limit defines the maximum amount of gas that can be used by a contract. | @@ -659,184 +701,238 @@ - +

Top

-## cyber/dmn/v1beta1/genesis.proto - +## cyber/clock/v1/query.proto - -### GenesisState + +### QueryClockContract +QueryClockContract is the request type to get a single contract. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cyber.dmn.v1beta1.Params) | | | +| `contract_address` | [string](#string) | | contract_address is the address of the contract to query. | - - + - +### QueryClockContractResponse +QueryClockContractResponse is the response type for the Query/ClockContract +RPC method. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `clock_contract` | [ClockContract](#cyber.clock.v1.ClockContract) | | contract is the clock contract. | - -

Top

-## cyber/dmn/v1beta1/query.proto - + -### QueryParamsRequest +### QueryClockContracts +QueryClockContracts is the request type to get all contracts. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - -### QueryParamsResponse + +### QueryClockContractsResponse +QueryClockContractsResponse is the response type for the Query/ClockContracts +RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cyber.dmn.v1beta1.Params) | | | +| `clock_contracts` | [ClockContract](#cyber.clock.v1.ClockContract) | repeated | clock_contracts are the clock contracts. | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. | - + + +### QueryParamsRequest +QueryParams is the request type to get all module params. + -### QueryThoughtParamsRequest + + + +### QueryParamsResponse +QueryClockContractsResponse is the response type for the Query/ClockContracts +RPC method. + + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `program` | [string](#string) | | | -| `name` | [string](#string) | | | +| `params` | [Params](#cyber.clock.v1.Params) | | | + - + -### QueryThoughtResponse + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `thought` | [Thought](#cyber.dmn.v1beta1.Thought) | | | +### Query +Query defines the gRPC querier service. +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `ClockContracts` | [QueryClockContracts](#cyber.clock.v1.QueryClockContracts) | [QueryClockContractsResponse](#cyber.clock.v1.QueryClockContractsResponse) | ClockContracts | GET|/cyber/clock/v1/contracts| +| `ClockContract` | [QueryClockContract](#cyber.clock.v1.QueryClockContract) | [QueryClockContractResponse](#cyber.clock.v1.QueryClockContractResponse) | ClockContract | GET|/cyber/clock/v1/contracts/{contract_address}| +| `Params` | [QueryParamsRequest](#cyber.clock.v1.QueryParamsRequest) | [QueryParamsResponse](#cyber.clock.v1.QueryParamsResponse) | Params | GET|/cyber/clock/v1/params| + + +

Top

- +## cyber/clock/v1/tx.proto -### QueryThoughtStatsResponse + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `thought_stats` | [ThoughtStats](#cyber.dmn.v1beta1.ThoughtStats) | | | +### MsgRegisterClockContract +MsgRegisterClockContract is the Msg/RegisterClockContract request type. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender_address` | [string](#string) | | The address of the sender. | +| `contract_address` | [string](#string) | | The address of the contract to register. | - -### QueryThoughtsFeesRequest + +### MsgRegisterClockContractResponse +MsgRegisterClockContractResponse defines the response structure for executing +a MsgRegisterClockContract message. - -### QueryThoughtsFeesResponse + +### MsgUnjailClockContract +MsgUnjailClockContract is the Msg/UnjailClockContract request type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `fees` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `sender_address` | [string](#string) | | The address of the sender. | +| `contract_address` | [string](#string) | | The address of the contract to unjail. | - - -### QueryThoughtsRequest - + +### MsgUnjailClockContractResponse +MsgUnjailClockContractResponse defines the response structure for executing a +MsgUnjailClockContract message. - -### QueryThoughtsResponse + +### MsgUnregisterClockContract +MsgUnregisterClockContract is the Msg/UnregisterClockContract request type. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `thoughts` | [Thought](#cyber.dmn.v1beta1.Thought) | repeated | | - +| `sender_address` | [string](#string) | | The address of the sender. | +| `contract_address` | [string](#string) | | The address of the contract to unregister. | - -### QueryThoughtsStatsRequest + +### MsgUnregisterClockContractResponse +MsgUnregisterClockContractResponse defines the response structure for +executing a MsgUnregisterClockContract message. - + -### QueryThoughtsStatsResponse +### MsgUpdateParams +MsgUpdateParams is the Msg/UpdateParams request type. +Since: cosmos-sdk 0.47 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `thoughts_stats` | [ThoughtStats](#cyber.dmn.v1beta1.ThoughtStats) | repeated | | +| `authority` | [string](#string) | | authority is the address of the governance account. | +| `params` | [Params](#cyber.clock.v1.Params) | | params defines the x/clock parameters to update. + +NOTE: All parameters must be supplied. | + + + + + + + + +### MsgUpdateParamsResponse +MsgUpdateParamsResponse defines the response structure for executing a +MsgUpdateParams message. + +Since: cosmos-sdk 0.47 @@ -849,169 +945,194 @@ - - -### Query + +### Msg +Msg defines the Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#cyber.dmn.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cyber.dmn.v1beta1.QueryParamsResponse) | | GET|/cyber/dmn/v1beta1/dmn/params| -| `Thought` | [QueryThoughtParamsRequest](#cyber.dmn.v1beta1.QueryThoughtParamsRequest) | [QueryThoughtResponse](#cyber.dmn.v1beta1.QueryThoughtResponse) | | GET|/cyber/dmn/v1beta1/dmn/thought| -| `ThoughtStats` | [QueryThoughtParamsRequest](#cyber.dmn.v1beta1.QueryThoughtParamsRequest) | [QueryThoughtStatsResponse](#cyber.dmn.v1beta1.QueryThoughtStatsResponse) | | GET|/cyber/dmn/v1beta1/dmn/thought_stats| -| `Thoughts` | [QueryThoughtsRequest](#cyber.dmn.v1beta1.QueryThoughtsRequest) | [QueryThoughtsResponse](#cyber.dmn.v1beta1.QueryThoughtsResponse) | | GET|/cyber/dmn/v1beta1/dmn/thoughts| -| `ThoughtsStats` | [QueryThoughtsStatsRequest](#cyber.dmn.v1beta1.QueryThoughtsStatsRequest) | [QueryThoughtsStatsResponse](#cyber.dmn.v1beta1.QueryThoughtsStatsResponse) | | GET|/cyber/dmn/v1beta1/dmn/thoughts_stats| -| `ThoughtsFees` | [QueryThoughtsFeesRequest](#cyber.dmn.v1beta1.QueryThoughtsFeesRequest) | [QueryThoughtsFeesResponse](#cyber.dmn.v1beta1.QueryThoughtsFeesResponse) | | GET|/cyber/dmn/v1beta1/dmn/thoughts_fees| +| `RegisterClockContract` | [MsgRegisterClockContract](#cyber.clock.v1.MsgRegisterClockContract) | [MsgRegisterClockContractResponse](#cyber.clock.v1.MsgRegisterClockContractResponse) | RegisterClockContract defines the endpoint for registering a new clock contract. | POST|/cyber/clock/v1/tx/register| +| `UnregisterClockContract` | [MsgUnregisterClockContract](#cyber.clock.v1.MsgUnregisterClockContract) | [MsgUnregisterClockContractResponse](#cyber.clock.v1.MsgUnregisterClockContractResponse) | UnregisterClockContract defines the endpoint for unregistering a clock contract. | POST|/cyber/clock/v1/tx/unregister| +| `UnjailClockContract` | [MsgUnjailClockContract](#cyber.clock.v1.MsgUnjailClockContract) | [MsgUnjailClockContractResponse](#cyber.clock.v1.MsgUnjailClockContractResponse) | UnjailClockContract defines the endpoint for unjailing a clock contract. | POST|/cyber/clock/v1/tx/unjail| +| `UpdateParams` | [MsgUpdateParams](#cyber.clock.v1.MsgUpdateParams) | [MsgUpdateParamsResponse](#cyber.clock.v1.MsgUpdateParamsResponse) | UpdateParams defines a governance operation for updating the x/clock module parameters. The authority is hard-coded to the x/gov module account. + +Since: cosmos-sdk 0.47 | | - +

Top

-## cyber/dmn/v1beta1/tx.proto +## cyber/dmn/v1beta1/types.proto - + -### MsgChangeThoughtBlock +### Load | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `program` | [string](#string) | | | -| `name` | [string](#string) | | | -| `block` | [uint64](#uint64) | | | +| `input` | [string](#string) | | | +| `gas_price` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### MsgChangeThoughtBlockResponse +### Params +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `max_slots` | [uint32](#uint32) | | | +| `max_gas` | [uint32](#uint32) | | | +| `fee_ttl` | [uint32](#uint32) | | | + + - + -### MsgChangeThoughtGasPrice +### Thought | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `program` | [string](#string) | | | +| `trigger` | [Trigger](#cyber.dmn.v1beta1.Trigger) | | | +| `load` | [Load](#cyber.dmn.v1beta1.Load) | | | | `name` | [string](#string) | | | -| `gas_price` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `particle` | [string](#string) | | | - + -### MsgChangeThoughtGasPriceResponse +### ThoughtStats +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `program` | [string](#string) | | | +| `name` | [string](#string) | | | +| `calls` | [uint64](#uint64) | | | +| `fees` | [uint64](#uint64) | | | +| `gas` | [uint64](#uint64) | | | +| `last_block` | [uint64](#uint64) | | | - -### MsgChangeThoughtInput + + + +### Trigger | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `program` | [string](#string) | | | -| `name` | [string](#string) | | | -| `input` | [string](#string) | | | +| `period` | [uint64](#uint64) | | | +| `block` | [uint64](#uint64) | | | + - + -### MsgChangeThoughtInputResponse + + + + +

Top

+## cyber/dmn/v1beta1/genesis.proto - + -### MsgChangeThoughtName +### GenesisState | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `program` | [string](#string) | | | -| `name` | [string](#string) | | | -| `new_name` | [string](#string) | | | +| `params` | [Params](#cyber.dmn.v1beta1.Params) | | | + - + -### MsgChangeThoughtNameResponse + + + +

Top

+## cyber/dmn/v1beta1/query.proto - -### MsgChangeThoughtParticle + +### QueryParamsRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `program` | [string](#string) | | | -| `name` | [string](#string) | | | -| `particle` | [string](#string) | | | + - +### QueryParamsResponse -### MsgChangeThoughtParticleResponse +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#cyber.dmn.v1beta1.Params) | | | - -### MsgChangeThoughtPeriod + + +### QueryThoughtParamsRequest @@ -1019,71 +1140,45 @@ | ----- | ---- | ----- | ----------- | | `program` | [string](#string) | | | | `name` | [string](#string) | | | -| `period` | [uint64](#uint64) | | | - - - - - - - - -### MsgChangeThoughtPeriodResponse + - - -### MsgCreateThought +### QueryThoughtResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `program` | [string](#string) | | | -| `trigger` | [Trigger](#cyber.dmn.v1beta1.Trigger) | | | -| `load` | [Load](#cyber.dmn.v1beta1.Load) | | | -| `name` | [string](#string) | | | -| `particle` | [string](#string) | | | - - - - - - - - -### MsgCreateThoughtResponse - +| `thought` | [Thought](#cyber.dmn.v1beta1.Thought) | | | - + -### MsgForgetThought +### QueryThoughtStatsResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `program` | [string](#string) | | | -| `name` | [string](#string) | | | +| `thought_stats` | [ThoughtStats](#cyber.dmn.v1beta1.ThoughtStats) | | | - + -### MsgForgetThoughtResponse +### QueryThoughtsFeesRequest @@ -1091,69 +1186,49 @@ - + -### MsgUpdateParams +### QueryThoughtsFeesResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `authority` | [string](#string) | | | -| `params` | [Params](#cyber.dmn.v1beta1.Params) | | | - - - - +| `fees` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - -### MsgUpdateParamsResponse + +### QueryThoughtsRequest - - - - -### Msg + +### QueryThoughtsResponse -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `CreateThought` | [MsgCreateThought](#cyber.dmn.v1beta1.MsgCreateThought) | [MsgCreateThoughtResponse](#cyber.dmn.v1beta1.MsgCreateThoughtResponse) | | | -| `ForgetThought` | [MsgForgetThought](#cyber.dmn.v1beta1.MsgForgetThought) | [MsgForgetThoughtResponse](#cyber.dmn.v1beta1.MsgForgetThoughtResponse) | | | -| `ChangeThoughtParticle` | [MsgChangeThoughtParticle](#cyber.dmn.v1beta1.MsgChangeThoughtParticle) | [MsgChangeThoughtParticleResponse](#cyber.dmn.v1beta1.MsgChangeThoughtParticleResponse) | | | -| `ChangeThoughtName` | [MsgChangeThoughtName](#cyber.dmn.v1beta1.MsgChangeThoughtName) | [MsgChangeThoughtNameResponse](#cyber.dmn.v1beta1.MsgChangeThoughtNameResponse) | | | -| `ChangeThoughtInput` | [MsgChangeThoughtInput](#cyber.dmn.v1beta1.MsgChangeThoughtInput) | [MsgChangeThoughtInputResponse](#cyber.dmn.v1beta1.MsgChangeThoughtInputResponse) | | | -| `ChangeThoughtGasPrice` | [MsgChangeThoughtGasPrice](#cyber.dmn.v1beta1.MsgChangeThoughtGasPrice) | [MsgChangeThoughtGasPriceResponse](#cyber.dmn.v1beta1.MsgChangeThoughtGasPriceResponse) | | | -| `ChangeThoughtPeriod` | [MsgChangeThoughtPeriod](#cyber.dmn.v1beta1.MsgChangeThoughtPeriod) | [MsgChangeThoughtPeriodResponse](#cyber.dmn.v1beta1.MsgChangeThoughtPeriodResponse) | | | -| `ChangeThoughtBlock` | [MsgChangeThoughtBlock](#cyber.dmn.v1beta1.MsgChangeThoughtBlock) | [MsgChangeThoughtBlockResponse](#cyber.dmn.v1beta1.MsgChangeThoughtBlockResponse) | | | -| `UpdateParams` | [MsgUpdateParams](#cyber.dmn.v1beta1.MsgUpdateParams) | [MsgUpdateParamsResponse](#cyber.dmn.v1beta1.MsgUpdateParamsResponse) | | | - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `thoughts` | [Thought](#cyber.dmn.v1beta1.Thought) | repeated | | - -

Top

-## cyber/graph/v1beta1/query.proto - + -### QueryGraphStatsRequest +### QueryThoughtsStatsRequest @@ -1161,16 +1236,15 @@ - + -### QueryGraphStatsResponse +### QueryThoughtsStatsResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `cyberlinks` | [uint64](#uint64) | | | -| `particles` | [uint64](#uint64) | | | +| `thoughts_stats` | [ThoughtStats](#cyber.dmn.v1beta1.ThoughtStats) | repeated | | @@ -1183,224 +1257,215 @@ - + ### Query | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `GraphStats` | [QueryGraphStatsRequest](#cyber.graph.v1beta1.QueryGraphStatsRequest) | [QueryGraphStatsResponse](#cyber.graph.v1beta1.QueryGraphStatsResponse) | | GET|/cyber/graph/v1beta1/graph_stats| +| `Params` | [QueryParamsRequest](#cyber.dmn.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cyber.dmn.v1beta1.QueryParamsResponse) | | GET|/cyber/dmn/v1beta1/dmn/params| +| `Thought` | [QueryThoughtParamsRequest](#cyber.dmn.v1beta1.QueryThoughtParamsRequest) | [QueryThoughtResponse](#cyber.dmn.v1beta1.QueryThoughtResponse) | | GET|/cyber/dmn/v1beta1/dmn/thought| +| `ThoughtStats` | [QueryThoughtParamsRequest](#cyber.dmn.v1beta1.QueryThoughtParamsRequest) | [QueryThoughtStatsResponse](#cyber.dmn.v1beta1.QueryThoughtStatsResponse) | | GET|/cyber/dmn/v1beta1/dmn/thought_stats| +| `Thoughts` | [QueryThoughtsRequest](#cyber.dmn.v1beta1.QueryThoughtsRequest) | [QueryThoughtsResponse](#cyber.dmn.v1beta1.QueryThoughtsResponse) | | GET|/cyber/dmn/v1beta1/dmn/thoughts| +| `ThoughtsStats` | [QueryThoughtsStatsRequest](#cyber.dmn.v1beta1.QueryThoughtsStatsRequest) | [QueryThoughtsStatsResponse](#cyber.dmn.v1beta1.QueryThoughtsStatsResponse) | | GET|/cyber/dmn/v1beta1/dmn/thoughts_stats| +| `ThoughtsFees` | [QueryThoughtsFeesRequest](#cyber.dmn.v1beta1.QueryThoughtsFeesRequest) | [QueryThoughtsFeesResponse](#cyber.dmn.v1beta1.QueryThoughtsFeesResponse) | | GET|/cyber/dmn/v1beta1/dmn/thoughts_fees| - +

Top

-## cyber/graph/v1beta1/types.proto +## cyber/dmn/v1beta1/tx.proto - + -### Link +### MsgChangeThoughtBlock | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `from` | [string](#string) | | | -| `to` | [string](#string) | | | - +| `program` | [string](#string) | | | +| `name` | [string](#string) | | | +| `block` | [uint64](#uint64) | | | - - - + - +### MsgChangeThoughtBlockResponse - -

Top

-## cyber/graph/v1beta1/tx.proto - + -### MsgCyberlink +### MsgChangeThoughtGasPrice | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `neuron` | [string](#string) | | | -| `links` | [Link](#cyber.graph.v1beta1.Link) | repeated | | +| `program` | [string](#string) | | | +| `name` | [string](#string) | | | +| `gas_price` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - + -### MsgCyberlinkResponse +### MsgChangeThoughtGasPriceResponse - - + - +### MsgChangeThoughtInput - -### Msg +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `program` | [string](#string) | | | +| `name` | [string](#string) | | | +| `input` | [string](#string) | | | -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Cyberlink` | [MsgCyberlink](#cyber.graph.v1beta1.MsgCyberlink) | [MsgCyberlinkResponse](#cyber.graph.v1beta1.MsgCyberlinkResponse) | | | - - -

Top

+ -## cyber/grid/v1beta1/types.proto +### MsgChangeThoughtInputResponse - -### Params -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `max_routes` | [uint32](#uint32) | | | + +### MsgChangeThoughtName +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `program` | [string](#string) | | | +| `name` | [string](#string) | | | +| `new_name` | [string](#string) | | | - -### Route -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `source` | [string](#string) | | | -| `destination` | [string](#string) | | | -| `name` | [string](#string) | | | -| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + +### MsgChangeThoughtNameResponse - -### Value + + + +### MsgChangeThoughtParticle | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - +| `program` | [string](#string) | | | +| `name` | [string](#string) | | | +| `particle` | [string](#string) | | | - - - + - +### MsgChangeThoughtParticleResponse - -

Top

-## cyber/grid/v1beta1/genesis.proto - + -### GenesisState +### MsgChangeThoughtPeriod | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cyber.grid.v1beta1.Params) | | | -| `routes` | [Route](#cyber.grid.v1beta1.Route) | repeated | | - +| `program` | [string](#string) | | | +| `name` | [string](#string) | | | +| `period` | [uint64](#uint64) | | | - - - + - +### MsgChangeThoughtPeriodResponse - -

Top

-## cyber/grid/v1beta1/query.proto - + -### QueryDestinationRequest +### MsgCreateThought | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `destination` | [string](#string) | | | +| `program` | [string](#string) | | | +| `trigger` | [Trigger](#cyber.dmn.v1beta1.Trigger) | | | +| `load` | [Load](#cyber.dmn.v1beta1.Load) | | | +| `name` | [string](#string) | | | +| `particle` | [string](#string) | | | - + -### QueryParamsRequest +### MsgCreateThoughtResponse @@ -1408,107 +1473,112 @@ - + -### QueryParamsResponse +### MsgForgetThought | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cyber.grid.v1beta1.Params) | | | +| `program` | [string](#string) | | | +| `name` | [string](#string) | | | - + -### QueryRouteRequest +### MsgForgetThoughtResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `source` | [string](#string) | | | -| `destination` | [string](#string) | | | - + - - -### QueryRouteResponse +### MsgUpdateParams | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `route` | [Route](#cyber.grid.v1beta1.Route) | | | +| `authority` | [string](#string) | | | +| `params` | [Params](#cyber.dmn.v1beta1.Params) | | | - + -### QueryRoutedEnergyResponse +### MsgUpdateParamsResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | + + + - -### QueryRoutesRequest + +### Msg -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `CreateThought` | [MsgCreateThought](#cyber.dmn.v1beta1.MsgCreateThought) | [MsgCreateThoughtResponse](#cyber.dmn.v1beta1.MsgCreateThoughtResponse) | | | +| `ForgetThought` | [MsgForgetThought](#cyber.dmn.v1beta1.MsgForgetThought) | [MsgForgetThoughtResponse](#cyber.dmn.v1beta1.MsgForgetThoughtResponse) | | | +| `ChangeThoughtParticle` | [MsgChangeThoughtParticle](#cyber.dmn.v1beta1.MsgChangeThoughtParticle) | [MsgChangeThoughtParticleResponse](#cyber.dmn.v1beta1.MsgChangeThoughtParticleResponse) | | | +| `ChangeThoughtName` | [MsgChangeThoughtName](#cyber.dmn.v1beta1.MsgChangeThoughtName) | [MsgChangeThoughtNameResponse](#cyber.dmn.v1beta1.MsgChangeThoughtNameResponse) | | | +| `ChangeThoughtInput` | [MsgChangeThoughtInput](#cyber.dmn.v1beta1.MsgChangeThoughtInput) | [MsgChangeThoughtInputResponse](#cyber.dmn.v1beta1.MsgChangeThoughtInputResponse) | | | +| `ChangeThoughtGasPrice` | [MsgChangeThoughtGasPrice](#cyber.dmn.v1beta1.MsgChangeThoughtGasPrice) | [MsgChangeThoughtGasPriceResponse](#cyber.dmn.v1beta1.MsgChangeThoughtGasPriceResponse) | | | +| `ChangeThoughtPeriod` | [MsgChangeThoughtPeriod](#cyber.dmn.v1beta1.MsgChangeThoughtPeriod) | [MsgChangeThoughtPeriodResponse](#cyber.dmn.v1beta1.MsgChangeThoughtPeriodResponse) | | | +| `ChangeThoughtBlock` | [MsgChangeThoughtBlock](#cyber.dmn.v1beta1.MsgChangeThoughtBlock) | [MsgChangeThoughtBlockResponse](#cyber.dmn.v1beta1.MsgChangeThoughtBlockResponse) | | | +| `UpdateParams` | [MsgUpdateParams](#cyber.dmn.v1beta1.MsgUpdateParams) | [MsgUpdateParamsResponse](#cyber.dmn.v1beta1.MsgUpdateParamsResponse) | | | + + +

Top

+## cyber/graph/v1beta1/query.proto - -### QueryRoutesResponse + +### QueryGraphStatsRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `routes` | [Route](#cyber.grid.v1beta1.Route) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | - + -### QuerySourceRequest +### QueryGraphStatsResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `source` | [string](#string) | | | +| `cyberlinks` | [uint64](#uint64) | | | +| `particles` | [uint64](#uint64) | | | @@ -1521,105 +1591,128 @@ - + ### Query | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#cyber.grid.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cyber.grid.v1beta1.QueryParamsResponse) | | GET|/cyber/grid/v1beta1/grid/params| -| `SourceRoutes` | [QuerySourceRequest](#cyber.grid.v1beta1.QuerySourceRequest) | [QueryRoutesResponse](#cyber.grid.v1beta1.QueryRoutesResponse) | | GET|/cyber/grid/v1beta1/grid/source_routes| -| `DestinationRoutes` | [QueryDestinationRequest](#cyber.grid.v1beta1.QueryDestinationRequest) | [QueryRoutesResponse](#cyber.grid.v1beta1.QueryRoutesResponse) | | GET|/cyber/grid/v1beta1/grid/destination_routes| -| `DestinationRoutedEnergy` | [QueryDestinationRequest](#cyber.grid.v1beta1.QueryDestinationRequest) | [QueryRoutedEnergyResponse](#cyber.grid.v1beta1.QueryRoutedEnergyResponse) | | GET|/cyber/grid/v1beta1/grid/destination_routed_energy| -| `SourceRoutedEnergy` | [QuerySourceRequest](#cyber.grid.v1beta1.QuerySourceRequest) | [QueryRoutedEnergyResponse](#cyber.grid.v1beta1.QueryRoutedEnergyResponse) | | GET|/cyber/grid/v1beta1/grid/source_routed_energy| -| `Route` | [QueryRouteRequest](#cyber.grid.v1beta1.QueryRouteRequest) | [QueryRouteResponse](#cyber.grid.v1beta1.QueryRouteResponse) | | GET|/cyber/grid/v1beta1/grid/route| -| `Routes` | [QueryRoutesRequest](#cyber.grid.v1beta1.QueryRoutesRequest) | [QueryRoutesResponse](#cyber.grid.v1beta1.QueryRoutesResponse) | | GET|/cyber/grid/v1beta1/grid/routes| +| `GraphStats` | [QueryGraphStatsRequest](#cyber.graph.v1beta1.QueryGraphStatsRequest) | [QueryGraphStatsResponse](#cyber.graph.v1beta1.QueryGraphStatsResponse) | | GET|/cyber/graph/v1beta1/graph_stats| - +

Top

-## cyber/grid/v1beta1/tx.proto +## cyber/graph/v1beta1/types.proto - + -### MsgCreateRoute +### Link | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `source` | [string](#string) | | | -| `destination` | [string](#string) | | | -| `name` | [string](#string) | | | +| `from` | [string](#string) | | | +| `to` | [string](#string) | | | + - + -### MsgCreateRouteResponse + + + + +

Top

+## cyber/graph/v1beta1/tx.proto - + -### MsgDeleteRoute +### MsgCyberlink | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `source` | [string](#string) | | | -| `destination` | [string](#string) | | | +| `neuron` | [string](#string) | | | +| `links` | [Link](#cyber.graph.v1beta1.Link) | repeated | | - + -### MsgDeleteRouteResponse +### MsgCyberlinkResponse + - + -### MsgEditRoute + + + + + +### Msg + + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Cyberlink` | [MsgCyberlink](#cyber.graph.v1beta1.MsgCyberlink) | [MsgCyberlinkResponse](#cyber.graph.v1beta1.MsgCyberlinkResponse) | | | + + + + + + +

Top

+ +## cyber/grid/v1beta1/types.proto + + + + + +### Params | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `source` | [string](#string) | | | -| `destination` | [string](#string) | | | -| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `max_routes` | [uint32](#uint32) | | | - + -### MsgEditRouteName +### Route @@ -1628,230 +1721,202 @@ | `source` | [string](#string) | | | | `destination` | [string](#string) | | | | `name` | [string](#string) | | | +| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - + -### MsgEditRouteNameResponse +### Value +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - -### MsgEditRouteResponse + + + + + +

Top

- +## cyber/grid/v1beta1/genesis.proto -### MsgUpdateParams + + + + +### GenesisState | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `authority` | [string](#string) | | | | `params` | [Params](#cyber.grid.v1beta1.Params) | | | +| `routes` | [Route](#cyber.grid.v1beta1.Route) | repeated | | + - + -### MsgUpdateParamsResponse + + + +

Top

+## cyber/grid/v1beta1/query.proto - - - + +### QueryDestinationRequest - -### Msg +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `destination` | [string](#string) | | | -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `CreateRoute` | [MsgCreateRoute](#cyber.grid.v1beta1.MsgCreateRoute) | [MsgCreateRouteResponse](#cyber.grid.v1beta1.MsgCreateRouteResponse) | | | -| `EditRoute` | [MsgEditRoute](#cyber.grid.v1beta1.MsgEditRoute) | [MsgEditRouteResponse](#cyber.grid.v1beta1.MsgEditRouteResponse) | | | -| `DeleteRoute` | [MsgDeleteRoute](#cyber.grid.v1beta1.MsgDeleteRoute) | [MsgDeleteRouteResponse](#cyber.grid.v1beta1.MsgDeleteRouteResponse) | | | -| `EditRouteName` | [MsgEditRouteName](#cyber.grid.v1beta1.MsgEditRouteName) | [MsgEditRouteNameResponse](#cyber.grid.v1beta1.MsgEditRouteNameResponse) | | | -| `UpdateParams` | [MsgUpdateParams](#cyber.grid.v1beta1.MsgUpdateParams) | [MsgUpdateParamsResponse](#cyber.grid.v1beta1.MsgUpdateParamsResponse) | | | - - -

Top

-## cyber/liquidity/v1beta1/tx.proto + + +### QueryParamsRequest + - -### MsgCreatePool -MsgCreatePool defines an sdk.Msg type that supports submitting a create -liquidity pool tx. -See: -https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md + + + +### QueryParamsResponse + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_creator_address` | [string](#string) | | | -| `pool_type_id` | [uint32](#uint32) | | id of the target pool type, must match the value in the pool. Only pool-type-id 1 is supported. | -| `deposit_coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | reserve coin pair of the pool to deposit. | +| `params` | [Params](#cyber.grid.v1beta1.Params) | | | - + + +### QueryRouteRequest + -### MsgCreatePoolResponse -MsgCreatePoolResponse defines the Msg/CreatePool response type. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `source` | [string](#string) | | | +| `destination` | [string](#string) | | | - -### MsgDepositWithinBatch -`MsgDepositWithinBatch defines` an `sdk.Msg` type that supports submitting -a deposit request to the batch of the liquidity pool. -Deposit is submitted to the batch of the Liquidity pool with the specified -`pool_id`, `deposit_coins` for reserve. -This request is stacked in the batch of the liquidity pool, is not processed -immediately, and is processed in the `endblock` at the same time as other -requests. + + +### QueryRouteResponse -See: -https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `depositor_address` | [string](#string) | | | -| `pool_id` | [uint64](#uint64) | | id of the target pool | -| `deposit_coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | reserve coin pair of the pool to deposit | +| `route` | [Route](#cyber.grid.v1beta1.Route) | | | - + -### MsgDepositWithinBatchResponse -MsgDepositWithinBatchResponse defines the Msg/DepositWithinBatch response -type. +### QueryRoutedEnergyResponse +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | - -### MsgSwapWithinBatch -`MsgSwapWithinBatch` defines an sdk.Msg type that supports submitting a swap -offer request to the batch of the liquidity pool. Submit swap offer to the -liquidity pool batch with the specified the `pool_id`, `swap_type_id`, -`demand_coin_denom` with the coin and the price you're offering -and `offer_coin_fee` must be half of offer coin amount * current -`params.swap_fee_rate` and ceil for reservation to pay fees. This request is -stacked in the batch of the liquidity pool, is not processed immediately, and -is processed in the `endblock` at the same time as other requests. You must -request the same fields as the pool. Only the default `swap_type_id` 1 is -supported. - -See: https://github.com/gravity-devs/liquidity/tree/develop/doc -https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `swap_requester_address` | [string](#string) | | address of swap requester | -| `pool_id` | [uint64](#uint64) | | id of swap type, must match the value in the pool. Only `swap_type_id` 1 is supported. | -| `swap_type_id` | [uint32](#uint32) | | id of swap type. Must match the value in the pool. | -| `offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | offer sdk.coin for the swap request, must match the denom in the pool. | -| `demand_coin_denom` | [string](#string) | | denom of demand coin to be exchanged on the swap request, must match the denom in the pool. | -| `offer_coin_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | half of offer coin amount * params.swap_fee_rate and ceil for reservation to pay fees. | -| `order_price` | [string](#string) | | limit order price for the order, the price is the exchange ratio of X/Y where X is the amount of the first coin and Y is the amount of the second coin when their denoms are sorted alphabetically. | + +### QueryRoutesRequest +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | | - -### MsgSwapWithinBatchResponse -MsgSwapWithinBatchResponse defines the Msg/Swap response type. + +### QueryRoutesResponse - -### MsgWithdrawWithinBatch -`MsgWithdrawWithinBatch` defines an `sdk.Msg` type that supports submitting -a withdraw request to the batch of the liquidity pool. -Withdraw is submitted to the batch from the Liquidity pool with the -specified `pool_id`, `pool_coin` of the pool. -This request is stacked in the batch of the liquidity pool, is not processed -immediately, and is processed in the `endblock` at the same time as other -requests. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `routes` | [Route](#cyber.grid.v1beta1.Route) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | | -See: -https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `withdrawer_address` | [string](#string) | | | -| `pool_id` | [uint64](#uint64) | | id of the target pool | -| `pool_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + +### QuerySourceRequest - -### MsgWithdrawWithinBatchResponse -MsgWithdrawWithinBatchResponse defines the Msg/WithdrawWithinBatch response -type. +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `source` | [string](#string) | | | @@ -1864,194 +1929,966 @@ type. - + + +### Query -### Msg -Msg defines the liquidity Msg service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `CreatePool` | [MsgCreatePool](#cyber.liquidity.v1beta1.MsgCreatePool) | [MsgCreatePoolResponse](#cyber.liquidity.v1beta1.MsgCreatePoolResponse) | Submit a create liquidity pool message. | | -| `DepositWithinBatch` | [MsgDepositWithinBatch](#cyber.liquidity.v1beta1.MsgDepositWithinBatch) | [MsgDepositWithinBatchResponse](#cyber.liquidity.v1beta1.MsgDepositWithinBatchResponse) | Submit a deposit to the liquidity pool batch. | | -| `WithdrawWithinBatch` | [MsgWithdrawWithinBatch](#cyber.liquidity.v1beta1.MsgWithdrawWithinBatch) | [MsgWithdrawWithinBatchResponse](#cyber.liquidity.v1beta1.MsgWithdrawWithinBatchResponse) | Submit a withdraw from the liquidity pool batch. | | -| `Swap` | [MsgSwapWithinBatch](#cyber.liquidity.v1beta1.MsgSwapWithinBatch) | [MsgSwapWithinBatchResponse](#cyber.liquidity.v1beta1.MsgSwapWithinBatchResponse) | Submit a swap to the liquidity pool batch. | | +| `Params` | [QueryParamsRequest](#cyber.grid.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cyber.grid.v1beta1.QueryParamsResponse) | | GET|/cyber/grid/v1beta1/grid/params| +| `SourceRoutes` | [QuerySourceRequest](#cyber.grid.v1beta1.QuerySourceRequest) | [QueryRoutesResponse](#cyber.grid.v1beta1.QueryRoutesResponse) | | GET|/cyber/grid/v1beta1/grid/source_routes| +| `DestinationRoutes` | [QueryDestinationRequest](#cyber.grid.v1beta1.QueryDestinationRequest) | [QueryRoutesResponse](#cyber.grid.v1beta1.QueryRoutesResponse) | | GET|/cyber/grid/v1beta1/grid/destination_routes| +| `DestinationRoutedEnergy` | [QueryDestinationRequest](#cyber.grid.v1beta1.QueryDestinationRequest) | [QueryRoutedEnergyResponse](#cyber.grid.v1beta1.QueryRoutedEnergyResponse) | | GET|/cyber/grid/v1beta1/grid/destination_routed_energy| +| `SourceRoutedEnergy` | [QuerySourceRequest](#cyber.grid.v1beta1.QuerySourceRequest) | [QueryRoutedEnergyResponse](#cyber.grid.v1beta1.QueryRoutedEnergyResponse) | | GET|/cyber/grid/v1beta1/grid/source_routed_energy| +| `Route` | [QueryRouteRequest](#cyber.grid.v1beta1.QueryRouteRequest) | [QueryRouteResponse](#cyber.grid.v1beta1.QueryRouteResponse) | | GET|/cyber/grid/v1beta1/grid/route| +| `Routes` | [QueryRoutesRequest](#cyber.grid.v1beta1.QueryRoutesRequest) | [QueryRoutesResponse](#cyber.grid.v1beta1.QueryRoutesResponse) | | GET|/cyber/grid/v1beta1/grid/routes| - +

Top

-## cyber/liquidity/v1beta1/liquidity.proto +## cyber/grid/v1beta1/tx.proto - + + +### MsgCreateRoute -### DepositMsgState -DepositMsgState defines the state of deposit message that contains state -information as it is processed in the next batch or batches. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `msg_height` | [int64](#int64) | | height where this message is appended to the batch | -| `msg_index` | [uint64](#uint64) | | index of this deposit message in this liquidity pool | -| `executed` | [bool](#bool) | | true if executed on this batch, false if not executed | -| `succeeded` | [bool](#bool) | | true if executed successfully on this batch, false if failed | -| `to_be_deleted` | [bool](#bool) | | true if ready to be deleted on kvstore, false if not ready to be deleted | -| `msg` | [MsgDepositWithinBatch](#cyber.liquidity.v1beta1.MsgDepositWithinBatch) | | MsgDepositWithinBatch | +| `source` | [string](#string) | | | +| `destination` | [string](#string) | | | +| `name` | [string](#string) | | | - + + +### MsgCreateRouteResponse + + + + + + + + + +### MsgDeleteRoute -### Params -Params defines the parameters for the liquidity module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_types` | [PoolType](#cyber.liquidity.v1beta1.PoolType) | repeated | list of available pool types | -| `min_init_deposit_amount` | [string](#string) | | Minimum number of coins to be deposited to the liquidity pool on pool creation. | -| `init_pool_coin_mint_amount` | [string](#string) | | Initial mint amount of pool coins upon pool creation. | -| `max_reserve_coin_amount` | [string](#string) | | Limit the size of each liquidity pool to minimize risk. In development, set to 0 for no limit. In production, set a limit. | -| `pool_creation_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Fee paid to create a Liquidity Pool. Set a fee to prevent spamming. | -| `swap_fee_rate` | [string](#string) | | Swap fee rate for every executed swap. | -| `withdraw_fee_rate` | [string](#string) | | Reserve coin withdrawal with less proportion by withdrawFeeRate. | -| `max_order_amount_ratio` | [string](#string) | | Maximum ratio of reserve coins that can be ordered at a swap order. | -| `unit_batch_height` | [uint32](#uint32) | | The smallest unit batch height for every liquidity pool. | -| `circuit_breaker_enabled` | [bool](#bool) | | Circuit breaker enables or disables transaction messages in liquidity module. | +| `source` | [string](#string) | | | +| `destination` | [string](#string) | | | - + + +### MsgDeleteRouteResponse + + + + + + + + + +### MsgEditRoute -### Pool -Pool defines the liquidity pool that contains pool information. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `id` | [uint64](#uint64) | | id of the pool | -| `type_id` | [uint32](#uint32) | | id of the pool_type | -| `reserve_coin_denoms` | [string](#string) | repeated | denoms of reserve coin pair of the pool | -| `reserve_account_address` | [string](#string) | | reserve account address of the pool | -| `pool_coin_denom` | [string](#string) | | denom of pool coin of the pool | +| `source` | [string](#string) | | | +| `destination` | [string](#string) | | | +| `value` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + + + + + + + +### MsgEditRouteName + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `source` | [string](#string) | | | +| `destination` | [string](#string) | | | +| `name` | [string](#string) | | | + + + + + + + + +### MsgEditRouteNameResponse + + + + + + + + + +### MsgEditRouteResponse + + + + + + + + + +### MsgUpdateParams + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `authority` | [string](#string) | | | +| `params` | [Params](#cyber.grid.v1beta1.Params) | | | + + + + + + + + +### MsgUpdateParamsResponse + + + + + + + + + + + + + + + +### Msg + + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `CreateRoute` | [MsgCreateRoute](#cyber.grid.v1beta1.MsgCreateRoute) | [MsgCreateRouteResponse](#cyber.grid.v1beta1.MsgCreateRouteResponse) | | | +| `EditRoute` | [MsgEditRoute](#cyber.grid.v1beta1.MsgEditRoute) | [MsgEditRouteResponse](#cyber.grid.v1beta1.MsgEditRouteResponse) | | | +| `DeleteRoute` | [MsgDeleteRoute](#cyber.grid.v1beta1.MsgDeleteRoute) | [MsgDeleteRouteResponse](#cyber.grid.v1beta1.MsgDeleteRouteResponse) | | | +| `EditRouteName` | [MsgEditRouteName](#cyber.grid.v1beta1.MsgEditRouteName) | [MsgEditRouteNameResponse](#cyber.grid.v1beta1.MsgEditRouteNameResponse) | | | +| `UpdateParams` | [MsgUpdateParams](#cyber.grid.v1beta1.MsgUpdateParams) | [MsgUpdateParamsResponse](#cyber.grid.v1beta1.MsgUpdateParamsResponse) | | | + + + + + + +

Top

+ +## cyber/liquidity/v1beta1/tx.proto + + + + + +### MsgCreatePool +MsgCreatePool defines an sdk.Msg type that supports submitting a create +liquidity pool tx. + +See: +https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_creator_address` | [string](#string) | | | +| `pool_type_id` | [uint32](#uint32) | | id of the target pool type, must match the value in the pool. Only pool-type-id 1 is supported. | +| `deposit_coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | reserve coin pair of the pool to deposit. | + + + + + + + + +### MsgCreatePoolResponse +MsgCreatePoolResponse defines the Msg/CreatePool response type. + + + + + + + + +### MsgDepositWithinBatch +`MsgDepositWithinBatch defines` an `sdk.Msg` type that supports submitting +a deposit request to the batch of the liquidity pool. +Deposit is submitted to the batch of the Liquidity pool with the specified +`pool_id`, `deposit_coins` for reserve. +This request is stacked in the batch of the liquidity pool, is not processed +immediately, and is processed in the `endblock` at the same time as other +requests. + +See: +https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `depositor_address` | [string](#string) | | | +| `pool_id` | [uint64](#uint64) | | id of the target pool | +| `deposit_coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | reserve coin pair of the pool to deposit | + + + + + + + + +### MsgDepositWithinBatchResponse +MsgDepositWithinBatchResponse defines the Msg/DepositWithinBatch response +type. + + + + + + + + +### MsgSwapWithinBatch +`MsgSwapWithinBatch` defines an sdk.Msg type that supports submitting a swap +offer request to the batch of the liquidity pool. Submit swap offer to the +liquidity pool batch with the specified the `pool_id`, `swap_type_id`, +`demand_coin_denom` with the coin and the price you're offering +and `offer_coin_fee` must be half of offer coin amount * current +`params.swap_fee_rate` and ceil for reservation to pay fees. This request is +stacked in the batch of the liquidity pool, is not processed immediately, and +is processed in the `endblock` at the same time as other requests. You must +request the same fields as the pool. Only the default `swap_type_id` 1 is +supported. + +See: https://github.com/gravity-devs/liquidity/tree/develop/doc +https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `swap_requester_address` | [string](#string) | | address of swap requester | +| `pool_id` | [uint64](#uint64) | | id of swap type, must match the value in the pool. Only `swap_type_id` 1 is supported. | +| `swap_type_id` | [uint32](#uint32) | | id of swap type. Must match the value in the pool. | +| `offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | offer sdk.coin for the swap request, must match the denom in the pool. | +| `demand_coin_denom` | [string](#string) | | denom of demand coin to be exchanged on the swap request, must match the denom in the pool. | +| `offer_coin_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | half of offer coin amount * params.swap_fee_rate and ceil for reservation to pay fees. | +| `order_price` | [string](#string) | | limit order price for the order, the price is the exchange ratio of X/Y where X is the amount of the first coin and Y is the amount of the second coin when their denoms are sorted alphabetically. | + + + + + + + + +### MsgSwapWithinBatchResponse +MsgSwapWithinBatchResponse defines the Msg/Swap response type. + + + + + + + + +### MsgWithdrawWithinBatch +`MsgWithdrawWithinBatch` defines an `sdk.Msg` type that supports submitting +a withdraw request to the batch of the liquidity pool. +Withdraw is submitted to the batch from the Liquidity pool with the +specified `pool_id`, `pool_coin` of the pool. +This request is stacked in the batch of the liquidity pool, is not processed +immediately, and is processed in the `endblock` at the same time as other +requests. + +See: +https://github.com/gravity-devs/liquidity/blob/develop/x/liquidity/spec/04_messages.md + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `withdrawer_address` | [string](#string) | | | +| `pool_id` | [uint64](#uint64) | | id of the target pool | +| `pool_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | + + + + + + + + +### MsgWithdrawWithinBatchResponse +MsgWithdrawWithinBatchResponse defines the Msg/WithdrawWithinBatch response +type. + + + + + + + + + + + + + + +### Msg +Msg defines the liquidity Msg service. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `CreatePool` | [MsgCreatePool](#cyber.liquidity.v1beta1.MsgCreatePool) | [MsgCreatePoolResponse](#cyber.liquidity.v1beta1.MsgCreatePoolResponse) | Submit a create liquidity pool message. | | +| `DepositWithinBatch` | [MsgDepositWithinBatch](#cyber.liquidity.v1beta1.MsgDepositWithinBatch) | [MsgDepositWithinBatchResponse](#cyber.liquidity.v1beta1.MsgDepositWithinBatchResponse) | Submit a deposit to the liquidity pool batch. | | +| `WithdrawWithinBatch` | [MsgWithdrawWithinBatch](#cyber.liquidity.v1beta1.MsgWithdrawWithinBatch) | [MsgWithdrawWithinBatchResponse](#cyber.liquidity.v1beta1.MsgWithdrawWithinBatchResponse) | Submit a withdraw from the liquidity pool batch. | | +| `Swap` | [MsgSwapWithinBatch](#cyber.liquidity.v1beta1.MsgSwapWithinBatch) | [MsgSwapWithinBatchResponse](#cyber.liquidity.v1beta1.MsgSwapWithinBatchResponse) | Submit a swap to the liquidity pool batch. | | + + + + + + +

Top

+ +## cyber/liquidity/v1beta1/liquidity.proto + + + + + +### DepositMsgState +DepositMsgState defines the state of deposit message that contains state +information as it is processed in the next batch or batches. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `msg_height` | [int64](#int64) | | height where this message is appended to the batch | +| `msg_index` | [uint64](#uint64) | | index of this deposit message in this liquidity pool | +| `executed` | [bool](#bool) | | true if executed on this batch, false if not executed | +| `succeeded` | [bool](#bool) | | true if executed successfully on this batch, false if failed | +| `to_be_deleted` | [bool](#bool) | | true if ready to be deleted on kvstore, false if not ready to be deleted | +| `msg` | [MsgDepositWithinBatch](#cyber.liquidity.v1beta1.MsgDepositWithinBatch) | | MsgDepositWithinBatch | + + + + + + + + +### Params +Params defines the parameters for the liquidity module. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_types` | [PoolType](#cyber.liquidity.v1beta1.PoolType) | repeated | list of available pool types | +| `min_init_deposit_amount` | [string](#string) | | Minimum number of coins to be deposited to the liquidity pool on pool creation. | +| `init_pool_coin_mint_amount` | [string](#string) | | Initial mint amount of pool coins upon pool creation. | +| `max_reserve_coin_amount` | [string](#string) | | Limit the size of each liquidity pool to minimize risk. In development, set to 0 for no limit. In production, set a limit. | +| `pool_creation_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | Fee paid to create a Liquidity Pool. Set a fee to prevent spamming. | +| `swap_fee_rate` | [string](#string) | | Swap fee rate for every executed swap. | +| `withdraw_fee_rate` | [string](#string) | | Reserve coin withdrawal with less proportion by withdrawFeeRate. | +| `max_order_amount_ratio` | [string](#string) | | Maximum ratio of reserve coins that can be ordered at a swap order. | +| `unit_batch_height` | [uint32](#uint32) | | The smallest unit batch height for every liquidity pool. | +| `circuit_breaker_enabled` | [bool](#bool) | | Circuit breaker enables or disables transaction messages in liquidity module. | + + + + + + + + +### Pool +Pool defines the liquidity pool that contains pool information. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [uint64](#uint64) | | id of the pool | +| `type_id` | [uint32](#uint32) | | id of the pool_type | +| `reserve_coin_denoms` | [string](#string) | repeated | denoms of reserve coin pair of the pool | +| `reserve_account_address` | [string](#string) | | reserve account address of the pool | +| `pool_coin_denom` | [string](#string) | | denom of pool coin of the pool | + + + + + + + + +### PoolBatch +PoolBatch defines the batch or batches of a given liquidity pool that +contains indexes of deposit, withdraw, and swap messages. Index param +increments by 1 if the pool id is same. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_id` | [uint64](#uint64) | | id of the pool | +| `index` | [uint64](#uint64) | | index of this batch | +| `begin_height` | [int64](#int64) | | height where this batch is started | +| `deposit_msg_index` | [uint64](#uint64) | | last index of DepositMsgStates | +| `withdraw_msg_index` | [uint64](#uint64) | | last index of WithdrawMsgStates | +| `swap_msg_index` | [uint64](#uint64) | | last index of SwapMsgStates | +| `executed` | [bool](#bool) | | true if executed, false if not executed | + + + + + + + + +### PoolMetadata +Metadata for the state of each pool for invariant checking after genesis +export or import. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_id` | [uint64](#uint64) | | id of the pool | +| `pool_coin_total_supply` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | pool coin issued at the pool | +| `reserve_coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | reserve coins deposited in the pool | + + + + + + + + +### PoolType +Structure for the pool type to distinguish the characteristics of the reserve +pools. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `id` | [uint32](#uint32) | | This is the id of the pool_type that is used as pool_type_id for pool creation. In this version, only pool-type-id 1 is supported. {"id":1,"name":"ConstantProductLiquidityPool","min_reserve_coin_num":2,"max_reserve_coin_num":2,"description":""} | +| `name` | [string](#string) | | name of the pool type. | +| `min_reserve_coin_num` | [uint32](#uint32) | | minimum number of reserveCoins for LiquidityPoolType, only 2 reserve coins are supported. | +| `max_reserve_coin_num` | [uint32](#uint32) | | maximum number of reserveCoins for LiquidityPoolType, only 2 reserve coins are supported. | +| `description` | [string](#string) | | description of the pool type. | + + + + + + + + +### SwapMsgState +SwapMsgState defines the state of the swap message that contains state +information as the message is processed in the next batch or batches. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `msg_height` | [int64](#int64) | | height where this message is appended to the batch | +| `msg_index` | [uint64](#uint64) | | index of this swap message in this liquidity pool | +| `executed` | [bool](#bool) | | true if executed on this batch, false if not executed | +| `succeeded` | [bool](#bool) | | true if executed successfully on this batch, false if failed | +| `to_be_deleted` | [bool](#bool) | | true if ready to be deleted on kvstore, false if not ready to be deleted | +| `order_expiry_height` | [int64](#int64) | | swap orders are cancelled when current height is equal to or higher than ExpiryHeight | +| `exchanged_offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | offer coin exchanged until now | +| `remaining_offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | offer coin currently remaining to be exchanged | +| `reserved_offer_coin_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | reserve fee for pays fee in half offer coin | +| `msg` | [MsgSwapWithinBatch](#cyber.liquidity.v1beta1.MsgSwapWithinBatch) | | MsgSwapWithinBatch | + + + + + + + + +### WithdrawMsgState +WithdrawMsgState defines the state of the withdraw message that contains +state information as the message is processed in the next batch or batches. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `msg_height` | [int64](#int64) | | height where this message is appended to the batch | +| `msg_index` | [uint64](#uint64) | | index of this withdraw message in this liquidity pool | +| `executed` | [bool](#bool) | | true if executed on this batch, false if not executed | +| `succeeded` | [bool](#bool) | | true if executed successfully on this batch, false if failed | +| `to_be_deleted` | [bool](#bool) | | true if ready to be deleted on kvstore, false if not ready to be deleted | +| `msg` | [MsgWithdrawWithinBatch](#cyber.liquidity.v1beta1.MsgWithdrawWithinBatch) | | MsgWithdrawWithinBatch | + + + + + + + + + + + + + + + + +

Top

+ +## cyber/liquidity/v1beta1/genesis.proto + + + + + +### GenesisState +GenesisState defines the liquidity module's genesis state. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#cyber.liquidity.v1beta1.Params) | | params defines all the parameters for the liquidity module. | +| `pool_records` | [PoolRecord](#cyber.liquidity.v1beta1.PoolRecord) | repeated | | + + + + + + + + +### PoolRecord +records the state of each pool after genesis export or import, used to check +variables + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool` | [Pool](#cyber.liquidity.v1beta1.Pool) | | | +| `pool_metadata` | [PoolMetadata](#cyber.liquidity.v1beta1.PoolMetadata) | | | +| `pool_batch` | [PoolBatch](#cyber.liquidity.v1beta1.PoolBatch) | | | +| `deposit_msg_states` | [DepositMsgState](#cyber.liquidity.v1beta1.DepositMsgState) | repeated | | +| `withdraw_msg_states` | [WithdrawMsgState](#cyber.liquidity.v1beta1.WithdrawMsgState) | repeated | | +| `swap_msg_states` | [SwapMsgState](#cyber.liquidity.v1beta1.SwapMsgState) | repeated | | + + + + + + + + + + + + + + + + +

Top

+ +## cyber/liquidity/v1beta1/query.proto + + + + + +### QueryLiquidityPoolBatchRequest +the request type for the QueryLiquidityPoolBatch RPC method. requestable +including specified pool_id. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_id` | [uint64](#uint64) | | id of the target pool for query | + + + + + + + + +### QueryLiquidityPoolBatchResponse +the response type for the QueryLiquidityPoolBatchResponse RPC method. Returns +the liquidity pool batch that corresponds to the requested pool_id. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `batch` | [PoolBatch](#cyber.liquidity.v1beta1.PoolBatch) | | | + + + + + + + + +### QueryLiquidityPoolByPoolCoinDenomRequest +the request type for the QueryLiquidityByPoolCoinDenomPool RPC method. +Requestable specified pool_coin_denom. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_coin_denom` | [string](#string) | | | + + + + + + + + +### QueryLiquidityPoolByReserveAccRequest +the request type for the QueryLiquidityByReserveAcc RPC method. Requestable +specified reserve_acc. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `reserve_acc` | [string](#string) | | | + + + + + + + + +### QueryLiquidityPoolRequest +the request type for the QueryLiquidityPool RPC method. requestable specified +pool_id. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_id` | [uint64](#uint64) | | | + + + + + + + + +### QueryLiquidityPoolResponse +the response type for the QueryLiquidityPoolResponse RPC method. Returns the +liquidity pool that corresponds to the requested pool_id. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool` | [Pool](#cyber.liquidity.v1beta1.Pool) | | | + + + + + + + + +### QueryLiquidityPoolsRequest +the request type for the QueryLiquidityPools RPC method. Requestable +including pagination offset, limit, key. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryLiquidityPoolsResponse +the response type for the QueryLiquidityPoolsResponse RPC method. This +includes a list of all existing liquidity pools and paging results that +contain next_key and total count. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pools` | [Pool](#cyber.liquidity.v1beta1.Pool) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. not working on this version. | + + + + + + + + +### QueryParamsRequest +QueryParamsRequest is request type for the QueryParams RPC method. + + + + + + + + +### QueryParamsResponse +the response type for the QueryParamsResponse RPC method. This includes +current parameter of the liquidity module. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#cyber.liquidity.v1beta1.Params) | | params holds all the parameters of this module. | + + + + + + + + +### QueryPoolBatchDepositMsgRequest +the request type for the QueryPoolBatchDeposit RPC method. requestable +including specified pool_id and msg_index. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_id` | [uint64](#uint64) | | id of the target pool for query | +| `msg_index` | [uint64](#uint64) | | target msg_index of the pool | + + + + + + + + +### QueryPoolBatchDepositMsgResponse +the response type for the QueryPoolBatchDepositMsg RPC method. This includes +a batch swap message of the batch. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `deposit` | [DepositMsgState](#cyber.liquidity.v1beta1.DepositMsgState) | | | + + + + + + + + +### QueryPoolBatchDepositMsgsRequest +the request type for the QueryPoolBatchDeposit RPC method. Requestable +including specified pool_id and pagination offset, limit, key. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_id` | [uint64](#uint64) | | id of the target pool for query | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | + + + + + + + + +### QueryPoolBatchDepositMsgsResponse +the response type for the QueryPoolBatchDeposit RPC method. This includes a +list of all currently existing deposit messages of the batch and paging +results that contain next_key and total count. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `deposits` | [DepositMsgState](#cyber.liquidity.v1beta1.DepositMsgState) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. not working on this version. | + + + + + + + + +### QueryPoolBatchSwapMsgRequest +the request type for the QueryPoolBatchSwap RPC method. Requestable including +specified pool_id and msg_index. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_id` | [uint64](#uint64) | | id of the target pool for query | +| `msg_index` | [uint64](#uint64) | | target msg_index of the pool | + + + + + + + + +### QueryPoolBatchSwapMsgResponse +the response type for the QueryPoolBatchSwapMsg RPC method. This includes a +batch swap message of the batch. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `swap` | [SwapMsgState](#cyber.liquidity.v1beta1.SwapMsgState) | | | + + + + + + + + +### QueryPoolBatchSwapMsgsRequest +the request type for the QueryPoolBatchSwapMsgs RPC method. Requestable +including specified pool_id and pagination offset, limit, key. + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `pool_id` | [uint64](#uint64) | | id of the target pool for query | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### PoolBatch -PoolBatch defines the batch or batches of a given liquidity pool that -contains indexes of deposit, withdraw, and swap messages. Index param -increments by 1 if the pool id is same. +### QueryPoolBatchSwapMsgsResponse +the response type for the QueryPoolBatchSwapMsgs RPC method. This includes +list of all currently existing swap messages of the batch and paging results +that contain next_key and total count. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_id` | [uint64](#uint64) | | id of the pool | -| `index` | [uint64](#uint64) | | index of this batch | -| `begin_height` | [int64](#int64) | | height where this batch is started | -| `deposit_msg_index` | [uint64](#uint64) | | last index of DepositMsgStates | -| `withdraw_msg_index` | [uint64](#uint64) | | last index of WithdrawMsgStates | -| `swap_msg_index` | [uint64](#uint64) | | last index of SwapMsgStates | -| `executed` | [bool](#bool) | | true if executed, false if not executed | +| `swaps` | [SwapMsgState](#cyber.liquidity.v1beta1.SwapMsgState) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. not working on this version. | - + -### PoolMetadata -Metadata for the state of each pool for invariant checking after genesis -export or import. +### QueryPoolBatchWithdrawMsgRequest +the request type for the QueryPoolBatchWithdraw RPC method. requestable +including specified pool_id and msg_index. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_id` | [uint64](#uint64) | | id of the pool | -| `pool_coin_total_supply` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | pool coin issued at the pool | -| `reserve_coins` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | reserve coins deposited in the pool | +| `pool_id` | [uint64](#uint64) | | id of the target pool for query | +| `msg_index` | [uint64](#uint64) | | target msg_index of the pool | - + -### PoolType -Structure for the pool type to distinguish the characteristics of the reserve -pools. +### QueryPoolBatchWithdrawMsgResponse +the response type for the QueryPoolBatchWithdrawMsg RPC method. This includes +a batch swap message of the batch. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `id` | [uint32](#uint32) | | This is the id of the pool_type that is used as pool_type_id for pool creation. In this version, only pool-type-id 1 is supported. {"id":1,"name":"ConstantProductLiquidityPool","min_reserve_coin_num":2,"max_reserve_coin_num":2,"description":""} | -| `name` | [string](#string) | | name of the pool type. | -| `min_reserve_coin_num` | [uint32](#uint32) | | minimum number of reserveCoins for LiquidityPoolType, only 2 reserve coins are supported. | -| `max_reserve_coin_num` | [uint32](#uint32) | | maximum number of reserveCoins for LiquidityPoolType, only 2 reserve coins are supported. | -| `description` | [string](#string) | | description of the pool type. | +| `withdraw` | [WithdrawMsgState](#cyber.liquidity.v1beta1.WithdrawMsgState) | | | - + -### SwapMsgState -SwapMsgState defines the state of the swap message that contains state -information as the message is processed in the next batch or batches. +### QueryPoolBatchWithdrawMsgsRequest +the request type for the QueryPoolBatchWithdraw RPC method. Requestable +including specified pool_id and pagination offset, limit, key. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `msg_height` | [int64](#int64) | | height where this message is appended to the batch | -| `msg_index` | [uint64](#uint64) | | index of this swap message in this liquidity pool | -| `executed` | [bool](#bool) | | true if executed on this batch, false if not executed | -| `succeeded` | [bool](#bool) | | true if executed successfully on this batch, false if failed | -| `to_be_deleted` | [bool](#bool) | | true if ready to be deleted on kvstore, false if not ready to be deleted | -| `order_expiry_height` | [int64](#int64) | | swap orders are cancelled when current height is equal to or higher than ExpiryHeight | -| `exchanged_offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | offer coin exchanged until now | -| `remaining_offer_coin` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | offer coin currently remaining to be exchanged | -| `reserved_offer_coin_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | reserve fee for pays fee in half offer coin | -| `msg` | [MsgSwapWithinBatch](#cyber.liquidity.v1beta1.MsgSwapWithinBatch) | | MsgSwapWithinBatch | +| `pool_id` | [uint64](#uint64) | | id of the target pool for query | +| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | - + -### WithdrawMsgState -WithdrawMsgState defines the state of the withdraw message that contains -state information as the message is processed in the next batch or batches. +### QueryPoolBatchWithdrawMsgsResponse +the response type for the QueryPoolBatchWithdraw RPC method. This includes a +list of all currently existing withdraw messages of the batch and paging +results that contain next_key and total count. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `msg_height` | [int64](#int64) | | height where this message is appended to the batch | -| `msg_index` | [uint64](#uint64) | | index of this withdraw message in this liquidity pool | -| `executed` | [bool](#bool) | | true if executed on this batch, false if not executed | -| `succeeded` | [bool](#bool) | | true if executed successfully on this batch, false if failed | -| `to_be_deleted` | [bool](#bool) | | true if ready to be deleted on kvstore, false if not ready to be deleted | -| `msg` | [MsgWithdrawWithinBatch](#cyber.liquidity.v1beta1.MsgWithdrawWithinBatch) | | MsgWithdrawWithinBatch | +| `withdraws` | [WithdrawMsgState](#cyber.liquidity.v1beta1.WithdrawMsgState) | repeated | | +| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. Not supported on this version. | @@ -2063,48 +2900,65 @@ state information as the message is processed in the next batch or batches. + + + +### Query +Query defines the gRPC query service for the liquidity module. + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `LiquidityPools` | [QueryLiquidityPoolsRequest](#cyber.liquidity.v1beta1.QueryLiquidityPoolsRequest) | [QueryLiquidityPoolsResponse](#cyber.liquidity.v1beta1.QueryLiquidityPoolsResponse) | Get existing liquidity pools. | GET|/cosmos/liquidity/v1beta1/pools| +| `LiquidityPool` | [QueryLiquidityPoolRequest](#cyber.liquidity.v1beta1.QueryLiquidityPoolRequest) | [QueryLiquidityPoolResponse](#cyber.liquidity.v1beta1.QueryLiquidityPoolResponse) | Get specific liquidity pool. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}| +| `LiquidityPoolByPoolCoinDenom` | [QueryLiquidityPoolByPoolCoinDenomRequest](#cyber.liquidity.v1beta1.QueryLiquidityPoolByPoolCoinDenomRequest) | [QueryLiquidityPoolResponse](#cyber.liquidity.v1beta1.QueryLiquidityPoolResponse) | Get specific liquidity pool corresponding to the pool_coin_denom. | GET|/cosmos/liquidity/v1beta1/pools/pool_coin_denom/{pool_coin_denom}| +| `LiquidityPoolByReserveAcc` | [QueryLiquidityPoolByReserveAccRequest](#cyber.liquidity.v1beta1.QueryLiquidityPoolByReserveAccRequest) | [QueryLiquidityPoolResponse](#cyber.liquidity.v1beta1.QueryLiquidityPoolResponse) | Get specific liquidity pool corresponding to the reserve account. | GET|/cosmos/liquidity/v1beta1/pools/reserve_acc/{reserve_acc}| +| `LiquidityPoolBatch` | [QueryLiquidityPoolBatchRequest](#cyber.liquidity.v1beta1.QueryLiquidityPoolBatchRequest) | [QueryLiquidityPoolBatchResponse](#cyber.liquidity.v1beta1.QueryLiquidityPoolBatchResponse) | Get the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch| +| `PoolBatchSwapMsgs` | [QueryPoolBatchSwapMsgsRequest](#cyber.liquidity.v1beta1.QueryPoolBatchSwapMsgsRequest) | [QueryPoolBatchSwapMsgsResponse](#cyber.liquidity.v1beta1.QueryPoolBatchSwapMsgsResponse) | Get all swap messages in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/swaps| +| `PoolBatchSwapMsg` | [QueryPoolBatchSwapMsgRequest](#cyber.liquidity.v1beta1.QueryPoolBatchSwapMsgRequest) | [QueryPoolBatchSwapMsgResponse](#cyber.liquidity.v1beta1.QueryPoolBatchSwapMsgResponse) | Get a specific swap message in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/swaps/{msg_index}| +| `PoolBatchDepositMsgs` | [QueryPoolBatchDepositMsgsRequest](#cyber.liquidity.v1beta1.QueryPoolBatchDepositMsgsRequest) | [QueryPoolBatchDepositMsgsResponse](#cyber.liquidity.v1beta1.QueryPoolBatchDepositMsgsResponse) | Get all deposit messages in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/deposits| +| `PoolBatchDepositMsg` | [QueryPoolBatchDepositMsgRequest](#cyber.liquidity.v1beta1.QueryPoolBatchDepositMsgRequest) | [QueryPoolBatchDepositMsgResponse](#cyber.liquidity.v1beta1.QueryPoolBatchDepositMsgResponse) | Get a specific deposit message in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/deposits/{msg_index}| +| `PoolBatchWithdrawMsgs` | [QueryPoolBatchWithdrawMsgsRequest](#cyber.liquidity.v1beta1.QueryPoolBatchWithdrawMsgsRequest) | [QueryPoolBatchWithdrawMsgsResponse](#cyber.liquidity.v1beta1.QueryPoolBatchWithdrawMsgsResponse) | Get all withdraw messages in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/withdraws| +| `PoolBatchWithdrawMsg` | [QueryPoolBatchWithdrawMsgRequest](#cyber.liquidity.v1beta1.QueryPoolBatchWithdrawMsgRequest) | [QueryPoolBatchWithdrawMsgResponse](#cyber.liquidity.v1beta1.QueryPoolBatchWithdrawMsgResponse) | Get a specific withdraw message in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/withdraws/{msg_index}| +| `Params` | [QueryParamsRequest](#cyber.liquidity.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cyber.liquidity.v1beta1.QueryParamsResponse) | Get all parameters of the liquidity module. | GET|/cosmos/liquidity/v1beta1/params| + - +

Top

-## cyber/liquidity/v1beta1/genesis.proto +## cyber/rank/v1beta1/types.proto - + + +### Params -### GenesisState -GenesisState defines the liquidity module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cyber.liquidity.v1beta1.Params) | | params defines all the parameters for the liquidity module. | -| `pool_records` | [PoolRecord](#cyber.liquidity.v1beta1.PoolRecord) | repeated | | +| `calculation_period` | [int64](#int64) | | | +| `damping_factor` | [string](#string) | | | +| `tolerance` | [string](#string) | | | - + + +### RankedParticle -### PoolRecord -records the state of each pool after genesis export or import, used to check -variables | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool` | [Pool](#cyber.liquidity.v1beta1.Pool) | | | -| `pool_metadata` | [PoolMetadata](#cyber.liquidity.v1beta1.PoolMetadata) | | | -| `pool_batch` | [PoolBatch](#cyber.liquidity.v1beta1.PoolBatch) | | | -| `deposit_msg_states` | [DepositMsgState](#cyber.liquidity.v1beta1.DepositMsgState) | repeated | | -| `withdraw_msg_states` | [WithdrawMsgState](#cyber.liquidity.v1beta1.WithdrawMsgState) | repeated | | -| `swap_msg_states` | [SwapMsgState](#cyber.liquidity.v1beta1.SwapMsgState) | repeated | | +| `particle` | [string](#string) | | | +| `rank` | [uint64](#uint64) | | | @@ -2120,367 +2974,320 @@ variables - +

Top

-## cyber/liquidity/v1beta1/query.proto +## cyber/rank/v1beta1/genesis.proto - + + +### GenesisState -### QueryLiquidityPoolBatchRequest -the request type for the QueryLiquidityPoolBatch RPC method. requestable -including specified pool_id. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_id` | [uint64](#uint64) | | id of the target pool for query | +| `params` | [Params](#cyber.rank.v1beta1.Params) | | | + - + -### QueryLiquidityPoolBatchResponse -the response type for the QueryLiquidityPoolBatchResponse RPC method. Returns -the liquidity pool batch that corresponds to the requested pool_id. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `batch` | [PoolBatch](#cyber.liquidity.v1beta1.PoolBatch) | | | + +

Top

+## cyber/rank/v1beta1/pagination.proto - + + +### PageRequest -### QueryLiquidityPoolByPoolCoinDenomRequest -the request type for the QueryLiquidityByPoolCoinDenomPool RPC method. -Requestable specified pool_coin_denom. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_coin_denom` | [string](#string) | | | +| `page` | [uint32](#uint32) | | | +| `per_page` | [uint32](#uint32) | | | - + + +### PageResponse -### QueryLiquidityPoolByReserveAccRequest -the request type for the QueryLiquidityByReserveAcc RPC method. Requestable -specified reserve_acc. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `reserve_acc` | [string](#string) | | | +| `total` | [uint32](#uint32) | | | + - + -### QueryLiquidityPoolRequest -the request type for the QueryLiquidityPool RPC method. requestable specified -pool_id. + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pool_id` | [uint64](#uint64) | | | + +

Top

+## cyber/rank/v1beta1/query.proto - + + +### QueryIsAnyLinkExistRequest -### QueryLiquidityPoolResponse -the response type for the QueryLiquidityPoolResponse RPC method. Returns the -liquidity pool that corresponds to the requested pool_id. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool` | [Pool](#cyber.liquidity.v1beta1.Pool) | | | +| `from` | [string](#string) | | | +| `to` | [string](#string) | | | - + + +### QueryIsLinkExistRequest -### QueryLiquidityPoolsRequest -the request type for the QueryLiquidityPools RPC method. Requestable -including pagination offset, limit, key. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `from` | [string](#string) | | | +| `to` | [string](#string) | | | +| `address` | [string](#string) | | | - + + +### QueryKarmaRequest -### QueryLiquidityPoolsResponse -the response type for the QueryLiquidityPoolsResponse RPC method. This -includes a list of all existing liquidity pools and paging results that -contain next_key and total count. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pools` | [Pool](#cyber.liquidity.v1beta1.Pool) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. not working on this version. | - - - - - - - +| `neuron` | [string](#string) | | | -### QueryParamsRequest -QueryParamsRequest is request type for the QueryParams RPC method. + - +### QueryKarmaResponse -### QueryParamsResponse -the response type for the QueryParamsResponse RPC method. This includes -current parameter of the liquidity module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cyber.liquidity.v1beta1.Params) | | params holds all the parameters of this module. | +| `karma` | [uint64](#uint64) | | | - + + +### QueryLinkExistResponse -### QueryPoolBatchDepositMsgRequest -the request type for the QueryPoolBatchDeposit RPC method. requestable -including specified pool_id and msg_index. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_id` | [uint64](#uint64) | | id of the target pool for query | -| `msg_index` | [uint64](#uint64) | | target msg_index of the pool | +| `exist` | [bool](#bool) | | | - + + +### QueryNegentropyParticleResponse -### QueryPoolBatchDepositMsgResponse -the response type for the QueryPoolBatchDepositMsg RPC method. This includes -a batch swap message of the batch. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `deposit` | [DepositMsgState](#cyber.liquidity.v1beta1.DepositMsgState) | | | +| `entropy` | [uint64](#uint64) | | | - + + +### QueryNegentropyPartilceRequest -### QueryPoolBatchDepositMsgsRequest -the request type for the QueryPoolBatchDeposit RPC method. Requestable -including specified pool_id and pagination offset, limit, key. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_id` | [uint64](#uint64) | | id of the target pool for query | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `particle` | [string](#string) | | | - + -### QueryPoolBatchDepositMsgsResponse -the response type for the QueryPoolBatchDeposit RPC method. This includes a -list of all currently existing deposit messages of the batch and paging -results that contain next_key and total count. +### QueryNegentropyRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `deposits` | [DepositMsgState](#cyber.liquidity.v1beta1.DepositMsgState) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. not working on this version. | + - +### QueryNegentropyResponse -### QueryPoolBatchSwapMsgRequest -the request type for the QueryPoolBatchSwap RPC method. Requestable including -specified pool_id and msg_index. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_id` | [uint64](#uint64) | | id of the target pool for query | -| `msg_index` | [uint64](#uint64) | | target msg_index of the pool | +| `negentropy` | [uint64](#uint64) | | | - + -### QueryPoolBatchSwapMsgResponse -the response type for the QueryPoolBatchSwapMsg RPC method. This includes a -batch swap message of the batch. +### QueryParamsRequest -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `swap` | [SwapMsgState](#cyber.liquidity.v1beta1.SwapMsgState) | | | + - +### QueryParamsResponse -### QueryPoolBatchSwapMsgsRequest -the request type for the QueryPoolBatchSwapMsgs RPC method. Requestable -including specified pool_id and pagination offset, limit, key. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_id` | [uint64](#uint64) | | id of the target pool for query | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `params` | [Params](#cyber.rank.v1beta1.Params) | | | - + + +### QueryRankRequest -### QueryPoolBatchSwapMsgsResponse -the response type for the QueryPoolBatchSwapMsgs RPC method. This includes -list of all currently existing swap messages of the batch and paging results -that contain next_key and total count. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `swaps` | [SwapMsgState](#cyber.liquidity.v1beta1.SwapMsgState) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. not working on this version. | +| `particle` | [string](#string) | | | - + + +### QueryRankResponse -### QueryPoolBatchWithdrawMsgRequest -the request type for the QueryPoolBatchWithdraw RPC method. requestable -including specified pool_id and msg_index. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_id` | [uint64](#uint64) | | id of the target pool for query | -| `msg_index` | [uint64](#uint64) | | target msg_index of the pool | +| `rank` | [uint64](#uint64) | | | - + + +### QuerySearchRequest -### QueryPoolBatchWithdrawMsgResponse -the response type for the QueryPoolBatchWithdrawMsg RPC method. This includes -a batch swap message of the batch. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `withdraw` | [WithdrawMsgState](#cyber.liquidity.v1beta1.WithdrawMsgState) | | | +| `particle` | [string](#string) | | | +| `pagination` | [PageRequest](#cyber.rank.v1beta1.PageRequest) | | | - + + +### QuerySearchResponse -### QueryPoolBatchWithdrawMsgsRequest -the request type for the QueryPoolBatchWithdraw RPC method. Requestable -including specified pool_id and pagination offset, limit, key. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pool_id` | [uint64](#uint64) | | id of the target pool for query | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an optional pagination for the request. | +| `result` | [RankedParticle](#cyber.rank.v1beta1.RankedParticle) | repeated | | +| `pagination` | [PageResponse](#cyber.rank.v1beta1.PageResponse) | | | - + + +### QueryTopRequest -### QueryPoolBatchWithdrawMsgsResponse -the response type for the QueryPoolBatchWithdraw RPC method. This includes a -list of all currently existing withdraw messages of the batch and paging -results that contain next_key and total count. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `withdraws` | [WithdrawMsgState](#cyber.liquidity.v1beta1.WithdrawMsgState) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines the pagination in the response. Not supported on this version. | +| `pagination` | [PageRequest](#cyber.rank.v1beta1.PageRequest) | | | @@ -2493,64 +3300,103 @@ results that contain next_key and total count. - + ### Query -Query defines the gRPC query service for the liquidity module. + | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `LiquidityPools` | [QueryLiquidityPoolsRequest](#cyber.liquidity.v1beta1.QueryLiquidityPoolsRequest) | [QueryLiquidityPoolsResponse](#cyber.liquidity.v1beta1.QueryLiquidityPoolsResponse) | Get existing liquidity pools. | GET|/cosmos/liquidity/v1beta1/pools| -| `LiquidityPool` | [QueryLiquidityPoolRequest](#cyber.liquidity.v1beta1.QueryLiquidityPoolRequest) | [QueryLiquidityPoolResponse](#cyber.liquidity.v1beta1.QueryLiquidityPoolResponse) | Get specific liquidity pool. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}| -| `LiquidityPoolByPoolCoinDenom` | [QueryLiquidityPoolByPoolCoinDenomRequest](#cyber.liquidity.v1beta1.QueryLiquidityPoolByPoolCoinDenomRequest) | [QueryLiquidityPoolResponse](#cyber.liquidity.v1beta1.QueryLiquidityPoolResponse) | Get specific liquidity pool corresponding to the pool_coin_denom. | GET|/cosmos/liquidity/v1beta1/pools/pool_coin_denom/{pool_coin_denom}| -| `LiquidityPoolByReserveAcc` | [QueryLiquidityPoolByReserveAccRequest](#cyber.liquidity.v1beta1.QueryLiquidityPoolByReserveAccRequest) | [QueryLiquidityPoolResponse](#cyber.liquidity.v1beta1.QueryLiquidityPoolResponse) | Get specific liquidity pool corresponding to the reserve account. | GET|/cosmos/liquidity/v1beta1/pools/reserve_acc/{reserve_acc}| -| `LiquidityPoolBatch` | [QueryLiquidityPoolBatchRequest](#cyber.liquidity.v1beta1.QueryLiquidityPoolBatchRequest) | [QueryLiquidityPoolBatchResponse](#cyber.liquidity.v1beta1.QueryLiquidityPoolBatchResponse) | Get the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch| -| `PoolBatchSwapMsgs` | [QueryPoolBatchSwapMsgsRequest](#cyber.liquidity.v1beta1.QueryPoolBatchSwapMsgsRequest) | [QueryPoolBatchSwapMsgsResponse](#cyber.liquidity.v1beta1.QueryPoolBatchSwapMsgsResponse) | Get all swap messages in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/swaps| -| `PoolBatchSwapMsg` | [QueryPoolBatchSwapMsgRequest](#cyber.liquidity.v1beta1.QueryPoolBatchSwapMsgRequest) | [QueryPoolBatchSwapMsgResponse](#cyber.liquidity.v1beta1.QueryPoolBatchSwapMsgResponse) | Get a specific swap message in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/swaps/{msg_index}| -| `PoolBatchDepositMsgs` | [QueryPoolBatchDepositMsgsRequest](#cyber.liquidity.v1beta1.QueryPoolBatchDepositMsgsRequest) | [QueryPoolBatchDepositMsgsResponse](#cyber.liquidity.v1beta1.QueryPoolBatchDepositMsgsResponse) | Get all deposit messages in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/deposits| -| `PoolBatchDepositMsg` | [QueryPoolBatchDepositMsgRequest](#cyber.liquidity.v1beta1.QueryPoolBatchDepositMsgRequest) | [QueryPoolBatchDepositMsgResponse](#cyber.liquidity.v1beta1.QueryPoolBatchDepositMsgResponse) | Get a specific deposit message in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/deposits/{msg_index}| -| `PoolBatchWithdrawMsgs` | [QueryPoolBatchWithdrawMsgsRequest](#cyber.liquidity.v1beta1.QueryPoolBatchWithdrawMsgsRequest) | [QueryPoolBatchWithdrawMsgsResponse](#cyber.liquidity.v1beta1.QueryPoolBatchWithdrawMsgsResponse) | Get all withdraw messages in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/withdraws| -| `PoolBatchWithdrawMsg` | [QueryPoolBatchWithdrawMsgRequest](#cyber.liquidity.v1beta1.QueryPoolBatchWithdrawMsgRequest) | [QueryPoolBatchWithdrawMsgResponse](#cyber.liquidity.v1beta1.QueryPoolBatchWithdrawMsgResponse) | Get a specific withdraw message in the pool's current batch. | GET|/cosmos/liquidity/v1beta1/pools/{pool_id}/batch/withdraws/{msg_index}| -| `Params` | [QueryParamsRequest](#cyber.liquidity.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cyber.liquidity.v1beta1.QueryParamsResponse) | Get all parameters of the liquidity module. | GET|/cosmos/liquidity/v1beta1/params| +| `Params` | [QueryParamsRequest](#cyber.rank.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cyber.rank.v1beta1.QueryParamsResponse) | | GET|/cyber/rank/v1beta1/rank/params| +| `Rank` | [QueryRankRequest](#cyber.rank.v1beta1.QueryRankRequest) | [QueryRankResponse](#cyber.rank.v1beta1.QueryRankResponse) | | GET|/cyber/rank/v1beta1/rank/rank/{particle}| +| `Search` | [QuerySearchRequest](#cyber.rank.v1beta1.QuerySearchRequest) | [QuerySearchResponse](#cyber.rank.v1beta1.QuerySearchResponse) | | GET|/cyber/rank/v1beta1/rank/search/{particle}| +| `Backlinks` | [QuerySearchRequest](#cyber.rank.v1beta1.QuerySearchRequest) | [QuerySearchResponse](#cyber.rank.v1beta1.QuerySearchResponse) | | GET|/cyber/rank/v1beta1/rank/backlinks/{particle}| +| `Top` | [QueryTopRequest](#cyber.rank.v1beta1.QueryTopRequest) | [QuerySearchResponse](#cyber.rank.v1beta1.QuerySearchResponse) | | GET|/cyber/rank/v1beta1/rank/top| +| `IsLinkExist` | [QueryIsLinkExistRequest](#cyber.rank.v1beta1.QueryIsLinkExistRequest) | [QueryLinkExistResponse](#cyber.rank.v1beta1.QueryLinkExistResponse) | | GET|/cyber/rank/v1beta1/is_link_exist| +| `IsAnyLinkExist` | [QueryIsAnyLinkExistRequest](#cyber.rank.v1beta1.QueryIsAnyLinkExistRequest) | [QueryLinkExistResponse](#cyber.rank.v1beta1.QueryLinkExistResponse) | | GET|/cyber/rank/v1beta1/is_any_link_exist| +| `ParticleNegentropy` | [QueryNegentropyPartilceRequest](#cyber.rank.v1beta1.QueryNegentropyPartilceRequest) | [QueryNegentropyParticleResponse](#cyber.rank.v1beta1.QueryNegentropyParticleResponse) | | GET|/cyber/rank/v1beta1/negentropy/{particle}| +| `Negentropy` | [QueryNegentropyRequest](#cyber.rank.v1beta1.QueryNegentropyRequest) | [QueryNegentropyResponse](#cyber.rank.v1beta1.QueryNegentropyResponse) | | GET|/cyber/rank/v1beta1/negentropy| +| `Karma` | [QueryKarmaRequest](#cyber.rank.v1beta1.QueryKarmaRequest) | [QueryKarmaResponse](#cyber.rank.v1beta1.QueryKarmaResponse) | | GET|/cyber/rank/v1beta1/karma/{neuron}| - +

Top

-## cyber/rank/v1beta1/types.proto +## cyber/rank/v1beta1/tx.proto - + -### Params +### MsgUpdateParams | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `calculation_period` | [int64](#int64) | | | -| `damping_factor` | [string](#string) | | | -| `tolerance` | [string](#string) | | | +| `authority` | [string](#string) | | | +| `params` | [Params](#cyber.rank.v1beta1.Params) | | | - + -### RankedParticle +### MsgUpdateParamsResponse + + + + + + + + + + + + + + + +### Msg + + +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `UpdateParams` | [MsgUpdateParams](#cyber.rank.v1beta1.MsgUpdateParams) | [MsgUpdateParamsResponse](#cyber.rank.v1beta1.MsgUpdateParamsResponse) | | | + + + + + + +

Top

+ +## cyber/resources/v1beta1/types.proto + + + + + +### Params | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `particle` | [string](#string) | | | -| `rank` | [uint64](#uint64) | | | +| `max_slots` | [uint32](#uint32) | | | +| `halving_period_volt_blocks` | [uint32](#uint32) | | | +| `halving_period_ampere_blocks` | [uint32](#uint32) | | | +| `base_investmint_period_volt` | [uint32](#uint32) | | | +| `base_investmint_period_ampere` | [uint32](#uint32) | | | +| `min_investmint_period` | [uint32](#uint32) | | | +| `base_investmint_amount_volt` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `base_investmint_amount_ampere` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | @@ -2566,14 +3412,14 @@ Query defines the gRPC query service for the liquidity module. - +

Top

-## cyber/rank/v1beta1/genesis.proto +## cyber/resources/v1beta1/genesis.proto - + ### GenesisState @@ -2581,7 +3427,7 @@ Query defines the gRPC query service for the liquidity module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cyber.rank.v1beta1.Params) | | | +| `params` | [Params](#cyber.resources.v1beta1.Params) | | | @@ -2597,350 +3443,376 @@ Query defines the gRPC query service for the liquidity module. - +

Top

-## cyber/rank/v1beta1/pagination.proto +## cyber/resources/v1beta1/query.proto - + -### PageRequest +### QueryInvestmintRequest | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `page` | [uint32](#uint32) | | | -| `per_page` | [uint32](#uint32) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `resource` | [string](#string) | | | +| `length` | [uint64](#uint64) | | | - + -### PageResponse +### QueryInvestmintResponse | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `total` | [uint32](#uint32) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - + - +### QueryParamsRequest - - -

Top

-## cyber/rank/v1beta1/query.proto + + +### QueryParamsResponse + + + +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `params` | [Params](#cyber.resources.v1beta1.Params) | | | + + + + + + + + + + + + + - +### Query -### QueryIsAnyLinkExistRequest +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Params` | [QueryParamsRequest](#cyber.resources.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cyber.resources.v1beta1.QueryParamsResponse) | | GET|/cyber/resources/v1beta1/resources/params| +| `Investmint` | [QueryInvestmintRequest](#cyber.resources.v1beta1.QueryInvestmintRequest) | [QueryInvestmintResponse](#cyber.resources.v1beta1.QueryInvestmintResponse) | | GET|/cyber/resources/v1beta1/resources/investmint| + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `from` | [string](#string) | | | -| `to` | [string](#string) | | | + +

Top

+## cyber/resources/v1beta1/tx.proto - + -### QueryIsLinkExistRequest +### MsgInvestmint | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `from` | [string](#string) | | | -| `to` | [string](#string) | | | -| `address` | [string](#string) | | | - - +| `neuron` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `resource` | [string](#string) | | | +| `length` | [uint64](#uint64) | | | - -### QueryKarmaRequest + +### MsgInvestmintResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `neuron` | [string](#string) | | | - + -### QueryKarmaResponse +### MsgUpdateParams | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `karma` | [uint64](#uint64) | | | +| `authority` | [string](#string) | | | +| `params` | [Params](#cyber.resources.v1beta1.Params) | | | - + -### QueryLinkExistResponse +### MsgUpdateParamsResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `exist` | [bool](#bool) | | | + + + - -### QueryNegentropyParticleResponse + +### Msg -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `entropy` | [uint64](#uint64) | | | +| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | +| ----------- | ------------ | ------------- | ------------| ------- | -------- | +| `Investmint` | [MsgInvestmint](#cyber.resources.v1beta1.MsgInvestmint) | [MsgInvestmintResponse](#cyber.resources.v1beta1.MsgInvestmintResponse) | | | +| `UpdateParams` | [MsgUpdateParams](#cyber.resources.v1beta1.MsgUpdateParams) | [MsgUpdateParamsResponse](#cyber.resources.v1beta1.MsgUpdateParamsResponse) | | | + + +

Top

+## osmosis/tokenfactory/v1beta1/authorityMetadata.proto - -### QueryNegentropyPartilceRequest + + +### DenomAuthorityMetadata +DenomAuthorityMetadata specifies metadata for addresses that have specific +capabilities over a token factory denom. Right now there is only one Admin +permission, but is planned to be extended to the future. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `particle` | [string](#string) | | | +| `admin` | [string](#string) | | Can be empty for no admin, or a valid osmosis address | + - + -### QueryNegentropyRequest + + + +

Top

+## osmosis/tokenfactory/v1beta1/params.proto - -### QueryNegentropyResponse + +### Params +Params defines the parameters for the tokenfactory module. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `negentropy` | [uint64](#uint64) | | | +| `denom_creation_fee` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | repeated | | +| `denom_creation_gas_consume` | [uint64](#uint64) | | if denom_creation_fee is an empty array, then this field is used to add more gas consumption to the base cost. https://github.com/CosmWasm/token-factory/issues/11 | + - + -### QueryParamsRequest + + + +

Top

+## osmosis/tokenfactory/v1beta1/genesis.proto - -### QueryParamsResponse + +### GenesisDenom +GenesisDenom defines a tokenfactory denom that is defined within genesis +state. The structure contains DenomAuthorityMetadata which defines the +denom's admin. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cyber.rank.v1beta1.Params) | | | - +| `denom` | [string](#string) | | | +| `authority_metadata` | [DenomAuthorityMetadata](#osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata) | | | - -### QueryRankRequest + +### GenesisState +GenesisState defines the tokenfactory module's genesis state. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `particle` | [string](#string) | | | +| `params` | [Params](#osmosis.tokenfactory.v1beta1.Params) | | params defines the parameters of the module. | +| `factory_denoms` | [GenesisDenom](#osmosis.tokenfactory.v1beta1.GenesisDenom) | repeated | | + - - -### QueryRankResponse - + + -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `rank` | [uint64](#uint64) | | | + + +

Top

+## osmosis/tokenfactory/v1beta1/query.proto - -### QuerySearchRequest + +### QueryDenomAuthorityMetadataRequest +QueryDenomAuthorityMetadataRequest defines the request structure for the +DenomAuthorityMetadata gRPC query. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `particle` | [string](#string) | | | -| `pagination` | [PageRequest](#cyber.rank.v1beta1.PageRequest) | | | +| `denom` | [string](#string) | | | - - -### QuerySearchResponse + +### QueryDenomAuthorityMetadataResponse +QueryDenomAuthorityMetadataResponse defines the response structure for the +DenomAuthorityMetadata gRPC query. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `result` | [RankedParticle](#cyber.rank.v1beta1.RankedParticle) | repeated | | -| `pagination` | [PageResponse](#cyber.rank.v1beta1.PageResponse) | | | - +| `authority_metadata` | [DenomAuthorityMetadata](#osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata) | | | - -### QueryTopRequest + +### QueryDenomsFromCreatorRequest +QueryDenomsFromCreatorRequest defines the request structure for the +DenomsFromCreator gRPC query. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `pagination` | [PageRequest](#cyber.rank.v1beta1.PageRequest) | | | +| `creator` | [string](#string) | | | - - + - +### QueryDenomsFromCreatorResponse +QueryDenomsFromCreatorRequest defines the response structure for the +DenomsFromCreator gRPC query. - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `denoms` | [string](#string) | repeated | | -### Query -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#cyber.rank.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cyber.rank.v1beta1.QueryParamsResponse) | | GET|/cyber/rank/v1beta1/rank/params| -| `Rank` | [QueryRankRequest](#cyber.rank.v1beta1.QueryRankRequest) | [QueryRankResponse](#cyber.rank.v1beta1.QueryRankResponse) | | GET|/cyber/rank/v1beta1/rank/rank/{particle}| -| `Search` | [QuerySearchRequest](#cyber.rank.v1beta1.QuerySearchRequest) | [QuerySearchResponse](#cyber.rank.v1beta1.QuerySearchResponse) | | GET|/cyber/rank/v1beta1/rank/search/{particle}| -| `Backlinks` | [QuerySearchRequest](#cyber.rank.v1beta1.QuerySearchRequest) | [QuerySearchResponse](#cyber.rank.v1beta1.QuerySearchResponse) | | GET|/cyber/rank/v1beta1/rank/backlinks/{particle}| -| `Top` | [QueryTopRequest](#cyber.rank.v1beta1.QueryTopRequest) | [QuerySearchResponse](#cyber.rank.v1beta1.QuerySearchResponse) | | GET|/cyber/rank/v1beta1/rank/top| -| `IsLinkExist` | [QueryIsLinkExistRequest](#cyber.rank.v1beta1.QueryIsLinkExistRequest) | [QueryLinkExistResponse](#cyber.rank.v1beta1.QueryLinkExistResponse) | | GET|/cyber/rank/v1beta1/is_link_exist| -| `IsAnyLinkExist` | [QueryIsAnyLinkExistRequest](#cyber.rank.v1beta1.QueryIsAnyLinkExistRequest) | [QueryLinkExistResponse](#cyber.rank.v1beta1.QueryLinkExistResponse) | | GET|/cyber/rank/v1beta1/is_any_link_exist| -| `ParticleNegentropy` | [QueryNegentropyPartilceRequest](#cyber.rank.v1beta1.QueryNegentropyPartilceRequest) | [QueryNegentropyParticleResponse](#cyber.rank.v1beta1.QueryNegentropyParticleResponse) | | GET|/cyber/rank/v1beta1/negentropy/{particle}| -| `Negentropy` | [QueryNegentropyRequest](#cyber.rank.v1beta1.QueryNegentropyRequest) | [QueryNegentropyResponse](#cyber.rank.v1beta1.QueryNegentropyResponse) | | GET|/cyber/rank/v1beta1/negentropy| -| `Karma` | [QueryKarmaRequest](#cyber.rank.v1beta1.QueryKarmaRequest) | [QueryKarmaResponse](#cyber.rank.v1beta1.QueryKarmaResponse) | | GET|/cyber/rank/v1beta1/karma/{neuron}| - + - -

Top

+### QueryParamsRequest +QueryParamsRequest is the request type for the Query/Params RPC method. -## cyber/rank/v1beta1/tx.proto - -### MsgUpdateParams + + +### QueryParamsResponse +QueryParamsResponse is the response type for the Query/Params RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `authority` | [string](#string) | | | -| `params` | [Params](#cyber.rank.v1beta1.Params) | | | - - - - - - - - -### MsgUpdateParamsResponse - +| `params` | [Params](#osmosis.tokenfactory.v1beta1.Params) | | params defines the parameters of the module. | @@ -2953,227 +3825,236 @@ Query defines the gRPC query service for the liquidity module. - - -### Msg + +### Query +Query defines the gRPC querier service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `UpdateParams` | [MsgUpdateParams](#cyber.rank.v1beta1.MsgUpdateParams) | [MsgUpdateParamsResponse](#cyber.rank.v1beta1.MsgUpdateParamsResponse) | | | +| `Params` | [QueryParamsRequest](#osmosis.tokenfactory.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#osmosis.tokenfactory.v1beta1.QueryParamsResponse) | Params defines a gRPC query method that returns the tokenfactory module's parameters. | GET|/osmosis/tokenfactory/v1beta1/params| +| `DenomAuthorityMetadata` | [QueryDenomAuthorityMetadataRequest](#osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataRequest) | [QueryDenomAuthorityMetadataResponse](#osmosis.tokenfactory.v1beta1.QueryDenomAuthorityMetadataResponse) | DenomAuthorityMetadata defines a gRPC query method for fetching DenomAuthorityMetadata for a particular denom. | GET|/osmosis/tokenfactory/v1beta1/denoms/{denom}/authority_metadata| +| `DenomsFromCreator` | [QueryDenomsFromCreatorRequest](#osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorRequest) | [QueryDenomsFromCreatorResponse](#osmosis.tokenfactory.v1beta1.QueryDenomsFromCreatorResponse) | DenomsFromCreator defines a gRPC query method for fetching all denominations created by a specific admin/creator. | GET|/osmosis/tokenfactory/v1beta1/denoms_from_creator/{creator}| - +

Top

-## cyber/resources/v1beta1/types.proto - +## osmosis/tokenfactory/v1beta1/tx.proto - -### Params + +### MsgBurn +MsgBurn is the sdk.Msg type for allowing an admin account to burn +a token. For now, we only support burning from the sender account. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `max_slots` | [uint32](#uint32) | | | -| `halving_period_volt_blocks` | [uint32](#uint32) | | | -| `halving_period_ampere_blocks` | [uint32](#uint32) | | | -| `base_investmint_period_volt` | [uint32](#uint32) | | | -| `base_investmint_period_ampere` | [uint32](#uint32) | | | -| `min_investmint_period` | [uint32](#uint32) | | | -| `base_investmint_amount_volt` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `base_investmint_amount_ampere` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | - - +| `sender` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `burnFromAddress` | [string](#string) | | | - - - - + +### MsgBurnResponse - -

Top

-## cyber/resources/v1beta1/genesis.proto - -### GenesisState + +### MsgChangeAdmin +MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign +adminship of a denom to a new account | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `params` | [Params](#cyber.resources.v1beta1.Params) | | | +| `sender` | [string](#string) | | | +| `denom` | [string](#string) | | | +| `new_admin` | [string](#string) | | | - - - - - - + +### MsgChangeAdminResponse +MsgChangeAdminResponse defines the response structure for an executed +MsgChangeAdmin message. - -

Top

-## cyber/resources/v1beta1/query.proto - + -### QueryInvestmintRequest +### MsgCreateDenom +MsgCreateDenom defines the message structure for the CreateDenom gRPC service +method. It allows an account to create a new denom. It requires a sender +address and a sub denomination. The (sender_address, sub_denomination) tuple +must be unique and cannot be re-used. +The resulting denom created is defined as +. The resulting denom's admin is +originally set to be the creator, but this can be changed later. The token +denom does not indicate the current admin. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `resource` | [string](#string) | | | -| `length` | [uint64](#uint64) | | | +| `sender` | [string](#string) | | | +| `subdenom` | [string](#string) | | subdenom can be up to 44 "alphanumeric" characters long. | - - -### QueryInvestmintResponse + +### MsgCreateDenomResponse +MsgCreateDenomResponse is the return value of MsgCreateDenom +It returns the full string of the newly created denom | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `new_token_denom` | [string](#string) | | | - + -### QueryParamsRequest +### MsgForceTransfer +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `transferFromAddress` | [string](#string) | | | +| `transferToAddress` | [string](#string) | | | - -### QueryParamsResponse + +### MsgForceTransferResponse -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `params` | [Params](#cyber.resources.v1beta1.Params) | | | - - + - +### MsgMint +MsgMint is the sdk.Msg type for allowing an admin account to mint +more of a token. For now, we only support minting to the sender account - +| Field | Type | Label | Description | +| ----- | ---- | ----- | ----------- | +| `sender` | [string](#string) | | | +| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | +| `mintToAddress` | [string](#string) | | | -### Query -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Params` | [QueryParamsRequest](#cyber.resources.v1beta1.QueryParamsRequest) | [QueryParamsResponse](#cyber.resources.v1beta1.QueryParamsResponse) | | GET|/cyber/resources/v1beta1/resources/params| -| `Investmint` | [QueryInvestmintRequest](#cyber.resources.v1beta1.QueryInvestmintRequest) | [QueryInvestmintResponse](#cyber.resources.v1beta1.QueryInvestmintResponse) | | GET|/cyber/resources/v1beta1/resources/investmint| - + - -

Top

+### MsgMintResponse -## cyber/resources/v1beta1/tx.proto - -### MsgInvestmint + + +### MsgSetDenomMetadata +MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set +the denom's bank metadata + | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `neuron` | [string](#string) | | | -| `amount` | [cosmos.base.v1beta1.Coin](#cosmos.base.v1beta1.Coin) | | | -| `resource` | [string](#string) | | | -| `length` | [uint64](#uint64) | | | +| `sender` | [string](#string) | | | +| `metadata` | [cosmos.bank.v1beta1.Metadata](#cosmos.bank.v1beta1.Metadata) | | | - - -### MsgInvestmintResponse + +### MsgSetDenomMetadataResponse +MsgSetDenomMetadataResponse defines the response structure for an executed +MsgSetDenomMetadata message. - + ### MsgUpdateParams +MsgUpdateParams is the Msg/UpdateParams request type. +Since: cosmos-sdk 0.47 | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | -| `authority` | [string](#string) | | | -| `params` | [Params](#cyber.resources.v1beta1.Params) | | | +| `authority` | [string](#string) | | authority is the address of the governance account. | +| `params` | [Params](#osmosis.tokenfactory.v1beta1.Params) | | params defines the x/mint parameters to update. +NOTE: All parameters must be supplied. | - + + ### MsgUpdateParamsResponse +MsgUpdateParamsResponse defines the response structure for executing a +MsgUpdateParams message. +Since: cosmos-sdk 0.47 @@ -3186,15 +4067,22 @@ Query defines the gRPC query service for the liquidity module. - + ### Msg - +Msg defines the tokefactory module's gRPC message service. | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `Investmint` | [MsgInvestmint](#cyber.resources.v1beta1.MsgInvestmint) | [MsgInvestmintResponse](#cyber.resources.v1beta1.MsgInvestmintResponse) | | | -| `UpdateParams` | [MsgUpdateParams](#cyber.resources.v1beta1.MsgUpdateParams) | [MsgUpdateParamsResponse](#cyber.resources.v1beta1.MsgUpdateParamsResponse) | | | +| `CreateDenom` | [MsgCreateDenom](#osmosis.tokenfactory.v1beta1.MsgCreateDenom) | [MsgCreateDenomResponse](#osmosis.tokenfactory.v1beta1.MsgCreateDenomResponse) | | | +| `Mint` | [MsgMint](#osmosis.tokenfactory.v1beta1.MsgMint) | [MsgMintResponse](#osmosis.tokenfactory.v1beta1.MsgMintResponse) | | | +| `Burn` | [MsgBurn](#osmosis.tokenfactory.v1beta1.MsgBurn) | [MsgBurnResponse](#osmosis.tokenfactory.v1beta1.MsgBurnResponse) | | | +| `ChangeAdmin` | [MsgChangeAdmin](#osmosis.tokenfactory.v1beta1.MsgChangeAdmin) | [MsgChangeAdminResponse](#osmosis.tokenfactory.v1beta1.MsgChangeAdminResponse) | | | +| `SetDenomMetadata` | [MsgSetDenomMetadata](#osmosis.tokenfactory.v1beta1.MsgSetDenomMetadata) | [MsgSetDenomMetadataResponse](#osmosis.tokenfactory.v1beta1.MsgSetDenomMetadataResponse) | | | +| `ForceTransfer` | [MsgForceTransfer](#osmosis.tokenfactory.v1beta1.MsgForceTransfer) | [MsgForceTransferResponse](#osmosis.tokenfactory.v1beta1.MsgForceTransferResponse) | | | +| `UpdateParams` | [MsgUpdateParams](#osmosis.tokenfactory.v1beta1.MsgUpdateParams) | [MsgUpdateParamsResponse](#osmosis.tokenfactory.v1beta1.MsgUpdateParamsResponse) | UpdateParams defines a governance operation for updating the x/mint module parameters. The authority is hard-coded to the x/gov module account. + +Since: cosmos-sdk 0.47 | | diff --git a/proto/cyber/clock/v1/clock.proto b/proto/cyber/clock/v1/clock.proto index 73b2a124..3b32829d 100644 --- a/proto/cyber/clock/v1/clock.proto +++ b/proto/cyber/clock/v1/clock.proto @@ -6,8 +6,8 @@ option go_package = "github.com/cybercongress/go-cyber/x/clock/types"; // This object is used to store the contract address and the // jail status of the contract. message ClockContract { - // The address of the contract. - string contract_address = 1; - // The jail status of the contract. - bool is_jailed = 2; + // The address of the contract. + string contract_address = 1; + // The jail status of the contract. + bool is_jailed = 2; } \ No newline at end of file diff --git a/proto/cyber/clock/v1/genesis.proto b/proto/cyber/clock/v1/genesis.proto index 371bff75..9a27b7be 100644 --- a/proto/cyber/clock/v1/genesis.proto +++ b/proto/cyber/clock/v1/genesis.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package cyber.clock.v1; import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; -import "cyber/clock/v1/clock.proto"; option go_package = "github.com/cybercongress/go-cyber/x/clock/types"; @@ -18,7 +16,8 @@ message GenesisState { // Params defines the set of module parameters. message Params { - // contract_gas_limit defines the maximum amount of gas that can be used by a contract. + // contract_gas_limit defines the maximum amount of gas that can be used by a + // contract. uint64 contract_gas_limit = 1 [ (gogoproto.jsontag) = "contract_gas_limit,omitempty", (gogoproto.moretags) = "yaml:\"contract_gas_limit\"" diff --git a/proto/cyber/clock/v1/query.proto b/proto/cyber/clock/v1/query.proto index 3935e204..df96fe92 100644 --- a/proto/cyber/clock/v1/query.proto +++ b/proto/cyber/clock/v1/query.proto @@ -4,7 +4,6 @@ package cyber.clock.v1; import "cosmos/base/query/v1beta1/pagination.proto"; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -import "cosmos/base/v1beta1/coin.proto"; import "cyber/clock/v1/genesis.proto"; import "cyber/clock/v1/clock.proto"; @@ -15,12 +14,10 @@ service Query { // ClockContracts rpc ClockContracts(QueryClockContracts) returns (QueryClockContractsResponse) { - option (google.api.http).get = - "/cyber/clock/v1/contracts"; + option (google.api.http).get = "/cyber/clock/v1/contracts"; } // ClockContract - rpc ClockContract(QueryClockContract) - returns (QueryClockContractResponse) { + rpc ClockContract(QueryClockContract) returns (QueryClockContractResponse) { option (google.api.http).get = "/cyber/clock/v1/contracts/{contract_address}"; } @@ -36,7 +33,8 @@ message QueryClockContracts { cosmos.base.query.v1beta1.PageRequest pagination = 1; } -// QueryClockContractsResponse is the response type for the Query/ClockContracts RPC method. +// QueryClockContractsResponse is the response type for the Query/ClockContracts +// RPC method. message QueryClockContractsResponse { // clock_contracts are the clock contracts. repeated ClockContract clock_contracts = 1 [ (gogoproto.nullable) = false ]; @@ -50,16 +48,21 @@ message QueryClockContract { string contract_address = 1; } -// QueryClockContractResponse is the response type for the Query/ClockContract RPC method. +// QueryClockContractResponse is the response type for the Query/ClockContract +// RPC method. message QueryClockContractResponse { // contract is the clock contract. - ClockContract clock_contract = 1 [(gogoproto.nullable) = false]; + ClockContract clock_contract = 1 [ (gogoproto.nullable) = false ]; } // QueryParams is the request type to get all module params. message QueryParamsRequest {} -// QueryClockContractsResponse is the response type for the Query/ClockContracts RPC method. +// QueryClockContractsResponse is the response type for the Query/ClockContracts +// RPC method. message QueryParamsResponse { - Params params = 1 [(gogoproto.jsontag) = "params", (gogoproto.moretags) = "yaml:\"params\""]; + Params params = 1 [ + (gogoproto.jsontag) = "params", + (gogoproto.moretags) = "yaml:\"params\"" + ]; } diff --git a/proto/cyber/clock/v1/tx.proto b/proto/cyber/clock/v1/tx.proto index 9cfeb754..d4ac3678 100644 --- a/proto/cyber/clock/v1/tx.proto +++ b/proto/cyber/clock/v1/tx.proto @@ -1,35 +1,34 @@ syntax = "proto3"; package cyber.clock.v1; -option go_package = "github.com/CosmosContracts/juno/x/clock/types"; +option go_package = "github.com/cybercongress/go-cyber/x/clock/types"; import "google/api/annotations.proto"; import "cosmos/msg/v1/msg.proto"; import "cyber/clock/v1/genesis.proto"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; -import "amino/amino.proto"; // Msg defines the Msg service. service Msg { // RegisterClockContract defines the endpoint for // registering a new clock contract. - rpc RegisterClockContract(MsgRegisterClockContract) + rpc RegisterClockContract(MsgRegisterClockContract) returns (MsgRegisterClockContractResponse) { option (google.api.http).post = "/cyber/clock/v1/tx/register"; }; // UnregisterClockContract defines the endpoint for // unregistering a clock contract. - rpc UnregisterClockContract(MsgUnregisterClockContract) + rpc UnregisterClockContract(MsgUnregisterClockContract) returns (MsgUnregisterClockContractResponse) { option (google.api.http).post = "/cyber/clock/v1/tx/unregister"; }; // UnjailClockContract defines the endpoint for // unjailing a clock contract. - rpc UnjailClockContract(MsgUnjailClockContract) + rpc UnjailClockContract(MsgUnjailClockContract) returns (MsgUnjailClockContractResponse) { option (google.api.http).post = "/cyber/clock/v1/tx/unjail"; }; @@ -49,8 +48,8 @@ message MsgRegisterClockContract { string contract_address = 2; } -// MsgRegisterClockContractResponse defines the response structure for executing a -// MsgRegisterClockContract message. +// MsgRegisterClockContractResponse defines the response structure for executing +// a MsgRegisterClockContract message. message MsgRegisterClockContractResponse {} // MsgUnregisterClockContract is the Msg/UnregisterClockContract request type. @@ -61,8 +60,8 @@ message MsgUnregisterClockContract { string contract_address = 2; } -// MsgUnregisterClockContractResponse defines the response structure for executing a -// MsgUnregisterClockContract message. +// MsgUnregisterClockContractResponse defines the response structure for +// executing a MsgUnregisterClockContract message. message MsgUnregisterClockContractResponse {} // MsgUnjailClockContract is the Msg/UnjailClockContract request type. @@ -84,12 +83,12 @@ message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // params defines the x/clock parameters to update. // // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false]; + Params params = 2 [ (gogoproto.nullable) = false ]; } // MsgUpdateParamsResponse defines the response structure for executing a diff --git a/x/clock/types/clock.pb.go b/x/clock/types/clock.pb.go index 4dc2be18..cd48dde0 100644 --- a/x/clock/types/clock.pb.go +++ b/x/clock/types/clock.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: juno/clock/v1/clock.proto +// source: cyber/clock/v1/clock.proto package types @@ -35,7 +35,7 @@ func (m *ClockContract) Reset() { *m = ClockContract{} } func (m *ClockContract) String() string { return proto.CompactTextString(m) } func (*ClockContract) ProtoMessage() {} func (*ClockContract) Descriptor() ([]byte, []int) { - return fileDescriptor_ae7dc6f78089f30c, []int{0} + return fileDescriptor_790af3b737cb20eb, []int{0} } func (m *ClockContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -79,25 +79,26 @@ func (m *ClockContract) GetIsJailed() bool { } func init() { - proto.RegisterType((*ClockContract)(nil), "juno.clock.v1.ClockContract") + proto.RegisterType((*ClockContract)(nil), "cyber.clock.v1.ClockContract") } -func init() { proto.RegisterFile("juno/clock/v1/clock.proto", fileDescriptor_ae7dc6f78089f30c) } +func init() { proto.RegisterFile("cyber/clock/v1/clock.proto", fileDescriptor_790af3b737cb20eb) } -var fileDescriptor_ae7dc6f78089f30c = []byte{ - // 190 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0xcc, 0x2a, 0xcd, 0xcb, - 0xd7, 0x4f, 0xce, 0xc9, 0x4f, 0xce, 0xd6, 0x2f, 0x33, 0x84, 0x30, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, - 0xf2, 0x85, 0x78, 0x41, 0x52, 0x7a, 0x10, 0x91, 0x32, 0x43, 0xa5, 0x70, 0x2e, 0x5e, 0x67, 0x10, - 0xdb, 0x39, 0x3f, 0xaf, 0xa4, 0x28, 0x31, 0xb9, 0x44, 0x48, 0x93, 0x4b, 0x20, 0x19, 0xca, 0x8e, - 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0xe2, 0x87, - 0x89, 0x3b, 0x42, 0x84, 0x85, 0xa4, 0xb9, 0x38, 0x33, 0x8b, 0xe3, 0xb3, 0x12, 0x33, 0x73, 0x52, - 0x53, 0x24, 0x98, 0x14, 0x18, 0x35, 0x38, 0x82, 0x38, 0x32, 0x8b, 0xbd, 0xc0, 0x7c, 0x27, 0xf7, - 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, 0x39, - 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4d, 0xcf, 0x2c, 0xc9, 0x28, - 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x77, 0xce, 0x2f, 0xce, 0xcd, 0x2f, 0x86, 0x59, 0x5e, 0xac, - 0x0f, 0x76, 0x77, 0x05, 0xd4, 0xe5, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0x60, 0x77, 0x1b, - 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x0e, 0xd7, 0x4c, 0x19, 0xd4, 0x00, 0x00, 0x00, +var fileDescriptor_790af3b737cb20eb = []byte{ + // 193 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4a, 0xae, 0x4c, 0x4a, + 0x2d, 0xd2, 0x4f, 0xce, 0xc9, 0x4f, 0xce, 0xd6, 0x2f, 0x33, 0x84, 0x30, 0xf4, 0x0a, 0x8a, 0xf2, + 0x4b, 0xf2, 0x85, 0xf8, 0xc0, 0x72, 0x7a, 0x10, 0xa1, 0x32, 0x43, 0xa5, 0x70, 0x2e, 0x5e, 0x67, + 0x10, 0xdb, 0x39, 0x3f, 0xaf, 0xa4, 0x28, 0x31, 0xb9, 0x44, 0x48, 0x93, 0x4b, 0x20, 0x19, 0xca, + 0x8e, 0x4f, 0x4c, 0x49, 0x29, 0x4a, 0x2d, 0x2e, 0x96, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0xe2, + 0x87, 0x89, 0x3b, 0x42, 0x84, 0x85, 0xa4, 0xb9, 0x38, 0x33, 0x8b, 0xe3, 0xb3, 0x12, 0x33, 0x73, + 0x52, 0x53, 0x24, 0x98, 0x14, 0x18, 0x35, 0x38, 0x82, 0x38, 0x32, 0x8b, 0xbd, 0xc0, 0x7c, 0x27, + 0xcf, 0x13, 0x8f, 0xe4, 0x18, 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x71, 0xc2, 0x63, + 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0xd2, 0x4f, 0xcf, 0x2c, 0xc9, + 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x07, 0xbb, 0x26, 0x39, 0x3f, 0x2f, 0x1d, 0x64, 0xa0, + 0x7e, 0x7a, 0xbe, 0x2e, 0xc4, 0xe9, 0x15, 0x50, 0xc7, 0x97, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, + 0x81, 0x9d, 0x6e, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x19, 0x17, 0xde, 0x92, 0xd8, 0x00, 0x00, + 0x00, } func (m *ClockContract) Marshal() (dAtA []byte, err error) { diff --git a/x/clock/types/genesis.pb.go b/x/clock/types/genesis.pb.go index ecc8feeb..cb59e533 100644 --- a/x/clock/types/genesis.pb.go +++ b/x/clock/types/genesis.pb.go @@ -1,11 +1,10 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: juno/clock/v1/genesis.proto +// source: cyber/clock/v1/genesis.proto package types import ( fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" io "io" @@ -34,7 +33,7 @@ func (m *GenesisState) Reset() { *m = GenesisState{} } func (m *GenesisState) String() string { return proto.CompactTextString(m) } func (*GenesisState) ProtoMessage() {} func (*GenesisState) Descriptor() ([]byte, []int) { - return fileDescriptor_c31a7855fe794abe, []int{0} + return fileDescriptor_5e684cf0c154fcd7, []int{0} } func (m *GenesisState) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -72,7 +71,8 @@ func (m *GenesisState) GetParams() Params { // Params defines the set of module parameters. type Params struct { - // contract_gas_limit defines the maximum amount of gas that can be used by a contract. + // contract_gas_limit defines the maximum amount of gas that can be used by a + // contract. ContractGasLimit uint64 `protobuf:"varint,1,opt,name=contract_gas_limit,json=contractGasLimit,proto3" json:"contract_gas_limit,omitempty" yaml:"contract_gas_limit"` } @@ -80,7 +80,7 @@ func (m *Params) Reset() { *m = Params{} } func (m *Params) String() string { return proto.CompactTextString(m) } func (*Params) ProtoMessage() {} func (*Params) Descriptor() ([]byte, []int) { - return fileDescriptor_c31a7855fe794abe, []int{1} + return fileDescriptor_5e684cf0c154fcd7, []int{1} } func (m *Params) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -117,33 +117,32 @@ func (m *Params) GetContractGasLimit() uint64 { } func init() { - proto.RegisterType((*GenesisState)(nil), "juno.clock.v1.GenesisState") - proto.RegisterType((*Params)(nil), "juno.clock.v1.Params") + proto.RegisterType((*GenesisState)(nil), "cyber.clock.v1.GenesisState") + proto.RegisterType((*Params)(nil), "cyber.clock.v1.Params") } -func init() { proto.RegisterFile("juno/clock/v1/genesis.proto", fileDescriptor_c31a7855fe794abe) } +func init() { proto.RegisterFile("cyber/clock/v1/genesis.proto", fileDescriptor_5e684cf0c154fcd7) } -var fileDescriptor_c31a7855fe794abe = []byte{ - // 301 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0x31, 0x4b, 0xf3, 0x40, - 0x18, 0xc7, 0x13, 0x78, 0xe9, 0x90, 0x57, 0xa1, 0x04, 0x85, 0xb6, 0xca, 0x45, 0x32, 0x39, 0xe8, - 0x1d, 0xd1, 0x4d, 0x70, 0x69, 0x87, 0x2c, 0x0e, 0x52, 0x07, 0xc1, 0xa5, 0x5c, 0x8e, 0x23, 0x9e, - 0xcd, 0xe5, 0x09, 0xb9, 0x4b, 0x30, 0xdf, 0xc2, 0x8f, 0xd5, 0xb1, 0xa3, 0x53, 0x90, 0x64, 0xeb, - 0xe8, 0x27, 0x90, 0x5c, 0x22, 0x52, 0xba, 0x1d, 0xcf, 0xef, 0xff, 0xfc, 0x9f, 0xe3, 0xe7, 0x9c, - 0xbd, 0x15, 0x29, 0x10, 0x96, 0x00, 0x5b, 0x93, 0x32, 0x20, 0x31, 0x4f, 0xb9, 0x12, 0x0a, 0x67, - 0x39, 0x68, 0x70, 0x8f, 0x3b, 0x88, 0x0d, 0xc4, 0x65, 0x30, 0x3b, 0x89, 0x21, 0x06, 0x43, 0x48, - 0xf7, 0xea, 0x43, 0x33, 0xc4, 0x40, 0x49, 0x50, 0x24, 0xa2, 0x8a, 0x93, 0x32, 0x88, 0xb8, 0xa6, - 0x01, 0x61, 0x20, 0xd2, 0x81, 0x4f, 0xf7, 0x2f, 0xf4, 0x6d, 0x06, 0xf9, 0xcf, 0xce, 0x51, 0xd8, - 0x1f, 0x7c, 0xd2, 0x54, 0x73, 0x37, 0x74, 0x46, 0x19, 0xcd, 0xa9, 0x54, 0x13, 0xfb, 0xc2, 0xbe, - 0xfc, 0x7f, 0x73, 0x8a, 0xf7, 0x3e, 0x80, 0x1f, 0x0d, 0x9c, 0x4f, 0x36, 0xb5, 0x67, 0xed, 0x6a, - 0x6f, 0xdc, 0x87, 0xaf, 0x40, 0x0a, 0xcd, 0x65, 0xa6, 0xab, 0xe5, 0xb0, 0xee, 0x17, 0xce, 0xa8, - 0xcf, 0xba, 0x6b, 0xc7, 0x65, 0x90, 0xea, 0x9c, 0x32, 0xbd, 0x8a, 0xa9, 0x5a, 0x25, 0x42, 0x0a, - 0x6d, 0xea, 0xff, 0xcd, 0xef, 0x77, 0xb5, 0x77, 0x7e, 0x48, 0xff, 0xfa, 0xbe, 0x6b, 0x6f, 0x5a, - 0x51, 0x99, 0xdc, 0xf9, 0x87, 0x29, 0x7f, 0x39, 0xfe, 0x1d, 0x86, 0x54, 0x3d, 0x74, 0xa3, 0x79, - 0xb8, 0x69, 0x90, 0xbd, 0x6d, 0x90, 0xfd, 0xd5, 0x20, 0xfb, 0xa3, 0x45, 0xd6, 0xb6, 0x45, 0xd6, - 0x67, 0x8b, 0xac, 0x97, 0xeb, 0x58, 0xe8, 0xd7, 0x22, 0xc2, 0x0c, 0x24, 0x59, 0x18, 0x5f, 0x8b, - 0x61, 0x59, 0x11, 0xe3, 0xe7, 0x7d, 0x30, 0xa4, 0xab, 0x8c, 0xab, 0x68, 0x64, 0xfc, 0xdc, 0xfe, - 0x04, 0x00, 0x00, 0xff, 0xff, 0x3c, 0x09, 0x34, 0x28, 0x9e, 0x01, 0x00, 0x00, +var fileDescriptor_5e684cf0c154fcd7 = []byte{ + // 275 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x49, 0xae, 0x4c, 0x4a, + 0x2d, 0xd2, 0x4f, 0xce, 0xc9, 0x4f, 0xce, 0xd6, 0x2f, 0x33, 0xd4, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, + 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x03, 0xcb, 0xea, 0x81, 0x65, 0xf5, + 0xca, 0x0c, 0xa5, 0x44, 0xd2, 0xf3, 0xd3, 0xf3, 0xc1, 0x52, 0xfa, 0x20, 0x16, 0x44, 0x95, 0x52, + 0x04, 0x17, 0x8f, 0x3b, 0x44, 0x5b, 0x70, 0x49, 0x62, 0x49, 0xaa, 0x90, 0x07, 0x17, 0x5b, 0x41, + 0x62, 0x51, 0x62, 0x6e, 0xb1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x98, 0x1e, 0xaa, 0x31, + 0x7a, 0x01, 0x60, 0x59, 0x27, 0x89, 0x13, 0xf7, 0xe4, 0x19, 0x5e, 0xdd, 0x93, 0x17, 0x80, 0xa8, + 0xd6, 0xc9, 0xcf, 0xcd, 0x2c, 0x49, 0xcd, 0x2d, 0x28, 0xa9, 0x0c, 0x82, 0xea, 0x57, 0x2a, 0xe5, + 0x62, 0x83, 0xa8, 0x15, 0xca, 0xe6, 0x12, 0x4a, 0xce, 0xcf, 0x2b, 0x29, 0x4a, 0x4c, 0x2e, 0x89, + 0x4f, 0x4f, 0x2c, 0x8e, 0xcf, 0xc9, 0xcc, 0xcd, 0x2c, 0x01, 0x9b, 0xcf, 0xe2, 0x64, 0xfb, 0xea, + 0x9e, 0xbc, 0x0c, 0xa6, 0x2c, 0xc2, 0xbc, 0x4f, 0xf7, 0xe4, 0x25, 0x2b, 0x13, 0x73, 0x73, 0xac, + 0x94, 0x30, 0x55, 0x29, 0x05, 0x09, 0xc0, 0x04, 0xdd, 0x13, 0x8b, 0x7d, 0x40, 0x42, 0x4e, 0x9e, + 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, 0xa5, 0x9f, 0x9e, 0x59, 0x92, 0x51, + 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x0f, 0xf6, 0x54, 0x72, 0x7e, 0x5e, 0x7a, 0x51, 0x6a, 0x71, + 0xb1, 0x7e, 0x7a, 0xbe, 0x2e, 0x24, 0x28, 0x2b, 0xa0, 0x81, 0x59, 0x52, 0x59, 0x90, 0x5a, 0x9c, + 0xc4, 0x06, 0x0e, 0x22, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2f, 0x65, 0x95, 0x9e, 0x68, + 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { diff --git a/x/clock/types/query.pb.go b/x/clock/types/query.pb.go index cebef785..4720799f 100644 --- a/x/clock/types/query.pb.go +++ b/x/clock/types/query.pb.go @@ -1,12 +1,11 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: juno/clock/v1/query.proto +// source: cyber/clock/v1/query.proto package types import ( context "context" fmt "fmt" - _ "github.com/cosmos/cosmos-sdk/types" query "github.com/cosmos/cosmos-sdk/types/query" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" @@ -41,7 +40,7 @@ func (m *QueryClockContracts) Reset() { *m = QueryClockContracts{} } func (m *QueryClockContracts) String() string { return proto.CompactTextString(m) } func (*QueryClockContracts) ProtoMessage() {} func (*QueryClockContracts) Descriptor() ([]byte, []int) { - return fileDescriptor_7da208f579d775c8, []int{0} + return fileDescriptor_05444fcb6b1de94a, []int{0} } func (m *QueryClockContracts) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -77,7 +76,8 @@ func (m *QueryClockContracts) GetPagination() *query.PageRequest { return nil } -// QueryClockContractsResponse is the response type for the Query/ClockContracts RPC method. +// QueryClockContractsResponse is the response type for the Query/ClockContracts +// RPC method. type QueryClockContractsResponse struct { // clock_contracts are the clock contracts. ClockContracts []ClockContract `protobuf:"bytes,1,rep,name=clock_contracts,json=clockContracts,proto3" json:"clock_contracts"` @@ -89,7 +89,7 @@ func (m *QueryClockContractsResponse) Reset() { *m = QueryClockContracts func (m *QueryClockContractsResponse) String() string { return proto.CompactTextString(m) } func (*QueryClockContractsResponse) ProtoMessage() {} func (*QueryClockContractsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7da208f579d775c8, []int{1} + return fileDescriptor_05444fcb6b1de94a, []int{1} } func (m *QueryClockContractsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -142,7 +142,7 @@ func (m *QueryClockContract) Reset() { *m = QueryClockContract{} } func (m *QueryClockContract) String() string { return proto.CompactTextString(m) } func (*QueryClockContract) ProtoMessage() {} func (*QueryClockContract) Descriptor() ([]byte, []int) { - return fileDescriptor_7da208f579d775c8, []int{2} + return fileDescriptor_05444fcb6b1de94a, []int{2} } func (m *QueryClockContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -178,7 +178,8 @@ func (m *QueryClockContract) GetContractAddress() string { return "" } -// QueryClockContractResponse is the response type for the Query/ClockContract RPC method. +// QueryClockContractResponse is the response type for the Query/ClockContract +// RPC method. type QueryClockContractResponse struct { // contract is the clock contract. ClockContract ClockContract `protobuf:"bytes,1,opt,name=clock_contract,json=clockContract,proto3" json:"clock_contract"` @@ -188,7 +189,7 @@ func (m *QueryClockContractResponse) Reset() { *m = QueryClockContractRe func (m *QueryClockContractResponse) String() string { return proto.CompactTextString(m) } func (*QueryClockContractResponse) ProtoMessage() {} func (*QueryClockContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7da208f579d775c8, []int{3} + return fileDescriptor_05444fcb6b1de94a, []int{3} } func (m *QueryClockContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -232,7 +233,7 @@ func (m *QueryParamsRequest) Reset() { *m = QueryParamsRequest{} } func (m *QueryParamsRequest) String() string { return proto.CompactTextString(m) } func (*QueryParamsRequest) ProtoMessage() {} func (*QueryParamsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_7da208f579d775c8, []int{4} + return fileDescriptor_05444fcb6b1de94a, []int{4} } func (m *QueryParamsRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -261,7 +262,8 @@ func (m *QueryParamsRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryParamsRequest proto.InternalMessageInfo -// QueryClockContractsResponse is the response type for the Query/ClockContracts RPC method. +// QueryClockContractsResponse is the response type for the Query/ClockContracts +// RPC method. type QueryParamsResponse struct { Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params" yaml:"params"` } @@ -270,7 +272,7 @@ func (m *QueryParamsResponse) Reset() { *m = QueryParamsResponse{} } func (m *QueryParamsResponse) String() string { return proto.CompactTextString(m) } func (*QueryParamsResponse) ProtoMessage() {} func (*QueryParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_7da208f579d775c8, []int{5} + return fileDescriptor_05444fcb6b1de94a, []int{5} } func (m *QueryParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -307,52 +309,52 @@ func (m *QueryParamsResponse) GetParams() *Params { } func init() { - proto.RegisterType((*QueryClockContracts)(nil), "juno.clock.v1.QueryClockContracts") - proto.RegisterType((*QueryClockContractsResponse)(nil), "juno.clock.v1.QueryClockContractsResponse") - proto.RegisterType((*QueryClockContract)(nil), "juno.clock.v1.QueryClockContract") - proto.RegisterType((*QueryClockContractResponse)(nil), "juno.clock.v1.QueryClockContractResponse") - proto.RegisterType((*QueryParamsRequest)(nil), "juno.clock.v1.QueryParamsRequest") - proto.RegisterType((*QueryParamsResponse)(nil), "juno.clock.v1.QueryParamsResponse") -} - -func init() { proto.RegisterFile("juno/clock/v1/query.proto", fileDescriptor_7da208f579d775c8) } - -var fileDescriptor_7da208f579d775c8 = []byte{ - // 542 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4d, 0x6f, 0xd3, 0x30, - 0x18, 0xc7, 0x9b, 0x0d, 0x2a, 0xe1, 0xa9, 0x1d, 0x32, 0x9b, 0x28, 0xe9, 0x48, 0x8b, 0x0f, 0xb0, - 0x0d, 0xcd, 0x56, 0xbb, 0x1b, 0x17, 0x44, 0x2b, 0x31, 0x01, 0x97, 0x91, 0x23, 0x12, 0x9a, 0xdc, - 0xcc, 0x0a, 0x81, 0x36, 0xce, 0x62, 0xb7, 0xa2, 0x42, 0x5c, 0xf6, 0x09, 0x78, 0xf9, 0x28, 0x7c, - 0x89, 0x1d, 0x27, 0x71, 0xe1, 0x54, 0xa1, 0x96, 0x13, 0x47, 0x3e, 0x01, 0x8a, 0xed, 0x94, 0x39, - 0x2b, 0x94, 0x9b, 0xfb, 0xbc, 0xfc, 0x9f, 0xdf, 0xf3, 0xd2, 0x80, 0x5b, 0xaf, 0x87, 0x31, 0x27, - 0x41, 0x9f, 0x07, 0x6f, 0xc8, 0xa8, 0x45, 0x4e, 0x86, 0x2c, 0x1d, 0xe3, 0x24, 0xe5, 0x92, 0xc3, - 0x4a, 0xe6, 0xc2, 0xca, 0x85, 0x47, 0x2d, 0x77, 0x37, 0xe0, 0x62, 0xc0, 0x05, 0xe9, 0x51, 0xc1, - 0x74, 0x1c, 0x19, 0xb5, 0x7a, 0x4c, 0xd2, 0x16, 0x49, 0x68, 0x18, 0xc5, 0x54, 0x46, 0x3c, 0xd6, - 0xa9, 0xee, 0x46, 0xc8, 0x43, 0xae, 0x9e, 0x24, 0x7b, 0x19, 0xeb, 0x56, 0xc8, 0x79, 0xd8, 0x67, - 0x84, 0x26, 0x11, 0xa1, 0x71, 0xcc, 0xa5, 0x4a, 0x11, 0xc6, 0xeb, 0x5d, 0xd4, 0xcf, 0x95, 0x03, - 0x1e, 0xe5, 0x9a, 0x75, 0x9b, 0x34, 0x64, 0x31, 0x13, 0x51, 0x9e, 0x5c, 0x68, 0x43, 0x43, 0x2b, - 0x17, 0x7a, 0x09, 0x6e, 0x3c, 0xcf, 0x68, 0xbb, 0x99, 0xad, 0xcb, 0x63, 0x99, 0xd2, 0x40, 0x0a, - 0xf8, 0x18, 0x80, 0x3f, 0xd8, 0x35, 0xa7, 0xe9, 0x6c, 0xaf, 0xb5, 0xef, 0x62, 0xcd, 0x80, 0x33, - 0x06, 0xac, 0x67, 0x61, 0x48, 0xf0, 0x21, 0x0d, 0x99, 0xcf, 0x4e, 0x86, 0x4c, 0x48, 0xff, 0x42, - 0x26, 0xfa, 0xe2, 0x80, 0xfa, 0x02, 0x7d, 0x9f, 0x89, 0x84, 0xc7, 0x82, 0xc1, 0x67, 0x60, 0x5d, - 0xd1, 0x1c, 0x05, 0xb9, 0xab, 0xe6, 0x34, 0x57, 0xb7, 0xd7, 0xda, 0x5b, 0xd8, 0x9a, 0x2f, 0xb6, - 0xf2, 0x3b, 0x57, 0xce, 0x26, 0x8d, 0x92, 0x5f, 0x0d, 0x6c, 0xe8, 0x03, 0x0b, 0x7a, 0x45, 0x41, - 0xdf, 0x5b, 0x0a, 0xad, 0x49, 0x2c, 0xea, 0x87, 0x00, 0x5e, 0x86, 0x86, 0x3b, 0xe0, 0x7a, 0x4e, - 0x79, 0x44, 0x8f, 0x8f, 0x53, 0x26, 0x84, 0x9a, 0xcc, 0x35, 0x7f, 0x3d, 0xb7, 0x3f, 0xd2, 0x66, - 0x14, 0x02, 0xf7, 0xb2, 0xc0, 0xbc, 0xe9, 0x27, 0xa0, 0x6a, 0x37, 0x6d, 0x06, 0xfc, 0x3f, 0x3d, - 0x57, 0xac, 0x9e, 0xd1, 0x86, 0x21, 0x3d, 0xa4, 0x29, 0x1d, 0x08, 0xb3, 0x01, 0x44, 0xcd, 0x52, - 0x73, 0xab, 0xa9, 0xfb, 0x14, 0x94, 0x13, 0x65, 0x31, 0xf5, 0x36, 0x0b, 0xf5, 0x74, 0x78, 0xa7, - 0xfe, 0x73, 0xd2, 0x30, 0x81, 0xbf, 0x26, 0x8d, 0xca, 0x98, 0x0e, 0xfa, 0x0f, 0x90, 0xfe, 0x8d, - 0x7c, 0xe3, 0x68, 0x7f, 0x5c, 0x05, 0x57, 0x55, 0x0d, 0x78, 0xea, 0x80, 0x6a, 0xe1, 0x7a, 0x50, - 0x41, 0x78, 0xc1, 0x05, 0xb8, 0xbb, 0xcb, 0x63, 0x72, 0x70, 0xd4, 0x3c, 0xfd, 0xfa, 0xe3, 0xf3, - 0x8a, 0x0b, 0x6b, 0xa4, 0x70, 0xc8, 0xf3, 0x8a, 0x9f, 0x1c, 0x50, 0xb1, 0xb7, 0x75, 0x67, 0xa9, - 0xbe, 0xbb, 0xb3, 0x34, 0x64, 0x4e, 0xb0, 0xaf, 0x08, 0xf6, 0xe0, 0xfd, 0xbf, 0x11, 0x90, 0x77, - 0xc5, 0xdb, 0x78, 0x0f, 0x63, 0x50, 0xd6, 0x23, 0x5d, 0x0c, 0x63, 0xed, 0xcc, 0x45, 0xff, 0x0a, - 0x31, 0x14, 0xb7, 0x15, 0xc5, 0x4d, 0xb8, 0x59, 0xa0, 0xd0, 0x3b, 0xe9, 0x1c, 0x9c, 0x4d, 0x3d, - 0xe7, 0x7c, 0xea, 0x39, 0xdf, 0xa7, 0x9e, 0xf3, 0x61, 0xe6, 0x95, 0xce, 0x67, 0x5e, 0xe9, 0xdb, - 0xcc, 0x2b, 0xbd, 0xd8, 0x0b, 0x23, 0xf9, 0x6a, 0xd8, 0xc3, 0x01, 0x1f, 0x90, 0xae, 0xfa, 0x3f, - 0xcc, 0x87, 0xac, 0xa5, 0xde, 0x1a, 0x31, 0x39, 0x4e, 0x98, 0xe8, 0x95, 0xd5, 0xb7, 0x61, 0xff, - 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x8e, 0x06, 0x27, 0xff, 0x04, 0x00, 0x00, + proto.RegisterType((*QueryClockContracts)(nil), "cyber.clock.v1.QueryClockContracts") + proto.RegisterType((*QueryClockContractsResponse)(nil), "cyber.clock.v1.QueryClockContractsResponse") + proto.RegisterType((*QueryClockContract)(nil), "cyber.clock.v1.QueryClockContract") + proto.RegisterType((*QueryClockContractResponse)(nil), "cyber.clock.v1.QueryClockContractResponse") + proto.RegisterType((*QueryParamsRequest)(nil), "cyber.clock.v1.QueryParamsRequest") + proto.RegisterType((*QueryParamsResponse)(nil), "cyber.clock.v1.QueryParamsResponse") +} + +func init() { proto.RegisterFile("cyber/clock/v1/query.proto", fileDescriptor_05444fcb6b1de94a) } + +var fileDescriptor_05444fcb6b1de94a = []byte{ + // 539 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4d, 0x6b, 0x13, 0x41, + 0x18, 0xc7, 0xb3, 0xad, 0x06, 0x9c, 0x92, 0x54, 0xc6, 0x52, 0xe2, 0x46, 0x37, 0x75, 0x0b, 0x5a, + 0xab, 0xce, 0x90, 0xe8, 0xc9, 0x8b, 0x98, 0x82, 0xe2, 0xcb, 0xa1, 0xee, 0x51, 0x90, 0x32, 0xbb, + 0x1d, 0xa6, 0x8b, 0xc9, 0xce, 0x66, 0x67, 0x12, 0x0c, 0xe2, 0x45, 0xf0, 0x2e, 0x88, 0x17, 0x3f, + 0x87, 0x1f, 0xa2, 0xc7, 0x82, 0x17, 0x4f, 0x41, 0x12, 0x4f, 0x1e, 0xfd, 0x04, 0xb2, 0x33, 0xb3, + 0xd1, 0xd9, 0xb6, 0xa6, 0xb7, 0xd9, 0xe7, 0xf5, 0xf7, 0x7f, 0x9e, 0x87, 0x05, 0x6e, 0x34, 0x0e, + 0x69, 0x86, 0xa3, 0x1e, 0x8f, 0x5e, 0xe3, 0x51, 0x1b, 0x0f, 0x86, 0x34, 0x1b, 0xa3, 0x34, 0xe3, + 0x92, 0xc3, 0xba, 0xf2, 0x21, 0xe5, 0x43, 0xa3, 0xb6, 0xbb, 0x1d, 0x71, 0xd1, 0xe7, 0x02, 0x87, + 0x44, 0x50, 0x1d, 0x88, 0x47, 0xed, 0x90, 0x4a, 0xd2, 0xc6, 0x29, 0x61, 0x71, 0x42, 0x64, 0xcc, + 0x13, 0x9d, 0xeb, 0xae, 0x31, 0xce, 0xb8, 0x7a, 0xe2, 0xfc, 0x65, 0xac, 0x57, 0x18, 0xe7, 0xac, + 0x47, 0x31, 0x49, 0x63, 0x4c, 0x92, 0x84, 0x4b, 0x95, 0x22, 0x0a, 0x6f, 0x89, 0x85, 0xd1, 0x84, + 0x8a, 0xb8, 0xf0, 0x96, 0x49, 0x35, 0x96, 0xf2, 0xf9, 0xaf, 0xc0, 0xa5, 0x17, 0x39, 0xcf, 0x4e, + 0x6e, 0xdb, 0xe1, 0x89, 0xcc, 0x48, 0x24, 0x05, 0x7c, 0x04, 0xc0, 0x5f, 0xb0, 0x86, 0xb3, 0xe1, + 0x6c, 0xad, 0x74, 0xae, 0x23, 0xad, 0x02, 0xe5, 0x2a, 0x90, 0x96, 0x6b, 0x54, 0xa0, 0x5d, 0xc2, + 0x68, 0x40, 0x07, 0x43, 0x2a, 0x64, 0xf0, 0x4f, 0xa6, 0xff, 0xd5, 0x01, 0xcd, 0x13, 0xea, 0x07, + 0x54, 0xa4, 0x3c, 0x11, 0x14, 0x3e, 0x07, 0xab, 0x8a, 0x66, 0x2f, 0x2a, 0x5c, 0x0d, 0x67, 0x63, + 0x79, 0x6b, 0xa5, 0x73, 0x15, 0xd9, 0x23, 0x44, 0x56, 0x81, 0xee, 0xb9, 0xc3, 0x49, 0xab, 0x12, + 0xd4, 0x23, 0x9b, 0xfa, 0xb1, 0x45, 0xbd, 0xa4, 0xa8, 0x6f, 0x2c, 0xa4, 0xd6, 0x28, 0x16, 0xf6, + 0x03, 0x00, 0x8f, 0x53, 0xc3, 0x9b, 0xe0, 0x62, 0x81, 0xb9, 0x47, 0xf6, 0xf7, 0x33, 0x2a, 0x84, + 0x1a, 0xcd, 0x85, 0x60, 0xb5, 0xb0, 0x3f, 0xd4, 0x66, 0xff, 0x00, 0xb8, 0xc7, 0x0b, 0xcc, 0x55, + 0x3f, 0x05, 0x75, 0x5b, 0xb5, 0x99, 0xf0, 0x99, 0x44, 0xd7, 0x2c, 0xd1, 0xfe, 0x9a, 0x41, 0xdd, + 0x25, 0x19, 0xe9, 0x0b, 0xb3, 0x03, 0x3f, 0x34, 0x6b, 0x2d, 0xac, 0xa6, 0xf1, 0x33, 0x50, 0x4d, + 0x95, 0xc5, 0x34, 0x5c, 0x2f, 0x37, 0xd4, 0xf1, 0xdd, 0xe6, 0xaf, 0x49, 0xcb, 0x44, 0xfe, 0x9e, + 0xb4, 0x6a, 0x63, 0xd2, 0xef, 0xdd, 0xf7, 0xf5, 0xb7, 0x1f, 0x18, 0x47, 0xe7, 0xcb, 0x32, 0x38, + 0xaf, 0x9a, 0xc0, 0x0f, 0x0e, 0xa8, 0x97, 0x0e, 0x68, 0xb3, 0x5c, 0xf9, 0x84, 0x2b, 0x70, 0x6f, + 0x9d, 0x21, 0xa8, 0x60, 0xf7, 0xaf, 0xbd, 0xff, 0xf6, 0xf3, 0xd3, 0x52, 0x13, 0x5e, 0xc6, 0xe5, + 0x73, 0x9e, 0x37, 0xfd, 0xec, 0x80, 0x9a, 0xbd, 0x32, 0x7f, 0x71, 0x07, 0x77, 0x7b, 0x71, 0xcc, + 0x1c, 0xe2, 0x9e, 0x82, 0x40, 0xf0, 0xf6, 0xa9, 0x10, 0xf8, 0x6d, 0xf9, 0x46, 0xde, 0xc1, 0x01, + 0xa8, 0xea, 0xc1, 0x9e, 0xc2, 0x63, 0xed, 0xce, 0xdd, 0xfc, 0x6f, 0x8c, 0x01, 0xf1, 0x14, 0x48, + 0x03, 0xae, 0x97, 0x41, 0xf4, 0x72, 0xba, 0x4f, 0x0e, 0xa7, 0x9e, 0x73, 0x34, 0xf5, 0x9c, 0x1f, + 0x53, 0xcf, 0xf9, 0x38, 0xf3, 0x2a, 0x47, 0x33, 0xaf, 0xf2, 0x7d, 0xe6, 0x55, 0x5e, 0x62, 0x16, + 0xcb, 0x83, 0x61, 0x88, 0x22, 0xde, 0xd7, 0xb9, 0x11, 0x4f, 0x58, 0xce, 0x89, 0x19, 0xbf, 0xa3, + 0x8b, 0xbd, 0x31, 0xe5, 0xe4, 0x38, 0xa5, 0x22, 0xac, 0xaa, 0x3f, 0xc5, 0xdd, 0x3f, 0x01, 0x00, + 0x00, 0xff, 0xff, 0x2a, 0x7c, 0xaf, 0x65, 0xf1, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -385,7 +387,7 @@ func NewQueryClient(cc grpc1.ClientConn) QueryClient { func (c *queryClient) ClockContracts(ctx context.Context, in *QueryClockContracts, opts ...grpc.CallOption) (*QueryClockContractsResponse, error) { out := new(QueryClockContractsResponse) - err := c.cc.Invoke(ctx, "/juno.clock.v1.Query/ClockContracts", in, out, opts...) + err := c.cc.Invoke(ctx, "/cyber.clock.v1.Query/ClockContracts", in, out, opts...) if err != nil { return nil, err } @@ -394,7 +396,7 @@ func (c *queryClient) ClockContracts(ctx context.Context, in *QueryClockContract func (c *queryClient) ClockContract(ctx context.Context, in *QueryClockContract, opts ...grpc.CallOption) (*QueryClockContractResponse, error) { out := new(QueryClockContractResponse) - err := c.cc.Invoke(ctx, "/juno.clock.v1.Query/ClockContract", in, out, opts...) + err := c.cc.Invoke(ctx, "/cyber.clock.v1.Query/ClockContract", in, out, opts...) if err != nil { return nil, err } @@ -403,7 +405,7 @@ func (c *queryClient) ClockContract(ctx context.Context, in *QueryClockContract, func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) { out := new(QueryParamsResponse) - err := c.cc.Invoke(ctx, "/juno.clock.v1.Query/Params", in, out, opts...) + err := c.cc.Invoke(ctx, "/cyber.clock.v1.Query/Params", in, out, opts...) if err != nil { return nil, err } @@ -448,7 +450,7 @@ func _Query_ClockContracts_Handler(srv interface{}, ctx context.Context, dec fun } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/juno.clock.v1.Query/ClockContracts", + FullMethod: "/cyber.clock.v1.Query/ClockContracts", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ClockContracts(ctx, req.(*QueryClockContracts)) @@ -466,7 +468,7 @@ func _Query_ClockContract_Handler(srv interface{}, ctx context.Context, dec func } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/juno.clock.v1.Query/ClockContract", + FullMethod: "/cyber.clock.v1.Query/ClockContract", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).ClockContract(ctx, req.(*QueryClockContract)) @@ -484,7 +486,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/juno.clock.v1.Query/Params", + FullMethod: "/cyber.clock.v1.Query/Params", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(QueryServer).Params(ctx, req.(*QueryParamsRequest)) @@ -493,7 +495,7 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf } var _Query_serviceDesc = grpc.ServiceDesc{ - ServiceName: "juno.clock.v1.Query", + ServiceName: "cyber.clock.v1.Query", HandlerType: (*QueryServer)(nil), Methods: []grpc.MethodDesc{ { @@ -510,7 +512,7 @@ var _Query_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "juno/clock/v1/query.proto", + Metadata: "cyber/clock/v1/query.proto", } func (m *QueryClockContracts) Marshal() (dAtA []byte, err error) { diff --git a/x/clock/types/query.pb.gw.go b/x/clock/types/query.pb.gw.go index cddeb596..d8621ea9 100644 --- a/x/clock/types/query.pb.gw.go +++ b/x/clock/types/query.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: juno/clock/v1/query.proto +// source: cyber/clock/v1/query.proto /* Package types is a reverse proxy. @@ -321,11 +321,11 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie } var ( - pattern_Query_ClockContracts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"juno", "clock", "v1", "contracts"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ClockContracts_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cyber", "clock", "v1", "contracts"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_ClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"juno", "clock", "v1", "contracts", "contract_address"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_ClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 1, 0, 4, 1, 5, 4}, []string{"cyber", "clock", "v1", "contracts", "contract_address"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"juno", "clock", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"cyber", "clock", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( diff --git a/x/clock/types/tx.pb.go b/x/clock/types/tx.pb.go index 22725c90..40e61213 100644 --- a/x/clock/types/tx.pb.go +++ b/x/clock/types/tx.pb.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: juno/clock/v1/tx.proto +// source: cyber/clock/v1/tx.proto package types @@ -8,7 +8,6 @@ import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/cosmos-sdk/types/msgservice" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" grpc1 "github.com/cosmos/gogoproto/grpc" proto "github.com/cosmos/gogoproto/proto" @@ -44,7 +43,7 @@ func (m *MsgRegisterClockContract) Reset() { *m = MsgRegisterClockContra func (m *MsgRegisterClockContract) String() string { return proto.CompactTextString(m) } func (*MsgRegisterClockContract) ProtoMessage() {} func (*MsgRegisterClockContract) Descriptor() ([]byte, []int) { - return fileDescriptor_76642a1e9a85f94b, []int{0} + return fileDescriptor_f27fe74cf5db2c38, []int{0} } func (m *MsgRegisterClockContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -87,8 +86,8 @@ func (m *MsgRegisterClockContract) GetContractAddress() string { return "" } -// MsgRegisterClockContractResponse defines the response structure for executing a -// MsgRegisterClockContract message. +// MsgRegisterClockContractResponse defines the response structure for executing +// a MsgRegisterClockContract message. type MsgRegisterClockContractResponse struct { } @@ -96,7 +95,7 @@ func (m *MsgRegisterClockContractResponse) Reset() { *m = MsgRegisterClo func (m *MsgRegisterClockContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgRegisterClockContractResponse) ProtoMessage() {} func (*MsgRegisterClockContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_76642a1e9a85f94b, []int{1} + return fileDescriptor_f27fe74cf5db2c38, []int{1} } func (m *MsgRegisterClockContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -137,7 +136,7 @@ func (m *MsgUnregisterClockContract) Reset() { *m = MsgUnregisterClockCo func (m *MsgUnregisterClockContract) String() string { return proto.CompactTextString(m) } func (*MsgUnregisterClockContract) ProtoMessage() {} func (*MsgUnregisterClockContract) Descriptor() ([]byte, []int) { - return fileDescriptor_76642a1e9a85f94b, []int{2} + return fileDescriptor_f27fe74cf5db2c38, []int{2} } func (m *MsgUnregisterClockContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -180,8 +179,8 @@ func (m *MsgUnregisterClockContract) GetContractAddress() string { return "" } -// MsgUnregisterClockContractResponse defines the response structure for executing a -// MsgUnregisterClockContract message. +// MsgUnregisterClockContractResponse defines the response structure for +// executing a MsgUnregisterClockContract message. type MsgUnregisterClockContractResponse struct { } @@ -189,7 +188,7 @@ func (m *MsgUnregisterClockContractResponse) Reset() { *m = MsgUnregiste func (m *MsgUnregisterClockContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgUnregisterClockContractResponse) ProtoMessage() {} func (*MsgUnregisterClockContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_76642a1e9a85f94b, []int{3} + return fileDescriptor_f27fe74cf5db2c38, []int{3} } func (m *MsgUnregisterClockContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -230,7 +229,7 @@ func (m *MsgUnjailClockContract) Reset() { *m = MsgUnjailClockContract{} func (m *MsgUnjailClockContract) String() string { return proto.CompactTextString(m) } func (*MsgUnjailClockContract) ProtoMessage() {} func (*MsgUnjailClockContract) Descriptor() ([]byte, []int) { - return fileDescriptor_76642a1e9a85f94b, []int{4} + return fileDescriptor_f27fe74cf5db2c38, []int{4} } func (m *MsgUnjailClockContract) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -282,7 +281,7 @@ func (m *MsgUnjailClockContractResponse) Reset() { *m = MsgUnjailClockCo func (m *MsgUnjailClockContractResponse) String() string { return proto.CompactTextString(m) } func (*MsgUnjailClockContractResponse) ProtoMessage() {} func (*MsgUnjailClockContractResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_76642a1e9a85f94b, []int{5} + return fileDescriptor_f27fe74cf5db2c38, []int{5} } func (m *MsgUnjailClockContractResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -327,7 +326,7 @@ func (m *MsgUpdateParams) Reset() { *m = MsgUpdateParams{} } func (m *MsgUpdateParams) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParams) ProtoMessage() {} func (*MsgUpdateParams) Descriptor() ([]byte, []int) { - return fileDescriptor_76642a1e9a85f94b, []int{6} + return fileDescriptor_f27fe74cf5db2c38, []int{6} } func (m *MsgUpdateParams) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -381,7 +380,7 @@ func (m *MsgUpdateParamsResponse) Reset() { *m = MsgUpdateParamsResponse func (m *MsgUpdateParamsResponse) String() string { return proto.CompactTextString(m) } func (*MsgUpdateParamsResponse) ProtoMessage() {} func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_76642a1e9a85f94b, []int{7} + return fileDescriptor_f27fe74cf5db2c38, []int{7} } func (m *MsgUpdateParamsResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -411,54 +410,54 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo func init() { - proto.RegisterType((*MsgRegisterClockContract)(nil), "juno.clock.v1.MsgRegisterClockContract") - proto.RegisterType((*MsgRegisterClockContractResponse)(nil), "juno.clock.v1.MsgRegisterClockContractResponse") - proto.RegisterType((*MsgUnregisterClockContract)(nil), "juno.clock.v1.MsgUnregisterClockContract") - proto.RegisterType((*MsgUnregisterClockContractResponse)(nil), "juno.clock.v1.MsgUnregisterClockContractResponse") - proto.RegisterType((*MsgUnjailClockContract)(nil), "juno.clock.v1.MsgUnjailClockContract") - proto.RegisterType((*MsgUnjailClockContractResponse)(nil), "juno.clock.v1.MsgUnjailClockContractResponse") - proto.RegisterType((*MsgUpdateParams)(nil), "juno.clock.v1.MsgUpdateParams") - proto.RegisterType((*MsgUpdateParamsResponse)(nil), "juno.clock.v1.MsgUpdateParamsResponse") -} - -func init() { proto.RegisterFile("juno/clock/v1/tx.proto", fileDescriptor_76642a1e9a85f94b) } - -var fileDescriptor_76642a1e9a85f94b = []byte{ - // 542 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x3f, 0x6f, 0xd3, 0x40, - 0x18, 0xc6, 0xe3, 0x52, 0x55, 0xea, 0x41, 0x5b, 0x30, 0x6d, 0x93, 0x9a, 0xc8, 0x44, 0xa7, 0xf2, - 0xa7, 0x48, 0xf1, 0x29, 0xad, 0xc4, 0xc0, 0x46, 0x32, 0x30, 0x45, 0x42, 0x46, 0x30, 0xb0, 0x54, - 0x57, 0xe7, 0x74, 0x75, 0x88, 0xef, 0x2c, 0xdf, 0xa5, 0x6a, 0xd7, 0xee, 0x20, 0x24, 0xc4, 0xc8, - 0xc8, 0xce, 0xc0, 0x87, 0xe8, 0x58, 0xc1, 0xc2, 0x84, 0x50, 0x82, 0xc4, 0xd7, 0x40, 0xbe, 0x3b, - 0x3b, 0x24, 0xb1, 0x51, 0x16, 0x58, 0xac, 0xf3, 0xfb, 0x3e, 0xef, 0xfb, 0xfc, 0x64, 0x3f, 0x36, - 0xd8, 0xee, 0x0f, 0x19, 0x47, 0xc1, 0x80, 0x07, 0xaf, 0xd0, 0x49, 0x0b, 0xc9, 0x53, 0x2f, 0x4e, - 0xb8, 0xe4, 0xf6, 0x5a, 0x5a, 0xf7, 0x54, 0xdd, 0x3b, 0x69, 0x39, 0x75, 0xca, 0x39, 0x1d, 0x10, - 0x84, 0xe3, 0x10, 0x61, 0xc6, 0xb8, 0xc4, 0x32, 0xe4, 0x4c, 0x68, 0xb1, 0x53, 0x0d, 0xb8, 0x88, - 0xb8, 0x40, 0x91, 0xa0, 0xe9, 0x92, 0x48, 0x50, 0xd3, 0xb8, 0x35, 0xbd, 0x9d, 0x12, 0x46, 0x44, - 0x98, 0x4d, 0x6d, 0x52, 0x4e, 0xb9, 0x3a, 0xa2, 0xf4, 0x64, 0xaa, 0x3b, 0x7a, 0xd7, 0xa1, 0x6e, - 0xe8, 0x1b, 0xd3, 0xba, 0x81, 0xa3, 0x90, 0x71, 0xa4, 0xae, 0xba, 0x04, 0x07, 0xa0, 0xd6, 0x15, - 0xd4, 0x27, 0x34, 0x14, 0x92, 0x24, 0x9d, 0xd4, 0xa8, 0xc3, 0x99, 0x4c, 0x70, 0x20, 0xed, 0x3b, - 0x60, 0x5d, 0x10, 0xd6, 0x23, 0xc9, 0x21, 0xee, 0xf5, 0x12, 0x22, 0x44, 0xcd, 0x6a, 0x58, 0xf7, - 0x57, 0xfd, 0x35, 0x5d, 0x7d, 0xac, 0x8b, 0xf6, 0x1e, 0xb8, 0x1e, 0x98, 0x91, 0x5c, 0xb8, 0xa4, - 0x84, 0x1b, 0x59, 0xdd, 0x48, 0x21, 0x04, 0x8d, 0x32, 0x37, 0x9f, 0x88, 0x98, 0x33, 0x41, 0x20, - 0x03, 0x4e, 0x57, 0xd0, 0xe7, 0x2c, 0xf9, 0x4f, 0x4c, 0xbb, 0x00, 0x96, 0xfb, 0xe5, 0x54, 0x7d, - 0xb0, 0xad, 0x54, 0x7d, 0x1c, 0x0e, 0xfe, 0x35, 0x51, 0x03, 0xb8, 0xc5, 0x5e, 0x39, 0xcd, 0x1b, - 0x0b, 0x6c, 0xa4, 0x92, 0xb8, 0x87, 0x25, 0x79, 0x8a, 0x13, 0x1c, 0x09, 0xfb, 0x21, 0x58, 0xc5, - 0x43, 0x79, 0xcc, 0x93, 0x50, 0x9e, 0x69, 0x84, 0x76, 0xed, 0xcb, 0xe7, 0xe6, 0xa6, 0x49, 0x80, - 0x59, 0xfe, 0x4c, 0x26, 0x21, 0xa3, 0xfe, 0x44, 0x6a, 0x1f, 0x80, 0x95, 0x58, 0x6d, 0x50, 0x38, - 0x57, 0xf7, 0xb7, 0xbc, 0xa9, 0xe4, 0x7a, 0x7a, 0x7d, 0x7b, 0xf9, 0xe2, 0xfb, 0xed, 0x8a, 0x6f, - 0xa4, 0x8f, 0xd6, 0xcf, 0x7f, 0x7d, 0x7a, 0x30, 0x59, 0x02, 0x77, 0x40, 0x75, 0x86, 0x27, 0x63, - 0xdd, 0xff, 0xb8, 0x0c, 0xae, 0x74, 0x05, 0xb5, 0xdf, 0x5b, 0x60, 0xab, 0x38, 0x67, 0xf7, 0x66, - 0x1c, 0xcb, 0x22, 0xe2, 0xa0, 0x05, 0x85, 0xf9, 0x73, 0x82, 0xe7, 0x5f, 0x7f, 0xbe, 0x5b, 0xaa, - 0x43, 0x07, 0xcd, 0x7e, 0xa5, 0x28, 0x7b, 0xdd, 0xf6, 0x07, 0x0b, 0x54, 0xcb, 0xd2, 0xb6, 0x37, - 0x6f, 0x58, 0x22, 0x75, 0x5a, 0x0b, 0x4b, 0x73, 0xba, 0x5d, 0x45, 0xe7, 0xc2, 0xfa, 0x3c, 0xdd, - 0x30, 0x1f, 0xb5, 0x5f, 0x5b, 0xe0, 0x66, 0x61, 0xee, 0x8a, 0x0c, 0xe7, 0x64, 0x4e, 0x73, 0x21, - 0x59, 0xce, 0xd4, 0x50, 0x4c, 0x0e, 0xac, 0x15, 0x31, 0xa5, 0x63, 0xf6, 0x0b, 0x70, 0x6d, 0x2a, - 0x77, 0x6e, 0x81, 0xc1, 0x1f, 0x7d, 0xe7, 0xee, 0xdf, 0xfb, 0x99, 0x73, 0xfb, 0xc9, 0xc5, 0xc8, - 0xb5, 0x2e, 0x47, 0xae, 0xf5, 0x63, 0xe4, 0x5a, 0x6f, 0xc7, 0x6e, 0xe5, 0x72, 0xec, 0x56, 0xbe, - 0x8d, 0xdd, 0xca, 0xcb, 0x26, 0x0d, 0xe5, 0xf1, 0xf0, 0xc8, 0x0b, 0x78, 0x84, 0x3a, 0x2a, 0xcd, - 0x19, 0xb6, 0xd0, 0x94, 0xa7, 0x86, 0x53, 0x9e, 0xc5, 0x44, 0x1c, 0xad, 0xa8, 0x3f, 0xdb, 0xc1, - 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x84, 0xfe, 0x6c, 0x9a, 0x05, 0x00, 0x00, + proto.RegisterType((*MsgRegisterClockContract)(nil), "cyber.clock.v1.MsgRegisterClockContract") + proto.RegisterType((*MsgRegisterClockContractResponse)(nil), "cyber.clock.v1.MsgRegisterClockContractResponse") + proto.RegisterType((*MsgUnregisterClockContract)(nil), "cyber.clock.v1.MsgUnregisterClockContract") + proto.RegisterType((*MsgUnregisterClockContractResponse)(nil), "cyber.clock.v1.MsgUnregisterClockContractResponse") + proto.RegisterType((*MsgUnjailClockContract)(nil), "cyber.clock.v1.MsgUnjailClockContract") + proto.RegisterType((*MsgUnjailClockContractResponse)(nil), "cyber.clock.v1.MsgUnjailClockContractResponse") + proto.RegisterType((*MsgUpdateParams)(nil), "cyber.clock.v1.MsgUpdateParams") + proto.RegisterType((*MsgUpdateParamsResponse)(nil), "cyber.clock.v1.MsgUpdateParamsResponse") +} + +func init() { proto.RegisterFile("cyber/clock/v1/tx.proto", fileDescriptor_f27fe74cf5db2c38) } + +var fileDescriptor_f27fe74cf5db2c38 = []byte{ + // 541 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x94, 0x41, 0x6f, 0xd3, 0x3e, + 0x18, 0xc6, 0x9b, 0xfd, 0xa7, 0x49, 0xf3, 0x1f, 0x3a, 0x14, 0xc6, 0xda, 0x66, 0x5b, 0x5a, 0x0c, + 0x83, 0x31, 0x69, 0x31, 0x2b, 0x88, 0x03, 0x37, 0xba, 0x13, 0x87, 0x4a, 0x28, 0x08, 0x09, 0x71, + 0x99, 0xdc, 0xd4, 0xf2, 0x32, 0x1a, 0x3b, 0xb2, 0xdd, 0x69, 0xbd, 0xee, 0x0b, 0x30, 0x89, 0x0b, + 0x47, 0x3e, 0xc2, 0x0e, 0x7c, 0x88, 0x1d, 0x27, 0xb8, 0x70, 0x42, 0xa8, 0x45, 0xe2, 0x6b, 0xa0, + 0xd8, 0x49, 0xc6, 0xba, 0x44, 0xf4, 0x02, 0x37, 0xe7, 0x7d, 0x9f, 0xf7, 0x79, 0x7e, 0x8a, 0xdf, + 0x04, 0xd4, 0x82, 0x51, 0x8f, 0x08, 0x14, 0x0c, 0x78, 0xf0, 0x16, 0x1d, 0xee, 0x20, 0x75, 0xe4, + 0xc5, 0x82, 0x2b, 0x6e, 0x57, 0x75, 0xc3, 0xd3, 0x0d, 0xef, 0x70, 0xc7, 0x59, 0xa3, 0x9c, 0xd3, + 0x01, 0x41, 0x38, 0x0e, 0x11, 0x66, 0x8c, 0x2b, 0xac, 0x42, 0xce, 0xa4, 0x51, 0x3b, 0xb5, 0x80, + 0xcb, 0x88, 0x4b, 0x14, 0x49, 0x9a, 0xb8, 0x44, 0x92, 0xa6, 0x8d, 0xb5, 0x29, 0x7f, 0x4a, 0x18, + 0x91, 0x61, 0x36, 0xb6, 0x4c, 0x39, 0xe5, 0xfa, 0x88, 0x92, 0x53, 0x5a, 0x6d, 0x18, 0xb3, 0x3d, + 0xd3, 0x30, 0x0f, 0xa6, 0x05, 0x07, 0xa0, 0xde, 0x95, 0xd4, 0x27, 0x34, 0x94, 0x8a, 0x88, 0xdd, + 0xc4, 0x75, 0x97, 0x33, 0x25, 0x70, 0xa0, 0xec, 0x0d, 0x50, 0x95, 0x84, 0xf5, 0x89, 0xd8, 0xc3, + 0xfd, 0xbe, 0x20, 0x52, 0xd6, 0xad, 0x96, 0xb5, 0xb9, 0xe8, 0x5f, 0x37, 0xd5, 0x67, 0xa6, 0x68, + 0x3f, 0x00, 0x37, 0x82, 0x74, 0x24, 0x17, 0xce, 0x69, 0xe1, 0x52, 0x56, 0x4f, 0xa5, 0x10, 0x82, + 0x56, 0x59, 0x9a, 0x4f, 0x64, 0xcc, 0x99, 0x24, 0x90, 0x01, 0xa7, 0x2b, 0xe9, 0x2b, 0x26, 0xfe, + 0x11, 0xd3, 0x5d, 0x00, 0xcb, 0xf3, 0x72, 0xaa, 0x03, 0xb0, 0xa2, 0x55, 0x07, 0x38, 0x1c, 0xfc, + 0x6d, 0xa2, 0x16, 0x70, 0x8b, 0xb3, 0x72, 0x9a, 0x77, 0x16, 0x58, 0x4a, 0x24, 0x71, 0x1f, 0x2b, + 0xf2, 0x02, 0x0b, 0x1c, 0x49, 0xfb, 0x09, 0x58, 0xc4, 0x43, 0xb5, 0xcf, 0x45, 0xa8, 0x46, 0x06, + 0xa1, 0x53, 0xff, 0xfc, 0x69, 0x7b, 0x39, 0xbd, 0xee, 0xd4, 0xfc, 0xa5, 0x12, 0x21, 0xa3, 0xfe, + 0x85, 0xd4, 0x7e, 0x0c, 0x16, 0x62, 0xed, 0xa0, 0x71, 0xfe, 0x6f, 0xaf, 0x78, 0x97, 0x17, 0xd5, + 0x33, 0xfe, 0x9d, 0xf9, 0xb3, 0x6f, 0xcd, 0x8a, 0x9f, 0x6a, 0x9f, 0x56, 0x8f, 0x7f, 0x9e, 0x6e, + 0x5d, 0xb8, 0xc0, 0x06, 0xa8, 0x4d, 0x01, 0x65, 0xb0, 0xed, 0xd3, 0x79, 0xf0, 0x5f, 0x57, 0x52, + 0xfb, 0x83, 0x05, 0x6e, 0x15, 0x2f, 0xda, 0xe6, 0x74, 0x64, 0xd9, 0x92, 0x38, 0x0f, 0x67, 0x55, + 0xe6, 0xaf, 0xea, 0xce, 0xf1, 0x97, 0x1f, 0xef, 0xe7, 0xd6, 0xe1, 0x2a, 0xba, 0xf2, 0x61, 0xa2, + 0xec, 0xca, 0xed, 0x8f, 0x16, 0xa8, 0x95, 0x6d, 0xdc, 0x56, 0x41, 0x64, 0x89, 0xd6, 0x69, 0xcf, + 0xae, 0xcd, 0x01, 0x37, 0x34, 0x60, 0x13, 0xae, 0x17, 0x00, 0x0e, 0xf3, 0x59, 0xfb, 0xc4, 0x02, + 0x37, 0x8b, 0xd6, 0xef, 0x5e, 0x61, 0xe4, 0x15, 0x9d, 0xe3, 0xcd, 0xa6, 0xcb, 0xb1, 0x6e, 0x6b, + 0xac, 0x55, 0xd8, 0x28, 0xc4, 0x4a, 0xe6, 0xec, 0xd7, 0xe0, 0xda, 0xa5, 0x0d, 0x6c, 0x16, 0x45, + 0xfc, 0x26, 0x70, 0xee, 0xff, 0x41, 0x90, 0x85, 0x77, 0x9e, 0x9f, 0x8d, 0x5d, 0xeb, 0x7c, 0xec, + 0x5a, 0xdf, 0xc7, 0xae, 0x75, 0x32, 0x71, 0x2b, 0xe7, 0x13, 0xb7, 0xf2, 0x75, 0xe2, 0x56, 0xde, + 0x20, 0x1a, 0xaa, 0xfd, 0x61, 0xcf, 0x0b, 0x78, 0x64, 0xc0, 0x02, 0xce, 0x68, 0xb2, 0xd8, 0x88, + 0xf2, 0x6d, 0x43, 0x7a, 0x94, 0xb2, 0xaa, 0x51, 0x4c, 0x64, 0x6f, 0x41, 0xff, 0xe7, 0x1e, 0xfd, + 0x0a, 0x00, 0x00, 0xff, 0xff, 0x1f, 0xcc, 0xf9, 0xf2, 0x98, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -499,7 +498,7 @@ func NewMsgClient(cc grpc1.ClientConn) MsgClient { func (c *msgClient) RegisterClockContract(ctx context.Context, in *MsgRegisterClockContract, opts ...grpc.CallOption) (*MsgRegisterClockContractResponse, error) { out := new(MsgRegisterClockContractResponse) - err := c.cc.Invoke(ctx, "/juno.clock.v1.Msg/RegisterClockContract", in, out, opts...) + err := c.cc.Invoke(ctx, "/cyber.clock.v1.Msg/RegisterClockContract", in, out, opts...) if err != nil { return nil, err } @@ -508,7 +507,7 @@ func (c *msgClient) RegisterClockContract(ctx context.Context, in *MsgRegisterCl func (c *msgClient) UnregisterClockContract(ctx context.Context, in *MsgUnregisterClockContract, opts ...grpc.CallOption) (*MsgUnregisterClockContractResponse, error) { out := new(MsgUnregisterClockContractResponse) - err := c.cc.Invoke(ctx, "/juno.clock.v1.Msg/UnregisterClockContract", in, out, opts...) + err := c.cc.Invoke(ctx, "/cyber.clock.v1.Msg/UnregisterClockContract", in, out, opts...) if err != nil { return nil, err } @@ -517,7 +516,7 @@ func (c *msgClient) UnregisterClockContract(ctx context.Context, in *MsgUnregist func (c *msgClient) UnjailClockContract(ctx context.Context, in *MsgUnjailClockContract, opts ...grpc.CallOption) (*MsgUnjailClockContractResponse, error) { out := new(MsgUnjailClockContractResponse) - err := c.cc.Invoke(ctx, "/juno.clock.v1.Msg/UnjailClockContract", in, out, opts...) + err := c.cc.Invoke(ctx, "/cyber.clock.v1.Msg/UnjailClockContract", in, out, opts...) if err != nil { return nil, err } @@ -526,7 +525,7 @@ func (c *msgClient) UnjailClockContract(ctx context.Context, in *MsgUnjailClockC func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) { out := new(MsgUpdateParamsResponse) - err := c.cc.Invoke(ctx, "/juno.clock.v1.Msg/UpdateParams", in, out, opts...) + err := c.cc.Invoke(ctx, "/cyber.clock.v1.Msg/UpdateParams", in, out, opts...) if err != nil { return nil, err } @@ -582,7 +581,7 @@ func _Msg_RegisterClockContract_Handler(srv interface{}, ctx context.Context, de } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/juno.clock.v1.Msg/RegisterClockContract", + FullMethod: "/cyber.clock.v1.Msg/RegisterClockContract", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).RegisterClockContract(ctx, req.(*MsgRegisterClockContract)) @@ -600,7 +599,7 @@ func _Msg_UnregisterClockContract_Handler(srv interface{}, ctx context.Context, } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/juno.clock.v1.Msg/UnregisterClockContract", + FullMethod: "/cyber.clock.v1.Msg/UnregisterClockContract", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UnregisterClockContract(ctx, req.(*MsgUnregisterClockContract)) @@ -618,7 +617,7 @@ func _Msg_UnjailClockContract_Handler(srv interface{}, ctx context.Context, dec } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/juno.clock.v1.Msg/UnjailClockContract", + FullMethod: "/cyber.clock.v1.Msg/UnjailClockContract", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UnjailClockContract(ctx, req.(*MsgUnjailClockContract)) @@ -636,7 +635,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/juno.clock.v1.Msg/UpdateParams", + FullMethod: "/cyber.clock.v1.Msg/UpdateParams", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { return srv.(MsgServer).UpdateParams(ctx, req.(*MsgUpdateParams)) @@ -645,7 +644,7 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in } var _Msg_serviceDesc = grpc.ServiceDesc{ - ServiceName: "juno.clock.v1.Msg", + ServiceName: "cyber.clock.v1.Msg", HandlerType: (*MsgServer)(nil), Methods: []grpc.MethodDesc{ { @@ -666,7 +665,7 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ }, }, Streams: []grpc.StreamDesc{}, - Metadata: "juno/clock/v1/tx.proto", + Metadata: "cyber/clock/v1/tx.proto", } func (m *MsgRegisterClockContract) Marshal() (dAtA []byte, err error) { diff --git a/x/clock/types/tx.pb.gw.go b/x/clock/types/tx.pb.gw.go index 13af0301..1ef2a599 100644 --- a/x/clock/types/tx.pb.gw.go +++ b/x/clock/types/tx.pb.gw.go @@ -1,5 +1,5 @@ // Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: juno/clock/v1/tx.proto +// source: cyber/clock/v1/tx.proto /* Package types is a reverse proxy. @@ -321,11 +321,11 @@ func RegisterMsgHandlerClient(ctx context.Context, mux *runtime.ServeMux, client } var ( - pattern_Msg_RegisterClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"juno", "clock", "v1", "tx", "register"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Msg_RegisterClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"cyber", "clock", "v1", "tx", "register"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Msg_UnregisterClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"juno", "clock", "v1", "tx", "unregister"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Msg_UnregisterClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"cyber", "clock", "v1", "tx", "unregister"}, "", runtime.AssumeColonVerbOpt(false))) - pattern_Msg_UnjailClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"juno", "clock", "v1", "tx", "unjail"}, "", runtime.AssumeColonVerbOpt(false))) + pattern_Msg_UnjailClockContract_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"cyber", "clock", "v1", "tx", "unjail"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( From 4e1bb6b1fb732a73a09a839037d4f7ee92a6cdc9 Mon Sep 17 00:00:00 2001 From: C H Date: Thu, 25 Jul 2024 15:11:56 +0800 Subject: [PATCH 5/8] Updated token factory proto --- Makefile | 2 +- docs/proto/proto-docs.md | 6 +++--- proto/buf.yaml | 2 +- .../{authorityMetadata.proto => authority_metadata.proto} | 2 +- proto/osmosis/tokenfactory/v1beta1/genesis.proto | 2 +- proto/osmosis/tokenfactory/v1beta1/params.proto | 8 +++----- proto/osmosis/tokenfactory/v1beta1/query.proto | 3 +-- proto/osmosis/tokenfactory/v1beta1/tx.proto | 4 ++-- 8 files changed, 13 insertions(+), 16 deletions(-) rename proto/osmosis/tokenfactory/v1beta1/{authorityMetadata.proto => authority_metadata.proto} (92%) mode change 100755 => 100644 mode change 100755 => 100644 proto/osmosis/tokenfactory/v1beta1/params.proto mode change 100755 => 100644 proto/osmosis/tokenfactory/v1beta1/tx.proto diff --git a/Makefile b/Makefile index e954c93d..de5cffea 100644 --- a/Makefile +++ b/Makefile @@ -149,7 +149,7 @@ protoVer=0.13.1 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) -proto-all: proto-format proto-lint proto-gen format +proto-all: proto-format proto-lint proto-gen proto-gen: @echo "Generating Protobuf files" diff --git a/docs/proto/proto-docs.md b/docs/proto/proto-docs.md index 313fe7a6..361b2006 100644 --- a/docs/proto/proto-docs.md +++ b/docs/proto/proto-docs.md @@ -269,7 +269,7 @@ - [Msg](#cyber.resources.v1beta1.Msg) -- [osmosis/tokenfactory/v1beta1/authorityMetadata.proto](#osmosis/tokenfactory/v1beta1/authorityMetadata.proto) +- [osmosis/tokenfactory/v1beta1/authority_metadata.proto](#osmosis/tokenfactory/v1beta1/authority_metadata.proto) - [DenomAuthorityMetadata](#osmosis.tokenfactory.v1beta1.DenomAuthorityMetadata) - [osmosis/tokenfactory/v1beta1/params.proto](#osmosis/tokenfactory/v1beta1/params.proto) @@ -3608,10 +3608,10 @@ Query defines the gRPC query service for the liquidity module. - +

Top

-## osmosis/tokenfactory/v1beta1/authorityMetadata.proto +## osmosis/tokenfactory/v1beta1/authority_metadata.proto diff --git a/proto/buf.yaml b/proto/buf.yaml index 376591de..b1687e02 100644 --- a/proto/buf.yaml +++ b/proto/buf.yaml @@ -17,7 +17,6 @@ breaking: lint: use: - DEFAULT - - FILE_LOWER_SNAKE_CASE except: - UNARY_RPC - COMMENT_FIELD @@ -31,3 +30,4 @@ lint: - RPC_REQUEST_RESPONSE_UNIQUE - COMMENTS - RPC_RESPONSE_STANDARD_NAME + - FIELD_LOWER_SNAKE_CASE diff --git a/proto/osmosis/tokenfactory/v1beta1/authorityMetadata.proto b/proto/osmosis/tokenfactory/v1beta1/authority_metadata.proto old mode 100755 new mode 100644 similarity index 92% rename from proto/osmosis/tokenfactory/v1beta1/authorityMetadata.proto rename to proto/osmosis/tokenfactory/v1beta1/authority_metadata.proto index d1cfb4f4..cfef8f15 --- a/proto/osmosis/tokenfactory/v1beta1/authorityMetadata.proto +++ b/proto/osmosis/tokenfactory/v1beta1/authority_metadata.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package osmosis.tokenfactory.v1beta1; import "gogoproto/gogo.proto"; -import "cosmos/base/v1beta1/coin.proto"; +// import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/CosmosContracts/juno/x/tokenfactory/types"; diff --git a/proto/osmosis/tokenfactory/v1beta1/genesis.proto b/proto/osmosis/tokenfactory/v1beta1/genesis.proto index 57612b9b..18bc09ae 100755 --- a/proto/osmosis/tokenfactory/v1beta1/genesis.proto +++ b/proto/osmosis/tokenfactory/v1beta1/genesis.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package osmosis.tokenfactory.v1beta1; import "gogoproto/gogo.proto"; -import "osmosis/tokenfactory/v1beta1/authorityMetadata.proto"; +import "osmosis/tokenfactory/v1beta1/authority_metadata.proto"; import "osmosis/tokenfactory/v1beta1/params.proto"; option go_package = "github.com/CosmosContracts/juno/x/tokenfactory/types"; diff --git a/proto/osmosis/tokenfactory/v1beta1/params.proto b/proto/osmosis/tokenfactory/v1beta1/params.proto old mode 100755 new mode 100644 index a6c8edc2..87a374f9 --- a/proto/osmosis/tokenfactory/v1beta1/params.proto +++ b/proto/osmosis/tokenfactory/v1beta1/params.proto @@ -2,8 +2,6 @@ syntax = "proto3"; package osmosis.tokenfactory.v1beta1; import "gogoproto/gogo.proto"; -import "osmosis/tokenfactory/v1beta1/authorityMetadata.proto"; -import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; option go_package = "github.com/CosmosContracts/juno/x/tokenfactory/types"; @@ -16,10 +14,10 @@ message Params { (gogoproto.nullable) = false ]; - // if denom_creation_fee is an empty array, then this field is used to add more gas consumption - // to the base cost. + // if denom_creation_fee is an empty array, then this field is used to add + // more gas consumption to the base cost. // https://github.com/CosmWasm/token-factory/issues/11 - uint64 denom_creation_gas_consume = 2 [ + uint64 denom_creation_gas_consume = 2 [ (gogoproto.moretags) = "yaml:\"denom_creation_gas_consume\"", (gogoproto.nullable) = true ]; diff --git a/proto/osmosis/tokenfactory/v1beta1/query.proto b/proto/osmosis/tokenfactory/v1beta1/query.proto index 9491e95c..77e92a46 100755 --- a/proto/osmosis/tokenfactory/v1beta1/query.proto +++ b/proto/osmosis/tokenfactory/v1beta1/query.proto @@ -3,8 +3,7 @@ package osmosis.tokenfactory.v1beta1; import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "osmosis/tokenfactory/v1beta1/authorityMetadata.proto"; +import "osmosis/tokenfactory/v1beta1/authority_metadata.proto"; import "osmosis/tokenfactory/v1beta1/params.proto"; option go_package = "github.com/CosmosContracts/juno/x/tokenfactory/types"; diff --git a/proto/osmosis/tokenfactory/v1beta1/tx.proto b/proto/osmosis/tokenfactory/v1beta1/tx.proto old mode 100755 new mode 100644 index bc4278e8..eb6dbd57 --- a/proto/osmosis/tokenfactory/v1beta1/tx.proto +++ b/proto/osmosis/tokenfactory/v1beta1/tx.proto @@ -124,12 +124,12 @@ message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; // authority is the address of the governance account. - string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // params defines the x/mint parameters to update. // // NOTE: All parameters must be supplied. - Params params = 2 [(gogoproto.nullable) = false]; + Params params = 2 [ (gogoproto.nullable) = false ]; } // MsgUpdateParamsResponse defines the response structure for executing a From 2ebc3ff173ac37b64f966913ee786fd5a27eedeb Mon Sep 17 00:00:00 2001 From: C H Date: Thu, 25 Jul 2024 15:17:00 +0800 Subject: [PATCH 6/8] Updated .gitignore --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d8de0225..12a71b7e 100644 --- a/.gitignore +++ b/.gitignore @@ -56,4 +56,4 @@ contracts # Scripts *.mjs -std_test.wasm \ No newline at end of file +*.wasm \ No newline at end of file From 551aae9124d7a6e51e1e339b7ccfe2e4914df1d1 Mon Sep 17 00:00:00 2001 From: C H Date: Thu, 25 Jul 2024 15:32:02 +0800 Subject: [PATCH 7/8] Updated clock module spec --- x/clock/spec/01_concepts.md | 8 ++++---- x/clock/spec/03_integration.md | 22 ++++++++++++++-------- x/clock/spec/04_clients.md | 16 ++++++++-------- x/clock/spec/README.md | 9 ++++++++- 4 files changed, 34 insertions(+), 21 deletions(-) diff --git a/x/clock/spec/01_concepts.md b/x/clock/spec/01_concepts.md index 8a9ada6f..34192359 100644 --- a/x/clock/spec/01_concepts.md +++ b/x/clock/spec/01_concepts.md @@ -6,14 +6,14 @@ order: 1 ## Clock -The Clock module allows registered contracts to be executed at the end of every block. This allows the smart contract to perform regular and routine actions without the need for external bots. Developers can setup their contract with x/Clock by registering their contract with the module. Once registered, the contract will be executed at the end of every block. If the contract throws an error during execution or exceeds the gas limit defined in the module's parameters, the contract will be jailed and no longer executed. The contract can be unjailed by the contract admin. +The Clock module allows registered contracts to be executed at the start and the end of every block. This allows the smart contract to perform regular and routine actions without the need for external bots. Developers can setup their contract with x/Clock by registering their contract with the module. Once registered, the contract will be executed at the end of every block. If the contract throws an error during execution or exceeds the gas limit defined in the module's parameters, the contract will be jailed and no longer executed. The contract can be unjailed by the contract admin. ## Registering a Contract Register a contract with x/Clock by executing the following transaction: ```bash -junod tx clock register [contract_address] +cyber tx clock register [contract_address] ``` > Note: the sender of this transaction must be the contract admin, if exists, or else the contract creator. @@ -25,7 +25,7 @@ The `contract_address` is the bech32 address of the contract to be executed at t A contract can be unjailed by executing the following transaction: ```bash -junod tx clock unjail [contract_address] +cyber tx clock unjail [contract_address] ``` > Note: the sender of this transaction must be the contract admin, if exists, or else the contract creator. @@ -37,7 +37,7 @@ The `contract_address` is the bech32 address of the contract to be unjailed. Unj A contract can be unregistered by executing the following transaction: ```bash -junod tx clock unregister [contract_address] +cyber tx clock unregister [contract_address] ``` > Note: the sender of this transaction must be the contract admin, if exists, or else the contract creator. diff --git a/x/clock/spec/03_integration.md b/x/clock/spec/03_integration.md index a7031d53..91c4b30b 100644 --- a/x/clock/spec/03_integration.md +++ b/x/clock/spec/03_integration.md @@ -16,14 +16,16 @@ To satisfy the module's requirements, add the following message and entry point // msg.rs #[cw_serde] pub enum SudoMsg { - ClockEndBlock { }, + BeginBlock { }, + EndBlock { }, } // contract.rs #[cfg_attr(not(feature = "library"), entry_point)] pub fn sudo(deps: DepsMut, _env: Env, msg: SudoMsg) -> Result { match msg { - SudoMsg::ClockEndBlock { } => { + SudoMsg::BeginBlock { } => {} + SudoMsg::EndBlock { } => { // TODO: PERFORM LOGIC HERE @@ -42,15 +44,17 @@ In the example below, at the end of every block the `val` Config variable will i ```rust // msg.rs #[cw_serde] -pub enum SudoMsg { - ClockEndBlock { }, +pub enum SudoMsg { + BeginBlock { }, + EndBlock { }, } // contract.rs #[cfg_attr(not(feature = "library"), entry_point)] pub fn sudo(deps: DepsMut, _env: Env, msg: SudoMsg) -> Result { match msg { - SudoMsg::ClockEndBlock { } => { + SudoMsg::BeginBlock { } => {} + SudoMsg::EndBlock { } => { let mut config = CONFIG.load(deps.storage)?; config.val += 1; CONFIG.save(deps.storage, &config)?; @@ -66,15 +70,17 @@ To perform an action occasionally rather than every block, use the `env` variabl ```rust // msg.rs #[cw_serde] -pub enum SudoMsg { - ClockEndBlock { }, +pub enum SudoMsg { + BeginBlock { }, + EndBlock { }, } // contract.rs #[cfg_attr(not(feature = "library"), entry_point)] pub fn sudo(deps: DepsMut, env: Env, msg: SudoMsg) -> Result { match msg { - SudoMsg::ClockEndBlock { } => { + SudoMsg::BeginBlock { } => {} + SudoMsg::EndBlock { } => { // If the block is not divisible by ten, do nothing. if env.block.height % 10 != 0 { return Ok(Response::new()); diff --git a/x/clock/spec/04_clients.md b/x/clock/spec/04_clients.md index 58ec871d..c982f27d 100644 --- a/x/clock/spec/04_clients.md +++ b/x/clock/spec/04_clients.md @@ -11,15 +11,15 @@ The CLI has been updated with new queries and transactions for the `x/clock` mod ### Queries | Command | Subcommand | Arguments | Description | -| :------------------ | :---------- | :----------------- | :---------------------- | -| `junod query clock` | `params` | | Get Clock params | -| `junod query clock` | `contract` | [contract_address] | Get a Clock contract | -| `junod query clock` | `contracts` | | Get all Clock contracts | +|:--------------------| :---------- | :----------------- | :---------------------- | +| `cyber query clock` | `params` | | Get Clock params | +| `cyber query clock` | `contract` | [contract_address] | Get a Clock contract | +| `cyber query clock` | `contracts` | | Get all Clock contracts | ### Transactions | Command | Subcommand | Arguments | Description | -| :--------------- | :----------- | :----------------- | :-------------------------- | -| `junod tx clock` | `register` | [contract_address] | Register a Clock contract | -| `junod tx clock` | `unjail` | [contract_address] | Unjail a Clock contract | -| `junod tx clock` | `unregister` | [contract_address] | Unregister a Clock contract | \ No newline at end of file +|:-----------------| :----------- | :----------------- | :-------------------------- | +| `cyber tx clock` | `register` | [contract_address] | Register a Clock contract | +| `cyber tx clock` | `unjail` | [contract_address] | Unjail a Clock contract | +| `cyber tx clock` | `unregister` | [contract_address] | Unregister a Clock contract | \ No newline at end of file diff --git a/x/clock/spec/README.md b/x/clock/spec/README.md index 735d8ae0..e0d97d50 100644 --- a/x/clock/spec/README.md +++ b/x/clock/spec/README.md @@ -1,8 +1,15 @@ # `clock` +```text +Thanks to Juno and Tgrade teams for the initial development of this module. +This module is based on Juno clock's module implementation with few modifications: +1. Added support for ABCI BeginBlocker +2. TODO: Add support for gas limit for each contract +``` + ## Abstract -This document specifies the internal `x/clock` module of Juno Network. +This document specifies the internal `x/clock` module of cyber-sdk based networks. The `x/clock` module allows specific contracts to be executed at the end of every block. This allows the smart contract to perform actions that may need to happen every block or at set block intervals. From 474a6017df468feed38234ab8b45c807eaa55593 Mon Sep 17 00:00:00 2001 From: C H Date: Thu, 25 Jul 2024 15:32:16 +0800 Subject: [PATCH 8/8] Updated clock module test --- x/clock/types/codec_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x/clock/types/codec_test.go b/x/clock/types/codec_test.go index 120d534d..d603dca1 100644 --- a/x/clock/types/codec_test.go +++ b/x/clock/types/codec_test.go @@ -25,9 +25,9 @@ func (suite *CodecTestSuite) TestRegisterInterfaces() { impls := registry.ListImplementations(sdk.MsgInterfaceProtoName) suite.Require().Equal(4, len(impls)) suite.Require().ElementsMatch([]string{ - "/juno.clock.v1.MsgUpdateParams", - "/juno.clock.v1.MsgRegisterClockContract", - "/juno.clock.v1.MsgUnregisterClockContract", - "/juno.clock.v1.MsgUnjailClockContract", + "/cyber.clock.v1.MsgUpdateParams", + "/cyber.clock.v1.MsgRegisterClockContract", + "/cyber.clock.v1.MsgUnregisterClockContract", + "/cyber.clock.v1.MsgUnjailClockContract", }, impls) }