diff --git a/app/setup_handlers.go b/app/setup_handlers.go index c2bf4ad10..77ffe212b 100644 --- a/app/setup_handlers.go +++ b/app/setup_handlers.go @@ -104,17 +104,11 @@ func setUpgradeHandler(app *ElysApp) { // dedicated x/consensus module. baseapp.MigrateParams(ctx, baseAppLegacySS, &app.ConsensusParamsKeeper) - // FIXME: temporary code to fix usdc/elys pool weights - pool, found := app.AmmKeeper.GetPool(ctx, 3) - if found { - totalWeight := sdk.ZeroInt() - for i := range pool.PoolAssets { - pool.PoolAssets[i].Weight = sdk.NewInt(107374182400) - totalWeight = totalWeight.Add(pool.PoolAssets[i].Weight) - } - pool.TotalWeight = totalWeight - pool.PoolParams.FeeDenom = "ibc/2180E84E20F5679FCC760D8C165B60F42065DEF7F46A72B447CFF1B7DC6C0A65" - app.AmmKeeper.SetPool(ctx, pool) + // set authority value for all time based inflation + for _, item := range app.TokenomicsKeeper.GetAllTimeBasedInflation(ctx) { + // set the gov module address to the authority + item.Authority = authtypes.NewModuleAddress(govtypes.ModuleName).String() + app.TokenomicsKeeper.SetTimeBasedInflation(ctx, item) } return app.mm.RunMigrations(ctx, app.configurator, vm) diff --git a/config.yml b/config.yml index 8db47a0d8..95bc072ef 100644 --- a/config.yml +++ b/config.yml @@ -339,6 +339,7 @@ genesis: - startBlockHeight: 1 endBlockHeight: 6307200 description: 1st Year Inflation + authority: elys10d07y265gmmuvt4z0w9aw880jnsr700j6z2zm3 inflation: lmRewards: 9999999 icsStakingRewards: 9999999 @@ -348,6 +349,7 @@ genesis: - startBlockHeight: 6307201 endBlockHeight: 12614401 description: 2nd Year Inflation + authority: elys10d07y265gmmuvt4z0w9aw880jnsr700j6z2zm3 inflation: lmRewards: 9999999 icsStakingRewards: 9999999 @@ -357,6 +359,7 @@ genesis: - startBlockHeight: 12614402 endBlockHeight: 18921602 description: 3rd Year Inflation + authority: elys10d07y265gmmuvt4z0w9aw880jnsr700j6z2zm3 inflation: lmRewards: 9999999 icsStakingRewards: 9999999 diff --git a/docs/static/openapi.yml b/docs/static/openapi.yml index 0c4ae64af..e45029d16 100644 --- a/docs/static/openapi.yml +++ b/docs/static/openapi.yml @@ -37481,42 +37481,6 @@ paths: format: uint64 tags: - Query - /elys-network/elys/accountedpool/params: - get: - summary: Parameters queries the parameters of the module. - operationId: ElysAccountedpoolParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. - default: - description: An unexpected error response. - schema: - type: object - properties: - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - '@type': - type: string - additionalProperties: {} - tags: - - Query /elys-network/elys/amm/balance/{address}/{denom}: get: summary: Queries a list of Balance items. @@ -82189,9 +82153,6 @@ definitions: type: string total_weight: type: string - elys.accountedpool.Params: - type: object - description: Params defines the parameters for the module. elys.accountedpool.QueryAllAccountedPoolResponse: type: object properties: @@ -82316,13 +82277,6 @@ definitions: type: string total_weight: type: string - elys.accountedpool.QueryParamsResponse: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - description: QueryParamsResponse is response type for the Query/Params RPC method. elys.amm.PoolAsset: type: object properties: diff --git a/x/accountedpool/types/query.pb.gw.go b/x/accountedpool/types/query.pb.gw.go index 6a905111e..09cf12539 100644 --- a/x/accountedpool/types/query.pb.gw.go +++ b/x/accountedpool/types/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join func request_Query_AccountedPool_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { var protoReq QueryGetAccountedPoolRequest @@ -124,12 +126,14 @@ func local_request_Query_AccountedPoolAll_0(ctx context.Context, marshaler runti // 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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// 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_AccountedPool_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 { @@ -137,6 +141,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_AccountedPool_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) @@ -150,6 +155,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_AccountedPoolAll_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 { @@ -157,6 +164,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_AccountedPoolAll_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) diff --git a/x/commitment/types/query.pb.gw.go b/x/commitment/types/query.pb.gw.go index 228e19d02..de5026737 100644 --- a/x/commitment/types/query.pb.gw.go +++ b/x/commitment/types/query.pb.gw.go @@ -20,6 +20,7 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/codes" "google.golang.org/grpc/grpclog" + "google.golang.org/grpc/metadata" "google.golang.org/grpc/status" ) @@ -30,6 +31,7 @@ var _ status.Status var _ = runtime.String var _ = utilities.NewDoubleArray var _ = descriptor.ForMessage +var _ = metadata.Join 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 @@ -106,12 +108,14 @@ func local_request_Query_ShowCommitments_0(ctx context.Context, marshaler runtim // 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 (such as grpc.SendHeader, etc) to stop working. Consider using RegisterQueryHandlerFromEndpoint instead. +// 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_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 { @@ -119,6 +123,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv 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) @@ -132,6 +137,8 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv mux.Handle("GET", pattern_Query_ShowCommitments_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 { @@ -139,6 +146,7 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv return } resp, md, err := local_request_Query_ShowCommitments_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)