From 36af853034eafcc0948c9c953c57d451876f02ab Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 08:53:39 -0500 Subject: [PATCH 01/28] add interface --- feemarket/feemarket.go | 64 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 feemarket/feemarket.go diff --git a/feemarket/feemarket.go b/feemarket/feemarket.go new file mode 100644 index 0000000..c5a0e6f --- /dev/null +++ b/feemarket/feemarket.go @@ -0,0 +1,64 @@ +package feemarket + +import sdk "github.com/cosmos/cosmos-sdk/types" + +type ( + // FeeMarket defines the expected interface each fee market plugin must + // implement to be utilized by the fee market module. + FeeMarket interface { + // ------------------- Fee Market Parameters ------------------- // + + // Init which initializes the fee market (in InitGenesis) + Init(ctx sdk.Context) error + + // EndBlockUpdateHandler allows the fee market to be updated + // after every block. This will be added to the EndBlock chain. + EndBlockUpdateHandler(ctx sdk.Context) UpdateHandler + + // EpochUpdateHandler allows the fee market to be updated + // after every given epoch identifier. This maps the epoch + // identifier to the UpdateHandler that should be executed. + EpochUpdateHandler(ctx sdk.Context) map[string]UpdateHandler + + // ------------------- Fee Market Queries ------------------- // + + // GetMinGasPrice retrieves the minimum gas price(s) needed + // to be included in the block for the given transaction + GetMinGasPrice(ctx sdk.Context, tx sdk.Tx) sdk.Coins + + // GetFeeMarketInfo retrieves the fee market's information about + // how to pay for a transaction (min gas price, min tip, + // where the fees are being distributed, etc.). + GetFeeMarketInfo(ctx sdk.Context) map[string]string + + // GetID returns the identifier of the fee market + GetID() string + + // ------------------- Fee Market Extraction ------------------- // + + // FeeAnteHandler will be called in the module AnteHandler, + // this is where the fee market would extract and distribute + // fees from a given transaction + FeeAnteHandler( + ctx sdk.Context, + tx sdk.Tx, + simulate bool, + next sdk.AnteHandler, + ) sdk.AnteHandler + + // FeePostHandler will be called in the module PostHandler + // if PostHandlers are implemented. This is another place + // the fee market might refund users + FeePostHandler( + ctx sdk.Context, + tx sdk.Tx, + simulate, + success bool, + next sdk.PostHandler, + ) sdk.PostHandler + } + + // UpdateHandler is responsible for updating the parameters of the + // fee market plugin. Fees can optionally also be extracted here. + UpdateHandler func(ctx sdk.Context) error +) From f0fa6b1e1bef919fc963ab2d497f5642d70fd997 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 09:24:50 -0500 Subject: [PATCH 02/28] mock --- feemarket/plugins/README.md | 6 ++ feemarket/plugins/mock/ante.go | 1 + feemarket/plugins/mock/feemarket.go | 75 +++++++++++++++++++++ tests/simapp/feemarketd/main.go | 1 + tests/simapp/feemarketd/testappd/root.go | 1 + tests/simapp/feemarketd/testappd/testnet.go | 1 + 6 files changed, 85 insertions(+) create mode 100644 feemarket/plugins/README.md create mode 100644 feemarket/plugins/mock/ante.go create mode 100644 feemarket/plugins/mock/feemarket.go diff --git a/feemarket/plugins/README.md b/feemarket/plugins/README.md new file mode 100644 index 0000000..144f82b --- /dev/null +++ b/feemarket/plugins/README.md @@ -0,0 +1,6 @@ +# FeeMarket Plugins + +This directory contains implementations of the `FeeMarket` interface to be plugged into the `x/feemarket` module. + +Current implementations include: + - [Mock:](./mock/feemarket.go) fee market that can be used for basic testing. DO NOT use in production. \ No newline at end of file diff --git a/feemarket/plugins/mock/ante.go b/feemarket/plugins/mock/ante.go new file mode 100644 index 0000000..f33e02b --- /dev/null +++ b/feemarket/plugins/mock/ante.go @@ -0,0 +1 @@ +package mock diff --git a/feemarket/plugins/mock/feemarket.go b/feemarket/plugins/mock/feemarket.go new file mode 100644 index 0000000..d867377 --- /dev/null +++ b/feemarket/plugins/mock/feemarket.go @@ -0,0 +1,75 @@ +package mock + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/skip-mev/feemarket/feemarket" +) + +var _ feemarket.FeeMarket = FeeMarket{} + +// FeeMarket is a simple mock fee market implmentation that should only be used for testing. +type FeeMarket struct{} + +// Init which initializes the fee market (in InitGenesis) +func (fm FeeMarket) Init(ctx sdk.Context) error { + return nil +} + +// EndBlockUpdateHandler allows the fee market to be updated +// after every block. This will be added to the EndBlock chain. +func (fm FeeMarket) EndBlockUpdateHandler(ctx sdk.Context) feemarket.UpdateHandler { + return nil +} + +// EpochUpdateHandler allows the fee market to be updated +// after every given epoch identifier. This maps the epoch +// identifier to the UpdateHandler that should be executed. +func (fm FeeMarket) EpochUpdateHandler(ctx sdk.Context) map[string]feemarket.UpdateHandler { + return nil +} + +// GetMinGasPrice retrieves the minimum gas price(s) needed +// to be included in the block for the given transaction +func (fm FeeMarket) GetMinGasPrice(ctx sdk.Context, tx sdk.Tx) sdk.Coins { + return sdk.NewCoins() +} + +// GetFeeMarketInfo retrieves the fee market's information about +// how to pay for a transaction (min gas price, min tip, +// where the fees are being distributed, etc.). +func (fm FeeMarket) GetFeeMarketInfo(ctx sdk.Context) map[string]string { + return nil +} + +// GetID returns the identifier of the fee market +func (fm FeeMarket) GetID() string { + return "mock" +} + +// FeeAnteHandler will be called in the module AnteHandler. +// Performs no actions. +func (fm FeeMarket) FeeAnteHandler( + ctx sdk.Context, + tx sdk.Tx, + simulate bool, + next sdk.AnteHandler, +) sdk.AnteHandler { + return func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { + return ctx, nil + } +} + +// FeePostHandler will be called in the module PostHandler +// if PostHandlers are implemented. Performs no actions. +func (fm FeeMarket) FeePostHandler( + ctx sdk.Context, + tx sdk.Tx, + simulate, + success bool, + next sdk.PostHandler, +) sdk.PostHandler { + return func(ctx sdk.Context, tx sdk.Tx, simulate, success bool) (newCtx sdk.Context, err error) { + return ctx, nil + } +} diff --git a/tests/simapp/feemarketd/main.go b/tests/simapp/feemarketd/main.go index e73c607..8036ee7 100644 --- a/tests/simapp/feemarketd/main.go +++ b/tests/simapp/feemarketd/main.go @@ -5,6 +5,7 @@ import ( "cosmossdk.io/log" svrcmd "github.com/cosmos/cosmos-sdk/server/cmd" + "github.com/skip-mev/feemarket/tests/simapp" cmd "github.com/skip-mev/feemarket/tests/simapp/feemarketd/testappd" ) diff --git a/tests/simapp/feemarketd/testappd/root.go b/tests/simapp/feemarketd/testappd/root.go index 42b368b..5e56cb6 100644 --- a/tests/simapp/feemarketd/testappd/root.go +++ b/tests/simapp/feemarketd/testappd/root.go @@ -16,6 +16,7 @@ import ( "cosmossdk.io/depinject" "cosmossdk.io/log" confixcmd "cosmossdk.io/tools/confix/cmd" + "github.com/skip-mev/feemarket/tests/simapp" "github.com/cosmos/cosmos-sdk/client" diff --git a/tests/simapp/feemarketd/testappd/testnet.go b/tests/simapp/feemarketd/testappd/testnet.go index 88391b6..5b1dbc7 100644 --- a/tests/simapp/feemarketd/testappd/testnet.go +++ b/tests/simapp/feemarketd/testappd/testnet.go @@ -33,6 +33,7 @@ import ( "github.com/cosmos/cosmos-sdk/x/genutil" genutiltypes "github.com/cosmos/cosmos-sdk/x/genutil/types" stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types" + "github.com/skip-mev/feemarket/tests/simapp" ) From dbc62d611846c38287852bead2ebf504eaa73bbb Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 10:07:05 -0500 Subject: [PATCH 03/28] md --- feemarket/plugins/README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/feemarket/plugins/README.md b/feemarket/plugins/README.md index 144f82b..0e9c284 100644 --- a/feemarket/plugins/README.md +++ b/feemarket/plugins/README.md @@ -1,6 +1,9 @@ # FeeMarket Plugins -This directory contains implementations of the `FeeMarket` interface to be plugged into the `x/feemarket` module. +This directory contains implementations of the `FeeMarket` interface to be +plugged into the `x/feemarket` module. Current implementations include: - - [Mock:](./mock/feemarket.go) fee market that can be used for basic testing. DO NOT use in production. \ No newline at end of file + + - [Mock:](./mock/feemarket.go) fee market that can be used for basic testing. + DO NOT use in production. \ No newline at end of file From 2bb20f726295339d4c19057914a315d29fef6892 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 10:10:17 -0500 Subject: [PATCH 04/28] md --- feemarket/plugins/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/feemarket/plugins/README.md b/feemarket/plugins/README.md index 0e9c284..8cc754a 100644 --- a/feemarket/plugins/README.md +++ b/feemarket/plugins/README.md @@ -1,9 +1,9 @@ # FeeMarket Plugins -This directory contains implementations of the `FeeMarket` interface to be +This directory contains implementations of the `FeeMarket` interface to be plugged into the `x/feemarket` module. Current implementations include: - - [Mock:](./mock/feemarket.go) fee market that can be used for basic testing. - DO NOT use in production. \ No newline at end of file + - [Mock:](./mock/feemarket.go) fee market that can be used for basic testing. + DO NOT use in production. From f0a006cbd97fd806eafa58c51e6df64e5be2a5d9 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 10:11:20 -0500 Subject: [PATCH 05/28] md --- feemarket/plugins/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/feemarket/plugins/README.md b/feemarket/plugins/README.md index 8cc754a..dd33ebc 100644 --- a/feemarket/plugins/README.md +++ b/feemarket/plugins/README.md @@ -5,5 +5,5 @@ plugged into the `x/feemarket` module. Current implementations include: - - [Mock:](./mock/feemarket.go) fee market that can be used for basic testing. - DO NOT use in production. +- [Mock:](./mock/feemarket.go) fee market that can be used for basic testing. +DO NOT use in production. From c84c9a767b14aa01ac1e0943cbcbef227bb78556 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 10:21:26 -0500 Subject: [PATCH 06/28] lint fix --- feemarket/plugins/mock/feemarket.go | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/feemarket/plugins/mock/feemarket.go b/feemarket/plugins/mock/feemarket.go index d867377..b4cf141 100644 --- a/feemarket/plugins/mock/feemarket.go +++ b/feemarket/plugins/mock/feemarket.go @@ -12,33 +12,33 @@ var _ feemarket.FeeMarket = FeeMarket{} type FeeMarket struct{} // Init which initializes the fee market (in InitGenesis) -func (fm FeeMarket) Init(ctx sdk.Context) error { +func (fm FeeMarket) Init(_ sdk.Context) error { return nil } // EndBlockUpdateHandler allows the fee market to be updated // after every block. This will be added to the EndBlock chain. -func (fm FeeMarket) EndBlockUpdateHandler(ctx sdk.Context) feemarket.UpdateHandler { +func (fm FeeMarket) EndBlockUpdateHandler(_ sdk.Context) feemarket.UpdateHandler { return nil } // EpochUpdateHandler allows the fee market to be updated // after every given epoch identifier. This maps the epoch // identifier to the UpdateHandler that should be executed. -func (fm FeeMarket) EpochUpdateHandler(ctx sdk.Context) map[string]feemarket.UpdateHandler { +func (fm FeeMarket) EpochUpdateHandler(_ sdk.Context) map[string]feemarket.UpdateHandler { return nil } // GetMinGasPrice retrieves the minimum gas price(s) needed // to be included in the block for the given transaction -func (fm FeeMarket) GetMinGasPrice(ctx sdk.Context, tx sdk.Tx) sdk.Coins { +func (fm FeeMarket) GetMinGasPrice(_ sdk.Context, _ sdk.Tx) sdk.Coins { return sdk.NewCoins() } // GetFeeMarketInfo retrieves the fee market's information about // how to pay for a transaction (min gas price, min tip, // where the fees are being distributed, etc.). -func (fm FeeMarket) GetFeeMarketInfo(ctx sdk.Context) map[string]string { +func (fm FeeMarket) GetFeeMarketInfo(_ sdk.Context) map[string]string { return nil } @@ -50,26 +50,26 @@ func (fm FeeMarket) GetID() string { // FeeAnteHandler will be called in the module AnteHandler. // Performs no actions. func (fm FeeMarket) FeeAnteHandler( - ctx sdk.Context, - tx sdk.Tx, - simulate bool, + _ sdk.Context, + _ sdk.Tx, + _ bool, next sdk.AnteHandler, ) sdk.AnteHandler { return func(ctx sdk.Context, tx sdk.Tx, simulate bool) (newCtx sdk.Context, err error) { - return ctx, nil + return next(ctx, tx, simulate) } } // FeePostHandler will be called in the module PostHandler // if PostHandlers are implemented. Performs no actions. func (fm FeeMarket) FeePostHandler( - ctx sdk.Context, - tx sdk.Tx, - simulate, - success bool, + _ sdk.Context, + _ sdk.Tx, + _, + _ bool, next sdk.PostHandler, ) sdk.PostHandler { return func(ctx sdk.Context, tx sdk.Tx, simulate, success bool) (newCtx sdk.Context, err error) { - return ctx, nil + return next(ctx, tx, simulate, success) } } From 0ba663dd4dc046cb0dd1c7baf579651cbc78bbee Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 10:32:05 -0500 Subject: [PATCH 07/28] module --- proto/feemarket/feemarket/module/v1/module.proto | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 proto/feemarket/feemarket/module/v1/module.proto diff --git a/proto/feemarket/feemarket/module/v1/module.proto b/proto/feemarket/feemarket/module/v1/module.proto new file mode 100644 index 0000000..bbf4e8c --- /dev/null +++ b/proto/feemarket/feemarket/module/v1/module.proto @@ -0,0 +1,16 @@ +syntax = "proto3"; + +package feemarket.feemarket.module.v1; + +import "cosmos/app/v1alpha1/module.proto"; + +// Module is the config object of the builder module. +message Module { + option (cosmos.app.v1alpha1.module) = { + go_import : "github.com/skip-mev/feemarket/x/feemarket" + }; + + // Authority defines the custom module authority. If not set, defaults to the + // governance module. + string authority = 1; +} \ No newline at end of file From ff867791cf8356e9a1cb557e708e612a941fb8b6 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 10:38:03 -0500 Subject: [PATCH 08/28] add proto --- proto/feemarket/feemarket/v1/genesis.proto | 23 ++++++++++++++++ proto/feemarket/feemarket/v1/query.proto | 27 +++++++++++++++++++ proto/feemarket/feemarket/v1/tx.proto | 31 ++++++++++++++++++++++ 3 files changed, 81 insertions(+) create mode 100644 proto/feemarket/feemarket/v1/genesis.proto create mode 100644 proto/feemarket/feemarket/v1/query.proto create mode 100644 proto/feemarket/feemarket/v1/tx.proto diff --git a/proto/feemarket/feemarket/v1/genesis.proto b/proto/feemarket/feemarket/v1/genesis.proto new file mode 100644 index 0000000..905feef --- /dev/null +++ b/proto/feemarket/feemarket/v1/genesis.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; +package feemarket.feemarket.v1; + +option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; + +import "gogoproto/gogo.proto"; +import "cosmos_proto/cosmos.proto"; +import "feemarket/feemarket/v1/genesis.proto"; + + +// GenesisState defines the feemarket module's genesis state. +message GenesisState { + // Params are the parameters for the feemarket module. + Params params = 3 [ + (gogoproto.nullable) = false + ]; +} + +// Params defines the parameters for the feemarket module. +message Params { + // Enabled is a flag to enable or disable the feemarket module. + bool enabled = 1; +} \ No newline at end of file diff --git a/proto/feemarket/feemarket/v1/query.proto b/proto/feemarket/feemarket/v1/query.proto new file mode 100644 index 0000000..4de1b94 --- /dev/null +++ b/proto/feemarket/feemarket/v1/query.proto @@ -0,0 +1,27 @@ +syntax = "proto3"; +package feemarket.feemarket.v1; + +option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; + +import "gogoproto/gogo.proto"; +import "google/api/annotations.proto"; +import "feemarket/feemarket/v1/genesis.proto"; + + +// Query Service for the feemarket module. +service Query { + // Params returns the current feemarket module parameters. + rpc Params(ParamsRequest) returns (ParamsResponse) { + option (google.api.http) = { + get: "/feemarket/feemarket/v1/params" + }; + }; +} + +// QueryParamsRequest is the request type for the Query/Params RPC method. +message ParamsRequest {} + +// QueryParamsResponse is the response type for the Query/Params RPC method. +message ParamsResponse { + Params params = 1 [(gogoproto.nullable) = false]; +} \ No newline at end of file diff --git a/proto/feemarket/feemarket/v1/tx.proto b/proto/feemarket/feemarket/v1/tx.proto new file mode 100644 index 0000000..dbaf368 --- /dev/null +++ b/proto/feemarket/feemarket/v1/tx.proto @@ -0,0 +1,31 @@ +syntax = "proto3"; +package feemarket.feemarket.v1; + +import "feemarket/feemarket/v1/genesis.proto"; +import "cosmos_proto/cosmos.proto"; +import "cosmos/msg/v1/msg.proto"; +import "gogoproto/gogo.proto"; + +option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; + +// Message service defines the types of messages supported by the feemarket module. +service Msg { + option (cosmos.msg.v1.service) = true; + + // Params defines a method for updating the feemarket module parameters. + rpc Params(MsgParams) returns (MsgParamsResponse); +} + +// MsgParams defines the Msg/Params request type. It contains the +// new parameters for the feemarket module. +message MsgParams { + option (cosmos.msg.v1.signer) = "from_address"; + + // Params defines the new parameters for the feemarket module. + Params params = 1 [(gogoproto.nullable) = false]; + // Authority defines the authority that is updating the feemarket module parameters. + string authority = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; +} + +// MsgParamsResponse defines the Msg/Params response type. +message MsgParamsResponse {} \ No newline at end of file From 7c5d6585c2f499b0accbed028f9a8f94a6ed91d6 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 11:36:27 -0500 Subject: [PATCH 09/28] fmt --- feemarket/feemarket.go | 64 -- proto/feemarket/feemarket/v1/feemarket.proto | 17 + proto/feemarket/feemarket/v1/genesis.proto | 10 +- proto/feemarket/feemarket/v1/mock.proto | 15 + proto/feemarket/feemarket/v1/query.proto | 7 +- proto/feemarket/feemarket/v1/tx.proto | 8 +- {feemarket => x/feemarket}/plugins/README.md | 2 +- .../feemarket}/plugins/mock/ante.go | 0 .../feemarket}/plugins/mock/feemarket.go | 26 +- x/feemarket/plugins/mock/mock.pb.go | 272 ++++++++ x/feemarket/types/feemarket.go | 71 +++ x/feemarket/types/feemarket.pb.go | 327 ++++++++++ x/feemarket/types/genesis.pb.go | 545 ++++++++++++++++ x/feemarket/types/query.pb.go | 536 ++++++++++++++++ x/feemarket/types/query.pb.gw.go | 153 +++++ x/feemarket/types/tx.pb.go | 593 ++++++++++++++++++ 16 files changed, 2556 insertions(+), 90 deletions(-) delete mode 100644 feemarket/feemarket.go create mode 100644 proto/feemarket/feemarket/v1/feemarket.proto create mode 100644 proto/feemarket/feemarket/v1/mock.proto rename {feemarket => x/feemarket}/plugins/README.md (71%) rename {feemarket => x/feemarket}/plugins/mock/ante.go (100%) rename {feemarket => x/feemarket}/plugins/mock/feemarket.go (68%) create mode 100644 x/feemarket/plugins/mock/mock.pb.go create mode 100644 x/feemarket/types/feemarket.go create mode 100644 x/feemarket/types/feemarket.pb.go create mode 100644 x/feemarket/types/genesis.pb.go create mode 100644 x/feemarket/types/query.pb.go create mode 100644 x/feemarket/types/query.pb.gw.go create mode 100644 x/feemarket/types/tx.pb.go diff --git a/feemarket/feemarket.go b/feemarket/feemarket.go deleted file mode 100644 index c5a0e6f..0000000 --- a/feemarket/feemarket.go +++ /dev/null @@ -1,64 +0,0 @@ -package feemarket - -import sdk "github.com/cosmos/cosmos-sdk/types" - -type ( - // FeeMarket defines the expected interface each fee market plugin must - // implement to be utilized by the fee market module. - FeeMarket interface { - // ------------------- Fee Market Parameters ------------------- // - - // Init which initializes the fee market (in InitGenesis) - Init(ctx sdk.Context) error - - // EndBlockUpdateHandler allows the fee market to be updated - // after every block. This will be added to the EndBlock chain. - EndBlockUpdateHandler(ctx sdk.Context) UpdateHandler - - // EpochUpdateHandler allows the fee market to be updated - // after every given epoch identifier. This maps the epoch - // identifier to the UpdateHandler that should be executed. - EpochUpdateHandler(ctx sdk.Context) map[string]UpdateHandler - - // ------------------- Fee Market Queries ------------------- // - - // GetMinGasPrice retrieves the minimum gas price(s) needed - // to be included in the block for the given transaction - GetMinGasPrice(ctx sdk.Context, tx sdk.Tx) sdk.Coins - - // GetFeeMarketInfo retrieves the fee market's information about - // how to pay for a transaction (min gas price, min tip, - // where the fees are being distributed, etc.). - GetFeeMarketInfo(ctx sdk.Context) map[string]string - - // GetID returns the identifier of the fee market - GetID() string - - // ------------------- Fee Market Extraction ------------------- // - - // FeeAnteHandler will be called in the module AnteHandler, - // this is where the fee market would extract and distribute - // fees from a given transaction - FeeAnteHandler( - ctx sdk.Context, - tx sdk.Tx, - simulate bool, - next sdk.AnteHandler, - ) sdk.AnteHandler - - // FeePostHandler will be called in the module PostHandler - // if PostHandlers are implemented. This is another place - // the fee market might refund users - FeePostHandler( - ctx sdk.Context, - tx sdk.Tx, - simulate, - success bool, - next sdk.PostHandler, - ) sdk.PostHandler - } - - // UpdateHandler is responsible for updating the parameters of the - // fee market plugin. Fees can optionally also be extracted here. - UpdateHandler func(ctx sdk.Context) error -) diff --git a/proto/feemarket/feemarket/v1/feemarket.proto b/proto/feemarket/feemarket/v1/feemarket.proto new file mode 100644 index 0000000..90da355 --- /dev/null +++ b/proto/feemarket/feemarket/v1/feemarket.proto @@ -0,0 +1,17 @@ +syntax = "proto3"; +package feemarket.feemarket.v1; + +option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; + +import "google/protobuf/any.proto"; +import "cosmos_proto/cosmos.proto"; + +// FeeMarket is the fee market implementation to be used by the x/feemarket +// module. +message FeeMarket { + // Implementation is a byte array that must implement + // x/feemarket/types/FeeMarketImplementation + bytes implementation = 1 + [ (cosmos_proto.accepts_interface) = + "feemarket.feemarket.v1.FeeMarketImplementation" ]; +} \ No newline at end of file diff --git a/proto/feemarket/feemarket/v1/genesis.proto b/proto/feemarket/feemarket/v1/genesis.proto index 905feef..462d3fb 100644 --- a/proto/feemarket/feemarket/v1/genesis.proto +++ b/proto/feemarket/feemarket/v1/genesis.proto @@ -5,15 +5,15 @@ option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; -import "feemarket/feemarket/v1/genesis.proto"; - +import "feemarket/feemarket/v1/feemarket.proto"; // GenesisState defines the feemarket module's genesis state. message GenesisState { + // Plugin is the FeeMarket implementation plugged into the feemarket module. + FeeMarket plugin = 1 [ (gogoproto.nullable) = false ]; + // Params are the parameters for the feemarket module. - Params params = 3 [ - (gogoproto.nullable) = false - ]; + Params params = 2 [ (gogoproto.nullable) = false ]; } // Params defines the parameters for the feemarket module. diff --git a/proto/feemarket/feemarket/v1/mock.proto b/proto/feemarket/feemarket/v1/mock.proto new file mode 100644 index 0000000..cc0bf60 --- /dev/null +++ b/proto/feemarket/feemarket/v1/mock.proto @@ -0,0 +1,15 @@ +syntax = "proto3"; +package feemarket.feemarket.v1; + +option go_package = "github.com/skip-mev/feemarket/x/feemarket/plugins/mock"; + +import "cosmos_proto/cosmos.proto"; + +// MockFeeMarket is a message that contains the information about a mock fee +// market implementation. +// +// NOTE: This is an example of a mock fee market. It is not used in production. +message MockFeeMarket { + option (cosmos_proto.implements_interface) = + "feemarket.feemarket.v1.FeeMarketImplementation"; +} \ No newline at end of file diff --git a/proto/feemarket/feemarket/v1/query.proto b/proto/feemarket/feemarket/v1/query.proto index 4de1b94..5e9024f 100644 --- a/proto/feemarket/feemarket/v1/query.proto +++ b/proto/feemarket/feemarket/v1/query.proto @@ -7,13 +7,12 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "feemarket/feemarket/v1/genesis.proto"; - // Query Service for the feemarket module. service Query { // Params returns the current feemarket module parameters. rpc Params(ParamsRequest) returns (ParamsResponse) { option (google.api.http) = { - get: "/feemarket/feemarket/v1/params" + get : "/feemarket/feemarket/v1/params" }; }; } @@ -22,6 +21,4 @@ service Query { message ParamsRequest {} // QueryParamsResponse is the response type for the Query/Params RPC method. -message ParamsResponse { - Params params = 1 [(gogoproto.nullable) = false]; -} \ No newline at end of file +message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } \ No newline at end of file diff --git a/proto/feemarket/feemarket/v1/tx.proto b/proto/feemarket/feemarket/v1/tx.proto index dbaf368..155fb79 100644 --- a/proto/feemarket/feemarket/v1/tx.proto +++ b/proto/feemarket/feemarket/v1/tx.proto @@ -8,7 +8,8 @@ import "gogoproto/gogo.proto"; option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; -// Message service defines the types of messages supported by the feemarket module. +// Message service defines the types of messages supported by the feemarket +// module. service Msg { option (cosmos.msg.v1.service) = true; @@ -22,8 +23,9 @@ message MsgParams { option (cosmos.msg.v1.signer) = "from_address"; // Params defines the new parameters for the feemarket module. - Params params = 1 [(gogoproto.nullable) = false]; - // Authority defines the authority that is updating the feemarket module parameters. + Params params = 1 [ (gogoproto.nullable) = false ]; + // Authority defines the authority that is updating the feemarket module + // parameters. string authority = 2 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; } diff --git a/feemarket/plugins/README.md b/x/feemarket/plugins/README.md similarity index 71% rename from feemarket/plugins/README.md rename to x/feemarket/plugins/README.md index dd33ebc..0e7364d 100644 --- a/feemarket/plugins/README.md +++ b/x/feemarket/plugins/README.md @@ -5,5 +5,5 @@ plugged into the `x/feemarket` module. Current implementations include: -- [Mock:](./mock/feemarket.go) fee market that can be used for basic testing. +- [Mock:](mock/feemarket.go) fee market that can be used for basic testing. DO NOT use in production. diff --git a/feemarket/plugins/mock/ante.go b/x/feemarket/plugins/mock/ante.go similarity index 100% rename from feemarket/plugins/mock/ante.go rename to x/feemarket/plugins/mock/ante.go diff --git a/feemarket/plugins/mock/feemarket.go b/x/feemarket/plugins/mock/feemarket.go similarity index 68% rename from feemarket/plugins/mock/feemarket.go rename to x/feemarket/plugins/mock/feemarket.go index b4cf141..070f000 100644 --- a/feemarket/plugins/mock/feemarket.go +++ b/x/feemarket/plugins/mock/feemarket.go @@ -3,53 +3,55 @@ package mock import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/skip-mev/feemarket/feemarket" + "github.com/skip-mev/feemarket/x/feemarket/types" ) -var _ feemarket.FeeMarket = FeeMarket{} +var _ types.FeeMarketImplementation = &MockFeeMarket{} -// FeeMarket is a simple mock fee market implmentation that should only be used for testing. -type FeeMarket struct{} +// ValidateBasic is a no-op. +func (fm *MockFeeMarket) ValidateBasic() error { + return nil +} // Init which initializes the fee market (in InitGenesis) -func (fm FeeMarket) Init(_ sdk.Context) error { +func (fm *MockFeeMarket) Init(_ sdk.Context) error { return nil } // EndBlockUpdateHandler allows the fee market to be updated // after every block. This will be added to the EndBlock chain. -func (fm FeeMarket) EndBlockUpdateHandler(_ sdk.Context) feemarket.UpdateHandler { +func (fm *MockFeeMarket) EndBlockUpdateHandler(_ sdk.Context) types.UpdateHandler { return nil } // EpochUpdateHandler allows the fee market to be updated // after every given epoch identifier. This maps the epoch // identifier to the UpdateHandler that should be executed. -func (fm FeeMarket) EpochUpdateHandler(_ sdk.Context) map[string]feemarket.UpdateHandler { +func (fm *MockFeeMarket) EpochUpdateHandler(_ sdk.Context) map[string]types.UpdateHandler { return nil } // GetMinGasPrice retrieves the minimum gas price(s) needed // to be included in the block for the given transaction -func (fm FeeMarket) GetMinGasPrice(_ sdk.Context, _ sdk.Tx) sdk.Coins { +func (fm *MockFeeMarket) GetMinGasPrice(_ sdk.Context, _ sdk.Tx) sdk.Coins { return sdk.NewCoins() } // GetFeeMarketInfo retrieves the fee market's information about // how to pay for a transaction (min gas price, min tip, // where the fees are being distributed, etc.). -func (fm FeeMarket) GetFeeMarketInfo(_ sdk.Context) map[string]string { +func (fm *MockFeeMarket) GetFeeMarketInfo(_ sdk.Context) map[string]string { return nil } // GetID returns the identifier of the fee market -func (fm FeeMarket) GetID() string { +func (fm *MockFeeMarket) GetID() string { return "mock" } // FeeAnteHandler will be called in the module AnteHandler. // Performs no actions. -func (fm FeeMarket) FeeAnteHandler( +func (fm *MockFeeMarket) FeeAnteHandler( _ sdk.Context, _ sdk.Tx, _ bool, @@ -62,7 +64,7 @@ func (fm FeeMarket) FeeAnteHandler( // FeePostHandler will be called in the module PostHandler // if PostHandlers are implemented. Performs no actions. -func (fm FeeMarket) FeePostHandler( +func (fm *MockFeeMarket) FeePostHandler( _ sdk.Context, _ sdk.Tx, _, diff --git a/x/feemarket/plugins/mock/mock.pb.go b/x/feemarket/plugins/mock/mock.pb.go new file mode 100644 index 0000000..4d3b5fe --- /dev/null +++ b/x/feemarket/plugins/mock/mock.pb.go @@ -0,0 +1,272 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/v1/mock.proto + +package mock + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/types/tx/amino" + 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 + +// MockFeeMarket is a message that contains the information about a mock fee +// market implementation. +// +// NOTE: This is an example of a mock fee market. It is not used in production. +type MockFeeMarket struct { +} + +func (m *MockFeeMarket) Reset() { *m = MockFeeMarket{} } +func (m *MockFeeMarket) String() string { return proto.CompactTextString(m) } +func (*MockFeeMarket) ProtoMessage() {} +func (*MockFeeMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_6b7e37c7950103c0, []int{0} +} +func (m *MockFeeMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MockFeeMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MockFeeMarket.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 *MockFeeMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_MockFeeMarket.Merge(m, src) +} +func (m *MockFeeMarket) XXX_Size() int { + return m.Size() +} +func (m *MockFeeMarket) XXX_DiscardUnknown() { + xxx_messageInfo_MockFeeMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_MockFeeMarket proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MockFeeMarket)(nil), "feemarket.feemarket.v1.MockFeeMarket") +} + +func init() { proto.RegisterFile("feemarket/feemarket/v1/mock.proto", fileDescriptor_6b7e37c7950103c0) } + +var fileDescriptor_6b7e37c7950103c0 = []byte{ + // 203 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x73, 0xf3, 0x93, 0xb3, 0xf5, + 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x12, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, 0x60, + 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0x28, 0x95, 0x92, 0x4c, 0xce, 0x2f, 0xce, 0xcd, + 0x2f, 0x8e, 0x07, 0xf3, 0xf4, 0x21, 0x1c, 0x88, 0x94, 0x52, 0x26, 0x17, 0xaf, 0x6f, 0x7e, 0x72, + 0xb6, 0x5b, 0x6a, 0xaa, 0x2f, 0xd8, 0x04, 0xab, 0x88, 0x53, 0x5b, 0x74, 0xf5, 0xb0, 0x1b, 0xad, + 0x07, 0x57, 0xe5, 0x99, 0x5b, 0x90, 0x93, 0x9a, 0x9b, 0x9a, 0x57, 0x92, 0x58, 0x92, 0x99, 0x9f, + 0xd7, 0xf5, 0x7c, 0x83, 0x16, 0x56, 0x07, 0xa3, 0x98, 0xec, 0x14, 0x70, 0xe2, 0x91, 0x1c, 0xe3, + 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, + 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x66, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, + 0xb9, 0xfa, 0xc5, 0xd9, 0x99, 0x05, 0xba, 0xb9, 0xa9, 0x65, 0x48, 0xc6, 0x54, 0x20, 0xb1, 0x0b, + 0x72, 0x4a, 0xd3, 0x33, 0xf3, 0x8a, 0xc1, 0x01, 0x91, 0xc4, 0x06, 0xf6, 0x83, 0x31, 0x20, 0x00, + 0x00, 0xff, 0xff, 0xd7, 0x5e, 0xa8, 0x15, 0x2e, 0x01, 0x00, 0x00, +} + +func (m *MockFeeMarket) 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 *MockFeeMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MockFeeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func encodeVarintMock(dAtA []byte, offset int, v uint64) int { + offset -= sovMock(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *MockFeeMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func sovMock(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozMock(x uint64) (n int) { + return sovMock(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *MockFeeMarket) 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 ErrIntOverflowMock + } + 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: MockFeeMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MockFeeMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipMock(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthMock + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipMock(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, ErrIntOverflowMock + } + 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, ErrIntOverflowMock + } + 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, ErrIntOverflowMock + } + 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, ErrInvalidLengthMock + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupMock + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthMock + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthMock = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowMock = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupMock = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/feemarket/types/feemarket.go b/x/feemarket/types/feemarket.go new file mode 100644 index 0000000..0a74ae4 --- /dev/null +++ b/x/feemarket/types/feemarket.go @@ -0,0 +1,71 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/gogoproto/proto" +) + +// FeeMarketImplementation represents the interface of various FeeMarket types implemented +// by other modules or packages. +type FeeMarketImplementation interface { + proto.Message + + // ValidateBasic does a simple validation check that + // doesn't require access to any other information. + ValidateBasic() error + + // ------------------- Fee Market Parameters ------------------- // + + // Init which initializes the fee market (in InitGenesis) + Init(ctx sdk.Context) error + + // EndBlockUpdateHandler allows the fee market to be updated + // after every block. This will be added to the EndBlock chain. + EndBlockUpdateHandler(ctx sdk.Context) UpdateHandler + + // EpochUpdateHandler allows the fee market to be updated + // after every given epoch identifier. This maps the epoch + // identifier to the UpdateHandler that should be executed. + EpochUpdateHandler(ctx sdk.Context) map[string]UpdateHandler + + // ------------------- Fee Market Queries ------------------- // + + // GetMinGasPrice retrieves the minimum gas price(s) needed + // to be included in the block for the given transaction + GetMinGasPrice(ctx sdk.Context, tx sdk.Tx) sdk.Coins + + // GetFeeMarketInfo retrieves the fee market's information about + // how to pay for a transaction (min gas price, min tip, + // where the fees are being distributed, etc.). + GetFeeMarketInfo(ctx sdk.Context) map[string]string + + // GetID returns the identifier of the fee market + GetID() string + + // ------------------- Fee Market Extraction ------------------- // + + // FeeAnteHandler will be called in the module AnteHandler, + // this is where the fee market would extract and distribute + // fees from a given transaction + FeeAnteHandler( + ctx sdk.Context, + tx sdk.Tx, + simulate bool, + next sdk.AnteHandler, + ) sdk.AnteHandler + + // FeePostHandler will be called in the module PostHandler + // if PostHandlers are implemented. This is another place + // the fee market might refund users + FeePostHandler( + ctx sdk.Context, + tx sdk.Tx, + simulate, + success bool, + next sdk.PostHandler, + ) sdk.PostHandler +} + +// UpdateHandler is responsible for updating the parameters of the +// fee market plugin. Fees can optionally also be extracted here. +type UpdateHandler func(ctx sdk.Context) error diff --git a/x/feemarket/types/feemarket.pb.go b/x/feemarket/types/feemarket.pb.go new file mode 100644 index 0000000..b3e9cc2 --- /dev/null +++ b/x/feemarket/types/feemarket.pb.go @@ -0,0 +1,327 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/v1/feemarket.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "github.com/cosmos/cosmos-sdk/codec/types" + 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 + +// FeeMarket is the fee market implementation to be used by the x/feemarket +// module. +type FeeMarket struct { + // Implementation is a byte array that must implement + // x/feemarket/types/FeeMarketImplementation + Implementation []byte `protobuf:"bytes,1,opt,name=implementation,proto3" json:"implementation,omitempty"` +} + +func (m *FeeMarket) Reset() { *m = FeeMarket{} } +func (m *FeeMarket) String() string { return proto.CompactTextString(m) } +func (*FeeMarket) ProtoMessage() {} +func (*FeeMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_515665ad4a4fc434, []int{0} +} +func (m *FeeMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FeeMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FeeMarket.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 *FeeMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_FeeMarket.Merge(m, src) +} +func (m *FeeMarket) XXX_Size() int { + return m.Size() +} +func (m *FeeMarket) XXX_DiscardUnknown() { + xxx_messageInfo_FeeMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_FeeMarket proto.InternalMessageInfo + +func (m *FeeMarket) GetImplementation() []byte { + if m != nil { + return m.Implementation + } + return nil +} + +func init() { + proto.RegisterType((*FeeMarket)(nil), "feemarket.feemarket.v1.FeeMarket") +} + +func init() { + proto.RegisterFile("feemarket/feemarket/v1/feemarket.proto", fileDescriptor_515665ad4a4fc434) +} + +var fileDescriptor_515665ad4a4fc434 = []byte{ + // 207 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0x11, 0x1c, 0xbd, 0x82, 0xa2, 0xfc, + 0x92, 0x7c, 0x21, 0x31, 0x84, 0x00, 0x82, 0x55, 0x66, 0x28, 0x25, 0x99, 0x9e, 0x9f, 0x9f, 0x9e, + 0x93, 0xaa, 0x0f, 0x56, 0x95, 0x54, 0x9a, 0xa6, 0x9f, 0x98, 0x57, 0x09, 0xd1, 0x22, 0x25, 0x99, + 0x9c, 0x5f, 0x9c, 0x9b, 0x5f, 0x1c, 0x0f, 0xe6, 0xe9, 0x43, 0x38, 0x10, 0x29, 0xa5, 0x74, 0x2e, + 0x4e, 0xb7, 0xd4, 0x54, 0x5f, 0xb0, 0x29, 0x42, 0x51, 0x5c, 0x7c, 0x99, 0xb9, 0x05, 0x39, 0xa9, + 0xb9, 0xa9, 0x79, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x4e, + 0x46, 0xa7, 0xb6, 0xe8, 0xea, 0x61, 0xb7, 0x56, 0x0f, 0xae, 0xdb, 0x13, 0x45, 0x67, 0x10, 0x9a, + 0x49, 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, 0x5f, 0x9c, 0x9d, 0x59, 0xa0, 0x9b, 0x9b, + 0x5a, 0x86, 0x14, 0x04, 0x15, 0x48, 0xec, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xd3, + 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x28, 0x7e, 0x40, 0x2f, 0x32, 0x01, 0x00, 0x00, +} + +func (m *FeeMarket) 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 *FeeMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FeeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Implementation) > 0 { + i -= len(m.Implementation) + copy(dAtA[i:], m.Implementation) + i = encodeVarintFeemarket(dAtA, i, uint64(len(m.Implementation))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintFeemarket(dAtA []byte, offset int, v uint64) int { + offset -= sovFeemarket(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *FeeMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Implementation) + if l > 0 { + n += 1 + l + sovFeemarket(uint64(l)) + } + return n +} + +func sovFeemarket(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozFeemarket(x uint64) (n int) { + return sovFeemarket(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *FeeMarket) 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 ErrIntOverflowFeemarket + } + 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: FeeMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FeeMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Implementation", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowFeemarket + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthFeemarket + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthFeemarket + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Implementation = append(m.Implementation[:0], dAtA[iNdEx:postIndex]...) + if m.Implementation == nil { + m.Implementation = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipFeemarket(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthFeemarket + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipFeemarket(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, ErrIntOverflowFeemarket + } + 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, ErrIntOverflowFeemarket + } + 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, ErrIntOverflowFeemarket + } + 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, ErrInvalidLengthFeemarket + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupFeemarket + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthFeemarket + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthFeemarket = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowFeemarket = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupFeemarket = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/feemarket/types/genesis.pb.go b/x/feemarket/types/genesis.pb.go new file mode 100644 index 0000000..41dab0c --- /dev/null +++ b/x/feemarket/types/genesis.pb.go @@ -0,0 +1,545 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/v1/genesis.proto + +package types + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + _ "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 defines the feemarket module's genesis state. +type GenesisState struct { + // Plugin is the FeeMarket implementation plugged into the feemarket module. + Plugin FeeMarket `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin"` + // Params are the parameters for the feemarket module. + Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` +} + +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_2180652c84279298, []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) GetPlugin() FeeMarket { + if m != nil { + return m.Plugin + } + return FeeMarket{} +} + +func (m *GenesisState) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +// Params defines the parameters for the feemarket module. +type Params struct { + // Enabled is a flag to enable or disable the feemarket module. + Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled,omitempty"` +} + +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_2180652c84279298, []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) GetEnabled() bool { + if m != nil { + return m.Enabled + } + return false +} + +func init() { + proto.RegisterType((*GenesisState)(nil), "feemarket.feemarket.v1.GenesisState") + proto.RegisterType((*Params)(nil), "feemarket.feemarket.v1.Params") +} + +func init() { + proto.RegisterFile("feemarket/feemarket/v1/genesis.proto", fileDescriptor_2180652c84279298) +} + +var fileDescriptor_2180652c84279298 = []byte{ + // 259 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0xd3, 0x53, 0xf3, 0x52, 0x8b, + 0x33, 0x8b, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x72, 0x7a, 0x08, 0x56, 0x99, + 0xa1, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x89, 0x3e, 0x88, 0x05, 0x51, 0x2d, 0x25, 0x99, + 0x9c, 0x5f, 0x9c, 0x9b, 0x5f, 0x1c, 0x0f, 0x91, 0x80, 0x70, 0xa0, 0x52, 0x6a, 0x38, 0xac, 0x43, + 0x98, 0x0a, 0x56, 0xa7, 0xd4, 0xcb, 0xc8, 0xc5, 0xe3, 0x0e, 0x71, 0x42, 0x70, 0x49, 0x62, 0x49, + 0xaa, 0x90, 0x3d, 0x17, 0x5b, 0x41, 0x4e, 0x69, 0x7a, 0x66, 0x9e, 0x04, 0xa3, 0x02, 0xa3, 0x06, + 0xb7, 0x91, 0xa2, 0x1e, 0x76, 0x27, 0xe9, 0xb9, 0xa5, 0xa6, 0xfa, 0x82, 0x39, 0x4e, 0x2c, 0x27, + 0xee, 0xc9, 0x33, 0x04, 0x41, 0xb5, 0x09, 0xd9, 0x70, 0xb1, 0x15, 0x24, 0x16, 0x25, 0xe6, 0x16, + 0x4b, 0x30, 0x81, 0x0d, 0x90, 0xc3, 0x65, 0x40, 0x00, 0x58, 0x15, 0x5c, 0x37, 0x98, 0xa7, 0xa4, + 0xc4, 0xc5, 0x06, 0x11, 0x17, 0x92, 0xe0, 0x62, 0x4f, 0xcd, 0x4b, 0x4c, 0xca, 0x49, 0x4d, 0x01, + 0xbb, 0x84, 0x23, 0x08, 0xc6, 0x75, 0xf2, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, + 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, + 0x86, 0x28, 0xfd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xe2, 0xec, + 0xcc, 0x02, 0xdd, 0xdc, 0xd4, 0x32, 0x24, 0xff, 0x57, 0x20, 0xb1, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, + 0x93, 0xd8, 0xc0, 0xa1, 0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x27, 0x07, 0xda, 0xbd, 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] = 0x12 + { + size, err := m.Plugin.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.Enabled { + i-- + if m.Enabled { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + 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.Plugin.Size() + n += 1 + l + sovGenesis(uint64(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.Enabled { + n += 2 + } + 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 Plugin", 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.Plugin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + 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 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 Enabled", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Enabled = bool(v != 0) + 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/feemarket/types/query.pb.go b/x/feemarket/types/query.pb.go new file mode 100644 index 0000000..07a4889 --- /dev/null +++ b/x/feemarket/types/query.pb.go @@ -0,0 +1,536 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/v1/query.proto + +package types + +import ( + context "context" + fmt "fmt" + _ "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 + +// QueryParamsRequest is the request type for the Query/Params RPC method. +type ParamsRequest struct { +} + +func (m *ParamsRequest) Reset() { *m = ParamsRequest{} } +func (m *ParamsRequest) String() string { return proto.CompactTextString(m) } +func (*ParamsRequest) ProtoMessage() {} +func (*ParamsRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_d683b3b0d8494138, []int{0} +} +func (m *ParamsRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ParamsRequest.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 *ParamsRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamsRequest.Merge(m, src) +} +func (m *ParamsRequest) XXX_Size() int { + return m.Size() +} +func (m *ParamsRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ParamsRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamsRequest proto.InternalMessageInfo + +// QueryParamsResponse is the response type for the Query/Params RPC method. +type ParamsResponse struct { + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` +} + +func (m *ParamsResponse) Reset() { *m = ParamsResponse{} } +func (m *ParamsResponse) String() string { return proto.CompactTextString(m) } +func (*ParamsResponse) ProtoMessage() {} +func (*ParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_d683b3b0d8494138, []int{1} +} +func (m *ParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ParamsResponse.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 *ParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ParamsResponse.Merge(m, src) +} +func (m *ParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *ParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ParamsResponse proto.InternalMessageInfo + +func (m *ParamsResponse) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func init() { + proto.RegisterType((*ParamsRequest)(nil), "feemarket.feemarket.v1.ParamsRequest") + proto.RegisterType((*ParamsResponse)(nil), "feemarket.feemarket.v1.ParamsResponse") +} + +func init() { + proto.RegisterFile("feemarket/feemarket/v1/query.proto", fileDescriptor_d683b3b0d8494138) +} + +var fileDescriptor_d683b3b0d8494138 = []byte{ + // 277 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4a, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x0b, 0x4b, 0x53, 0x8b, 0x2a, + 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x32, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, + 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x89, 0x3e, 0x88, 0x05, 0x51, 0x2d, 0x25, 0x93, 0x9e, 0x9f, + 0x9f, 0x9e, 0x93, 0xaa, 0x9f, 0x58, 0x90, 0xa9, 0x9f, 0x98, 0x97, 0x97, 0x5f, 0x92, 0x58, 0x92, + 0x99, 0x9f, 0x57, 0x0c, 0x95, 0x55, 0xc1, 0x61, 0x5f, 0x7a, 0x6a, 0x5e, 0x6a, 0x71, 0x26, 0x54, + 0x95, 0x12, 0x3f, 0x17, 0x6f, 0x40, 0x62, 0x51, 0x62, 0x6e, 0x71, 0x50, 0x6a, 0x61, 0x69, 0x6a, + 0x71, 0x89, 0x92, 0x1f, 0x17, 0x1f, 0x4c, 0xa0, 0xb8, 0x20, 0x3f, 0xaf, 0x38, 0x55, 0xc8, 0x86, + 0x8b, 0xad, 0x00, 0x2c, 0x22, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa7, 0x87, 0xdd, 0x95, + 0x7a, 0x10, 0x7d, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0xf5, 0x18, 0x75, 0x30, 0x72, + 0xb1, 0x06, 0x82, 0xbc, 0x28, 0x54, 0xcf, 0xc5, 0x06, 0x51, 0x21, 0xa4, 0x8a, 0xdf, 0x04, 0xa8, + 0x53, 0xa4, 0xd4, 0x08, 0x29, 0x83, 0x38, 0x50, 0x49, 0xad, 0xe9, 0xf2, 0x93, 0xc9, 0x4c, 0x0a, + 0x42, 0x72, 0xfa, 0x38, 0xbc, 0x0c, 0x71, 0x8a, 0x93, 0xe7, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, + 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe1, 0xb1, 0x1c, 0xc3, 0x85, 0xc7, 0x72, 0x0c, 0x37, + 0x1e, 0xcb, 0x31, 0x44, 0xe9, 0xa7, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7, 0xea, + 0x17, 0x67, 0x67, 0x16, 0xe8, 0xe6, 0xa6, 0x96, 0x21, 0x19, 0x51, 0x81, 0xc4, 0x2e, 0xa9, 0x2c, + 0x48, 0x2d, 0x4e, 0x62, 0x03, 0x87, 0x9e, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x8b, 0x31, 0xbb, + 0xa1, 0xd5, 0x01, 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 { + // Params returns the current feemarket module parameters. + Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) +} + +type queryClient struct { + cc grpc1.ClientConn +} + +func NewQueryClient(cc grpc1.ClientConn) QueryClient { + return &queryClient{cc} +} + +func (c *queryClient) Params(ctx context.Context, in *ParamsRequest, opts ...grpc.CallOption) (*ParamsResponse, error) { + out := new(ParamsResponse) + err := c.cc.Invoke(ctx, "/feemarket.feemarket.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 { + // Params returns the current feemarket module parameters. + Params(context.Context, *ParamsRequest) (*ParamsResponse, error) +} + +// UnimplementedQueryServer can be embedded to have forward compatible implementations. +type UnimplementedQueryServer struct { +} + +func (*UnimplementedQueryServer) Params(ctx context.Context, req *ParamsRequest) (*ParamsResponse, 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_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ParamsRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/feemarket.feemarket.v1.Query/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).Params(ctx, req.(*ParamsRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Query_serviceDesc = grpc.ServiceDesc{ + ServiceName: "feemarket.feemarket.v1.Query", + HandlerType: (*QueryServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Query_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "feemarket/feemarket/v1/query.proto", +} + +func (m *ParamsRequest) 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 *ParamsRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *ParamsResponse) 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 *ParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ParamsResponse) 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 = 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 *ParamsRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *ParamsResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + 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 *ParamsRequest) 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: ParamsRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamsRequest: 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 *ParamsResponse) 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: ParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ParamsResponse: 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 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/feemarket/types/query.pb.gw.go b/x/feemarket/types/query.pb.gw.go new file mode 100644 index 0000000..a0bfb41 --- /dev/null +++ b/x/feemarket/types/query.pb.gw.go @@ -0,0 +1,153 @@ +// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. +// source: feemarket/feemarket/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 + +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 ParamsRequest + 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 ParamsRequest + 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_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_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_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 0, 2, 1, 2, 2}, []string{"feemarket", "v1", "params"}, "", runtime.AssumeColonVerbOpt(false))) +) + +var ( + forward_Query_Params_0 = runtime.ForwardResponseMessage +) diff --git a/x/feemarket/types/tx.pb.go b/x/feemarket/types/tx.pb.go new file mode 100644 index 0000000..d7b97b0 --- /dev/null +++ b/x/feemarket/types/tx.pb.go @@ -0,0 +1,593 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/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/gogoproto/gogoproto" + grpc1 "github.com/cosmos/gogoproto/grpc" + proto "github.com/cosmos/gogoproto/proto" + 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 + +// MsgParams defines the Msg/Params request type. It contains the +// new parameters for the feemarket module. +type MsgParams struct { + // Params defines the new parameters for the feemarket module. + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + // Authority defines the authority that is updating the feemarket module + // parameters. + Authority string `protobuf:"bytes,2,opt,name=authority,proto3" json:"authority,omitempty"` +} + +func (m *MsgParams) Reset() { *m = MsgParams{} } +func (m *MsgParams) String() string { return proto.CompactTextString(m) } +func (*MsgParams) ProtoMessage() {} +func (*MsgParams) Descriptor() ([]byte, []int) { + return fileDescriptor_1bbf67a633e47917, []int{0} +} +func (m *MsgParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgParams.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 *MsgParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgParams.Merge(m, src) +} +func (m *MsgParams) XXX_Size() int { + return m.Size() +} +func (m *MsgParams) XXX_DiscardUnknown() { + xxx_messageInfo_MsgParams.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgParams proto.InternalMessageInfo + +func (m *MsgParams) GetParams() Params { + if m != nil { + return m.Params + } + return Params{} +} + +func (m *MsgParams) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +// MsgParamsResponse defines the Msg/Params response type. +type MsgParamsResponse struct { +} + +func (m *MsgParamsResponse) Reset() { *m = MsgParamsResponse{} } +func (m *MsgParamsResponse) String() string { return proto.CompactTextString(m) } +func (*MsgParamsResponse) ProtoMessage() {} +func (*MsgParamsResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_1bbf67a633e47917, []int{1} +} +func (m *MsgParamsResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgParamsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgParamsResponse.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 *MsgParamsResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgParamsResponse.Merge(m, src) +} +func (m *MsgParamsResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgParamsResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgParamsResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgParamsResponse proto.InternalMessageInfo + +func init() { + proto.RegisterType((*MsgParams)(nil), "feemarket.feemarket.v1.MsgParams") + proto.RegisterType((*MsgParamsResponse)(nil), "feemarket.feemarket.v1.MsgParamsResponse") +} + +func init() { proto.RegisterFile("feemarket/feemarket/v1/tx.proto", fileDescriptor_1bbf67a633e47917) } + +var fileDescriptor_1bbf67a633e47917 = []byte{ + // 325 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x4b, 0x2a, 0xf4, 0x0a, 0x8a, + 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0xc2, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, 0x0a, 0x0e, 0x8d, + 0xe9, 0xa9, 0x79, 0xa9, 0xc5, 0x99, 0xc5, 0x10, 0xdd, 0x52, 0x92, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, + 0xc5, 0xf1, 0x60, 0x9e, 0x3e, 0x84, 0x03, 0x95, 0x12, 0x87, 0xf0, 0xf4, 0x73, 0x8b, 0xd3, 0x41, + 0xfa, 0x72, 0x8b, 0xd3, 0xa1, 0x12, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x10, 0x0d, 0x20, 0x16, 0x44, + 0x54, 0x69, 0x0a, 0x23, 0x17, 0xa7, 0x6f, 0x71, 0x7a, 0x40, 0x62, 0x51, 0x62, 0x6e, 0xb1, 0x90, + 0x0d, 0x17, 0x5b, 0x01, 0x98, 0x25, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa7, 0x87, 0xdd, + 0x99, 0x7a, 0x10, 0xf5, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0xf5, 0x08, 0x99, 0x71, + 0x71, 0x26, 0x96, 0x96, 0x64, 0xe4, 0x17, 0x65, 0x96, 0x54, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x70, + 0x3a, 0x49, 0x5c, 0xda, 0xa2, 0x2b, 0x02, 0x75, 0x9f, 0x63, 0x4a, 0x4a, 0x51, 0x6a, 0x71, 0x71, + 0x70, 0x49, 0x51, 0x66, 0x5e, 0x7a, 0x10, 0x42, 0xa9, 0x95, 0x60, 0xd3, 0xf3, 0x0d, 0x5a, 0x3c, + 0x69, 0x45, 0xf9, 0xb9, 0xf1, 0x89, 0x10, 0x35, 0x4a, 0xc2, 0x5c, 0x82, 0x70, 0x57, 0x05, 0xa5, + 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x1a, 0xa5, 0x70, 0x31, 0xfb, 0x16, 0xa7, 0x0b, 0x85, 0x71, + 0xb1, 0x41, 0x9d, 0xab, 0x88, 0xcb, 0x79, 0x70, 0xbd, 0x52, 0x9a, 0x04, 0x95, 0xc0, 0x8c, 0x97, + 0x62, 0x6d, 0x78, 0xbe, 0x41, 0x8b, 0xd1, 0xc9, 0xf3, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, + 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, + 0xe5, 0x18, 0xa2, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x8b, + 0xb3, 0x33, 0x0b, 0x74, 0x73, 0x53, 0xcb, 0x90, 0x62, 0xa9, 0x02, 0x89, 0x5d, 0x52, 0x59, 0x90, + 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x63, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xdd, 0xc1, + 0x8e, 0x0e, 0x02, 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 { + // Params defines a method for updating the feemarket module parameters. + Params(ctx context.Context, in *MsgParams, opts ...grpc.CallOption) (*MsgParamsResponse, error) +} + +type msgClient struct { + cc grpc1.ClientConn +} + +func NewMsgClient(cc grpc1.ClientConn) MsgClient { + return &msgClient{cc} +} + +func (c *msgClient) Params(ctx context.Context, in *MsgParams, opts ...grpc.CallOption) (*MsgParamsResponse, error) { + out := new(MsgParamsResponse) + err := c.cc.Invoke(ctx, "/feemarket.feemarket.v1.Msg/Params", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// MsgServer is the server API for Msg service. +type MsgServer interface { + // Params defines a method for updating the feemarket module parameters. + Params(context.Context, *MsgParams) (*MsgParamsResponse, error) +} + +// UnimplementedMsgServer can be embedded to have forward compatible implementations. +type UnimplementedMsgServer struct { +} + +func (*UnimplementedMsgServer) Params(ctx context.Context, req *MsgParams) (*MsgParamsResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") +} + +func RegisterMsgServer(s grpc1.Server, srv MsgServer) { + s.RegisterService(&_Msg_serviceDesc, srv) +} + +func _Msg_Params_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgParams) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).Params(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/feemarket.feemarket.v1.Msg/Params", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).Params(ctx, req.(*MsgParams)) + } + return interceptor(ctx, in, info, handler) +} + +var _Msg_serviceDesc = grpc.ServiceDesc{ + ServiceName: "feemarket.feemarket.v1.Msg", + HandlerType: (*MsgServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Params", + Handler: _Msg_Params_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "feemarket/feemarket/v1/tx.proto", +} + +func (m *MsgParams) 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 *MsgParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + 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] = 0x12 + } + { + size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + +func (m *MsgParamsResponse) 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 *MsgParamsResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgParamsResponse) 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 *MsgParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.Params.Size() + n += 1 + l + sovTx(uint64(l)) + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgParamsResponse) 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 *MsgParams) 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: MsgParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgParams: 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 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 + case 2: + 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 + 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 *MsgParamsResponse) 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: MsgParamsResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgParamsResponse: 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") +) From 7ce863c71b3779aed4d1eba88f53558edea127b4 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 11:43:37 -0500 Subject: [PATCH 10/28] move files --- feemarket/feemarket.go | 64 ----------------- feemarket/plugins/README.md | 9 --- feemarket/plugins/mock/ante.go | 1 - x/feemarket/plugins/README.md | 0 .../feemarket}/plugins/mock/feemarket.go | 28 ++++---- x/feemarket/types/feemarket.go | 70 +++++++++++++++++++ 6 files changed, 86 insertions(+), 86 deletions(-) delete mode 100644 feemarket/feemarket.go delete mode 100644 feemarket/plugins/README.md delete mode 100644 feemarket/plugins/mock/ante.go create mode 100644 x/feemarket/plugins/README.md rename {feemarket => x/feemarket}/plugins/mock/feemarket.go (67%) create mode 100644 x/feemarket/types/feemarket.go diff --git a/feemarket/feemarket.go b/feemarket/feemarket.go deleted file mode 100644 index c5a0e6f..0000000 --- a/feemarket/feemarket.go +++ /dev/null @@ -1,64 +0,0 @@ -package feemarket - -import sdk "github.com/cosmos/cosmos-sdk/types" - -type ( - // FeeMarket defines the expected interface each fee market plugin must - // implement to be utilized by the fee market module. - FeeMarket interface { - // ------------------- Fee Market Parameters ------------------- // - - // Init which initializes the fee market (in InitGenesis) - Init(ctx sdk.Context) error - - // EndBlockUpdateHandler allows the fee market to be updated - // after every block. This will be added to the EndBlock chain. - EndBlockUpdateHandler(ctx sdk.Context) UpdateHandler - - // EpochUpdateHandler allows the fee market to be updated - // after every given epoch identifier. This maps the epoch - // identifier to the UpdateHandler that should be executed. - EpochUpdateHandler(ctx sdk.Context) map[string]UpdateHandler - - // ------------------- Fee Market Queries ------------------- // - - // GetMinGasPrice retrieves the minimum gas price(s) needed - // to be included in the block for the given transaction - GetMinGasPrice(ctx sdk.Context, tx sdk.Tx) sdk.Coins - - // GetFeeMarketInfo retrieves the fee market's information about - // how to pay for a transaction (min gas price, min tip, - // where the fees are being distributed, etc.). - GetFeeMarketInfo(ctx sdk.Context) map[string]string - - // GetID returns the identifier of the fee market - GetID() string - - // ------------------- Fee Market Extraction ------------------- // - - // FeeAnteHandler will be called in the module AnteHandler, - // this is where the fee market would extract and distribute - // fees from a given transaction - FeeAnteHandler( - ctx sdk.Context, - tx sdk.Tx, - simulate bool, - next sdk.AnteHandler, - ) sdk.AnteHandler - - // FeePostHandler will be called in the module PostHandler - // if PostHandlers are implemented. This is another place - // the fee market might refund users - FeePostHandler( - ctx sdk.Context, - tx sdk.Tx, - simulate, - success bool, - next sdk.PostHandler, - ) sdk.PostHandler - } - - // UpdateHandler is responsible for updating the parameters of the - // fee market plugin. Fees can optionally also be extracted here. - UpdateHandler func(ctx sdk.Context) error -) diff --git a/feemarket/plugins/README.md b/feemarket/plugins/README.md deleted file mode 100644 index dd33ebc..0000000 --- a/feemarket/plugins/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# FeeMarket Plugins - -This directory contains implementations of the `FeeMarket` interface to be -plugged into the `x/feemarket` module. - -Current implementations include: - -- [Mock:](./mock/feemarket.go) fee market that can be used for basic testing. -DO NOT use in production. diff --git a/feemarket/plugins/mock/ante.go b/feemarket/plugins/mock/ante.go deleted file mode 100644 index f33e02b..0000000 --- a/feemarket/plugins/mock/ante.go +++ /dev/null @@ -1 +0,0 @@ -package mock diff --git a/x/feemarket/plugins/README.md b/x/feemarket/plugins/README.md new file mode 100644 index 0000000..e69de29 diff --git a/feemarket/plugins/mock/feemarket.go b/x/feemarket/plugins/mock/feemarket.go similarity index 67% rename from feemarket/plugins/mock/feemarket.go rename to x/feemarket/plugins/mock/feemarket.go index b4cf141..8e8b30b 100644 --- a/feemarket/plugins/mock/feemarket.go +++ b/x/feemarket/plugins/mock/feemarket.go @@ -3,53 +3,57 @@ package mock import ( sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/skip-mev/feemarket/feemarket" + "github.com/skip-mev/feemarket/x/feemarket/types" ) -var _ feemarket.FeeMarket = FeeMarket{} +var _ types.FeeMarketImplementation = &MockFeeMarket{} -// FeeMarket is a simple mock fee market implmentation that should only be used for testing. -type FeeMarket struct{} +type MockFeeMarket struct{} //nolint + +// ValidateBasic is a no-op. +func (fm *MockFeeMarket) ValidateBasic() error { + return nil +} // Init which initializes the fee market (in InitGenesis) -func (fm FeeMarket) Init(_ sdk.Context) error { +func (fm *MockFeeMarket) Init(_ sdk.Context) error { return nil } // EndBlockUpdateHandler allows the fee market to be updated // after every block. This will be added to the EndBlock chain. -func (fm FeeMarket) EndBlockUpdateHandler(_ sdk.Context) feemarket.UpdateHandler { +func (fm *MockFeeMarket) EndBlockUpdateHandler(_ sdk.Context) types.UpdateHandler { return nil } // EpochUpdateHandler allows the fee market to be updated // after every given epoch identifier. This maps the epoch // identifier to the UpdateHandler that should be executed. -func (fm FeeMarket) EpochUpdateHandler(_ sdk.Context) map[string]feemarket.UpdateHandler { +func (fm *MockFeeMarket) EpochUpdateHandler(_ sdk.Context) map[string]types.UpdateHandler { return nil } // GetMinGasPrice retrieves the minimum gas price(s) needed // to be included in the block for the given transaction -func (fm FeeMarket) GetMinGasPrice(_ sdk.Context, _ sdk.Tx) sdk.Coins { +func (fm *MockFeeMarket) GetMinGasPrice(_ sdk.Context, _ sdk.Tx) sdk.Coins { return sdk.NewCoins() } // GetFeeMarketInfo retrieves the fee market's information about // how to pay for a transaction (min gas price, min tip, // where the fees are being distributed, etc.). -func (fm FeeMarket) GetFeeMarketInfo(_ sdk.Context) map[string]string { +func (fm *MockFeeMarket) GetFeeMarketInfo(_ sdk.Context) map[string]string { return nil } // GetID returns the identifier of the fee market -func (fm FeeMarket) GetID() string { +func (fm *MockFeeMarket) GetID() string { return "mock" } // FeeAnteHandler will be called in the module AnteHandler. // Performs no actions. -func (fm FeeMarket) FeeAnteHandler( +func (fm *MockFeeMarket) FeeAnteHandler( _ sdk.Context, _ sdk.Tx, _ bool, @@ -62,7 +66,7 @@ func (fm FeeMarket) FeeAnteHandler( // FeePostHandler will be called in the module PostHandler // if PostHandlers are implemented. Performs no actions. -func (fm FeeMarket) FeePostHandler( +func (fm *MockFeeMarket) FeePostHandler( _ sdk.Context, _ sdk.Tx, _, diff --git a/x/feemarket/types/feemarket.go b/x/feemarket/types/feemarket.go new file mode 100644 index 0000000..f538aaa --- /dev/null +++ b/x/feemarket/types/feemarket.go @@ -0,0 +1,70 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +// FeeMarketImplementation represents the interface of various FeeMarket types implemented +// by other modules or packages. +type FeeMarketImplementation interface { + // proto.Message TODO: add + + // ValidateBasic does a simple validation check that + // doesn't require access to any other information. + ValidateBasic() error + + // ------------------- Fee Market Parameters ------------------- // + + // Init which initializes the fee market (in InitGenesis) + Init(ctx sdk.Context) error + + // EndBlockUpdateHandler allows the fee market to be updated + // after every block. This will be added to the EndBlock chain. + EndBlockUpdateHandler(ctx sdk.Context) UpdateHandler + + // EpochUpdateHandler allows the fee market to be updated + // after every given epoch identifier. This maps the epoch + // identifier to the UpdateHandler that should be executed. + EpochUpdateHandler(ctx sdk.Context) map[string]UpdateHandler + + // ------------------- Fee Market Queries ------------------- // + + // GetMinGasPrice retrieves the minimum gas price(s) needed + // to be included in the block for the given transaction + GetMinGasPrice(ctx sdk.Context, tx sdk.Tx) sdk.Coins + + // GetFeeMarketInfo retrieves the fee market's information about + // how to pay for a transaction (min gas price, min tip, + // where the fees are being distributed, etc.). + GetFeeMarketInfo(ctx sdk.Context) map[string]string + + // GetID returns the identifier of the fee market + GetID() string + + // ------------------- Fee Market Extraction ------------------- // + + // FeeAnteHandler will be called in the module AnteHandler, + // this is where the fee market would extract and distribute + // fees from a given transaction + FeeAnteHandler( + ctx sdk.Context, + tx sdk.Tx, + simulate bool, + next sdk.AnteHandler, + ) sdk.AnteHandler + + // FeePostHandler will be called in the module PostHandler + // if PostHandlers are implemented. This is another place + // the fee market might refund users + FeePostHandler( + ctx sdk.Context, + tx sdk.Tx, + simulate, + success bool, + next sdk.PostHandler, + ) sdk.PostHandler +} + +// UpdateHandler is responsible for updating the parameters of the +// fee market plugin. Fees can optionally also be extracted here. +type UpdateHandler func(ctx sdk.Context) error From 096c238ba90009df083539b0b904b53cac2201eb Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 11:45:36 -0500 Subject: [PATCH 11/28] proto-cute --- proto/feemarket/feemarket/module/v1/module.proto | 2 +- proto/feemarket/feemarket/v1/feemarket.proto | 2 +- proto/feemarket/feemarket/v1/genesis.proto | 2 +- proto/feemarket/feemarket/v1/mock.proto | 2 +- proto/feemarket/feemarket/v1/query.proto | 2 +- proto/feemarket/feemarket/v1/tx.proto | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/proto/feemarket/feemarket/module/v1/module.proto b/proto/feemarket/feemarket/module/v1/module.proto index bbf4e8c..9bddd03 100644 --- a/proto/feemarket/feemarket/module/v1/module.proto +++ b/proto/feemarket/feemarket/module/v1/module.proto @@ -13,4 +13,4 @@ message Module { // Authority defines the custom module authority. If not set, defaults to the // governance module. string authority = 1; -} \ No newline at end of file +} diff --git a/proto/feemarket/feemarket/v1/feemarket.proto b/proto/feemarket/feemarket/v1/feemarket.proto index 90da355..a00a805 100644 --- a/proto/feemarket/feemarket/v1/feemarket.proto +++ b/proto/feemarket/feemarket/v1/feemarket.proto @@ -14,4 +14,4 @@ message FeeMarket { bytes implementation = 1 [ (cosmos_proto.accepts_interface) = "feemarket.feemarket.v1.FeeMarketImplementation" ]; -} \ No newline at end of file +} diff --git a/proto/feemarket/feemarket/v1/genesis.proto b/proto/feemarket/feemarket/v1/genesis.proto index 462d3fb..128b9e0 100644 --- a/proto/feemarket/feemarket/v1/genesis.proto +++ b/proto/feemarket/feemarket/v1/genesis.proto @@ -20,4 +20,4 @@ message GenesisState { message Params { // Enabled is a flag to enable or disable the feemarket module. bool enabled = 1; -} \ No newline at end of file +} diff --git a/proto/feemarket/feemarket/v1/mock.proto b/proto/feemarket/feemarket/v1/mock.proto index cc0bf60..442ae74 100644 --- a/proto/feemarket/feemarket/v1/mock.proto +++ b/proto/feemarket/feemarket/v1/mock.proto @@ -12,4 +12,4 @@ import "cosmos_proto/cosmos.proto"; message MockFeeMarket { option (cosmos_proto.implements_interface) = "feemarket.feemarket.v1.FeeMarketImplementation"; -} \ No newline at end of file +} diff --git a/proto/feemarket/feemarket/v1/query.proto b/proto/feemarket/feemarket/v1/query.proto index 5e9024f..5345884 100644 --- a/proto/feemarket/feemarket/v1/query.proto +++ b/proto/feemarket/feemarket/v1/query.proto @@ -21,4 +21,4 @@ service Query { message ParamsRequest {} // QueryParamsResponse is the response type for the Query/Params RPC method. -message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } \ No newline at end of file +message ParamsResponse { Params params = 1 [ (gogoproto.nullable) = false ]; } diff --git a/proto/feemarket/feemarket/v1/tx.proto b/proto/feemarket/feemarket/v1/tx.proto index 155fb79..47ce6e4 100644 --- a/proto/feemarket/feemarket/v1/tx.proto +++ b/proto/feemarket/feemarket/v1/tx.proto @@ -30,4 +30,4 @@ message MsgParams { } // MsgParamsResponse defines the Msg/Params response type. -message MsgParamsResponse {} \ No newline at end of file +message MsgParamsResponse {} From ee0b83f9c56174a5dd41048b4d83655070e38a48 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 13:50:18 -0500 Subject: [PATCH 12/28] nit fix --- x/feemarket/plugins/mock/feemarket.go | 30 +++++++++++++++------------ x/feemarket/types/feemarket.go | 18 ++++++++-------- 2 files changed, 26 insertions(+), 22 deletions(-) diff --git a/x/feemarket/plugins/mock/feemarket.go b/x/feemarket/plugins/mock/feemarket.go index 8e8b30b..bf161e4 100644 --- a/x/feemarket/plugins/mock/feemarket.go +++ b/x/feemarket/plugins/mock/feemarket.go @@ -1,6 +1,8 @@ package mock import ( + "encoding/json" + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/skip-mev/feemarket/x/feemarket/types" @@ -20,23 +22,25 @@ func (fm *MockFeeMarket) Init(_ sdk.Context) error { return nil } -// EndBlockUpdateHandler allows the fee market to be updated -// after every block. This will be added to the EndBlock chain. -func (fm *MockFeeMarket) EndBlockUpdateHandler(_ sdk.Context) types.UpdateHandler { - return nil +// Export which exports the fee market (in ExportGenesis) +func (fm *MockFeeMarket) Export(_ sdk.Context) (json.RawMessage, error) { + return nil, nil } -// EpochUpdateHandler allows the fee market to be updated -// after every given epoch identifier. This maps the epoch -// identifier to the UpdateHandler that should be executed. -func (fm *MockFeeMarket) EpochUpdateHandler(_ sdk.Context) map[string]types.UpdateHandler { - return nil +// BeginBlockUpdateHandler allows the fee market to be updated +// after every block. This will be added to the BeginBlock chain. +func (fm *MockFeeMarket) BeginBlockUpdateHandler(_ sdk.Context) types.UpdateHandler { + return func(ctx sdk.Context) error { + return nil + } } -// GetMinGasPrice retrieves the minimum gas price(s) needed -// to be included in the block for the given transaction -func (fm *MockFeeMarket) GetMinGasPrice(_ sdk.Context, _ sdk.Tx) sdk.Coins { - return sdk.NewCoins() +// EndBlockUpdateHandler allows the fee market to be updated +// after every block. This will be added to the EndBlock chain. +func (fm *MockFeeMarket) EndBlockUpdateHandler(_ sdk.Context) types.UpdateHandler { + return func(ctx sdk.Context) error { + return nil + } } // GetFeeMarketInfo retrieves the fee market's information about diff --git a/x/feemarket/types/feemarket.go b/x/feemarket/types/feemarket.go index f538aaa..3876870 100644 --- a/x/feemarket/types/feemarket.go +++ b/x/feemarket/types/feemarket.go @@ -1,6 +1,8 @@ package types import ( + "encoding/json" + sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -18,21 +20,19 @@ type FeeMarketImplementation interface { // Init which initializes the fee market (in InitGenesis) Init(ctx sdk.Context) error + // Export which exports the fee market (in ExportGenesis) + Export(ctx sdk.Context) (json.RawMessage, error) + + // BeginBlockUpdateHandler allows the fee market to be updated + // after every block. This will be added to the BeginBlock chain. + BeginBlockUpdateHandler(ctx sdk.Context) UpdateHandler + // EndBlockUpdateHandler allows the fee market to be updated // after every block. This will be added to the EndBlock chain. EndBlockUpdateHandler(ctx sdk.Context) UpdateHandler - // EpochUpdateHandler allows the fee market to be updated - // after every given epoch identifier. This maps the epoch - // identifier to the UpdateHandler that should be executed. - EpochUpdateHandler(ctx sdk.Context) map[string]UpdateHandler - // ------------------- Fee Market Queries ------------------- // - // GetMinGasPrice retrieves the minimum gas price(s) needed - // to be included in the block for the given transaction - GetMinGasPrice(ctx sdk.Context, tx sdk.Tx) sdk.Coins - // GetFeeMarketInfo retrieves the fee market's information about // how to pay for a transaction (min gas price, min tip, // where the fees are being distributed, etc.). From 589c493722b2e0ab338adb13f8f4ad22f03a1470 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 14:14:47 -0500 Subject: [PATCH 13/28] params --- go.work.sum | 691 ------------------------------------ x/feemarket/types/params.go | 15 + 2 files changed, 15 insertions(+), 691 deletions(-) delete mode 100644 go.work.sum create mode 100644 x/feemarket/types/params.go diff --git a/go.work.sum b/go.work.sum deleted file mode 100644 index 2b22bf4..0000000 --- a/go.work.sum +++ /dev/null @@ -1,691 +0,0 @@ -cloud.google.com/go/accessapproval v1.7.2 h1:W55SFrY6EVlcmmRGUk0rGhuy3j4fn7UtEocib/zADVE= -cloud.google.com/go/accessapproval v1.7.2/go.mod h1:/gShiq9/kK/h8T/eEn1BTzalDvk0mZxJlhfw0p+Xuc0= -cloud.google.com/go/accesscontextmanager v1.8.2 h1:jcOXen2u13aHgOHibUjxyPI+fZzVhElxy2gzJJlOOHg= -cloud.google.com/go/accesscontextmanager v1.8.2/go.mod h1:E6/SCRM30elQJ2PKtFMs2YhfJpZSNcJyejhuzoId4Zk= -cloud.google.com/go/aiplatform v1.51.1 h1:g+y03dll9HnX9U0oBKIqUOI+8VQWT1QJF12VGxkal0Q= -cloud.google.com/go/aiplatform v1.51.1/go.mod h1:kY3nIMAVQOK2XDqDPHaOuD9e+FdMA6OOpfBjsvaFSOo= -cloud.google.com/go/analytics v0.21.4 h1:SScWR8i/M8h7h3lFKtOYcj0r4272aL+KvRRrsu39Vec= -cloud.google.com/go/analytics v0.21.4/go.mod h1:zZgNCxLCy8b2rKKVfC1YkC2vTrpfZmeRCySM3aUbskA= -cloud.google.com/go/apigateway v1.6.2 h1:I46jVrhr2M1JJ1lK7JGn2BvybN44muEh+LSjBQ1l9hw= -cloud.google.com/go/apigateway v1.6.2/go.mod h1:CwMC90nnZElorCW63P2pAYm25AtQrHfuOkbRSHj0bT8= -cloud.google.com/go/apigeeconnect v1.6.2 h1:7LzOTW34EH2julg0MQVt+U9ZdmiCKcg6fef/ugKL2Xo= -cloud.google.com/go/apigeeconnect v1.6.2/go.mod h1:s6O0CgXT9RgAxlq3DLXvG8riw8PYYbU/v25jqP3Dy18= -cloud.google.com/go/apigeeregistry v0.7.2 h1:MESEjKSfz4TvLAzT2KPimDDvhOyQlcq7aFFREG2PRt4= -cloud.google.com/go/apigeeregistry v0.7.2/go.mod h1:9CA2B2+TGsPKtfi3F7/1ncCCsL62NXBRfM6iPoGSM+8= -cloud.google.com/go/appengine v1.8.2 h1:0/OFV0FQKgi0AB4E8NuYN0JY3hJzND4ftRpK7P26uaw= -cloud.google.com/go/appengine v1.8.2/go.mod h1:WMeJV9oZ51pvclqFN2PqHoGnys7rK0rz6s3Mp6yMvDo= -cloud.google.com/go/area120 v0.8.2 h1:h/wMtPPsgFJfMce1b9M24Od8RuKt8CWENwr+X24tBhE= -cloud.google.com/go/area120 v0.8.2/go.mod h1:a5qfo+x77SRLXnCynFWPUZhnZGeSgvQ+Y0v1kSItkh4= -cloud.google.com/go/artifactregistry v1.14.3 h1:Ssv6f+jgfhDdhu43AaHUaSosIYpQ+TPCJNwqYSJT1AE= -cloud.google.com/go/artifactregistry v1.14.3/go.mod h1:A2/E9GXnsyXl7GUvQ/2CjHA+mVRoWAXC0brg2os+kNI= -cloud.google.com/go/asset v1.15.1 h1:+9f5/s/U0AGZSPLTOMcXSZ5NDB5jQ2Szr+WQPgPA8bk= -cloud.google.com/go/asset v1.15.1/go.mod h1:yX/amTvFWRpp5rcFq6XbCxzKT8RJUam1UoboE179jU4= -cloud.google.com/go/assuredworkloads v1.11.2 h1:EbPyk3fC8sTxSIPoFrCR9P1wRTVdXcRxvPqFK8/wdso= -cloud.google.com/go/assuredworkloads v1.11.2/go.mod h1:O1dfr+oZJMlE6mw0Bp0P1KZSlj5SghMBvTpZqIcUAW4= -cloud.google.com/go/automl v1.13.2 h1:kUN4Y6N61AsNdXsdZIug1c+2pTJ5tg9xUA6+yn0Wf8Y= -cloud.google.com/go/automl v1.13.2/go.mod h1:gNY/fUmDEN40sP8amAX3MaXkxcqPIn7F1UIIPZpy4Mg= -cloud.google.com/go/baremetalsolution v1.2.1 h1:uRpZsKiWFDyT1sARZVRKqnOmf2mpRfVas7KMC3/MA4I= -cloud.google.com/go/baremetalsolution v1.2.1/go.mod h1:3qKpKIw12RPXStwQXcbhfxVj1dqQGEvcmA+SX/mUR88= -cloud.google.com/go/batch v1.5.1 h1:+8ZogCLFauglOE5ybTCWscoexD7Z8k4XW27RVTKNEoo= -cloud.google.com/go/batch v1.5.1/go.mod h1:RpBuIYLkQu8+CWDk3dFD/t/jOCGuUpkpX+Y0n1Xccs8= -cloud.google.com/go/beyondcorp v1.0.1 h1:uQpsXwttlV0+AXHdB5qaZl1mz2SsyYV1PKgTR74noaQ= -cloud.google.com/go/beyondcorp v1.0.1/go.mod h1:zl/rWWAFVeV+kx+X2Javly7o1EIQThU4WlkynffL/lk= -cloud.google.com/go/bigquery v1.56.0 h1:LHIc9E7Kw+ftFpQFKzZYBB88IAFz7qONawXXx0F3QBo= -cloud.google.com/go/bigquery v1.56.0/go.mod h1:KDcsploXTEY7XT3fDQzMUZlpQLHzE4itubHrnmhUrZA= -cloud.google.com/go/billing v1.17.2 h1:ozS/MNj6KKz8Reuw7tIG8Ycucq/YpSf3u3XCqrupbcg= -cloud.google.com/go/billing v1.17.2/go.mod h1:u/AdV/3wr3xoRBk5xvUzYMS1IawOAPwQMuHgHMdljDg= -cloud.google.com/go/binaryauthorization v1.7.1 h1:i2S+/G36VA1UG8gdcQLpq5I58/w/RzAnjQ65scKozFg= -cloud.google.com/go/binaryauthorization v1.7.1/go.mod h1:GTAyfRWYgcbsP3NJogpV3yeunbUIjx2T9xVeYovtURE= -cloud.google.com/go/certificatemanager v1.7.2 h1:Xytp8O0/EDh2nVscHhFQpicY9YAT3f3R7D7pv/z29uE= -cloud.google.com/go/certificatemanager v1.7.2/go.mod h1:15SYTDQMd00kdoW0+XY5d9e+JbOPjp24AvF48D8BbcQ= -cloud.google.com/go/channel v1.17.1 h1:+1B+Gj/3SJSLGJZXCp3dWiseMVHoSZ7Xo6Klg1fqM64= -cloud.google.com/go/channel v1.17.1/go.mod h1:xqfzcOZAcP4b/hUDH0GkGg1Sd5to6di1HOJn/pi5uBQ= -cloud.google.com/go/cloudbuild v1.14.1 h1:Tp0ITIlFam7T8K/TyeceITtpw1f8+KxVKwYyiyWDPK8= -cloud.google.com/go/cloudbuild v1.14.1/go.mod h1:K7wGc/3zfvmYWOWwYTgF/d/UVJhS4pu+HAy7PL7mCsU= -cloud.google.com/go/clouddms v1.7.1 h1:LrtqeR2xKV3juG5N7eeUgW+PqdMClOWH2U9PN3EpfFw= -cloud.google.com/go/clouddms v1.7.1/go.mod h1:o4SR8U95+P7gZ/TX+YbJxehOCsM+fe6/brlrFquiszk= -cloud.google.com/go/cloudtasks v1.12.2 h1:IoJI49JClvv2+NYvcABRgTO9y4veAUFlaOTigm+xXqE= -cloud.google.com/go/cloudtasks v1.12.2/go.mod h1:A7nYkjNlW2gUoROg1kvJrQGhJP/38UaWwsnuBDOBVUk= -cloud.google.com/go/contactcenterinsights v1.11.1 h1:dEfCjtdYjS3n8/1HEKbJaOL31l3dEs3q9aeaNsyrJBc= -cloud.google.com/go/contactcenterinsights v1.11.1/go.mod h1:FeNP3Kg8iteKM80lMwSk3zZZKVxr+PGnAId6soKuXwE= -cloud.google.com/go/container v1.26.1 h1:1CXjOL/dZZ2jXX1CYWqlxmXqJbZo8HwQX4DJxLzgQWo= -cloud.google.com/go/container v1.26.1/go.mod h1:5smONjPRUxeEpDG7bMKWfDL4sauswqEtnBK1/KKpR04= -cloud.google.com/go/containeranalysis v0.11.1 h1:PHh4KTcMpCjYgxfV+TzvP24wolTGP9lGbqh9sBNHxjs= -cloud.google.com/go/containeranalysis v0.11.1/go.mod h1:rYlUOM7nem1OJMKwE1SadufX0JP3wnXj844EtZAwWLY= -cloud.google.com/go/datacatalog v1.18.1 h1:xJp9mZrc2HPaoxIz3sP9pCmf/impifweQ/yGG9VBfio= -cloud.google.com/go/datacatalog v1.18.1/go.mod h1:TzAWaz+ON1tkNr4MOcak8EBHX7wIRX/gZKM+yTVsv+A= -cloud.google.com/go/dataflow v0.9.2 h1:cpu2OeNxnYVadAIXETLRS5riz3KUR8ErbTojAQTFJVg= -cloud.google.com/go/dataflow v0.9.2/go.mod h1:vBfdBZ/ejlTaYIGB3zB4T08UshH70vbtZeMD+urnUSo= -cloud.google.com/go/dataform v0.8.2 h1:l155O3DS7pfyR91maS4l92bEjKbkbWie3dpgltZ1Q68= -cloud.google.com/go/dataform v0.8.2/go.mod h1:X9RIqDs6NbGPLR80tnYoPNiO1w0wenKTb8PxxlhTMKM= -cloud.google.com/go/datafusion v1.7.2 h1:CIIXp4bbwck49ZTV/URabJaV48jVB86THyVBWGgeDjw= -cloud.google.com/go/datafusion v1.7.2/go.mod h1:62K2NEC6DRlpNmI43WHMWf9Vg/YvN6QVi8EVwifElI0= -cloud.google.com/go/datalabeling v0.8.2 h1:4N5mbjauemzaatxGOFVpV2i8HiXSUUhyNRBU+dCBHl0= -cloud.google.com/go/datalabeling v0.8.2/go.mod h1:cyDvGHuJWu9U/cLDA7d8sb9a0tWLEletStu2sTmg3BE= -cloud.google.com/go/dataplex v1.10.1 h1:8Irss8sIalm/X8r0Masv5KJRkddcxov3TiW8W96FmC4= -cloud.google.com/go/dataplex v1.10.1/go.mod h1:1MzmBv8FvjYfc7vDdxhnLFNskikkB+3vl475/XdCDhs= -cloud.google.com/go/dataproc/v2 v2.2.1 h1:BPjIIkTCAOHUkMtWKqae55qEku5K09LVbQ46LYt7r1s= -cloud.google.com/go/dataproc/v2 v2.2.1/go.mod h1:QdAJLaBjh+l4PVlVZcmrmhGccosY/omC1qwfQ61Zv/o= -cloud.google.com/go/dataqna v0.8.2 h1:vJ9JVKDgDG7AQMbTD8pdWaogJ4c/yHn0qer+q0nFIaw= -cloud.google.com/go/dataqna v0.8.2/go.mod h1:KNEqgx8TTmUipnQsScOoDpq/VlXVptUqVMZnt30WAPs= -cloud.google.com/go/datastore v1.15.0 h1:0P9WcsQeTWjuD1H14JIY7XQscIPQ4Laje8ti96IC5vg= -cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= -cloud.google.com/go/datastream v1.10.1 h1:XWiXV1hzs8oAd54//wcb1L15Jl7MnZ/cY2B8XCmu0xE= -cloud.google.com/go/datastream v1.10.1/go.mod h1:7ngSYwnw95YFyTd5tOGBxHlOZiL+OtpjheqU7t2/s/c= -cloud.google.com/go/deploy v1.13.1 h1:eV5MdoQJGdac/k7D97SDjD8iLE4jCzL42UCAgG6j0iE= -cloud.google.com/go/deploy v1.13.1/go.mod h1:8jeadyLkH9qu9xgO3hVWw8jVr29N1mnW42gRJT8GY6g= -cloud.google.com/go/dialogflow v1.44.1 h1:Ml/hgEzU3AN0tjNSSv4/QmG1nqwYEsiCySKMkWMqUmI= -cloud.google.com/go/dialogflow v1.44.1/go.mod h1:n/h+/N2ouKOO+rbe/ZnI186xImpqvCVj2DdsWS/0EAk= -cloud.google.com/go/dlp v1.10.2 h1:sWOATigjZOKmA2rVOSjIcKLCtL2ifdawaukx+H9iffk= -cloud.google.com/go/dlp v1.10.2/go.mod h1:ZbdKIhcnyhILgccwVDzkwqybthh7+MplGC3kZVZsIOQ= -cloud.google.com/go/documentai v1.23.2 h1:IAKWBngDFTxABdAH52uAn0osPDemyegyRmf5IQKznHw= -cloud.google.com/go/documentai v1.23.2/go.mod h1:Q/wcRT+qnuXOpjAkvOV4A+IeQl04q2/ReT7SSbytLSo= -cloud.google.com/go/domains v0.9.2 h1:SjpTtaTNRPPajrGiZEtxz9dpElO4PxuDWFvU4JpV1gk= -cloud.google.com/go/domains v0.9.2/go.mod h1:3YvXGYzZG1Temjbk7EyGCuGGiXHJwVNmwIf+E/cUp5I= -cloud.google.com/go/edgecontainer v1.1.2 h1:B+Acb/0frXUxc60i6lC0JtXrBFAKoS7ZELmet9+ySo8= -cloud.google.com/go/edgecontainer v1.1.2/go.mod h1:wQRjIzqxEs9e9wrtle4hQPSR1Y51kqN75dgF7UllZZ4= -cloud.google.com/go/errorreporting v0.3.0 h1:kj1XEWMu8P0qlLhm3FwcaFsUvXChV/OraZwA70trRR0= -cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU= -cloud.google.com/go/essentialcontacts v1.6.3 h1:xrGTLRTzunQk5XhBIkdftuC00B9MUoEXi7Pjgeu1kMM= -cloud.google.com/go/essentialcontacts v1.6.3/go.mod h1:yiPCD7f2TkP82oJEFXFTou8Jl8L6LBRPeBEkTaO0Ggo= -cloud.google.com/go/eventarc v1.13.1 h1:FmEcxG5rX3LaUB2nRjf2Pas5J5TtVrVznaHN5rxYxnQ= -cloud.google.com/go/eventarc v1.13.1/go.mod h1:EqBxmGHFrruIara4FUQ3RHlgfCn7yo1HYsu2Hpt/C3Y= -cloud.google.com/go/filestore v1.7.2 h1:/Nnk5pOoY1Lx6A42hJ2eBYcBfqKvLcnh8fV4egopvY4= -cloud.google.com/go/filestore v1.7.2/go.mod h1:TYOlyJs25f/omgj+vY7/tIG/E7BX369triSPzE4LdgE= -cloud.google.com/go/firestore v1.13.0 h1:/3S4RssUV4GO/kvgJZB+tayjhOfyAHs+KcpJgRVu/Qk= -cloud.google.com/go/firestore v1.13.0/go.mod h1:QojqqOh8IntInDUSTAh0c8ZsPYAr68Ma8c5DWOy8xb8= -cloud.google.com/go/functions v1.15.2 h1:DpT51zU3UMTt64efB4a9hE9B98Kb0fZC3IfaVp7GnkE= -cloud.google.com/go/functions v1.15.2/go.mod h1:CHAjtcR6OU4XF2HuiVeriEdELNcnvRZSk1Q8RMqy4lE= -cloud.google.com/go/gaming v1.6.0 h1:PKggmegChZulPW8yvtziF8P9UOuVFwbvylbEucTNups= -cloud.google.com/go/gkebackup v1.3.2 h1:1fnA934a/0oz7nU22gTzmGYFVi6V13Q/hCkdC99K178= -cloud.google.com/go/gkebackup v1.3.2/go.mod h1:OMZbXzEJloyXMC7gqdSB+EOEQ1AKcpGYvO3s1ec5ixk= -cloud.google.com/go/gkeconnect v0.8.2 h1:AuR3YNK0DgLVrmcc8o4sBrU0dVs/SULSuLh4Gmn1e10= -cloud.google.com/go/gkeconnect v0.8.2/go.mod h1:6nAVhwchBJYgQCXD2pHBFQNiJNyAd/wyxljpaa6ZPrY= -cloud.google.com/go/gkehub v0.14.2 h1:7rddjV52z0RbToFYj1B39R9dsn+6IXgx4DduEH7N25Q= -cloud.google.com/go/gkehub v0.14.2/go.mod h1:iyjYH23XzAxSdhrbmfoQdePnlMj2EWcvnR+tHdBQsCY= -cloud.google.com/go/gkemulticloud v1.0.1 h1:V82LxEvFIGJnebn7BBdOUKcVlNQqBaubbKtLgRicHow= -cloud.google.com/go/gkemulticloud v1.0.1/go.mod h1:AcrGoin6VLKT/fwZEYuqvVominLriQBCKmbjtnbMjG8= -cloud.google.com/go/grafeas v0.2.0 h1:CYjC+xzdPvbV65gi6Dr4YowKcmLo045pm18L0DhdELM= -cloud.google.com/go/gsuiteaddons v1.6.2 h1:vR7E1gR85x0wlbUek3cZYJ67U67GpNrboNCRiF/VSSc= -cloud.google.com/go/gsuiteaddons v1.6.2/go.mod h1:K65m9XSgs8hTF3X9nNTPi8IQueljSdYo9F+Mi+s4MyU= -cloud.google.com/go/iap v1.9.1 h1:J5r6CL6EakRmsMRIm2yV0PF5zfIm4sMQbQfPhSTnRzA= -cloud.google.com/go/iap v1.9.1/go.mod h1:SIAkY7cGMLohLSdBR25BuIxO+I4fXJiL06IBL7cy/5Q= -cloud.google.com/go/ids v1.4.2 h1:KqvR28pAnIss6d2pmGOQ+Fcsi3FOWDVhqdr6QaVvqsI= -cloud.google.com/go/ids v1.4.2/go.mod h1:3vw8DX6YddRu9BncxuzMyWn0g8+ooUjI2gslJ7FH3vk= -cloud.google.com/go/iot v1.7.2 h1:qFNv3teWkONIPmuY2mzodEnHb6E67ch2OZ6216ycUiU= -cloud.google.com/go/iot v1.7.2/go.mod h1:q+0P5zr1wRFpw7/MOgDXrG/HVA+l+cSwdObffkrpnSg= -cloud.google.com/go/kms v1.15.3 h1:RYsbxTRmk91ydKCzekI2YjryO4c5Y2M80Zwcs9/D/cI= -cloud.google.com/go/kms v1.15.3/go.mod h1:AJdXqHxS2GlPyduM99s9iGqi2nwbviBbhV/hdmt4iOQ= -cloud.google.com/go/language v1.11.1 h1:BjU7Ljhh0ZYnZC8jZwiezf1FH75yijJ4raAScseqCns= -cloud.google.com/go/language v1.11.1/go.mod h1:Xyid9MG9WOX3utvDbpX7j3tXDmmDooMyMDqgUVpH17U= -cloud.google.com/go/lifesciences v0.9.2 h1:0naTq5qUWoRt/b5P+SZ/0mun7ZTlhpJZJsUxhCmLv1c= -cloud.google.com/go/lifesciences v0.9.2/go.mod h1:QHEOO4tDzcSAzeJg7s2qwnLM2ji8IRpQl4p6m5Z9yTA= -cloud.google.com/go/logging v1.8.1 h1:26skQWPeYhvIasWKm48+Eq7oUqdcdbwsCVwz5Ys0FvU= -cloud.google.com/go/logging v1.8.1/go.mod h1:TJjR+SimHwuC8MZ9cjByQulAMgni+RkXeI3wwctHJEI= -cloud.google.com/go/longrunning v0.5.2 h1:u+oFqfEwwU7F9dIELigxbe0XVnBAo9wqMuQLA50CZ5k= -cloud.google.com/go/longrunning v0.5.2/go.mod h1:nqo6DQbNV2pXhGDbDMoN2bWz68MjZUzqv2YttZiveCs= -cloud.google.com/go/managedidentities v1.6.2 h1:QijSmmWHb3EzYQr8SrjWe941ba9G5sTCF5PvhhMM8CM= -cloud.google.com/go/managedidentities v1.6.2/go.mod h1:5c2VG66eCa0WIq6IylRk3TBW83l161zkFvCj28X7jn8= -cloud.google.com/go/maps v1.4.1 h1:/wp8wImC3tHIHOoaQGRA+KyH3as/Dvp+3J/NqJQBiPQ= -cloud.google.com/go/maps v1.4.1/go.mod h1:BxSa0BnW1g2U2gNdbq5zikLlHUuHW0GFWh7sgML2kIY= -cloud.google.com/go/mediatranslation v0.8.2 h1:nyBZbNX1j34H00n+irnQraCogrkRWntQsDoA6s8OfKo= -cloud.google.com/go/mediatranslation v0.8.2/go.mod h1:c9pUaDRLkgHRx3irYE5ZC8tfXGrMYwNZdmDqKMSfFp8= -cloud.google.com/go/memcache v1.10.2 h1:WLJALO3FxuStMiYdSQwiQBDBcs4G8DDwZQmXK+YzAWk= -cloud.google.com/go/memcache v1.10.2/go.mod h1:f9ZzJHLBrmd4BkguIAa/l/Vle6uTHzHokdnzSWOdQ6A= -cloud.google.com/go/metastore v1.13.1 h1:tLemzNMjKY+xdJUDQt9v5+fQqSufTNgKHHQmihG5ay8= -cloud.google.com/go/metastore v1.13.1/go.mod h1:IbF62JLxuZmhItCppcIfzBBfUFq0DIB9HPDoLgWrVOU= -cloud.google.com/go/monitoring v1.16.1 h1:CTklIuUkS5nCricGojPwdkSgPsCTX2HmYTxFDg+UvpU= -cloud.google.com/go/monitoring v1.16.1/go.mod h1:6HsxddR+3y9j+o/cMJH6q/KJ/CBTvM/38L/1m7bTRJ4= -cloud.google.com/go/networkconnectivity v1.14.1 h1:uR+ASueYNodsPCd9wcYEedqjH4+LaCkKqltRBF6CmB4= -cloud.google.com/go/networkconnectivity v1.14.1/go.mod h1:LyGPXR742uQcDxZ/wv4EI0Vu5N6NKJ77ZYVnDe69Zug= -cloud.google.com/go/networkmanagement v1.9.1 h1:ZK6i6FVQNc1t3fecM3hf9Nu6Kr9C95xr+zMVORYd8ak= -cloud.google.com/go/networkmanagement v1.9.1/go.mod h1:CCSYgrQQvW73EJawO2QamemYcOb57LvrDdDU51F0mcI= -cloud.google.com/go/networksecurity v0.9.2 h1:fA73AX//KWaqNKOvuQ00WUD3Z/XMhiMhHSFTEl2Wxec= -cloud.google.com/go/networksecurity v0.9.2/go.mod h1:jG0SeAttWzPMUILEHDUvFYdQTl8L/E/KC8iZDj85lEI= -cloud.google.com/go/notebooks v1.10.1 h1:j/G3r6SPoWzD6CZZrDffZGwgGALvxWwtKJHJ4GF17WA= -cloud.google.com/go/notebooks v1.10.1/go.mod h1:5PdJc2SgAybE76kFQCWrTfJolCOUQXF97e+gteUUA6A= -cloud.google.com/go/optimization v1.5.1 h1:71wTxJz8gRrVEHF4fw18sGynAyNQwatxCJBI3m3Rd4c= -cloud.google.com/go/optimization v1.5.1/go.mod h1:NC0gnUD5MWVAF7XLdoYVPmYYVth93Q6BUzqAq3ZwtV8= -cloud.google.com/go/orchestration v1.8.2 h1:lb+Vphr+x2V9ukHwLjyaXJpbPuPhaKdobQx3UAOeSsQ= -cloud.google.com/go/orchestration v1.8.2/go.mod h1:T1cP+6WyTmh6LSZzeUhvGf0uZVmJyTx7t8z7Vg87+A0= -cloud.google.com/go/orgpolicy v1.11.2 h1:Dnfh5sj3aIAuJzH4Q4rBp6lCJ/IdXRBbwQ0/nQsUySE= -cloud.google.com/go/orgpolicy v1.11.2/go.mod h1:biRDpNwfyytYnmCRWZWxrKF22Nkz9eNVj9zyaBdpm1o= -cloud.google.com/go/osconfig v1.12.2 h1:AjHbw8MgKKaTFAEJWGdOYtMED3wUXKLtvdfP8Uzbuy0= -cloud.google.com/go/osconfig v1.12.2/go.mod h1:eh9GPaMZpI6mEJEuhEjUJmaxvQ3gav+fFEJon1Y8Iw0= -cloud.google.com/go/oslogin v1.11.1 h1:r3JYeLf004krfXhRMDfYKlBdMgDDc2q2PM1bomb5Luw= -cloud.google.com/go/oslogin v1.11.1/go.mod h1:OhD2icArCVNUxKqtK0mcSmKL7lgr0LVlQz+v9s1ujTg= -cloud.google.com/go/phishingprotection v0.8.2 h1:BIv/42ooQXh/jW8BW2cgO0E6yRPbEdvqH3JzKV7BlmI= -cloud.google.com/go/phishingprotection v0.8.2/go.mod h1:LhJ91uyVHEYKSKcMGhOa14zMMWfbEdxG032oT6ECbC8= -cloud.google.com/go/policytroubleshooter v1.9.1 h1:92YSoPZE62QkNM0G6Nl6PICKUyv4aNgsdtWWceJR6ys= -cloud.google.com/go/policytroubleshooter v1.9.1/go.mod h1:MYI8i0bCrL8cW+VHN1PoiBTyNZTstCg2WUw2eVC4c4U= -cloud.google.com/go/privatecatalog v0.9.2 h1:gxL4Kn9IXt3tdIOpDPEDPI/kBBLVzaAX5wq6IbOYi8A= -cloud.google.com/go/privatecatalog v0.9.2/go.mod h1:RMA4ATa8IXfzvjrhhK8J6H4wwcztab+oZph3c6WmtFc= -cloud.google.com/go/pubsub v1.33.0 h1:6SPCPvWav64tj0sVX/+npCBKhUi/UjJehy9op/V3p2g= -cloud.google.com/go/pubsub v1.33.0/go.mod h1:f+w71I33OMyxf9VpMVcZbnG5KSUkCOUHYpFd5U1GdRc= -cloud.google.com/go/pubsublite v1.8.1 h1:pX+idpWMIH30/K7c0epN6V703xpIcMXWRjKJsz0tYGY= -cloud.google.com/go/pubsublite v1.8.1/go.mod h1:fOLdU4f5xldK4RGJrBMm+J7zMWNj/k4PxwEZXy39QS0= -cloud.google.com/go/recaptchaenterprise v1.3.1 h1:u6EznTGzIdsyOsvm+Xkw0aSuKFXQlyjGE9a4exk6iNQ= -cloud.google.com/go/recaptchaenterprise/v2 v2.8.1 h1:06V6+edT20PcrFJfH0TVWMZpZCUpSCADgwGwhkMsGmY= -cloud.google.com/go/recaptchaenterprise/v2 v2.8.1/go.mod h1:JZYZJOeZjgSSTGP4uz7NlQ4/d1w5hGmksVgM0lbEij0= -cloud.google.com/go/recommendationengine v0.8.2 h1:odf0TZXtwoZ5kJaWBlaE9D0AV+WJLLs+/SRSuE4T/ds= -cloud.google.com/go/recommendationengine v0.8.2/go.mod h1:QIybYHPK58qir9CV2ix/re/M//Ty10OxjnnhWdaKS1Y= -cloud.google.com/go/recommender v1.11.1 h1:GI4EBCMTLfC8I8R+e13ZaTAa8ZZ0KRPdS99hGtJYyaU= -cloud.google.com/go/recommender v1.11.1/go.mod h1:sGwFFAyI57v2Hc5LbIj+lTwXipGu9NW015rkaEM5B18= -cloud.google.com/go/redis v1.13.2 h1:2ZtIGspMT65wern2rjX35XPCCJxVKF4J0P1S99bac3k= -cloud.google.com/go/redis v1.13.2/go.mod h1:0Hg7pCMXS9uz02q+LoEVl5dNHUkIQv+C/3L76fandSA= -cloud.google.com/go/resourcemanager v1.9.2 h1:lC3PjJMHLPlZKqLfan6FkEb3X1F8oCRc1ylY7vRHvDQ= -cloud.google.com/go/resourcemanager v1.9.2/go.mod h1:OujkBg1UZg5lX2yIyMo5Vz9O5hf7XQOSV7WxqxxMtQE= -cloud.google.com/go/resourcesettings v1.6.2 h1:feqx2EcLRgtmwNHzeLw5Og4Wcy4vcZxw62b0x/QNu60= -cloud.google.com/go/resourcesettings v1.6.2/go.mod h1:mJIEDd9MobzunWMeniaMp6tzg4I2GvD3TTmPkc8vBXk= -cloud.google.com/go/retail v1.14.2 h1:ed5hWjpOwfsi6E9kj2AFzkz5ScT3aZs7o3MUM0YITUM= -cloud.google.com/go/retail v1.14.2/go.mod h1:W7rrNRChAEChX336QF7bnMxbsjugcOCPU44i5kbLiL8= -cloud.google.com/go/run v1.3.1 h1:xc46W9kxJI2De9hmpqHEBSSLJhP3bSZl86LdlJa5zm8= -cloud.google.com/go/run v1.3.1/go.mod h1:cymddtZOzdwLIAsmS6s+Asl4JoXIDm/K1cpZTxV4Q5s= -cloud.google.com/go/scheduler v1.10.2 h1:lgUd1D84JEgNzzHRlcZEIoQ6Ny10YWe8RNH1knhouNk= -cloud.google.com/go/scheduler v1.10.2/go.mod h1:O3jX6HRH5eKCA3FutMw375XHZJudNIKVonSCHv7ropY= -cloud.google.com/go/secretmanager v1.11.2 h1:52Z78hH8NBWIqbvIG0wi0EoTaAmSx99KIOAmDXIlX0M= -cloud.google.com/go/secretmanager v1.11.2/go.mod h1:MQm4t3deoSub7+WNwiC4/tRYgDBHJgJPvswqQVB1Vss= -cloud.google.com/go/security v1.15.2 h1:VNpdJNfMeHSJZ+647QtzPrvZ6rWChBklLm/NY64RVW8= -cloud.google.com/go/security v1.15.2/go.mod h1:2GVE/v1oixIRHDaClVbHuPcZwAqFM28mXuAKCfMgYIg= -cloud.google.com/go/securitycenter v1.23.1 h1:Epx7Gm9ZRPRiFfwDFplka2zKCS0J3cpm0Et1KwI2tvY= -cloud.google.com/go/securitycenter v1.23.1/go.mod h1:w2HV3Mv/yKhbXKwOCu2i8bCuLtNP1IMHuiYQn4HJq5s= -cloud.google.com/go/servicedirectory v1.11.1 h1:SXhbxsfQJBsUDeo743x5AnVe8ifC7qjXU3bSTT6t/+Q= -cloud.google.com/go/servicedirectory v1.11.1/go.mod h1:tJywXimEWzNzw9FvtNjsQxxJ3/41jseeILgwU/QLrGI= -cloud.google.com/go/shell v1.7.2 h1:zk0Cf2smbFlAdhBQ5tXESZzzmsTfGc31fJfI6a0SVD8= -cloud.google.com/go/shell v1.7.2/go.mod h1:KqRPKwBV0UyLickMn0+BY1qIyE98kKyI216sH/TuHmc= -cloud.google.com/go/spanner v1.50.0 h1:QrJFOpaxCXdXF+GkiruLz642PHxkdj68PbbnLw3O2Zw= -cloud.google.com/go/spanner v1.50.0/go.mod h1:eGj9mQGK8+hkgSVbHNQ06pQ4oS+cyc4tXXd6Dif1KoM= -cloud.google.com/go/speech v1.19.1 h1:z035FMLs98jpnqcP5xZZ6Es+g6utbeVoUH64BaTzTSU= -cloud.google.com/go/speech v1.19.1/go.mod h1:WcuaWz/3hOlzPFOVo9DUsblMIHwxP589y6ZMtaG+iAA= -cloud.google.com/go/storagetransfer v1.10.1 h1:CU03oYLauu7xRV25fFmozHZHA/SokLQlC20Ip/UvFro= -cloud.google.com/go/storagetransfer v1.10.1/go.mod h1:rS7Sy0BtPviWYTTJVWCSV4QrbBitgPeuK4/FKa4IdLs= -cloud.google.com/go/talent v1.6.3 h1:TyJqwhmncdW5CL4rzYSYKJrR9YAe0iNqHtJTnnOaEyM= -cloud.google.com/go/talent v1.6.3/go.mod h1:xoDO97Qd4AK43rGjJvyBHMskiEf3KulgYzcH6YWOVoo= -cloud.google.com/go/texttospeech v1.7.2 h1:Ac53sRkUo8UMSuhyyWRFJvWEaX8vm0EFwwiTAxeVYuU= -cloud.google.com/go/texttospeech v1.7.2/go.mod h1:VYPT6aTOEl3herQjFHYErTlSZJ4vB00Q2ZTmuVgluD4= -cloud.google.com/go/tpu v1.6.2 h1:SAFzyGp6mU37lfLTV0cNQwu7tqH4X8b4RCpQZ1s+mYM= -cloud.google.com/go/tpu v1.6.2/go.mod h1:NXh3NDwt71TsPZdtGWgAG5ThDfGd32X1mJ2cMaRlVgU= -cloud.google.com/go/trace v1.10.2 h1:80Rh4JSqJLfe/xGNrpyO4MQxiFDXcHG1XrsevfmrIRQ= -cloud.google.com/go/trace v1.10.2/go.mod h1:NPXemMi6MToRFcSxRl2uDnu/qAlAQ3oULUphcHGh1vA= -cloud.google.com/go/translate v1.9.1 h1:gNPBVMINs+aZMB8BW+IfrHLLTfdq0t0GMwa31NmOXY4= -cloud.google.com/go/translate v1.9.1/go.mod h1:TWIgDZknq2+JD4iRcojgeDtqGEp154HN/uL6hMvylS8= -cloud.google.com/go/video v1.20.1 h1:yMfxQ4N/fXNDsCKNKw9W+FpdrJPj5CDu+FuAJBmGuoo= -cloud.google.com/go/video v1.20.1/go.mod h1:3gJS+iDprnj8SY6pe0SwLeC5BUW80NjhwX7INWEuWGU= -cloud.google.com/go/videointelligence v1.11.2 h1:vAKuM4YHwZy1W5P7hGJdfXriovqHHUZKhDBq8o4nqfg= -cloud.google.com/go/videointelligence v1.11.2/go.mod h1:ocfIGYtIVmIcWk1DsSGOoDiXca4vaZQII1C85qtoplc= -cloud.google.com/go/vision v1.2.0 h1:/CsSTkbmO9HC8iQpxbK8ATms3OQaX3YQUeTMGCxlaK4= -cloud.google.com/go/vision/v2 v2.7.3 h1:o8iiH4UsI6O8wO2Ax2r88fLG1RzYQIFevUQY7hXPZeM= -cloud.google.com/go/vision/v2 v2.7.3/go.mod h1:V0IcLCY7W+hpMKXK1JYE0LV5llEqVmj+UJChjvA1WsM= -cloud.google.com/go/vmmigration v1.7.2 h1:ObE8VWzL+xkU22IsPEMvPCWArnSQ85dEwR5fzgaOvA4= -cloud.google.com/go/vmmigration v1.7.2/go.mod h1:iA2hVj22sm2LLYXGPT1pB63mXHhrH1m/ruux9TwWLd8= -cloud.google.com/go/vmwareengine v1.0.1 h1:Bj9WECvQk1fkx8IG7gqII3+g1CzhqkPOV84WXvifpFg= -cloud.google.com/go/vmwareengine v1.0.1/go.mod h1:aT3Xsm5sNx0QShk1Jc1B8OddrxAScYLwzVoaiXfdzzk= -cloud.google.com/go/vpcaccess v1.7.2 h1:3qKiWvzK07eIa943mCvkcZB4gimxaQKKGdNoX01ps7A= -cloud.google.com/go/vpcaccess v1.7.2/go.mod h1:mmg/MnRHv+3e8FJUjeSibVFvQF1cCy2MsFaFqxeY1HU= -cloud.google.com/go/webrisk v1.9.2 h1:1NZppagzdGO0hVMJsUhZQ5a3Iu2cNyNObu85VFcvIVA= -cloud.google.com/go/webrisk v1.9.2/go.mod h1:pY9kfDgAqxUpDBOrG4w8deLfhvJmejKB0qd/5uQIPBc= -cloud.google.com/go/websecurityscanner v1.6.2 h1:V7PhbJ2OvpGHINL67RBhpwU3+g4MOoqOeL/sFYrogeE= -cloud.google.com/go/websecurityscanner v1.6.2/go.mod h1:7YgjuU5tun7Eg2kpKgGnDuEOXWIrh8x8lWrJT4zfmas= -cloud.google.com/go/workflows v1.12.1 h1:jvhSfcfAoOt0nILm7aZPJAHdpoe571qrJyc2ZlngaJk= -cloud.google.com/go/workflows v1.12.1/go.mod h1:5A95OhD/edtOhQd/O741NSfIMezNTbCwLM1P1tBRGHM= -dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY= -github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53 h1:sR+/8Yb4slttB4vD+b9btVEnWgL3Q00OBTzVT8B9C0c= -github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno= -github.com/CloudyKit/jet/v6 v6.2.0 h1:EpcZ6SR9n28BUGtNJSvlBqf90IpjeFr36Tizxhn/oME= -github.com/CloudyKit/jet/v6 v6.2.0/go.mod h1:d3ypHeIRNo2+XyqnGA8s+aphtcVpjP5hPwP/Lzo7Ro4= -github.com/DataDog/datadog-go v3.2.0+incompatible h1:qSG2N4FghB1He/r2mFrWKCaL7dXCilEuNEeAn20fdD4= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0 h1:+r1rSv4gvYn0wmRjC8X7IAzX8QezqtFV9m0MUHFJgts= -github.com/GaijinEntertainment/go-exhaustruct/v2 v2.3.0/go.mod h1:b3g59n2Y+T5xmcxJL+UEG2f8cQploZm1mR/v6BW0mU0= -github.com/HdrHistogram/hdrhistogram-go v1.1.2 h1:5IcZpTvzydCQeHzK4Ef/D5rrSqwxob0t8PQPMybUNFM= -github.com/HdrHistogram/hdrhistogram-go v1.1.2/go.mod h1:yDgFjdqOqDEKOvasDdhWNXYg9BVp4O+o5f6V/ehm6Oo= -github.com/Joker/jade v1.1.3 h1:Qbeh12Vq6BxURXT1qZBRHsDxeURB8ztcL6f3EXSGeHk= -github.com/Joker/jade v1.1.3/go.mod h1:T+2WLyt7VH6Lp0TRxQrUYEs64nRc83wkMQrfeIQKduM= -github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible h1:1G1pk05UrOh0NlF1oeaaix1x8XzrfjIDK47TY0Zehcw= -github.com/Masterminds/semver/v3 v3.2.0 h1:3MEsd0SM6jqZojhjLWWeBY+Kcjy9i6MQAeY7YgDP83g= -github.com/Masterminds/semver/v3 v3.2.0/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= -github.com/OpenPeeDeeP/depguard v1.1.1 h1:TSUznLjvp/4IUP+OQ0t/4jF4QUyxIcVX8YnghZdunyA= -github.com/OpenPeeDeeP/depguard v1.1.1/go.mod h1:JtAMzWkmFEzDPyAd+W0NHl1lvpQKTvT9jnRVsohBKpc= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8 h1:wPbRQzjjwFc0ih8puEVAOFGELsn1zoIIYdxvML7mDxA= -github.com/ProtonMail/go-crypto v0.0.0-20230217124315-7d5c6f04bbb8/go.mod h1:I0gYDMZ6Z5GRU7l58bNFSkPTFN6Yl12dsUlAZ8xy98g= -github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06 h1:KkH3I3sJuOLP3TjA/dfr4NAY8bghDwnXiU7cTKxQqo0= -github.com/Shopify/goreferrer v0.0.0-20220729165902-8cddb4f5de06/go.mod h1:7erjKLwalezA0k99cWs5L11HWOAPNjdUZ6RxH1BXbbM= -github.com/Shopify/sarama v1.19.0 h1:9oksLxC6uxVPHPVYUmq6xhr1BOF/hHobWH2UzO67z1s= -github.com/Shopify/toxiproxy v2.1.4+incompatible h1:TKdv8HiTLgE5wdJuEML90aBgNWsokNbMijUGhmcoBJc= -github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794 h1:xlwdaKcTNVW4PtpQb8aKA4Pjy0CdJHEqvFbAnvR5m2g= -github.com/aclements/go-moremath v0.0.0-20210112150236-f10218a38794/go.mod h1:7e+I0LQFUI9AXWxOfsQROs9xPhoJtbsyWcjJqDd4KPY= -github.com/acomagu/bufpipe v1.0.4 h1:e3H4WUzM3npvo5uv95QuJM3cQspFNtFBzvJ2oNjKIDQ= -github.com/acomagu/bufpipe v1.0.4/go.mod h1:mxdxdup/WdsKVreO5GpW4+M/1CE2sMG4jeGJ2sYmHc4= -github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5 h1:rFw4nCn9iMW+Vajsk51NtYIcwSTkXr+JGrMd36kTDJw= -github.com/alecthomas/kingpin/v2 v2.3.2 h1:H0aULhgmSzN8xQ3nX1uxtdlTHYoPLu5AhHxWrKI6ocU= -github.com/alecthomas/kingpin/v2 v2.3.2/go.mod h1:0gyi0zQnjuFk8xrkNKamJoyUo382HRL7ATRpFZCw6tE= -github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 h1:JYp7IbQjafoB+tBA3gMyHYHrpOtNuDiK/uB5uXxq5wM= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 h1:s6gZFSlWYmbqAuRjVTiNNhvNRfY2Wxp9nhfyel4rklc= -github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137/go.mod h1:OMCwj8VM1Kc9e19TLln2VL61YJF0x1XFtfdL4JdbSyE= -github.com/andybalholm/brotli v1.0.5 h1:8uQZIdzKmjc/iuPu7O2ioW48L81FgatrcpfFmiq/cCs= -github.com/andybalholm/brotli v1.0.5/go.mod h1:fO7iG3H7G2nSZ7m0zPUDn85XEX2GTukHGRSepvi9Eig= -github.com/antihax/optional v1.0.0 h1:xK2lYat7ZLaVVcIuj82J8kIro4V6kDe0AUDFboUCwcg= -github.com/apache/thrift v0.13.0 h1:5hryIiq9gtn+MiLVn0wP37kb/uTeRZgN08WoCsAhIhI= -github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e h1:QEF07wC0T1rKkctt1RINW/+RMTVmiwxETico2l3gxJA= -github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6 h1:G1bPvciwNyF7IUmKXNt9Ak3m6u9DE1rF+RmtIkBpVdA= -github.com/armon/go-metrics v0.4.0 h1:yCQqn7dwca4ITXb+CbubHmedzaQYHhNhrEXLYUeEe8Q= -github.com/armon/go-metrics v0.4.0/go.mod h1:E6amYzXo6aW1tqzoZGT755KkbgrJsSdpwZ+3JqfkOG4= -github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310 h1:BUAU3CGlLvorLI26FmByPp2eC2qla6E1Tw+scpcg/to= -github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a h1:pv34s756C4pEXnjgPfGYgdhg/ZdajGhyOvzx8k+23nw= -github.com/aws/aws-lambda-go v1.13.3 h1:SuCy7H3NLyp+1Mrfp+m80jcbi9KYWAs9/BXwppwRDzY= -github.com/aws/aws-sdk-go-v2 v1.9.1 h1:ZbovGV/qo40nrOJ4q8G33AGICzaPI45FHQWJ9650pF4= -github.com/aws/aws-sdk-go-v2 v1.9.1/go.mod h1:cK/D0BBs0b/oWPIcX/Z/obahJK1TT7IPVjy53i/mX/4= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1 h1:w/fPGB0t5rWwA43mux4e9ozFSH5zF1moQemlA131PWc= -github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.8.1/go.mod h1:CM+19rL1+4dFWnOQKwDc7H1KwXTz+h61oUSHyhV0b3o= -github.com/aws/smithy-go v1.8.0 h1:AEwwwXQZtUwP5Mz506FeXXrKBe0jA8gVM+1gEcSRooc= -github.com/aws/smithy-go v1.8.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= -github.com/aymerick/douceur v0.2.0 h1:Mv+mAeH1Q+n9Fr+oyamOlAkUNPWPlA8PPGR0QAaYuPk= -github.com/aymerick/douceur v0.2.0/go.mod h1:wlT5vV2O3h55X9m7iVYN0TBM0NH/MmbLnd30/FjWUq4= -github.com/bufbuild/buf v1.15.1 h1:v7sK2uMEsGX4Z2hvu+xiMheH3C3AKBGfxPBgdUZYDQ8= -github.com/bufbuild/buf v1.15.1/go.mod h1:TQeGKam1QMfHy/xsSnnMpxN3JK5HBb6aNvZj4m52gkE= -github.com/bufbuild/connect-go v1.5.2 h1:G4EZd5gF1U1ZhhbVJXplbuUnfKpBZ5j5izqIwu2g2W8= -github.com/bufbuild/connect-go v1.5.2/go.mod h1:GmMJYR6orFqD0Y6ZgX8pwQ8j9baizDrIQMm1/a6LnHk= -github.com/casbin/casbin/v2 v2.37.0 h1:/poEwPSovi4bTOcP752/CsTQiRz2xycyVKFG7GUhbDw= -github.com/casbin/casbin/v2 v2.37.0/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= -github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= -github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= -github.com/cheggaaa/pb v1.0.27 h1:wIkZHkNfC7R6GI5w7l/PdAdzXzlrbcI3p8OAlnkTsnc= -github.com/chigopher/pathlib v0.12.0 h1:1GM7fN/IwXXmOHbd1jkMqHD2wUhYqUvafgxTwmLT/q8= -github.com/chigopher/pathlib v0.12.0/go.mod h1:EJ5UtJ/sK8Nt6q3VWN+EwZLZ3g0afJiG8NegYiQQ/gQ= -github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible h1:C29Ae4G5GtYyYMm1aztcyj/J5ckgJm2zwdDajFbx1NY= -github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA= -github.com/clbanning/mxj v1.8.4 h1:HuhwZtbyvyOw+3Z1AowPkU87JkJUSv751ELWaiTpj8I= -github.com/clbanning/mxj v1.8.4/go.mod h1:BVjHeAH+rl9rs6f+QIpeRl0tfu10SXn1pUSa5PVGJng= -github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec h1:EdRZT3IeKQmfCSrgo8SZ8V3MEnskuJP0wCYNpe+aiXo= -github.com/cloudflare/circl v1.3.1 h1:4OVCZRL62ijwEwxnF6I7hLwxvIYi3VaZt8TflkqtrtA= -github.com/cloudflare/circl v1.3.1/go.mod h1:+CauBF6R70Jqcyl8N2hC8pAXYbWkGIezuSbuGLtRhnw= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= -github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4 h1:/inchEIKaYC1Akx+H+gqO04wryn5h75LSazbRlnya1k= -github.com/cncf/xds/go v0.0.0-20230607035331-e9ce68804cb4/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2 h1:IKgmqgMQlVJIZj19CdocBeSfSaiCbEBZGKODaixqtHM= -github.com/cockroachdb/sentry-go v0.6.1-cockroachdb.2/go.mod h1:8BT+cPK6xvFOcRlk0R8eg+OTkcqI6baNH4xAkpiYVvQ= -github.com/codahale/hdrhistogram v0.0.0-20161010025455-3a0bb77429bd h1:qMd81Ts1T2OTKmB4acZcyKaMtRnY5Y44NuXGX2GFJ1w= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 h1:sDMmm+q/3+BukdIpxwO365v/Rbspp2Nt5XntgQRXq8Q= -github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM= -github.com/coreos/etcd v3.3.10+incompatible h1:jFneRYjIvLMLhDLCzuTuU4rSJUjRplcJQ7pD7MnhC04= -github.com/coreos/go-etcd v2.0.0+incompatible h1:bXhRBIXoTm9BYHS3gE0TtQuyNZyeEMux2sDi4oo5YOo= -github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmfM= -github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= -github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7 h1:u9SHYsPQNyt5tgDm3YN7+9dYrpK96E5wFilTFWIDZOM= -github.com/coreos/go-systemd/v22 v22.5.0 h1:RrqgGjYQKalulkV8NGVIfkXQf6YYmOyiJKk8iXXhfZs= -github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf h1:CAKfRE2YtTUIjjh1bkBtyYFaUT/WmOqsJjgtihT0vMI= -github.com/cpuguy83/go-md2man v1.0.10 h1:BSKMNlYxDvnunlTymqtgONjNnaRV1sTpcovwwjF22jk= -github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w= -github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6 h1:uKuolOJonQOb/2+z/wFSJeVREP6fSoigr/X4Wlfhwwg= -github.com/creachadair/command v0.0.0-20220916173946-56a74cdd66b6/go.mod h1:jN7ZJM5YSVtD3SHmkAdN/cOC1dXiqg2Y9K5Sr5a8Nxw= -github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= -github.com/cristalhq/acmd v0.11.1 h1:DJ4fh2Pv0nPKmqT646IU/0Vh5FNdGblxvF+3/W3NAUI= -github.com/cristalhq/acmd v0.11.1/go.mod h1:LG5oa43pE/BbxtfMoImHCQN++0Su7dzipdgBjMCBVDQ= -github.com/dgrijalva/jwt-go v3.2.0+incompatible h1:7qlOGliEKZXTDg6OTjfoBKDXWrumCAMpl/TFQ4/5kLM= -github.com/docker/cli v23.0.1+incompatible h1:LRyWITpGzl2C9e9uGxzisptnxAn1zfZKXy13Ul2Q5oM= -github.com/docker/cli v23.0.1+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8= -github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68= -github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w= -github.com/docker/docker v23.0.1+incompatible h1:vjgvJZxprTTE1A37nm+CLNAdwu6xZekyoiVlUZEINcY= -github.com/docker/docker v23.0.1+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk= -github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A= -github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0= -github.com/eapache/go-resiliency v1.1.0 h1:1NtRmCAqadE2FN4ZcN6g90TP3uk8cg9rn9eNK2197aU= -github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 h1:YEetp8/yCZMuEPMUDHG0CW/brkkEp8mzqk2+ODEitlw= -github.com/eapache/queue v1.1.0 h1:YOEu7KNc61ntiQlcEeUIoDTJ2o8mQznoNvUhiigpIqc= -github.com/edsrzf/mmap-go v1.0.0 h1:CEBF7HpRnUCSJgGUb5h1Gm7e3VkmVDrR8lvWVLtrOFw= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385 h1:clC1lXBpe2kTj2VHdaIu9ajZQe4kcEY9j0NsnDDBZ3o= -github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM= -github.com/emirpasic/gods v1.18.1 h1:FXtiHYKDGKCW2KzwZKx0iC0PQmdlorYgdFG9jPXJ1Bc= -github.com/emirpasic/gods v1.18.1/go.mod h1:8tpGGwCnJ5H4r6BWwaV6OrWmMoPhUl5jm/FMNAnJvWQ= -github.com/envoyproxy/go-control-plane v0.11.1 h1:wSUXTlLfiAQRWs2F+p+EKOY9rUyis1MyGqJ2DIk5HpM= -github.com/envoyproxy/go-control-plane v0.11.1/go.mod h1:uhMcXKCQMEJHiAb0w+YGefQLaTEw+YhGluxZkrTmD0g= -github.com/envoyproxy/protoc-gen-validate v1.0.2 h1:QkIBuU5k+x7/QXPvPPnWXWlCdaBFApVqftFV6k087DA= -github.com/envoyproxy/protoc-gen-validate v1.0.2/go.mod h1:GpiZQP3dDbg4JouG/NNS7QWXpgx6x8QiMKdmN72jogE= -github.com/fatih/structs v1.1.0 h1:Q7juDM0QtcnhCpeyLGQKyg4TOIghuNXrkL32pHAUMxo= -github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M= -github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g= -github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw= -github.com/flosch/pongo2/v4 v4.0.2 h1:gv+5Pe3vaSVmiJvh/BZa82b7/00YUGm0PIyVVLop0Hw= -github.com/flosch/pongo2/v4 v4.0.2/go.mod h1:B5ObFANs/36VwxxlgKpdchIJHMvHB562PW+BWPhwZD8= -github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db h1:gb2Z18BhTPJPpLQWj4T+rfKHYCHxRHCtRxhKKjRidVw= -github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8 h1:a9ENSRDFBUPkJ5lCgVZh26+ZbGyoVJG7yb5SSzF5H54= -github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9 h1:r5GgOLGbza2wVHRzK7aAj6lWZjfbAwiu/RDCVOKjRyM= -github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs= -github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= -github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0= -github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8= -github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4= -github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E= -github.com/go-git/go-billy/v5 v5.4.1 h1:Uwp5tDRkPr+l/TnbHOQzp+tmJfLceOlbVucgpTz8ix4= -github.com/go-git/go-billy/v5 v5.4.1/go.mod h1:vjbugF6Fz7JIflbVpl1hJsGjSHNltrSw45YK/ukIvQg= -github.com/go-git/go-git/v5 v5.6.1 h1:q4ZRqQl4pR/ZJHc1L5CFjGA1a10u76aV1iC+nh+bHsk= -github.com/go-git/go-git/v5 v5.6.1/go.mod h1:mvyoL6Unz0PiTQrGQfSfiLFhBH1c1e84ylC2MDs4ee8= -github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= -github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag= -github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab h1:xveKWz2iaueeTaUgdetzel+U7exyigDYBryyVfV/rZk= -github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8= -github.com/go-ole/go-ole v1.2.6 h1:/Fpf6oFPoeFik9ty7siob0G6Ke8QvQEuVcuChpwXzpY= -github.com/go-ole/go-ole v1.2.6/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= -github.com/go-playground/assert/v2 v2.0.1 h1:MsBgLAaY856+nPRTKrp3/OZK38U/wa0CcBYNjji3q3A= -github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI= -github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI= -github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= -github.com/go-zookeeper/zk v1.0.2 h1:4mx0EYENAdX/B/rbunjlt5+4RTA/a9SMHBRuSKdGxPM= -github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= -github.com/godbus/dbus/v5 v5.0.4 h1:9349emZab16e7zQvpmsbtjc18ykshndd8y2PG3sgJbA= -github.com/gofrs/uuid v4.4.0+incompatible h1:3qXRTX8/NbyulANqlc0lchS1gqAVxRgsuW1YrTJupqA= -github.com/gofrs/uuid v4.4.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM= -github.com/gofrs/uuid/v5 v5.0.0 h1:p544++a97kEL+svbcFbCQVM9KFu0Yo25UoISXGNNH9M= -github.com/gofrs/uuid/v5 v5.0.0/go.mod h1:CDOjlDMVAtN56jqyRUZh58JT31Tiw7/oQyEXZV+9bD8= -github.com/gogo/status v1.1.0 h1:+eIkrewn5q6b30y+g/BJINVVdi2xH7je5MPJ3ZPK3JA= -github.com/gogo/status v1.1.0/go.mod h1:BFv9nrluPLmrS0EmGVvLaPNmRosr9KapBYd5/hpY1WM= -github.com/golang-jwt/jwt/v4 v4.0.0 h1:RAqyYixv1p7uEnocuy8P1nru5wprCh/MH2BIlW5z5/o= -github.com/golang-jwt/jwt/v4 v4.0.0/go.mod h1:/xlHOz8bRuivTWchD4jCa+NbatV+wEUSzwAxVc6locg= -github.com/google/go-containerregistry v0.13.0 h1:y1C7Z3e149OJbOPDBxLYR8ITPz8dTKqQwjErKVHJC8k= -github.com/google/go-containerregistry v0.13.0/go.mod h1:J9FQ+eSS4a1aC2GNZxvNpbWhgp0487v+cgiilB4FqDo= -github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= -github.com/googleapis/go-type-adapters v1.0.0 h1:9XdMn+d/G57qq1s8dNc5IesGCXHf6V2HZ2JwRxfA2tA= -github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= -github.com/gookit/color v1.5.4 h1:FZmqs7XOyGgCAxmWyPslpiok1k05wmY3SJTytgvYFs0= -github.com/gookit/color v1.5.4/go.mod h1:pZJOeOS8DM43rXbp4AZo1n9zCU2qjpcRko0b6/QJi9w= -github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8= -github.com/gorilla/context v1.1.1 h1:AWwleXJkX/nhcU9bZSnZoi3h/qGYqQAGhq6zZe/aQW8= -github.com/gorilla/css v1.0.0 h1:BQqNyPTi50JCFMTw/b67hByjMVXZRwGha6wxVGkeihY= -github.com/gorilla/css v1.0.0/go.mod h1:Dn721qIggHpt4+EFCcTLTU/vk5ySda2ReITrtgBl60c= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible h1:AQwinXlbQR2HvPjQZOmDhRqsv5mZf+Jb1RnSLxcqZcI= -github.com/gotestyourself/gotestyourself v2.2.0+incompatible/go.mod h1:zZKM6oeNM8k+FRljX1mnzVYeS8wiGgQyvST1/GafPbY= -github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92BcuyuQ/YW4NSIpoGtfXNho= -github.com/guptarohit/asciigraph v0.5.5 h1:ccFnUF8xYIOUPPY3tmdvRyHqmn1MYI9iv1pLKX+/ZkQ= -github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag= -github.com/hashicorp/consul/api v1.20.0 h1:9IHTjNVSZ7MIwjlW3N3a7iGiykCMDpxZu8jsxFJh0yc= -github.com/hashicorp/consul/api v1.20.0/go.mod h1:nR64eD44KQ59Of/ECwt2vUmIK2DKsDzAwTmwmLl8Wpo= -github.com/hashicorp/consul/sdk v0.3.0 h1:UOxjlb4xVNF93jak1mzzoBatyFju9nrkxpVwIp/QqxQ= -github.com/hashicorp/go-msgpack v0.5.3 h1:zKjpN5BK/P5lMYrLmBHdBULWbJ0XpYR+7NGzqkZzoD4= -github.com/hashicorp/go-retryablehttp v0.5.3 h1:QlWt0KvWT0lq8MFppF9tsJGF+ynG7ztc2KIPhzRGk7s= -github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc= -github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= -github.com/hashicorp/go-sockaddr v1.0.0 h1:GeH6tui99pF4NJgfnhp+L6+FfobzVW3Ah46sLo0ICXs= -github.com/hashicorp/go-syslog v1.0.0 h1:KaodqZuhUoZereWVIYmpUgZysurB1kBLX2j0MwMrUAE= -github.com/hashicorp/go.net v0.0.1 h1:sNCoNyDEvN1xa+X0baata4RdcpKwcMS6DH+xwfqPgjw= -github.com/hashicorp/logutils v1.0.0 h1:dLEQVugN8vlakKOUE3ihGLTZJRB4j+M2cdTm/ORI65Y= -github.com/hashicorp/mdns v1.0.0 h1:WhIgCr5a7AaVH6jPUwjtRuuE7/RDufnUvzIr48smyxs= -github.com/hashicorp/memberlist v0.1.3 h1:EmmoJme1matNzb+hMpDuR/0sbJSUisxyqBGG676r31M= -github.com/hashicorp/serf v0.10.1 h1:Z1H2J60yRKvfDYAOZLd2MU0ND4AH/WDz7xYHDWQsIPY= -github.com/hashicorp/serf v0.10.1/go.mod h1:yL2t6BqATOLGc5HF7qbFkTfXoPIY0WZdWHfEvMqbG+4= -github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI= -github.com/hudl/fargo v1.4.0 h1:ZDDILMbB37UlAVLlWcJ2Iz1XuahZZTDZfdCKeclfq2s= -github.com/hudl/fargo v1.4.0/go.mod h1:9Ai6uvFy5fQNq6VPKtg+Ceq1+eTY4nKUlR2JElEOcDo= -github.com/hydrogen18/memlistener v1.0.0 h1:JR7eDj8HD6eXrc5fWLbSUnfcQFL06PYvCc0DKQnWfaU= -github.com/hydrogen18/memlistener v1.0.0/go.mod h1:qEIFzExnS6016fRpRfxrExeVn2gbClQA99gQhnIcdhE= -github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI= -github.com/imdario/mergo v0.3.13 h1:lFzP57bqS/wsqKssCGmtLAb8A0wKjLGrve2q3PPVcBk= -github.com/imdario/mergo v0.3.13/go.mod h1:4lJ1jqUDcsbIECGy0RUJAXNIhg+6ocWgb1ALK2O4oXg= -github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab h1:HqW4xhhynfjrtEiiSGcQUd6vrK23iMam1FO8rI7mwig= -github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= -github.com/informalsystems/tm-load-test v1.3.0 h1:FGjKy7vBw6mXNakt+wmNWKggQZRsKkEYpaFk/zR64VA= -github.com/informalsystems/tm-load-test v1.3.0/go.mod h1:OQ5AQ9TbT5hKWBNIwsMjn6Bf4O0U4b1kRc+0qZlQJKw= -github.com/iris-contrib/schema v0.0.6 h1:CPSBLyx2e91H2yJzPuhGuifVRnZBBJ3pCOMbOvPZaTw= -github.com/iris-contrib/schema v0.0.6/go.mod h1:iYszG0IOsuIsfzjymw1kMzTL8YQcCWlm65f3wX8J5iA= -github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM= -github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg= -github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk= -github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM= -github.com/jackc/pgx/v5 v5.4.3 h1:cxFyXhxlvAifxnkKKdlxv8XqUf59tDlYjnV5YYfsJJY= -github.com/jackc/pgx/v5 v5.4.3/go.mod h1:Ig06C2Vu0t5qXC60W8sqIthScaEnFvojjj9dSljmHRA= -github.com/jackc/puddle/v2 v2.2.1 h1:RhxXJtFG022u4ibrCSMSiu5aOq1i77R3OHKNJj77OAk= -github.com/jackc/puddle/v2 v2.2.1/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A= -github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo= -github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 h1:2uT3aivO7NVpUPGcQX7RbHijHMyWix/yCnIrCWc+5co= -github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw= -github.com/jinzhu/copier v0.3.5 h1:GlvfUwHk62RokgqVNvYsku0TATCF7bAHVwEXoBh3iJg= -github.com/jinzhu/copier v0.3.5/go.mod h1:DfbEm0FYsaqBcKcFuvmOZb218JkPGtvSHsKg8S8hyyg= -github.com/jmoiron/sqlx v1.3.5 h1:vFFPA71p1o5gAeqtEAwLU4dnX2napprKtHr7PYIcN3g= -github.com/jmoiron/sqlx v1.3.5/go.mod h1:nRVWtLre0KfCLJvgxzCsLVMogSvQ1zNJtpYr2Ccp0mQ= -github.com/jonboulle/clockwork v0.1.0 h1:VKV+ZcuP6l3yW9doeqz6ziZGgcynBVQO+obU0+0hcPo= -github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= -github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= -github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= -github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= -github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= -github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= -github.com/junk1tm/musttag v0.5.0 h1:bV1DTdi38Hi4pG4OVWa7Kap0hi0o7EczuK6wQt9zPOM= -github.com/junk1tm/musttag v0.5.0/go.mod h1:PcR7BA+oREQYvHwgjIDmw3exJeds5JzRcvEJTfjrA0M= -github.com/kataras/blocks v0.0.7 h1:cF3RDY/vxnSRezc7vLFlQFTYXG/yAr1o7WImJuZbzC4= -github.com/kataras/blocks v0.0.7/go.mod h1:UJIU97CluDo0f+zEjbnbkeMRlvYORtmc1304EeyXf4I= -github.com/kataras/golog v0.1.8 h1:isP8th4PJH2SrbkciKnylaND9xoTtfxv++NB+DF0l9g= -github.com/kataras/golog v0.1.8/go.mod h1:rGPAin4hYROfk1qT9wZP6VY2rsb4zzc37QpdPjdkqVw= -github.com/kataras/iris/v12 v12.2.0 h1:WzDY5nGuW/LgVaFS5BtTkW3crdSKJ/FEgWnxPnIVVLI= -github.com/kataras/iris/v12 v12.2.0/go.mod h1:BLzBpEunc41GbE68OUaQlqX4jzi791mx5HU04uPb90Y= -github.com/kataras/pio v0.0.11 h1:kqreJ5KOEXGMwHAWHDwIl+mjfNCPhAwZPa8gK7MKlyw= -github.com/kataras/pio v0.0.11/go.mod h1:38hH6SWH6m4DKSYmRhlrCJ5WItwWgCVrTNU62XZyUvI= -github.com/kataras/sitemap v0.0.6 h1:w71CRMMKYMJh6LR2wTgnk5hSgjVNB9KL60n5e2KHvLY= -github.com/kataras/sitemap v0.0.6/go.mod h1:dW4dOCNs896OR1HmG+dMLdT7JjDk7mYBzoIRwuj5jA4= -github.com/kataras/tunnel v0.0.4 h1:sCAqWuJV7nPzGrlb0os3j49lk2JhILT0rID38NHNLpA= -github.com/kataras/tunnel v0.0.4/go.mod h1:9FkU4LaeifdMWqZu7o20ojmW4B7hdhv2CMLwfnHGpYw= -github.com/kevinburke/ssh_config v1.2.0 h1:x584FjTGwHzMwvHx18PXxbBVzfnxogHaAReU4gf13a4= -github.com/kevinburke/ssh_config v1.2.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM= -github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE= -github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs= -github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8= -github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= -github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= -github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= -github.com/labstack/echo/v4 v4.10.0 h1:5CiyngihEO4HXsz3vVsJn7f8xAlWwRr3aY6Ih280ZKA= -github.com/labstack/echo/v4 v4.10.0/go.mod h1:S/T/5fy/GigaXnHTkh0ZGe4LpkkQysvRjFMSUTkDRNQ= -github.com/labstack/gommon v0.4.0 h1:y7cvthEAEbU0yHOf4axH8ZG2NH8knB9iNSoTO8dyIk8= -github.com/labstack/gommon v0.4.0/go.mod h1:uW6kP17uPlLJsD3ijUYn3/M5bAxtlZhMI6m3MFxTMTM= -github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743 h1:143Bb8f8DuGWck/xpNUOckBVYfFbBTnLevfRZ1aVVqo= -github.com/lightstep/lightstep-tracer-go v0.18.1 h1:vi1F1IQ8N7hNWytK9DpJsUfQhGuNSc19z330K6vl4zk= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4= -github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I= -github.com/lyft/protoc-gen-validate v0.0.13 h1:KNt/RhmQTOLr7Aj8PsJ7mTronaFyx80mRTT9qF261dA= -github.com/magefile/mage v1.14.0 h1:6QDX3g6z1YvJ4olPhT1wksUcSa/V0a1B+pJb73fBjyo= -github.com/magefile/mage v1.14.0/go.mod h1:z5UZb/iS3GoOSn0JgWuiw7dxlurVYTu+/jHXqQg881A= -github.com/mailgun/raymond/v2 v2.0.48 h1:5dmlB680ZkFG2RN/0lvTAghrSxIESeu9/2aeDqACtjw= -github.com/mailgun/raymond/v2 v2.0.48/go.mod h1:lsgvL50kgt1ylcFJYZiULi5fjPBkkhNfj4KA0W54Z18= -github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= -github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= -github.com/matttproud/golang_protobuf_extensions v1.0.4 h1:mmDVorXM7PCGKw94cs5zkfA9PSy5pEvNWRP0ET0TIVo= -github.com/matttproud/golang_protobuf_extensions v1.0.4/go.mod h1:BSXmuO+STAnVfrANrmjBb36TMTDstsz7MSK+HVaYKv4= -github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 h1:zpIH83+oKzcpryru8ceC6BxnoG8TBrhgAvRg8obzup0= -github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= -github.com/microcosm-cc/bluemonday v1.0.23 h1:SMZe2IGa0NuHvnVNAZ+6B38gsTbi5e4sViiWJyDDqFY= -github.com/microcosm-cc/bluemonday v1.0.23/go.mod h1:mN70sk7UkkF8TUr2IGBpNN0jAgStuPzlK76QuruE/z4= -github.com/miekg/dns v1.1.43 h1:JKfpVSCB84vrAmHzyrsxB5NAr5kLoMXZArPSw7Qlgyg= -github.com/miekg/dns v1.1.43/go.mod h1:+evo5L0630/F6ca/Z9+GAqzhjGyn8/c+TBaOyfEl0V4= -github.com/mitchellh/cli v1.0.0 h1:iGBIsUe3+HZ/AD/Vd7DErOt5sU9fa8Uj7A2s1aggv1Y= -github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc= -github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg= -github.com/mitchellh/gox v0.4.0 h1:lfGJxY7ToLJQjHHwi0EX6uYBdK78egf954SQl13PQJc= -github.com/mitchellh/iochan v1.0.0 h1:C+X3KsSTLFVBr/tK1eYN/vs4rJcvsiLU338UhYPJWeY= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA= -github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y= -github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A= -github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc= -github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5 h1:0KqC6/sLy7fDpBdybhVkkv4Yz+PmB7c9Dz9z3dLW804= -github.com/mozilla/tls-observatory v0.0.0-20210609171429-7bc42856d2e5/go.mod h1:FUqVoUPHSEdDR0MnFM3Dh8AU0pZHLXUD127SAJGER/s= -github.com/mwitkow/grpc-proxy v0.0.0-20181017164139-0f1106ef9c76 h1:0xuRacu/Zr+jX+KyLLPPktbwXqyOvnOPUQmMLzX1jxU= -github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI= -github.com/nats-io/jwt/v2 v2.0.3 h1:i/O6cmIsjpcQyWDYNcq2JyZ3/VTF8SJ4JWluI5OhpvI= -github.com/nats-io/jwt/v2 v2.0.3/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= -github.com/nats-io/nats-server/v2 v2.5.0 h1:wsnVaaXH9VRSg+A2MVg5Q727/CqxnmPLGFQ3YZYKTQg= -github.com/nats-io/nats-server/v2 v2.5.0/go.mod h1:Kj86UtrXAL6LwYRA6H4RqzkHhK0Vcv2ZnKD5WbQ1t3g= -github.com/nats-io/nats.go v1.12.1 h1:+0ndxwUPz3CmQ2vjbXdkC1fo3FdiOQDim4gl3Mge8Qo= -github.com/nats-io/nats.go v1.12.1/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= -github.com/nats-io/nkeys v0.3.0 h1:cgM5tL53EvYRU+2YLXIK0G2mJtK12Ft9oeooSZMA2G8= -github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= -github.com/nats-io/nuid v1.0.1 h1:5iA8DT8V7q8WK2EScv2padNa/rTESc1KdnPw4TC2paw= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354 h1:4kuARK6Y6FxaNu/BnU2OAaLF86eTVhP2hjTB6iMvItA= -github.com/nbutton23/zxcvbn-go v0.0.0-20210217022336-fa2cb2858354/go.mod h1:KSVJerMDfblTH7p5MZaTt+8zaT2iEk3AkVb9PQdZuE8= -github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= -github.com/oklog/oklog v0.3.2 h1:wVfs8F+in6nTBMkA7CbRw+zZMIB7nNM825cM1wuzoTk= -github.com/op/go-logging v0.0.0-20160315200505-970db520ece7 h1:lDH9UUVJtmYCjyT0CI4q8xvlXPxeZ0gYCVvWbmPlp88= -github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492 h1:lM6RxxfUMrYL/f8bWEUqdXrANWtrL7Nndbm9iFN0DlU= -github.com/opentracing/basictracer-go v1.0.0 h1:YyUAhaEfjoWXclZVJ9sGoNct7j4TVk7lZWlQw5UXuoo= -github.com/opentracing/opentracing-go v1.2.0 h1:uEJPy/1a5RIPAJ0Ov+OIO8OxWu77jEv+1B0VhjKrZUs= -github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= -github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5 h1:ZCnq+JUrvXcDVhX/xRolRBZifmabN1HcS1wrPSvxhrU= -github.com/openzipkin/zipkin-go v0.2.5 h1:UwtQQx2pyPIgWYHRg+epgdx1/HnBQTgN3/oIYEJTQzU= -github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= -github.com/otiai10/curr v1.0.0 h1:TJIWdbX0B+kpNagQrjgq8bCMrbhiuX73M2XwgtDMoOI= -github.com/otiai10/mint v1.3.1 h1:BCmzIS3n71sGfHB5NMNDB3lHYPz8fWSkCAErHed//qc= -github.com/pact-foundation/pact-go v1.0.4 h1:OYkFijGHoZAYbOIb1LWXrwKQbMMRUv1oQ89blD2Mh2Q= -github.com/pborman/uuid v1.2.0 h1:J7Q5mO4ysT1dv8hyrUGHb9+ooztCXu1D8MY8DZYsu3g= -github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3ve8= -github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c= -github.com/performancecopilot/speed v3.0.0+incompatible h1:2WnRzIquHa5QxaJKShDkLM+sc0JPuwhXzK8OYOyt3Vg= -github.com/performancecopilot/speed/v4 v4.0.0 h1:VxEDCmdkfbQYDlcr/GC9YoN9PQ6p8ulk9xVsepYy9ZY= -github.com/performancecopilot/speed/v4 v4.0.0/go.mod h1:qxrSyuDGrTOWfV+uKRFhfxw6h/4HXRGUiZiufxo49BM= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d h1:CdDQnGF8Nq9ocOS/xlSptM1N3BbrA6/kmaep5ggwaIA= -github.com/phayes/checkstyle v0.0.0-20170904204023-bfd46e6a821d/go.mod h1:3OzsM7FXDQlpCiw2j81fOmAwQLnZnLGXVKUzeKQXIAw= -github.com/pierrec/lz4 v2.0.5+incompatible h1:2xWsjqPFWcplujydGg4WmhC/6fZqK42wMM8aXeqhl0I= -github.com/pjbgf/sha1cd v0.3.0 h1:4D5XXmUUBUl/xQ6IjCkEAbqXskkq/4O7LmGn0AqMDs4= -github.com/pjbgf/sha1cd v0.3.0/go.mod h1:nZ1rrWOcGJ5uZgEEVL1VUM9iRQiZvWdbZjkKyFzPPsI= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU= -github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI= -github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= -github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA= -github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo= -github.com/pkg/sftp v1.13.1 h1:I2qBYMChEhIjOgazfJmV3/mZM256btk6wkCDRmW7JYs= -github.com/pointlander/compress v1.1.1-0.20190518213731-ff44bd196cc3 h1:hUmXhbljNFtrH5hzV9kiRoddZ5nfPTq3K0Sb2hYYiqE= -github.com/pointlander/compress v1.1.1-0.20190518213731-ff44bd196cc3/go.mod h1:q5NXNGzqj5uPnVuhGkZfmgHqNUhf15VLi6L9kW0VEc0= -github.com/pointlander/jetset v1.0.1-0.20190518214125-eee7eff80bd4 h1:RHHRCZeaNyBXdYPMjZNH8/XHDBH38TZzw8izrW7dmBE= -github.com/pointlander/jetset v1.0.1-0.20190518214125-eee7eff80bd4/go.mod h1:RdR1j20Aj5pB6+fw6Y9Ur7lMHpegTEjY1vc19hEZL40= -github.com/pointlander/peg v1.0.1 h1:mgA/GQE8TeS9MdkU6Xn6iEzBmQUQCNuWD7rHCK6Mjs0= -github.com/pointlander/peg v1.0.1/go.mod h1:5hsGDQR2oZI4QoWz0/Kdg3VSVEC31iJw/b7WjqCBGRI= -github.com/posener/complete v1.1.1 h1:ccV59UEOTzVDnDUEFdT95ZzHVZ+5+158q8+SJb2QV5w= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw= -github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE= -github.com/quasilyte/go-ruleguard/dsl v0.3.22 h1:wd8zkOhSNr+I+8Qeciml08ivDt1pSXe60+5DqOpCjPE= -github.com/quasilyte/go-ruleguard/dsl v0.3.22/go.mod h1:KeCP03KrjuSO0H1kTuZQCWlQPulDV6YMIXmpQss17rU= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71 h1:CNooiryw5aisadVfzneSZPswRWvnVW8hF1bS/vo8ReI= -github.com/quasilyte/go-ruleguard/rules v0.0.0-20211022131956-028d6511ab71/go.mod h1:4cgAphtvu7Ftv7vOT2ZOYhC6CvBxZixcasr8qIOTA50= -github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5 h1:CvqZS4QYHBRvx7AeFdimd16HCbLlYsvQMcKDACpJW/c= -github.com/remyoudompheng/go-dbus v0.0.0-20121104212943-b7232d34b1d5/go.mod h1:+u151txRmLpwxBmpYn9z3d1sdJdjRPQpsXuYeY9jNls= -github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96 h1:J8J/cgLDRuqXJnwIrRDBvtl+LLsdg7De74znW/BRRq4= -github.com/remyoudompheng/go-liblzma v0.0.0-20190506200333-81bf2d431b96/go.mod h1:90HvCY7+oHHUKkbeMCiHt1WuFR2/hPJ9QrljDG+v6ls= -github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e h1:eTWZyPUnHcuGRDiryS/l2I7FfKjbU3IBx3IjqHPxuKU= -github.com/remyoudompheng/go-misc v0.0.0-20190427085024-2d6ac652a50e/go.mod h1:80FQABjoFzZ2M5uEa6FUaJYEmqU2UOKojlFVak1UAwI= -github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s= -github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc= -github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo= -github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= -github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f h1:UFr9zpz4xgTnIE5yIMtWAMngCdZ9p/+q6lTbgelo80M= -github.com/sagikazarmark/crypt v0.10.0 h1:96E1qrToLBU6fGzo+PRRz7KGOc9FkYFiPnR3/zf8Smg= -github.com/sagikazarmark/crypt v0.10.0/go.mod h1:gwTNHQVoOS3xp9Xvz5LLR+1AauC5M6880z5NWzdhOyQ= -github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da h1:p3Vo3i64TCLY7gIfzeQaUJ+kppEO5WQG3cL8iE8tGHU= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -github.com/schollz/closestmatch v2.1.0+incompatible h1:Uel2GXEpJqOWBrlyI+oY9LTiyyjYS17cCYRqP13/SHk= -github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g= -github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529 h1:nn5Wsu0esKSJiIVhscUtVbo7ada43DJhG55ua/hjS5I= -github.com/sergi/go-diff v1.2.0 h1:XU+rvMAioB0UC3q1MFrIQy4Vo5/4VsRDQQXHsEya6xQ= -github.com/sergi/go-diff v1.2.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= -github.com/shirou/gopsutil/v3 v3.23.10 h1:/N42opWlYzegYaVkWejXWJpbzKv2JDy3mrgGzKsh9hM= -github.com/shirou/gopsutil/v3 v3.23.10/go.mod h1:JIE26kpucQi+innVlAUnIEOSBhBUkirr5b44yr55+WE= -github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM= -github.com/shoenig/go-m1cpu v0.1.6/go.mod h1:1JJMcUBvfNwpq05QDQVAnx3gUHr9IYF7GNg9SUEw2VQ= -github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e h1:MZM7FHLqUHYI0Y/mQAt3d2aYa0SiNms/hFqC9qJYolM= -github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041 h1:llrF3Fs4018ePo4+G/HV/uQUqEI1HMDjCeOf2V6puPc= -github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo= -github.com/skeema/knownhosts v1.1.0 h1:Wvr9V0MxhjRbl3f9nMnKnFfiWTJmtECJ9Njkea3ysW0= -github.com/skeema/knownhosts v1.1.0/go.mod h1:sKFq3RD6/TKZkSWn8boUbDC7Qkgcv+8XXijpFO6roag= -github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= -github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= -github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa h1:YJfZp12Z3AFhSBeXOlv4BO55RMwPn2NoQeDsrdWnBtY= -github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa/go.mod h1:oJyF+mSPHbB5mVY2iO9KV3pTt/QbIkGaO8gQ2WrDbP4= -github.com/soheilhy/cmux v0.1.4 h1:0HKaf1o97UwFjHH9o5XsHUOF+tqmdA7KEzXLpiyaw0E= -github.com/sony/gobreaker v0.4.1 h1:oMnRNZXX5j85zso6xCPRNPtmAycat+WcoKbklScLDgQ= -github.com/streadway/amqp v1.0.0 h1:kuuDrUJFZL1QYL9hUNuCxNObNzB0bV/ZG5jV3RWAQgo= -github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= -github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e h1:mOtuXaRAbVZsxAHVdPR3IjfmN8T1h2iczJLynhLybf8= -github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= -github.com/tdewolff/minify/v2 v2.12.4 h1:kejsHQMM17n6/gwdw53qsi6lg0TGddZADVyQOz1KMdE= -github.com/tdewolff/minify/v2 v2.12.4/go.mod h1:h+SRvSIX3kwgwTFOpSckvSxgax3uy8kZTSF1Ojrr3bk= -github.com/tdewolff/parse/v2 v2.6.4 h1:KCkDvNUMof10e3QExio9OPZJT8SbdKojLBumw8YZycQ= -github.com/tdewolff/parse/v2 v2.6.4/go.mod h1:woz0cgbLwFdtbjJu8PIKxhW05KplTFQkOdX78o+Jgrs= -github.com/tklauser/go-sysconf v0.3.12 h1:0QaGUFOdQaIVdPgfITYzaTegZvdCjmYO52cSFAEVmqU= -github.com/tklauser/go-sysconf v0.3.12/go.mod h1:Ho14jnntGE1fpdOqQEEaiKRpvIavV0hSfmBq8nJbHYI= -github.com/tklauser/numcpus v0.6.1 h1:ng9scYS7az0Bk4OZLvrNXNSAO2Pxr1XXRAPyjhIx+Fk= -github.com/tklauser/numcpus v0.6.1/go.mod h1:1XfjsgE2zo8GVw7POkMbHENHzVg3GzmoZ9fESEdAacY= -github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8 h1:ndzgwNDnKIqyCvHTXaCqh9KlOWKvBry6nuXMJmonVsE= -github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926 h1:G3dpKMzFDjgEh2q1Z7zUUtKa8ViPtH+ocF0bE0g00O8= -github.com/urfave/cli v1.22.1 h1:+mkCCcOFKPnCmVYVcURKps1Xe+3zP90gSYGNfRkjoIY= -github.com/urfave/negroni v1.0.0 h1:kIimOitoypq34K7TG7DUaJ9kq/N4Ofuwi1sjz0KipXc= -github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4= -github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw= -github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc= -github.com/valyala/fasthttp v1.40.0 h1:CRq/00MfruPGFLTQKY8b+8SfdK60TxNztjRMnH0t1Yc= -github.com/valyala/fasthttp v1.40.0/go.mod h1:t/G+3rLek+CyY9bnIE+YlMRddxVAAGjhxndDB4i4C0I= -github.com/valyala/fasttemplate v1.2.2 h1:lxLXG0uE3Qnshl9QyaK6XJxMXlQZELvChBOCmQD0Loo= -github.com/valyala/fasttemplate v1.2.2/go.mod h1:KHLXt3tVN2HBp8eijSv/kGJopbvo7S+qRAEEKiv+SiQ= -github.com/valyala/quicktemplate v1.7.0 h1:LUPTJmlVcb46OOUY3IeD9DojFpAVbsG+5WFTcjMJzCM= -github.com/valyala/quicktemplate v1.7.0/go.mod h1:sqKJnoaOF88V07vkO+9FL8fb9uZg/VPSJnLYn+LmLk8= -github.com/vektra/mockery/v2 v2.23.1 h1:N59FENM2d/gWE6Ns5JPuf9a7jqQWeheGefZqvuvb1dM= -github.com/vektra/mockery/v2 v2.23.1/go.mod h1:Zh3Kv1ckKs6FokhlVLcCu6UTyzfS3M8mpROz1lBNp+w= -github.com/vmihailenco/msgpack/v5 v5.3.5 h1:5gO0H1iULLWGhs2H5tbAHIZTV8/cYafcFOr9znI5mJU= -github.com/vmihailenco/msgpack/v5 v5.3.5/go.mod h1:7xyJ9e+0+9SaZT0Wt1RGleJXzli6Q/V5KbhBonMG9jc= -github.com/vmihailenco/tagparser/v2 v2.0.0 h1:y09buUbR+b5aycVFQs/g70pqKVZNBmxwAhO7/IwNM9g= -github.com/vmihailenco/tagparser/v2 v2.0.0/go.mod h1:Wri+At7QHww0WTrCBeu4J6bNtoV6mEfg5OIWRZA9qds= -github.com/xanzy/ssh-agent v0.3.3 h1:+/15pJfg/RsTxqYcX6fHqOXZwwMP+2VyYWJeWM2qQFM= -github.com/xanzy/ssh-agent v0.3.3/go.mod h1:6dzNDKs0J9rVPHPhaGCukekBHKqfl+L3KghI1Bc68Uw= -github.com/xhit/go-str2duration/v2 v2.1.0 h1:lxklc02Drh6ynqX+DdPyp5pCKLUQpRT8bp8Ydu2Bstc= -github.com/xhit/go-str2duration/v2 v2.1.0/go.mod h1:ohY8p+0f07DiV6Em5LKB0s2YpLtXVyJfNt1+BlmyAsU= -github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 h1:eY9dn8+vbi4tKz5Qo6v2eYzo7kUS51QINcR5jNpbZS8= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778 h1:QldyIu/L63oPpyvQmHgvgickp1Yw510KJOqX7H24mg8= -github.com/xo/terminfo v0.0.0-20210125001918-ca9a967f8778/go.mod h1:2MuV+tbUrU1zIOPMxZ5EncGwgmMJsa+9ucAQZXxsObs= -github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77 h1:ESFSdwYZvkeru3RtdrYueztKhOBCSAAzS4Gf+k0tEow= -github.com/yosssi/ace v0.0.5 h1:tUkIP/BLdKqrlrPwcmH0shwEEhTRHoGnc1wFIWmaBUA= -github.com/yosssi/ace v0.0.5/go.mod h1:ALfIzm2vT7t5ZE7uoIZqF3TQ7SAOyupFZnkrF5id+K0= -github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= -github.com/yusufpapurcu/wmi v1.2.3 h1:E1ctvB7uKFMOJw3fdOW32DwGE9I7t++CRUEMKvFoFiw= -github.com/yusufpapurcu/wmi v1.2.3/go.mod h1:SBZ9tNy3G9/m5Oi98Zks0QjeHVDvuK0qfxQmPyzfmi0= -go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738 h1:VcrIfasaLFkyjk6KNlXQSzO+B0fZcnECiDrKJsfxka0= -go.etcd.io/etcd/api/v3 v3.5.9 h1:4wSsluwyTbGGmyjJktOf3wFQoTBIURXHnq9n/G/JQHs= -go.etcd.io/etcd/api/v3 v3.5.9/go.mod h1:uyAal843mC8uUVSLWz6eHa/d971iDGnCRpmKd2Z+X8k= -go.etcd.io/etcd/client/pkg/v3 v3.5.9 h1:oidDC4+YEuSIQbsR94rY9gur91UPL6DnxDCIYd2IGsE= -go.etcd.io/etcd/client/pkg/v3 v3.5.9/go.mod h1:y+CzeSmkMpWN2Jyu1npecjB9BBnABxGM4pN8cGuJeL4= -go.etcd.io/etcd/client/v2 v2.305.7 h1:AELPkjNR3/igjbO7CjyF1fPuVPjrblliiKj+Y6xSGOU= -go.etcd.io/etcd/client/v2 v2.305.7/go.mod h1:GQGT5Z3TBuAQGvgPfhR7VPySu/SudxmEkRq9BgzFU6s= -go.etcd.io/etcd/client/v3 v3.5.9 h1:r5xghnU7CwbUxD/fbUtRyJGaYNfDun8sp/gTr1hew6E= -go.etcd.io/etcd/client/v3 v3.5.9/go.mod h1:i/Eo5LrZ5IKqpbtpPDuaUnDOUv471oDg8cjQaUr2MbA= -go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= -go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= -go.opentelemetry.io/otel v1.14.0 h1:/79Huy8wbf5DnIPhemGB+zEPVwnN6fuQybr/SRXa6hM= -go.opentelemetry.io/otel v1.14.0/go.mod h1:o4buv+dJzx8rohcUeRmWUZhqupFvzWis188WlggnNeU= -go.opentelemetry.io/otel/sdk v1.14.0 h1:PDCppFRDq8A1jL9v6KMI6dYesaq+DFcDZvjsoGvxGzY= -go.opentelemetry.io/otel/sdk v1.14.0/go.mod h1:bwIC5TjrNG6QDCHNWvW4HLHtUQ4I+VQDsnjhvyZCALM= -go.opentelemetry.io/otel/trace v1.14.0 h1:wp2Mmvj41tDsyAJXiWDWpfNsOiIyd38fy85pyKcFq/M= -go.opentelemetry.io/otel/trace v1.14.0/go.mod h1:8avnQLK+CG77yNLUae4ea2JDQ6iT+gozhnZjy/rw9G8= -go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8= -go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= -golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= -golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug= -golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= -golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5 h1:ObuXPmIgI4ZMyQLIz48cJYgSyWdjUXc2SZAdyJMwEAU= -golang.org/x/perf v0.0.0-20230113213139-801c7ef9e5c5/go.mod h1:UBKtEnL8aqnd+0JHqZ+2qoMDwtuy6cYhhKNoHLBiTQc= -golang.org/x/time v0.3.0 h1:rg5rLMjNzMS1RkNLzCG38eapWhnYLFYXDXj2gOlr8j4= -golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= -gonum.org/v1/gonum v0.12.0 h1:xKuo6hzt+gMav00meVPUlXwSdoEJP46BR+wdxQEFK2o= -gonum.org/v1/gonum v0.12.0/go.mod h1:73TDxJfAAHeA8Mk9mf8NlIppyhQNo5GLTcYeqgo2lvY= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc h1:g3hIDl0jRNd9PPTs2uBzYuaD5mQuwOkZY0vSc0LR32o= -google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= -google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0 h1:M1YKkFIboKNieVO5DLUEVzQfGwJD30Nv2jfUgzb5UcE= -gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= -gopkg.in/cheggaaa/pb.v1 v1.0.27 h1:kJdccidYzt3CaHD1crCFTS1hxyhSi059NhOFUf03YFo= -gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= -gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4= -gopkg.in/gcfg.v1 v1.2.3 h1:m8OOJ4ccYHnx2f4gQwpno8nAX5OGOh7RLaaz0pj3Ogs= -gopkg.in/resty.v1 v1.12.0 h1:CuXP0Pjfw9rOuY6EP+UvtNvt5DSqHpIxILZKT/quCZI= -gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME= -gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= -gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= -rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= -rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= -rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= -sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0 h1:ucqkfpjg9WzSUubAO62csmucvxl4/JeW3F4I4909XkM= diff --git a/x/feemarket/types/params.go b/x/feemarket/types/params.go new file mode 100644 index 0000000..1ed9b91 --- /dev/null +++ b/x/feemarket/types/params.go @@ -0,0 +1,15 @@ +package types + +// DefaultParams returns default feemarket parameters. +func DefaultParams() Params { + return Params{ + Enabled: true, + } +} + +// NewParams returns a new Params instance. +func NewParams(enabled bool) Params { + return Params{ + Enabled: enabled, + } +} From b876bd52c4a0fc6c661f09405b2467b483131367 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 14:43:28 -0500 Subject: [PATCH 14/28] init --- x/feemarket/plugins/mock/feemarket.go | 5 +++ x/feemarket/types/feemarket.go | 6 +++ x/feemarket/types/genesis.go | 41 +++++++++++++++++++ x/feemarket/types/genesis_test.go | 57 +++++++++++++++++++++++++++ x/feemarket/types/keys.go | 8 ++++ x/feemarket/types/msgs.go | 29 ++++++++++++++ x/feemarket/types/msgs_test.go | 24 +++++++++++ x/feemarket/types/params.go | 4 ++ x/feemarket/types/plugins.go | 12 ++++++ x/feemarket/types/plugins_test.go | 15 +++++++ 10 files changed, 201 insertions(+) create mode 100644 x/feemarket/types/genesis.go create mode 100644 x/feemarket/types/genesis_test.go create mode 100644 x/feemarket/types/keys.go create mode 100644 x/feemarket/types/msgs.go create mode 100644 x/feemarket/types/msgs_test.go create mode 100644 x/feemarket/types/plugins.go create mode 100644 x/feemarket/types/plugins_test.go diff --git a/x/feemarket/plugins/mock/feemarket.go b/x/feemarket/plugins/mock/feemarket.go index 511fc4e..77d8006 100644 --- a/x/feemarket/plugins/mock/feemarket.go +++ b/x/feemarket/plugins/mock/feemarket.go @@ -10,6 +10,11 @@ import ( var _ types.FeeMarketImplementation = &MockFeeMarket{} +// NewFeeMarket returns an instance of a new MockFeeMarket. +func NewFeeMarket() *MockFeeMarket { + return &MockFeeMarket{} +} + // ValidateBasic is a no-op. func (fm *MockFeeMarket) ValidateBasic() error { return nil diff --git a/x/feemarket/types/feemarket.go b/x/feemarket/types/feemarket.go index b1c863d..0822da9 100644 --- a/x/feemarket/types/feemarket.go +++ b/x/feemarket/types/feemarket.go @@ -16,6 +16,12 @@ type FeeMarketImplementation interface { // doesn't require access to any other information. ValidateBasic() error + // Marshal Marshall the feemarket into bytes. + Marshal() ([]byte, error) + + // Unmarshal the feemarket from bytes. + Unmarshal([]byte) error + // ------------------- Fee Market Parameters ------------------- // // Init which initializes the fee market (in InitGenesis) diff --git a/x/feemarket/types/genesis.go b/x/feemarket/types/genesis.go new file mode 100644 index 0000000..566cac2 --- /dev/null +++ b/x/feemarket/types/genesis.go @@ -0,0 +1,41 @@ +package types + +import ( + "encoding/json" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" +) + +// NewDefaultGenesisState returns a default genesis state for the module. +func NewDefaultGenesisState() *GenesisState { + return &GenesisState{ + Plugin: MustNewPlugin(mock.NewFeeMarket()), // TODO replace with another impl + Params: DefaultParams(), + } +} + +// NewGenesisState returns a new genesis state for the module. +func NewGenesisState(plugin FeeMarket, params Params) *GenesisState { + return &GenesisState{ + Plugin: plugin, + Params: params, + } +} + +// ValidateBasic performs basic validation of the genesis state data returning an +// error for any failed validation criteria. +func (gs *GenesisState) ValidateBasic() error { + fmimpl := FeeMarketImplementation{} + + err := + + return gs.Params.ValidateBasic() +} + +// GetGenesisStateFromAppState returns x/sla GenesisState given raw application +// genesis state. +func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMessage) GenesisState { + var gs GenesisState + cdc.MustUnmarshalJSON(appState[ModuleName], &gs) + return gs +} diff --git a/x/feemarket/types/genesis_test.go b/x/feemarket/types/genesis_test.go new file mode 100644 index 0000000..3bcdbcb --- /dev/null +++ b/x/feemarket/types/genesis_test.go @@ -0,0 +1,57 @@ +package types_test + +import ( + "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/skip-mev/feemarket/x/feemarket/types" +) + +func TestGenesis(t *testing.T) { + t.Run("can create a new default genesis state", func(t *testing.T) { + gs := types.NewDefaultGenesisState() + require.NoError(t, gs.ValidateBasic()) + }) + + t.Run("can accept a valid genesis state with a valid FeeMarket type", func(t *testing.T) { + plugin := types.MustNewPlugin(mock.NewFeeMarket()) + gs := types.NewGenesisState(plugin, types.Params{Enabled: false}) + require.NoError(t, gs.ValidateBasic()) + }) + + t.Run("can accept a valid genesis state with multiple incentive types", func(t *testing.T) { + badPrice := types.NewIncentives("badprice", [][]byte{[]byte("incentive1")}) + goodPrice := types.NewIncentives("goodprice", [][]byte{[]byte("incentive1")}) + + gs := types.NewGenesisState([]types.IncentivesByType{badPrice, goodPrice}) + + require.NoError(t, gs.ValidateBasic()) + }) + + t.Run("can reject a genesis state with duplicate incentive types", func(t *testing.T) { + badPrice := types.NewIncentives("badprice", [][]byte{[]byte("incentive1")}) + goodPrice := types.NewIncentives("badprice", [][]byte{[]byte("incentive1")}) + + gs := types.NewGenesisState([]types.IncentivesByType{badPrice, goodPrice}) + + require.Error(t, gs.ValidateBasic()) + }) + + t.Run("can reject a genesis state with an empty incentive type", func(t *testing.T) { + badPrice := types.NewIncentives("", [][]byte{[]byte("incentive1")}) + + gs := types.NewGenesisState([]types.IncentivesByType{badPrice}) + + require.Error(t, gs.ValidateBasic()) + }) + + t.Run("can reject a genesis state with an empty incentive", func(t *testing.T) { + badPrice := types.NewIncentives("badprice", [][]byte{[]byte("")}) + + gs := types.NewGenesisState([]types.IncentivesByType{badPrice}) + + require.Error(t, gs.ValidateBasic()) + }) +} diff --git a/x/feemarket/types/keys.go b/x/feemarket/types/keys.go new file mode 100644 index 0000000..ead39b8 --- /dev/null +++ b/x/feemarket/types/keys.go @@ -0,0 +1,8 @@ +package types + +const ( + // ModuleName is the name of the module. + ModuleName = "feemarket" + // StoreKey is the store key string for the sla module. + StoreKey = ModuleName +) diff --git a/x/feemarket/types/msgs.go b/x/feemarket/types/msgs.go new file mode 100644 index 0000000..4e40dc4 --- /dev/null +++ b/x/feemarket/types/msgs.go @@ -0,0 +1,29 @@ +package types + +import ( + sdk "github.com/cosmos/cosmos-sdk/types" +) + +var ( + _ sdk.Msg = &MsgParams{} +) + +// NewMsgParams returns a new message to update the x/feemarket module's parameters. +func NewMsgParams(authority string, params Params) MsgParams { + return MsgParams{ + Authority: authority, + Params: params, + } +} + +// ValidateBasic determines whether the information in the message is formatted correctly, specifically +// whether the authority is a valid acc-address. +func (m *MsgParams) ValidateBasic() error { + // validate authority address + _, err := sdk.AccAddressFromBech32(m.Authority) + if err != nil { + return err + } + + return nil +} diff --git a/x/feemarket/types/msgs_test.go b/x/feemarket/types/msgs_test.go new file mode 100644 index 0000000..c05fc49 --- /dev/null +++ b/x/feemarket/types/msgs_test.go @@ -0,0 +1,24 @@ +package types_test + +import ( + "testing" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + "github.com/skip-mev/feemarket/x/feemarket/types" +) + +func TestMsgParams(t *testing.T) { + t.Run("should reject a message with an invalid authority address", func(t *testing.T) { + msg := types.NewMsgParams("invalid", types.DefaultParams()) + err := msg.ValidateBasic() + require.Error(t, err) + }) + + t.Run("should accept an empty message with a valid authority address", func(t *testing.T) { + msg := types.NewMsgParams(sdk.AccAddress("test").String(), types.DefaultParams()) + err := msg.ValidateBasic() + require.NoError(t, err) + }) +} diff --git a/x/feemarket/types/params.go b/x/feemarket/types/params.go index 1ed9b91..7508736 100644 --- a/x/feemarket/types/params.go +++ b/x/feemarket/types/params.go @@ -13,3 +13,7 @@ func NewParams(enabled bool) Params { Enabled: enabled, } } + +func (p *Params) ValidateBasic() error { + return nil +} diff --git a/x/feemarket/types/plugins.go b/x/feemarket/types/plugins.go new file mode 100644 index 0000000..f8e0d6a --- /dev/null +++ b/x/feemarket/types/plugins.go @@ -0,0 +1,12 @@ +package types + +// MustNewPlugin creates a new instance of a FeeMarket plugin by marshalling a +// FeeMarketImplementation to bytes. Will panic() if marshalling fails. +func MustNewPlugin(implementation FeeMarketImplementation) FeeMarket { + implBz, err := implementation.Marshal() + if err != nil { + panic(err) + } + + return FeeMarket{Implementation: implBz} +} diff --git a/x/feemarket/types/plugins_test.go b/x/feemarket/types/plugins_test.go new file mode 100644 index 0000000..1d34ff3 --- /dev/null +++ b/x/feemarket/types/plugins_test.go @@ -0,0 +1,15 @@ +package types_test + +import ( + "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" + "github.com/stretchr/testify/require" + "testing" +) + +func TestMustNewPlugin(t *testing.T) { + t.Run("create valid plugin", func(t *testing.T) { + require.NotPanics(t, func() { + MustNewPlugin(mock.NewFeeMarket()) + }) + }) +} From 58f2e4b6b2568d2ba27e0c5db1c2f5e318d1c21a Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 14:55:58 -0500 Subject: [PATCH 15/28] format --- .../{types => interfaces}/feemarket.go | 12 +++++- .../{types => interfaces}/feemarket.pb.go | 2 +- x/feemarket/plugins/mock/feemarket.go | 10 ++--- x/feemarket/plugins/mock/feemarket_test.go | 9 +++++ x/feemarket/types/genesis.go | 12 ++++-- x/feemarket/types/genesis.pb.go | 7 ++-- x/feemarket/types/genesis_test.go | 39 ++++--------------- x/feemarket/types/msgs.go | 4 +- x/feemarket/types/plugins.go | 6 ++- x/feemarket/types/plugins_test.go | 9 +++-- 10 files changed, 55 insertions(+), 55 deletions(-) rename x/feemarket/{types => interfaces}/feemarket.go (89%) rename x/feemarket/{types => interfaces}/feemarket.pb.go (99%) create mode 100644 x/feemarket/plugins/mock/feemarket_test.go diff --git a/x/feemarket/types/feemarket.go b/x/feemarket/interfaces/feemarket.go similarity index 89% rename from x/feemarket/types/feemarket.go rename to x/feemarket/interfaces/feemarket.go index 0822da9..af5403d 100644 --- a/x/feemarket/types/feemarket.go +++ b/x/feemarket/interfaces/feemarket.go @@ -1,7 +1,8 @@ -package types +package interfaces import ( "encoding/json" + "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/gogoproto/proto" @@ -75,3 +76,12 @@ type FeeMarketImplementation interface { // UpdateHandler is responsible for updating the parameters of the // fee market plugin. Fees can optionally also be extracted here. type UpdateHandler func(ctx sdk.Context) error + +// ValidateBasic performs stateless checks on a FeeMarket to check validity. +func (fm *FeeMarket) ValidateBasic() error { + if len(fm.Implementation) == 0 { + return fmt.Errorf("fee market implementation cannot be empty") + } + + return nil +} diff --git a/x/feemarket/types/feemarket.pb.go b/x/feemarket/interfaces/feemarket.pb.go similarity index 99% rename from x/feemarket/types/feemarket.pb.go rename to x/feemarket/interfaces/feemarket.pb.go index b3e9cc2..01ff8e2 100644 --- a/x/feemarket/types/feemarket.pb.go +++ b/x/feemarket/interfaces/feemarket.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: feemarket/feemarket/v1/feemarket.proto -package types +package interfaces import ( fmt "fmt" diff --git a/x/feemarket/plugins/mock/feemarket.go b/x/feemarket/plugins/mock/feemarket.go index 77d8006..0c617c8 100644 --- a/x/feemarket/plugins/mock/feemarket.go +++ b/x/feemarket/plugins/mock/feemarket.go @@ -3,13 +3,11 @@ package mock import ( "encoding/json" - sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/skip-mev/feemarket/x/feemarket/interfaces" - "github.com/skip-mev/feemarket/x/feemarket/types" + sdk "github.com/cosmos/cosmos-sdk/types" ) -var _ types.FeeMarketImplementation = &MockFeeMarket{} - // NewFeeMarket returns an instance of a new MockFeeMarket. func NewFeeMarket() *MockFeeMarket { return &MockFeeMarket{} @@ -32,7 +30,7 @@ func (fm *MockFeeMarket) Export(_ sdk.Context) (json.RawMessage, error) { // BeginBlockUpdateHandler allows the fee market to be updated // after every block. This will be added to the BeginBlock chain. -func (fm *MockFeeMarket) BeginBlockUpdateHandler(_ sdk.Context) types.UpdateHandler { +func (fm *MockFeeMarket) BeginBlockUpdateHandler(_ sdk.Context) interfaces.UpdateHandler { return func(ctx sdk.Context) error { return nil } @@ -40,7 +38,7 @@ func (fm *MockFeeMarket) BeginBlockUpdateHandler(_ sdk.Context) types.UpdateHand // EndBlockUpdateHandler allows the fee market to be updated // after every block. This will be added to the EndBlock chain. -func (fm *MockFeeMarket) EndBlockUpdateHandler(_ sdk.Context) types.UpdateHandler { +func (fm *MockFeeMarket) EndBlockUpdateHandler(_ sdk.Context) interfaces.UpdateHandler { return func(ctx sdk.Context) error { return nil } diff --git a/x/feemarket/plugins/mock/feemarket_test.go b/x/feemarket/plugins/mock/feemarket_test.go new file mode 100644 index 0000000..0865c45 --- /dev/null +++ b/x/feemarket/plugins/mock/feemarket_test.go @@ -0,0 +1,9 @@ +package mock_test + +import ( + "github.com/skip-mev/feemarket/x/feemarket/interfaces" + "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" +) + +// type assertion in test to prevent import cycle +var _ interfaces.FeeMarketImplementation = &mock.MockFeeMarket{} diff --git a/x/feemarket/types/genesis.go b/x/feemarket/types/genesis.go index 566cac2..40cd18f 100644 --- a/x/feemarket/types/genesis.go +++ b/x/feemarket/types/genesis.go @@ -2,7 +2,11 @@ package types import ( "encoding/json" + + "github.com/skip-mev/feemarket/x/feemarket/interfaces" + "github.com/cosmos/cosmos-sdk/codec" + "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" ) @@ -15,7 +19,7 @@ func NewDefaultGenesisState() *GenesisState { } // NewGenesisState returns a new genesis state for the module. -func NewGenesisState(plugin FeeMarket, params Params) *GenesisState { +func NewGenesisState(plugin interfaces.FeeMarket, params Params) *GenesisState { return &GenesisState{ Plugin: plugin, Params: params, @@ -25,9 +29,9 @@ func NewGenesisState(plugin FeeMarket, params Params) *GenesisState { // ValidateBasic performs basic validation of the genesis state data returning an // error for any failed validation criteria. func (gs *GenesisState) ValidateBasic() error { - fmimpl := FeeMarketImplementation{} - - err := + if err := gs.Plugin.ValidateBasic(); err != nil { + return err + } return gs.Params.ValidateBasic() } diff --git a/x/feemarket/types/genesis.pb.go b/x/feemarket/types/genesis.pb.go index 41dab0c..634f5f4 100644 --- a/x/feemarket/types/genesis.pb.go +++ b/x/feemarket/types/genesis.pb.go @@ -8,6 +8,7 @@ import ( _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" + "github.com/skip-mev/feemarket/x/feemarket/interfaces" io "io" math "math" math_bits "math/bits" @@ -27,7 +28,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the feemarket module's genesis state. type GenesisState struct { // Plugin is the FeeMarket implementation plugged into the feemarket module. - Plugin FeeMarket `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin"` + Plugin interfaces.FeeMarket `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin"` // Params are the parameters for the feemarket module. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } @@ -65,11 +66,11 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetPlugin() FeeMarket { +func (m *GenesisState) GetPlugin() interfaces.FeeMarket { if m != nil { return m.Plugin } - return FeeMarket{} + return interfaces.FeeMarket{} } func (m *GenesisState) GetParams() Params { diff --git a/x/feemarket/types/genesis_test.go b/x/feemarket/types/genesis_test.go index 3bcdbcb..cfd8daa 100644 --- a/x/feemarket/types/genesis_test.go +++ b/x/feemarket/types/genesis_test.go @@ -1,11 +1,13 @@ package types_test import ( - "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" "testing" + "github.com/skip-mev/feemarket/x/feemarket/interfaces" + "github.com/stretchr/testify/require" + "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" "github.com/skip-mev/feemarket/x/feemarket/types" ) @@ -17,41 +19,14 @@ func TestGenesis(t *testing.T) { t.Run("can accept a valid genesis state with a valid FeeMarket type", func(t *testing.T) { plugin := types.MustNewPlugin(mock.NewFeeMarket()) - gs := types.NewGenesisState(plugin, types.Params{Enabled: false}) - require.NoError(t, gs.ValidateBasic()) - }) - - t.Run("can accept a valid genesis state with multiple incentive types", func(t *testing.T) { - badPrice := types.NewIncentives("badprice", [][]byte{[]byte("incentive1")}) - goodPrice := types.NewIncentives("goodprice", [][]byte{[]byte("incentive1")}) - - gs := types.NewGenesisState([]types.IncentivesByType{badPrice, goodPrice}) - + gs := types.NewGenesisState(plugin, types.NewParams(false)) require.NoError(t, gs.ValidateBasic()) }) - t.Run("can reject a genesis state with duplicate incentive types", func(t *testing.T) { - badPrice := types.NewIncentives("badprice", [][]byte{[]byte("incentive1")}) - goodPrice := types.NewIncentives("badprice", [][]byte{[]byte("incentive1")}) - - gs := types.NewGenesisState([]types.IncentivesByType{badPrice, goodPrice}) - - require.Error(t, gs.ValidateBasic()) - }) - - t.Run("can reject a genesis state with an empty incentive type", func(t *testing.T) { - badPrice := types.NewIncentives("", [][]byte{[]byte("incentive1")}) - - gs := types.NewGenesisState([]types.IncentivesByType{badPrice}) - - require.Error(t, gs.ValidateBasic()) - }) - - t.Run("can reject a genesis state with an empty incentive", func(t *testing.T) { - badPrice := types.NewIncentives("badprice", [][]byte{[]byte("")}) - - gs := types.NewGenesisState([]types.IncentivesByType{badPrice}) + t.Run("can reject a genesis with empty implementation", func(t *testing.T) { + plugin := interfaces.FeeMarket{Implementation: make([]byte, 0)} + gs := types.NewGenesisState(plugin, types.NewParams(false)) require.Error(t, gs.ValidateBasic()) }) } diff --git a/x/feemarket/types/msgs.go b/x/feemarket/types/msgs.go index 4e40dc4..94cdd46 100644 --- a/x/feemarket/types/msgs.go +++ b/x/feemarket/types/msgs.go @@ -4,9 +4,7 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" ) -var ( - _ sdk.Msg = &MsgParams{} -) +var _ sdk.Msg = &MsgParams{} // NewMsgParams returns a new message to update the x/feemarket module's parameters. func NewMsgParams(authority string, params Params) MsgParams { diff --git a/x/feemarket/types/plugins.go b/x/feemarket/types/plugins.go index f8e0d6a..c4ca669 100644 --- a/x/feemarket/types/plugins.go +++ b/x/feemarket/types/plugins.go @@ -1,12 +1,14 @@ package types +import "github.com/skip-mev/feemarket/x/feemarket/interfaces" + // MustNewPlugin creates a new instance of a FeeMarket plugin by marshalling a // FeeMarketImplementation to bytes. Will panic() if marshalling fails. -func MustNewPlugin(implementation FeeMarketImplementation) FeeMarket { +func MustNewPlugin(implementation interfaces.FeeMarketImplementation) interfaces.FeeMarket { implBz, err := implementation.Marshal() if err != nil { panic(err) } - return FeeMarket{Implementation: implBz} + return interfaces.FeeMarket{Implementation: implBz} } diff --git a/x/feemarket/types/plugins_test.go b/x/feemarket/types/plugins_test.go index 1d34ff3..b02669f 100644 --- a/x/feemarket/types/plugins_test.go +++ b/x/feemarket/types/plugins_test.go @@ -1,15 +1,18 @@ package types_test import ( - "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" - "github.com/stretchr/testify/require" "testing" + + "github.com/stretchr/testify/require" + + "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" + "github.com/skip-mev/feemarket/x/feemarket/types" ) func TestMustNewPlugin(t *testing.T) { t.Run("create valid plugin", func(t *testing.T) { require.NotPanics(t, func() { - MustNewPlugin(mock.NewFeeMarket()) + types.MustNewPlugin(mock.NewFeeMarket()) }) }) } From 4356a5beaa033d30a81508ff3105b64433192530 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 15:01:50 -0500 Subject: [PATCH 16/28] fix --- proto/feemarket/feemarket/v1/feemarket.proto | 2 +- proto/feemarket/feemarket/v1/mock.proto | 2 + x/feemarket/interfaces/feemarket.go | 18 ++--- x/feemarket/interfaces/feemarket.pb.go | 11 +-- x/feemarket/plugins/mock/feemarket.go | 4 +- x/feemarket/plugins/mock/mock.pb.go | 76 ++++++++++++++++---- x/feemarket/types/genesis.pb.go | 2 +- 7 files changed, 85 insertions(+), 30 deletions(-) diff --git a/proto/feemarket/feemarket/v1/feemarket.proto b/proto/feemarket/feemarket/v1/feemarket.proto index a00a805..6c46fd0 100644 --- a/proto/feemarket/feemarket/v1/feemarket.proto +++ b/proto/feemarket/feemarket/v1/feemarket.proto @@ -1,7 +1,7 @@ syntax = "proto3"; package feemarket.feemarket.v1; -option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; +option go_package = "github.com/skip-mev/feemarket/x/feemarket/interfaces"; import "google/protobuf/any.proto"; import "cosmos_proto/cosmos.proto"; diff --git a/proto/feemarket/feemarket/v1/mock.proto b/proto/feemarket/feemarket/v1/mock.proto index 442ae74..5af139f 100644 --- a/proto/feemarket/feemarket/v1/mock.proto +++ b/proto/feemarket/feemarket/v1/mock.proto @@ -12,4 +12,6 @@ import "cosmos_proto/cosmos.proto"; message MockFeeMarket { option (cosmos_proto.implements_interface) = "feemarket.feemarket.v1.FeeMarketImplementation"; + + string testData = 1; } diff --git a/x/feemarket/interfaces/feemarket.go b/x/feemarket/interfaces/feemarket.go index af5403d..acf8473 100644 --- a/x/feemarket/interfaces/feemarket.go +++ b/x/feemarket/interfaces/feemarket.go @@ -8,6 +8,15 @@ import ( "github.com/cosmos/gogoproto/proto" ) +// ValidateBasic performs stateless checks on a FeeMarket to check validity. +func (fm *FeeMarket) ValidateBasic() error { + if len(fm.Implementation) == 0 { + return fmt.Errorf("fee market implementation cannot be empty") + } + + return nil +} + // FeeMarketImplementation represents the interface of various FeeMarket types implemented // by other modules or packages. type FeeMarketImplementation interface { @@ -76,12 +85,3 @@ type FeeMarketImplementation interface { // UpdateHandler is responsible for updating the parameters of the // fee market plugin. Fees can optionally also be extracted here. type UpdateHandler func(ctx sdk.Context) error - -// ValidateBasic performs stateless checks on a FeeMarket to check validity. -func (fm *FeeMarket) ValidateBasic() error { - if len(fm.Implementation) == 0 { - return fmt.Errorf("fee market implementation cannot be empty") - } - - return nil -} diff --git a/x/feemarket/interfaces/feemarket.pb.go b/x/feemarket/interfaces/feemarket.pb.go index 01ff8e2..af6a032 100644 --- a/x/feemarket/interfaces/feemarket.pb.go +++ b/x/feemarket/interfaces/feemarket.pb.go @@ -81,7 +81,7 @@ func init() { } var fileDescriptor_515665ad4a4fc434 = []byte{ - // 207 bytes of a gzipped FileDescriptorProto + // 212 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0x4b, 0x4d, 0xcd, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0x11, 0x1c, 0xbd, 0x82, 0xa2, 0xfc, 0x92, 0x7c, 0x21, 0x31, 0x84, 0x00, 0x82, 0x55, 0x66, 0x28, 0x25, 0x99, 0x9e, 0x9f, 0x9f, 0x9e, @@ -90,11 +90,12 @@ var fileDescriptor_515665ad4a4fc434 = []byte{ 0x4e, 0xb7, 0xd4, 0x54, 0x5f, 0xb0, 0x29, 0x42, 0x51, 0x5c, 0x7c, 0x99, 0xb9, 0x05, 0x39, 0xa9, 0xb9, 0xa9, 0x79, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x4e, 0x46, 0xa7, 0xb6, 0xe8, 0xea, 0x61, 0xb7, 0x56, 0x0f, 0xae, 0xdb, 0x13, 0x45, 0x67, 0x10, 0x9a, - 0x49, 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, + 0x49, 0x4e, 0x7e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, + 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x92, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x9c, 0x9d, 0x59, 0xa0, 0x9b, 0x9b, - 0x5a, 0x86, 0x14, 0x04, 0x15, 0x48, 0xec, 0x92, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0xd3, - 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x28, 0x7e, 0x40, 0x2f, 0x32, 0x01, 0x00, 0x00, + 0x5a, 0x86, 0x14, 0x04, 0x15, 0x48, 0xec, 0xcc, 0xbc, 0x92, 0xd4, 0xa2, 0xb4, 0xc4, 0xe4, 0xd4, + 0xe2, 0x24, 0x36, 0xb0, 0xfb, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x46, 0x13, 0x02, + 0x37, 0x01, 0x00, 0x00, } func (m *FeeMarket) Marshal() (dAtA []byte, err error) { diff --git a/x/feemarket/plugins/mock/feemarket.go b/x/feemarket/plugins/mock/feemarket.go index 0c617c8..e8cb005 100644 --- a/x/feemarket/plugins/mock/feemarket.go +++ b/x/feemarket/plugins/mock/feemarket.go @@ -10,7 +10,9 @@ import ( // NewFeeMarket returns an instance of a new MockFeeMarket. func NewFeeMarket() *MockFeeMarket { - return &MockFeeMarket{} + return &MockFeeMarket{ + TestData: "test", + } } // ValidateBasic is a no-op. diff --git a/x/feemarket/plugins/mock/mock.pb.go b/x/feemarket/plugins/mock/mock.pb.go index 4d3b5fe..2947ca6 100644 --- a/x/feemarket/plugins/mock/mock.pb.go +++ b/x/feemarket/plugins/mock/mock.pb.go @@ -6,7 +6,6 @@ package mock import ( fmt "fmt" _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/types/tx/amino" proto "github.com/cosmos/gogoproto/proto" io "io" math "math" @@ -29,6 +28,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // // NOTE: This is an example of a mock fee market. It is not used in production. type MockFeeMarket struct { + TestData string `protobuf:"bytes,1,opt,name=testData,proto3" json:"testData,omitempty"` } func (m *MockFeeMarket) Reset() { *m = MockFeeMarket{} } @@ -64,6 +64,13 @@ func (m *MockFeeMarket) XXX_DiscardUnknown() { var xxx_messageInfo_MockFeeMarket proto.InternalMessageInfo +func (m *MockFeeMarket) GetTestData() string { + if m != nil { + return m.TestData + } + return "" +} + func init() { proto.RegisterType((*MockFeeMarket)(nil), "feemarket.feemarket.v1.MockFeeMarket") } @@ -71,20 +78,20 @@ func init() { func init() { proto.RegisterFile("feemarket/feemarket/v1/mock.proto", fileDescriptor_6b7e37c7950103c0) } var fileDescriptor_6b7e37c7950103c0 = []byte{ - // 203 bytes of a gzipped FileDescriptorProto + // 204 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0x4b, 0x4d, 0xcd, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x73, 0xf3, 0x93, 0xb3, 0xf5, - 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x12, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, 0x60, - 0x62, 0x6e, 0x66, 0x5e, 0xbe, 0x3e, 0x98, 0x84, 0x28, 0x95, 0x92, 0x4c, 0xce, 0x2f, 0xce, 0xcd, - 0x2f, 0x8e, 0x07, 0xf3, 0xf4, 0x21, 0x1c, 0x88, 0x94, 0x52, 0x26, 0x17, 0xaf, 0x6f, 0x7e, 0x72, - 0xb6, 0x5b, 0x6a, 0xaa, 0x2f, 0xd8, 0x04, 0xab, 0x88, 0x53, 0x5b, 0x74, 0xf5, 0xb0, 0x1b, 0xad, - 0x07, 0x57, 0xe5, 0x99, 0x5b, 0x90, 0x93, 0x9a, 0x9b, 0x9a, 0x57, 0x92, 0x58, 0x92, 0x99, 0x9f, - 0xd7, 0xf5, 0x7c, 0x83, 0x16, 0x56, 0x07, 0xa3, 0x98, 0xec, 0x14, 0x70, 0xe2, 0x91, 0x1c, 0xe3, - 0x85, 0x47, 0x72, 0x8c, 0x0f, 0x1e, 0xc9, 0x31, 0x4e, 0x78, 0x2c, 0xc7, 0x70, 0xe1, 0xb1, 0x1c, - 0xc3, 0x8d, 0xc7, 0x72, 0x0c, 0x51, 0x66, 0xe9, 0x99, 0x25, 0x19, 0xa5, 0x49, 0x7a, 0xc9, 0xf9, - 0xb9, 0xfa, 0xc5, 0xd9, 0x99, 0x05, 0xba, 0xb9, 0xa9, 0x65, 0x48, 0xc6, 0x54, 0x20, 0xb1, 0x0b, - 0x72, 0x4a, 0xd3, 0x33, 0xf3, 0x8a, 0xc1, 0x01, 0x91, 0xc4, 0x06, 0xf6, 0x83, 0x31, 0x20, 0x00, - 0x00, 0xff, 0xff, 0xd7, 0x5e, 0xa8, 0x15, 0x2e, 0x01, 0x00, 0x00, + 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x12, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, 0x64, + 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x3c, 0x58, 0x95, 0x3e, 0x84, 0x03, 0xd1, 0xa2, 0x14, 0xcf, + 0xc5, 0xeb, 0x9b, 0x9f, 0x9c, 0xed, 0x96, 0x9a, 0xea, 0x0b, 0x56, 0x2e, 0x24, 0xc5, 0xc5, 0x51, + 0x92, 0x5a, 0x5c, 0xe2, 0x92, 0x58, 0x92, 0x28, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe7, + 0x5b, 0x19, 0x9d, 0xda, 0xa2, 0xab, 0x87, 0xdd, 0x0e, 0x3d, 0xb8, 0x09, 0x9e, 0xb9, 0x05, 0x39, + 0xa9, 0xb9, 0xa9, 0x79, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x4e, 0x01, 0x27, 0x1e, 0xc9, 0x31, + 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, + 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x96, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, + 0x9f, 0xab, 0x5f, 0x9c, 0x9d, 0x59, 0xa0, 0x9b, 0x9b, 0x5a, 0x86, 0xe4, 0xb5, 0x0a, 0x24, 0x76, + 0x41, 0x4e, 0x69, 0x7a, 0x66, 0x5e, 0x31, 0xd8, 0xaf, 0x49, 0x6c, 0x60, 0x97, 0x1b, 0x03, 0x02, + 0x00, 0x00, 0xff, 0xff, 0x5a, 0xc0, 0x8f, 0x93, 0x11, 0x01, 0x00, 0x00, } func (m *MockFeeMarket) Marshal() (dAtA []byte, err error) { @@ -107,6 +114,13 @@ func (m *MockFeeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if len(m.TestData) > 0 { + i -= len(m.TestData) + copy(dAtA[i:], m.TestData) + i = encodeVarintMock(dAtA, i, uint64(len(m.TestData))) + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -127,6 +141,10 @@ func (m *MockFeeMarket) Size() (n int) { } var l int _ = l + l = len(m.TestData) + if l > 0 { + n += 1 + l + sovMock(uint64(l)) + } return n } @@ -165,6 +183,38 @@ func (m *MockFeeMarket) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MockFeeMarket: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field TestData", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowMock + } + 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 ErrInvalidLengthMock + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthMock + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.TestData = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipMock(dAtA[iNdEx:]) diff --git a/x/feemarket/types/genesis.pb.go b/x/feemarket/types/genesis.pb.go index 634f5f4..ddaba0c 100644 --- a/x/feemarket/types/genesis.pb.go +++ b/x/feemarket/types/genesis.pb.go @@ -8,7 +8,7 @@ import ( _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - "github.com/skip-mev/feemarket/x/feemarket/interfaces" + interfaces "github.com/skip-mev/feemarket/x/feemarket/interfaces" io "io" math "math" math_bits "math/bits" From 5283e3851be497fc2c9e3c5e07be7aa7162bfa6b Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 15:07:28 -0500 Subject: [PATCH 17/28] clean --- x/feemarket/plugins/mock/feemarket.go | 7 +++++-- x/feemarket/plugins/mock/feemarket_test.go | 9 --------- 2 files changed, 5 insertions(+), 11 deletions(-) delete mode 100644 x/feemarket/plugins/mock/feemarket_test.go diff --git a/x/feemarket/plugins/mock/feemarket.go b/x/feemarket/plugins/mock/feemarket.go index e8cb005..78cffa4 100644 --- a/x/feemarket/plugins/mock/feemarket.go +++ b/x/feemarket/plugins/mock/feemarket.go @@ -3,11 +3,14 @@ package mock import ( "encoding/json" - "github.com/skip-mev/feemarket/x/feemarket/interfaces" - sdk "github.com/cosmos/cosmos-sdk/types" + + "github.com/skip-mev/feemarket/x/feemarket/interfaces" ) +// type assertion in test to prevent import cycle +var _ interfaces.FeeMarketImplementation = &MockFeeMarket{} + // NewFeeMarket returns an instance of a new MockFeeMarket. func NewFeeMarket() *MockFeeMarket { return &MockFeeMarket{ diff --git a/x/feemarket/plugins/mock/feemarket_test.go b/x/feemarket/plugins/mock/feemarket_test.go deleted file mode 100644 index 0865c45..0000000 --- a/x/feemarket/plugins/mock/feemarket_test.go +++ /dev/null @@ -1,9 +0,0 @@ -package mock_test - -import ( - "github.com/skip-mev/feemarket/x/feemarket/interfaces" - "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" -) - -// type assertion in test to prevent import cycle -var _ interfaces.FeeMarketImplementation = &mock.MockFeeMarket{} From fb5a1afe0084bedad0635a6aa896f2feec45108b Mon Sep 17 00:00:00 2001 From: Alex Johnson Date: Thu, 9 Nov 2023 15:32:24 -0500 Subject: [PATCH 18/28] Update proto/feemarket/feemarket/v1/mock.proto Co-authored-by: David Terpay <35130517+davidterpay@users.noreply.github.com> --- proto/feemarket/feemarket/v1/mock.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/feemarket/feemarket/v1/mock.proto b/proto/feemarket/feemarket/v1/mock.proto index 5af139f..2fa0a4f 100644 --- a/proto/feemarket/feemarket/v1/mock.proto +++ b/proto/feemarket/feemarket/v1/mock.proto @@ -13,5 +13,5 @@ message MockFeeMarket { option (cosmos_proto.implements_interface) = "feemarket.feemarket.v1.FeeMarketImplementation"; - string testData = 1; + string test_data = 1; } From 8e007e1a3c1316e478bc905273fb868e0c797e7e Mon Sep 17 00:00:00 2001 From: Alex Johnson Date: Thu, 9 Nov 2023 15:35:01 -0500 Subject: [PATCH 19/28] Update x/feemarket/types/genesis.go Co-authored-by: David Terpay <35130517+davidterpay@users.noreply.github.com> --- x/feemarket/types/genesis.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/feemarket/types/genesis.go b/x/feemarket/types/genesis.go index 40cd18f..e04c93b 100644 --- a/x/feemarket/types/genesis.go +++ b/x/feemarket/types/genesis.go @@ -36,7 +36,7 @@ func (gs *GenesisState) ValidateBasic() error { return gs.Params.ValidateBasic() } -// GetGenesisStateFromAppState returns x/sla GenesisState given raw application +// GetGenesisStateFromAppState returns x/feemarket GenesisState given raw application // genesis state. func GetGenesisStateFromAppState(cdc codec.Codec, appState map[string]json.RawMessage) GenesisState { var gs GenesisState From 73148c2b16f81d341fba8ca12bad50c0f001eca3 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 15:36:01 -0500 Subject: [PATCH 20/28] regen --- x/feemarket/plugins/mock/mock.pb.go | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/x/feemarket/plugins/mock/mock.pb.go b/x/feemarket/plugins/mock/mock.pb.go index 2947ca6..1993249 100644 --- a/x/feemarket/plugins/mock/mock.pb.go +++ b/x/feemarket/plugins/mock/mock.pb.go @@ -28,7 +28,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // // NOTE: This is an example of a mock fee market. It is not used in production. type MockFeeMarket struct { - TestData string `protobuf:"bytes,1,opt,name=testData,proto3" json:"testData,omitempty"` + TestData string `protobuf:"bytes,1,opt,name=test_data,json=testData,proto3" json:"test_data,omitempty"` } func (m *MockFeeMarket) Reset() { *m = MockFeeMarket{} } @@ -78,20 +78,21 @@ func init() { func init() { proto.RegisterFile("feemarket/feemarket/v1/mock.proto", fileDescriptor_6b7e37c7950103c0) } var fileDescriptor_6b7e37c7950103c0 = []byte{ - // 204 bytes of a gzipped FileDescriptorProto + // 210 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0x4b, 0x4d, 0xcd, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x73, 0xf3, 0x93, 0xb3, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x12, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, 0x64, - 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x3c, 0x58, 0x95, 0x3e, 0x84, 0x03, 0xd1, 0xa2, 0x14, 0xcf, - 0xc5, 0xeb, 0x9b, 0x9f, 0x9c, 0xed, 0x96, 0x9a, 0xea, 0x0b, 0x56, 0x2e, 0x24, 0xc5, 0xc5, 0x51, - 0x92, 0x5a, 0x5c, 0xe2, 0x92, 0x58, 0x92, 0x28, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0x04, 0xe7, - 0x5b, 0x19, 0x9d, 0xda, 0xa2, 0xab, 0x87, 0xdd, 0x0e, 0x3d, 0xb8, 0x09, 0x9e, 0xb9, 0x05, 0x39, - 0xa9, 0xb9, 0xa9, 0x79, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x4e, 0x01, 0x27, 0x1e, 0xc9, 0x31, - 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, - 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x96, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, - 0x9f, 0xab, 0x5f, 0x9c, 0x9d, 0x59, 0xa0, 0x9b, 0x9b, 0x5a, 0x86, 0xe4, 0xb5, 0x0a, 0x24, 0x76, - 0x41, 0x4e, 0x69, 0x7a, 0x66, 0x5e, 0x31, 0xd8, 0xaf, 0x49, 0x6c, 0x60, 0x97, 0x1b, 0x03, 0x02, - 0x00, 0x00, 0xff, 0xff, 0x5a, 0xc0, 0x8f, 0x93, 0x11, 0x01, 0x00, 0x00, + 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x3c, 0x58, 0x95, 0x3e, 0x84, 0x03, 0xd1, 0xa2, 0x94, 0xc0, + 0xc5, 0xeb, 0x9b, 0x9f, 0x9c, 0xed, 0x96, 0x9a, 0xea, 0x0b, 0x56, 0x2e, 0x24, 0xcd, 0xc5, 0x59, + 0x92, 0x5a, 0x5c, 0x12, 0x9f, 0x92, 0x58, 0x92, 0x28, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0xc4, + 0x01, 0x12, 0x70, 0x49, 0x2c, 0x49, 0xb4, 0x32, 0x3a, 0xb5, 0x45, 0x57, 0x0f, 0xbb, 0x25, 0x7a, + 0x70, 0x23, 0x3c, 0x73, 0x0b, 0x72, 0x52, 0x73, 0x53, 0xf3, 0x4a, 0x12, 0x4b, 0x32, 0xf3, 0xf3, + 0x9c, 0x02, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, + 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x2c, 0x3d, 0xb3, + 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xbf, 0x38, 0x3b, 0xb3, 0x40, 0x37, 0x37, 0xb5, + 0x0c, 0xc9, 0x6f, 0x15, 0x48, 0xec, 0x82, 0x9c, 0xd2, 0xf4, 0xcc, 0xbc, 0x62, 0xb0, 0x67, 0x93, + 0xd8, 0xc0, 0x4e, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x52, 0x48, 0x0c, 0x12, 0x01, + 0x00, 0x00, } func (m *MockFeeMarket) Marshal() (dAtA []byte, err error) { From fb601fcf2c792cd1a40a815ed065a700a236d3d8 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 15:39:13 -0500 Subject: [PATCH 21/28] fix --- proto/feemarket/feemarket/v1/tx.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/feemarket/feemarket/v1/tx.proto b/proto/feemarket/feemarket/v1/tx.proto index 47ce6e4..1db4097 100644 --- a/proto/feemarket/feemarket/v1/tx.proto +++ b/proto/feemarket/feemarket/v1/tx.proto @@ -20,7 +20,7 @@ service Msg { // MsgParams defines the Msg/Params request type. It contains the // new parameters for the feemarket module. message MsgParams { - option (cosmos.msg.v1.signer) = "from_address"; + option (cosmos.msg.v1.signer) = "authority"; // Params defines the new parameters for the feemarket module. Params params = 1 [ (gogoproto.nullable) = false ]; From 685f72bf6ee25874a0c1cce3eebf25da116c4b9c Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 15:39:24 -0500 Subject: [PATCH 22/28] fix --- x/feemarket/types/tx.pb.go | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/x/feemarket/types/tx.pb.go b/x/feemarket/types/tx.pb.go index d7b97b0..38c57aa 100644 --- a/x/feemarket/types/tx.pb.go +++ b/x/feemarket/types/tx.pb.go @@ -132,28 +132,27 @@ func init() { func init() { proto.RegisterFile("feemarket/feemarket/v1/tx.proto", fileDescriptor_1bbf67a633e47917) } var fileDescriptor_1bbf67a633e47917 = []byte{ - // 325 bytes of a gzipped FileDescriptorProto + // 317 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0x4b, 0x4d, 0xcd, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x4b, 0x2a, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0xc2, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, 0x0a, 0x0e, 0x8d, 0xe9, 0xa9, 0x79, 0xa9, 0xc5, 0x99, 0xc5, 0x10, 0xdd, 0x52, 0x92, 0xc9, 0xf9, 0xc5, 0xb9, 0xf9, 0xc5, 0xf1, 0x60, 0x9e, 0x3e, 0x84, 0x03, 0x95, 0x12, 0x87, 0xf0, 0xf4, 0x73, 0x8b, 0xd3, 0x41, 0xfa, 0x72, 0x8b, 0xd3, 0xa1, 0x12, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x10, 0x0d, 0x20, 0x16, 0x44, - 0x54, 0x69, 0x0a, 0x23, 0x17, 0xa7, 0x6f, 0x71, 0x7a, 0x40, 0x62, 0x51, 0x62, 0x6e, 0xb1, 0x90, + 0x54, 0x69, 0x22, 0x23, 0x17, 0xa7, 0x6f, 0x71, 0x7a, 0x40, 0x62, 0x51, 0x62, 0x6e, 0xb1, 0x90, 0x0d, 0x17, 0x5b, 0x01, 0x98, 0x25, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa7, 0x87, 0xdd, 0x99, 0x7a, 0x10, 0xf5, 0x4e, 0x2c, 0x27, 0xee, 0xc9, 0x33, 0x04, 0x41, 0xf5, 0x08, 0x99, 0x71, 0x71, 0x26, 0x96, 0x96, 0x64, 0xe4, 0x17, 0x65, 0x96, 0x54, 0x4a, 0x30, 0x29, 0x30, 0x6a, 0x70, 0x3a, 0x49, 0x5c, 0xda, 0xa2, 0x2b, 0x02, 0x75, 0x9f, 0x63, 0x4a, 0x4a, 0x51, 0x6a, 0x71, 0x71, - 0x70, 0x49, 0x51, 0x66, 0x5e, 0x7a, 0x10, 0x42, 0xa9, 0x95, 0x60, 0xd3, 0xf3, 0x0d, 0x5a, 0x3c, - 0x69, 0x45, 0xf9, 0xb9, 0xf1, 0x89, 0x10, 0x35, 0x4a, 0xc2, 0x5c, 0x82, 0x70, 0x57, 0x05, 0xa5, - 0x16, 0x17, 0xe4, 0xe7, 0x15, 0xa7, 0x1a, 0xa5, 0x70, 0x31, 0xfb, 0x16, 0xa7, 0x0b, 0x85, 0x71, - 0xb1, 0x41, 0x9d, 0xab, 0x88, 0xcb, 0x79, 0x70, 0xbd, 0x52, 0x9a, 0x04, 0x95, 0xc0, 0x8c, 0x97, - 0x62, 0x6d, 0x78, 0xbe, 0x41, 0x8b, 0xd1, 0xc9, 0xf3, 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, - 0x18, 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, - 0xe5, 0x18, 0xa2, 0xf4, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x8b, - 0xb3, 0x33, 0x0b, 0x74, 0x73, 0x53, 0xcb, 0x90, 0x62, 0xa9, 0x02, 0x89, 0x5d, 0x52, 0x59, 0x90, - 0x5a, 0x9c, 0xc4, 0x06, 0x0e, 0x63, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2a, 0xdd, 0xc1, - 0x8e, 0x0e, 0x02, 0x00, 0x00, + 0x70, 0x49, 0x51, 0x66, 0x5e, 0x7a, 0x10, 0x42, 0xa9, 0x15, 0x5f, 0xd3, 0xf3, 0x0d, 0x5a, 0x08, + 0xbe, 0x92, 0x30, 0x97, 0x20, 0xdc, 0x49, 0x41, 0xa9, 0xc5, 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x46, + 0x29, 0x5c, 0xcc, 0xbe, 0xc5, 0xe9, 0x42, 0x61, 0x5c, 0x6c, 0x50, 0xb7, 0x2a, 0xe2, 0x72, 0x1b, + 0x5c, 0xaf, 0x94, 0x26, 0x41, 0x25, 0x30, 0xe3, 0xa5, 0x58, 0x1b, 0x9e, 0x6f, 0xd0, 0x62, 0x74, + 0xf2, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, + 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, 0x86, 0x28, 0xfd, 0xf4, 0xcc, 0x92, + 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xe2, 0xec, 0xcc, 0x02, 0xdd, 0xdc, 0xd4, 0x32, + 0xa4, 0x28, 0xaa, 0x40, 0x62, 0x97, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0x03, 0xd8, 0x18, + 0x10, 0x00, 0x00, 0xff, 0xff, 0x32, 0x51, 0x38, 0x20, 0x0b, 0x02, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. From ea6e913f9e6c7343f095fd04f8d0850fd0fdda3d Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 16:01:13 -0500 Subject: [PATCH 23/28] simplify --- .../v1/{mock.proto => default.proto} | 12 +- proto/feemarket/feemarket/v1/feemarket.proto | 17 - proto/feemarket/feemarket/v1/genesis.proto | 6 +- x/feemarket/interfaces/feemarket.go | 10 - x/feemarket/interfaces/feemarket.pb.go | 328 ------------------ .../plugins/defaultmarket/default.pb.go | 327 +++++++++++++++++ .../{mock => defaultmarket}/feemarket.go | 39 +-- x/feemarket/plugins/mock/ante.go | 1 - x/feemarket/plugins/mock/mock.pb.go | 324 ----------------- x/feemarket/types/genesis.go | 18 +- x/feemarket/types/genesis.pb.go | 70 ++-- x/feemarket/types/genesis_test.go | 13 +- x/feemarket/types/plugins.go | 4 +- x/feemarket/types/plugins_test.go | 4 +- 14 files changed, 405 insertions(+), 768 deletions(-) rename proto/feemarket/feemarket/v1/{mock.proto => default.proto} (50%) delete mode 100644 proto/feemarket/feemarket/v1/feemarket.proto delete mode 100644 x/feemarket/interfaces/feemarket.pb.go create mode 100644 x/feemarket/plugins/defaultmarket/default.pb.go rename x/feemarket/plugins/{mock => defaultmarket}/feemarket.go (61%) delete mode 100644 x/feemarket/plugins/mock/ante.go delete mode 100644 x/feemarket/plugins/mock/mock.pb.go diff --git a/proto/feemarket/feemarket/v1/mock.proto b/proto/feemarket/feemarket/v1/default.proto similarity index 50% rename from proto/feemarket/feemarket/v1/mock.proto rename to proto/feemarket/feemarket/v1/default.proto index 9b7814d..027ba79 100644 --- a/proto/feemarket/feemarket/v1/mock.proto +++ b/proto/feemarket/feemarket/v1/default.proto @@ -1,18 +1,18 @@ syntax = "proto3"; package feemarket.feemarket.v1; -option go_package = "github.com/skip-mev/feemarket/x/feemarket/plugins/mock"; +option go_package = "github.com/skip-mev/feemarket/x/feemarket/plugins/defaultmarket"; import "cosmos_proto/cosmos.proto"; -// MockFeeMarket is a message that contains the information about a mock fee +// DefaultMarket is a message that contains the information about a default fee // market implementation. // -// NOTE: This is an example of a mock fee market. It is not used in production. -message MockFeeMarket { +// NOTE: Most operations of this fee market are no-ops. +message DefaultMarket { option (cosmos_proto.implements_interface) = "feemarket.feemarket.v1.FeeMarketImplementation"; - // TestData represents dummy test data for the MockFeeMarket - string test_data = 1; + // Data represents arbitrary data stored in the implementation. + bytes data = 1; } diff --git a/proto/feemarket/feemarket/v1/feemarket.proto b/proto/feemarket/feemarket/v1/feemarket.proto deleted file mode 100644 index 6c46fd0..0000000 --- a/proto/feemarket/feemarket/v1/feemarket.proto +++ /dev/null @@ -1,17 +0,0 @@ -syntax = "proto3"; -package feemarket.feemarket.v1; - -option go_package = "github.com/skip-mev/feemarket/x/feemarket/interfaces"; - -import "google/protobuf/any.proto"; -import "cosmos_proto/cosmos.proto"; - -// FeeMarket is the fee market implementation to be used by the x/feemarket -// module. -message FeeMarket { - // Implementation is a byte array that must implement - // x/feemarket/types/FeeMarketImplementation - bytes implementation = 1 - [ (cosmos_proto.accepts_interface) = - "feemarket.feemarket.v1.FeeMarketImplementation" ]; -} diff --git a/proto/feemarket/feemarket/v1/genesis.proto b/proto/feemarket/feemarket/v1/genesis.proto index 128b9e0..9122fef 100644 --- a/proto/feemarket/feemarket/v1/genesis.proto +++ b/proto/feemarket/feemarket/v1/genesis.proto @@ -5,12 +5,14 @@ option go_package = "github.com/skip-mev/feemarket/x/feemarket/types"; import "gogoproto/gogo.proto"; import "cosmos_proto/cosmos.proto"; -import "feemarket/feemarket/v1/feemarket.proto"; // GenesisState defines the feemarket module's genesis state. message GenesisState { // Plugin is the FeeMarket implementation plugged into the feemarket module. - FeeMarket plugin = 1 [ (gogoproto.nullable) = false ]; + // Must implement x/feemarket/types/FeeMarketImplementation + bytes plugin = 1 + [ (cosmos_proto.accepts_interface) = + "feemarket.feemarket.v1.FeeMarketImplementation" ]; // Params are the parameters for the feemarket module. Params params = 2 [ (gogoproto.nullable) = false ]; diff --git a/x/feemarket/interfaces/feemarket.go b/x/feemarket/interfaces/feemarket.go index acf8473..427d17d 100644 --- a/x/feemarket/interfaces/feemarket.go +++ b/x/feemarket/interfaces/feemarket.go @@ -2,21 +2,11 @@ package interfaces import ( "encoding/json" - "fmt" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/gogoproto/proto" ) -// ValidateBasic performs stateless checks on a FeeMarket to check validity. -func (fm *FeeMarket) ValidateBasic() error { - if len(fm.Implementation) == 0 { - return fmt.Errorf("fee market implementation cannot be empty") - } - - return nil -} - // FeeMarketImplementation represents the interface of various FeeMarket types implemented // by other modules or packages. type FeeMarketImplementation interface { diff --git a/x/feemarket/interfaces/feemarket.pb.go b/x/feemarket/interfaces/feemarket.pb.go deleted file mode 100644 index af6a032..0000000 --- a/x/feemarket/interfaces/feemarket.pb.go +++ /dev/null @@ -1,328 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: feemarket/feemarket/v1/feemarket.proto - -package interfaces - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - _ "github.com/cosmos/cosmos-sdk/codec/types" - 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 - -// FeeMarket is the fee market implementation to be used by the x/feemarket -// module. -type FeeMarket struct { - // Implementation is a byte array that must implement - // x/feemarket/types/FeeMarketImplementation - Implementation []byte `protobuf:"bytes,1,opt,name=implementation,proto3" json:"implementation,omitempty"` -} - -func (m *FeeMarket) Reset() { *m = FeeMarket{} } -func (m *FeeMarket) String() string { return proto.CompactTextString(m) } -func (*FeeMarket) ProtoMessage() {} -func (*FeeMarket) Descriptor() ([]byte, []int) { - return fileDescriptor_515665ad4a4fc434, []int{0} -} -func (m *FeeMarket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FeeMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FeeMarket.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 *FeeMarket) XXX_Merge(src proto.Message) { - xxx_messageInfo_FeeMarket.Merge(m, src) -} -func (m *FeeMarket) XXX_Size() int { - return m.Size() -} -func (m *FeeMarket) XXX_DiscardUnknown() { - xxx_messageInfo_FeeMarket.DiscardUnknown(m) -} - -var xxx_messageInfo_FeeMarket proto.InternalMessageInfo - -func (m *FeeMarket) GetImplementation() []byte { - if m != nil { - return m.Implementation - } - return nil -} - -func init() { - proto.RegisterType((*FeeMarket)(nil), "feemarket.feemarket.v1.FeeMarket") -} - -func init() { - proto.RegisterFile("feemarket/feemarket/v1/feemarket.proto", fileDescriptor_515665ad4a4fc434) -} - -var fileDescriptor_515665ad4a4fc434 = []byte{ - // 212 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4b, 0x4b, 0x4d, 0xcd, - 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0x11, 0x1c, 0xbd, 0x82, 0xa2, 0xfc, - 0x92, 0x7c, 0x21, 0x31, 0x84, 0x00, 0x82, 0x55, 0x66, 0x28, 0x25, 0x99, 0x9e, 0x9f, 0x9f, 0x9e, - 0x93, 0xaa, 0x0f, 0x56, 0x95, 0x54, 0x9a, 0xa6, 0x9f, 0x98, 0x57, 0x09, 0xd1, 0x22, 0x25, 0x99, - 0x9c, 0x5f, 0x9c, 0x9b, 0x5f, 0x1c, 0x0f, 0xe6, 0xe9, 0x43, 0x38, 0x10, 0x29, 0xa5, 0x74, 0x2e, - 0x4e, 0xb7, 0xd4, 0x54, 0x5f, 0xb0, 0x29, 0x42, 0x51, 0x5c, 0x7c, 0x99, 0xb9, 0x05, 0x39, 0xa9, - 0xb9, 0xa9, 0x79, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0x3c, 0x4e, - 0x46, 0xa7, 0xb6, 0xe8, 0xea, 0x61, 0xb7, 0x56, 0x0f, 0xae, 0xdb, 0x13, 0x45, 0x67, 0x10, 0x9a, - 0x49, 0x4e, 0x7e, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, - 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x92, 0x9e, - 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, 0x5f, 0x9c, 0x9d, 0x59, 0xa0, 0x9b, 0x9b, - 0x5a, 0x86, 0x14, 0x04, 0x15, 0x48, 0xec, 0xcc, 0xbc, 0x92, 0xd4, 0xa2, 0xb4, 0xc4, 0xe4, 0xd4, - 0xe2, 0x24, 0x36, 0xb0, 0xfb, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x90, 0x46, 0x13, 0x02, - 0x37, 0x01, 0x00, 0x00, -} - -func (m *FeeMarket) 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 *FeeMarket) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FeeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Implementation) > 0 { - i -= len(m.Implementation) - copy(dAtA[i:], m.Implementation) - i = encodeVarintFeemarket(dAtA, i, uint64(len(m.Implementation))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintFeemarket(dAtA []byte, offset int, v uint64) int { - offset -= sovFeemarket(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *FeeMarket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Implementation) - if l > 0 { - n += 1 + l + sovFeemarket(uint64(l)) - } - return n -} - -func sovFeemarket(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozFeemarket(x uint64) (n int) { - return sovFeemarket(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *FeeMarket) 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 ErrIntOverflowFeemarket - } - 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: FeeMarket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FeeMarket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Implementation", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowFeemarket - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthFeemarket - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthFeemarket - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Implementation = append(m.Implementation[:0], dAtA[iNdEx:postIndex]...) - if m.Implementation == nil { - m.Implementation = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipFeemarket(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthFeemarket - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipFeemarket(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, ErrIntOverflowFeemarket - } - 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, ErrIntOverflowFeemarket - } - 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, ErrIntOverflowFeemarket - } - 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, ErrInvalidLengthFeemarket - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupFeemarket - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthFeemarket - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthFeemarket = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowFeemarket = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupFeemarket = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/feemarket/plugins/defaultmarket/default.pb.go b/x/feemarket/plugins/defaultmarket/default.pb.go new file mode 100644 index 0000000..a67f376 --- /dev/null +++ b/x/feemarket/plugins/defaultmarket/default.pb.go @@ -0,0 +1,327 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: feemarket/feemarket/v1/default.proto + +package defaultmarket + +import ( + fmt "fmt" + _ "github.com/cosmos/cosmos-proto" + 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 + +// DefaultMarket is a message that contains the information about a default fee +// market implementation. +// +// NOTE: Most operations of this fee market are no-ops. +type DefaultMarket struct { + // Data represents arbitrary data stored in the implementation. + Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"` +} + +func (m *DefaultMarket) Reset() { *m = DefaultMarket{} } +func (m *DefaultMarket) String() string { return proto.CompactTextString(m) } +func (*DefaultMarket) ProtoMessage() {} +func (*DefaultMarket) Descriptor() ([]byte, []int) { + return fileDescriptor_01f10c50fb712997, []int{0} +} +func (m *DefaultMarket) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *DefaultMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_DefaultMarket.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 *DefaultMarket) XXX_Merge(src proto.Message) { + xxx_messageInfo_DefaultMarket.Merge(m, src) +} +func (m *DefaultMarket) XXX_Size() int { + return m.Size() +} +func (m *DefaultMarket) XXX_DiscardUnknown() { + xxx_messageInfo_DefaultMarket.DiscardUnknown(m) +} + +var xxx_messageInfo_DefaultMarket proto.InternalMessageInfo + +func (m *DefaultMarket) GetData() []byte { + if m != nil { + return m.Data + } + return nil +} + +func init() { + proto.RegisterType((*DefaultMarket)(nil), "feemarket.feemarket.v1.DefaultMarket") +} + +func init() { + proto.RegisterFile("feemarket/feemarket/v1/default.proto", fileDescriptor_01f10c50fb712997) +} + +var fileDescriptor_01f10c50fb712997 = []byte{ + // 204 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x4b, 0x4d, 0xcd, + 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x53, 0x52, 0xd3, 0x12, 0x4b, + 0x73, 0x4a, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x72, 0x7a, 0x08, 0x56, 0x99, + 0xa1, 0x94, 0x64, 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x3c, 0x58, 0x95, 0x3e, 0x84, 0x03, 0xd1, + 0xa2, 0x14, 0xce, 0xc5, 0xeb, 0x02, 0x31, 0xc3, 0x17, 0xac, 0x5c, 0x48, 0x88, 0x8b, 0x25, 0x25, + 0xb1, 0x24, 0x51, 0x82, 0x51, 0x81, 0x51, 0x83, 0x27, 0x08, 0xcc, 0xb6, 0x32, 0x3a, 0xb5, 0x45, + 0x57, 0x0f, 0xbb, 0xd9, 0x7a, 0x6e, 0xa9, 0xa9, 0x10, 0x9d, 0x9e, 0xb9, 0x05, 0x39, 0xa9, 0xb9, + 0xa9, 0x79, 0x25, 0x89, 0x25, 0x99, 0xf9, 0x79, 0x4e, 0x91, 0x27, 0x1e, 0xc9, 0x31, 0x5e, 0x78, + 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, 0x31, 0xdc, + 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x9f, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, 0x9f, 0xab, + 0x5f, 0x9c, 0x9d, 0x59, 0xa0, 0x9b, 0x9b, 0x5a, 0x86, 0xe4, 0xab, 0x0a, 0x24, 0x76, 0x41, 0x4e, + 0x69, 0x7a, 0x66, 0x5e, 0x31, 0xcc, 0x9b, 0x10, 0xd1, 0x24, 0x36, 0xb0, 0xd3, 0x8d, 0x01, 0x01, + 0x00, 0x00, 0xff, 0xff, 0x5d, 0xc0, 0xa6, 0x36, 0x15, 0x01, 0x00, 0x00, +} + +func (m *DefaultMarket) 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 *DefaultMarket) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *DefaultMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.Data) > 0 { + i -= len(m.Data) + copy(dAtA[i:], m.Data) + i = encodeVarintDefault(dAtA, i, uint64(len(m.Data))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintDefault(dAtA []byte, offset int, v uint64) int { + offset -= sovDefault(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *DefaultMarket) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Data) + if l > 0 { + n += 1 + l + sovDefault(uint64(l)) + } + return n +} + +func sovDefault(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozDefault(x uint64) (n int) { + return sovDefault(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *DefaultMarket) 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 ErrIntOverflowDefault + } + 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: DefaultMarket: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: DefaultMarket: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Data", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowDefault + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthDefault + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthDefault + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Data = append(m.Data[:0], dAtA[iNdEx:postIndex]...) + if m.Data == nil { + m.Data = []byte{} + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipDefault(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthDefault + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipDefault(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, ErrIntOverflowDefault + } + 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, ErrIntOverflowDefault + } + 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, ErrIntOverflowDefault + } + 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, ErrInvalidLengthDefault + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupDefault + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthDefault + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthDefault = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowDefault = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupDefault = fmt.Errorf("proto: unexpected end of group") +) diff --git a/x/feemarket/plugins/mock/feemarket.go b/x/feemarket/plugins/defaultmarket/feemarket.go similarity index 61% rename from x/feemarket/plugins/mock/feemarket.go rename to x/feemarket/plugins/defaultmarket/feemarket.go index 78cffa4..f347f8b 100644 --- a/x/feemarket/plugins/mock/feemarket.go +++ b/x/feemarket/plugins/defaultmarket/feemarket.go @@ -1,4 +1,4 @@ -package mock +package defaultmarket import ( "encoding/json" @@ -8,34 +8,33 @@ import ( "github.com/skip-mev/feemarket/x/feemarket/interfaces" ) -// type assertion in test to prevent import cycle -var _ interfaces.FeeMarketImplementation = &MockFeeMarket{} +var _ interfaces.FeeMarketImplementation = &DefaultMarket{} -// NewFeeMarket returns an instance of a new MockFeeMarket. -func NewFeeMarket() *MockFeeMarket { - return &MockFeeMarket{ - TestData: "test", +// NewDefaultFeeMarket returns an instance of a new DefaultFeeMarket. +func NewDefaultFeeMarket() *DefaultMarket { + return &DefaultMarket{ + Data: []byte("default"), } } // ValidateBasic is a no-op. -func (fm *MockFeeMarket) ValidateBasic() error { +func (fm *DefaultMarket) ValidateBasic() error { return nil } -// Init which initializes the fee market (in InitGenesis) -func (fm *MockFeeMarket) Init(_ sdk.Context) error { +// Init which initializes the fee market (in InitGenesis). +func (fm *DefaultMarket) Init(_ sdk.Context) error { return nil } -// Export which exports the fee market (in ExportGenesis) -func (fm *MockFeeMarket) Export(_ sdk.Context) (json.RawMessage, error) { +// Export which exports the fee market (in ExportGenesis). +func (fm *DefaultMarket) Export(_ sdk.Context) (json.RawMessage, error) { return nil, nil } // BeginBlockUpdateHandler allows the fee market to be updated // after every block. This will be added to the BeginBlock chain. -func (fm *MockFeeMarket) BeginBlockUpdateHandler(_ sdk.Context) interfaces.UpdateHandler { +func (fm *DefaultMarket) BeginBlockUpdateHandler(_ sdk.Context) interfaces.UpdateHandler { return func(ctx sdk.Context) error { return nil } @@ -43,7 +42,7 @@ func (fm *MockFeeMarket) BeginBlockUpdateHandler(_ sdk.Context) interfaces.Updat // EndBlockUpdateHandler allows the fee market to be updated // after every block. This will be added to the EndBlock chain. -func (fm *MockFeeMarket) EndBlockUpdateHandler(_ sdk.Context) interfaces.UpdateHandler { +func (fm *DefaultMarket) EndBlockUpdateHandler(_ sdk.Context) interfaces.UpdateHandler { return func(ctx sdk.Context) error { return nil } @@ -52,18 +51,18 @@ func (fm *MockFeeMarket) EndBlockUpdateHandler(_ sdk.Context) interfaces.UpdateH // GetFeeMarketInfo retrieves the fee market's information about // how to pay for a transaction (min gas price, min tip, // where the fees are being distributed, etc.). -func (fm *MockFeeMarket) GetFeeMarketInfo(_ sdk.Context) map[string]string { +func (fm *DefaultMarket) GetFeeMarketInfo(_ sdk.Context) map[string]string { return nil } -// GetID returns the identifier of the fee market -func (fm *MockFeeMarket) GetID() string { - return "mock" +// GetID returns the identifier of the fee market. +func (fm *DefaultMarket) GetID() string { + return "default" } // FeeAnteHandler will be called in the module AnteHandler. // Performs no actions. -func (fm *MockFeeMarket) FeeAnteHandler( +func (fm *DefaultMarket) FeeAnteHandler( _ sdk.Context, _ sdk.Tx, _ bool, @@ -76,7 +75,7 @@ func (fm *MockFeeMarket) FeeAnteHandler( // FeePostHandler will be called in the module PostHandler // if PostHandlers are implemented. Performs no actions. -func (fm *MockFeeMarket) FeePostHandler( +func (fm *DefaultMarket) FeePostHandler( _ sdk.Context, _ sdk.Tx, _, diff --git a/x/feemarket/plugins/mock/ante.go b/x/feemarket/plugins/mock/ante.go deleted file mode 100644 index f33e02b..0000000 --- a/x/feemarket/plugins/mock/ante.go +++ /dev/null @@ -1 +0,0 @@ -package mock diff --git a/x/feemarket/plugins/mock/mock.pb.go b/x/feemarket/plugins/mock/mock.pb.go deleted file mode 100644 index ad8ca4d..0000000 --- a/x/feemarket/plugins/mock/mock.pb.go +++ /dev/null @@ -1,324 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: feemarket/feemarket/v1/mock.proto - -package mock - -import ( - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - 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 - -// MockFeeMarket is a message that contains the information about a mock fee -// market implementation. -// -// NOTE: This is an example of a mock fee market. It is not used in production. -type MockFeeMarket struct { - // TestData represents dummy test data for the MockFeeMarket - TestData string `protobuf:"bytes,1,opt,name=test_data,json=testData,proto3" json:"test_data,omitempty"` -} - -func (m *MockFeeMarket) Reset() { *m = MockFeeMarket{} } -func (m *MockFeeMarket) String() string { return proto.CompactTextString(m) } -func (*MockFeeMarket) ProtoMessage() {} -func (*MockFeeMarket) Descriptor() ([]byte, []int) { - return fileDescriptor_6b7e37c7950103c0, []int{0} -} -func (m *MockFeeMarket) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *MockFeeMarket) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_MockFeeMarket.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 *MockFeeMarket) XXX_Merge(src proto.Message) { - xxx_messageInfo_MockFeeMarket.Merge(m, src) -} -func (m *MockFeeMarket) XXX_Size() int { - return m.Size() -} -func (m *MockFeeMarket) XXX_DiscardUnknown() { - xxx_messageInfo_MockFeeMarket.DiscardUnknown(m) -} - -var xxx_messageInfo_MockFeeMarket proto.InternalMessageInfo - -func (m *MockFeeMarket) GetTestData() string { - if m != nil { - return m.TestData - } - return "" -} - -func init() { - proto.RegisterType((*MockFeeMarket)(nil), "feemarket.feemarket.v1.MockFeeMarket") -} - -func init() { proto.RegisterFile("feemarket/feemarket/v1/mock.proto", fileDescriptor_6b7e37c7950103c0) } - -var fileDescriptor_6b7e37c7950103c0 = []byte{ - // 210 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x4c, 0x4b, 0x4d, 0xcd, - 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0x73, 0xf3, 0x93, 0xb3, 0xf5, - 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x12, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, 0x64, - 0x72, 0x7e, 0x71, 0x6e, 0x7e, 0x71, 0x3c, 0x58, 0x95, 0x3e, 0x84, 0x03, 0xd1, 0xa2, 0x94, 0xc0, - 0xc5, 0xeb, 0x9b, 0x9f, 0x9c, 0xed, 0x96, 0x9a, 0xea, 0x0b, 0x56, 0x2e, 0x24, 0xcd, 0xc5, 0x59, - 0x92, 0x5a, 0x5c, 0x12, 0x9f, 0x92, 0x58, 0x92, 0x28, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x19, 0xc4, - 0x01, 0x12, 0x70, 0x49, 0x2c, 0x49, 0xb4, 0x32, 0x3a, 0xb5, 0x45, 0x57, 0x0f, 0xbb, 0x25, 0x7a, - 0x70, 0x23, 0x3c, 0x73, 0x0b, 0x72, 0x52, 0x73, 0x53, 0xf3, 0x4a, 0x12, 0x4b, 0x32, 0xf3, 0xf3, - 0x9c, 0x02, 0x4e, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e, 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x09, - 0x8f, 0xe5, 0x18, 0x2e, 0x3c, 0x96, 0x63, 0xb8, 0xf1, 0x58, 0x8e, 0x21, 0xca, 0x2c, 0x3d, 0xb3, - 0x24, 0xa3, 0x34, 0x49, 0x2f, 0x39, 0x3f, 0x57, 0xbf, 0x38, 0x3b, 0xb3, 0x40, 0x37, 0x37, 0xb5, - 0x0c, 0xc9, 0x6f, 0x15, 0x48, 0xec, 0x82, 0x9c, 0xd2, 0xf4, 0xcc, 0xbc, 0x62, 0xb0, 0x67, 0x93, - 0xd8, 0xc0, 0x4e, 0x37, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x52, 0x48, 0x0c, 0x12, 0x01, - 0x00, 0x00, -} - -func (m *MockFeeMarket) 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 *MockFeeMarket) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *MockFeeMarket) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.TestData) > 0 { - i -= len(m.TestData) - copy(dAtA[i:], m.TestData) - i = encodeVarintMock(dAtA, i, uint64(len(m.TestData))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintMock(dAtA []byte, offset int, v uint64) int { - offset -= sovMock(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *MockFeeMarket) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.TestData) - if l > 0 { - n += 1 + l + sovMock(uint64(l)) - } - return n -} - -func sovMock(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozMock(x uint64) (n int) { - return sovMock(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *MockFeeMarket) 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 ErrIntOverflowMock - } - 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: MockFeeMarket: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: MockFeeMarket: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TestData", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowMock - } - 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 ErrInvalidLengthMock - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthMock - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TestData = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipMock(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthMock - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipMock(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, ErrIntOverflowMock - } - 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, ErrIntOverflowMock - } - 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, ErrIntOverflowMock - } - 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, ErrInvalidLengthMock - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupMock - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthMock - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthMock = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowMock = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupMock = fmt.Errorf("proto: unexpected end of group") -) diff --git a/x/feemarket/types/genesis.go b/x/feemarket/types/genesis.go index e04c93b..e23b912 100644 --- a/x/feemarket/types/genesis.go +++ b/x/feemarket/types/genesis.go @@ -3,25 +3,27 @@ package types import ( "encoding/json" + "github.com/skip-mev/feemarket/x/feemarket/plugins/defaultmarket" + "github.com/skip-mev/feemarket/x/feemarket/interfaces" "github.com/cosmos/cosmos-sdk/codec" - - "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" ) // NewDefaultGenesisState returns a default genesis state for the module. func NewDefaultGenesisState() *GenesisState { return &GenesisState{ - Plugin: MustNewPlugin(mock.NewFeeMarket()), // TODO replace with another impl + Plugin: MustNewPlugin(defaultmarket.NewDefaultFeeMarket()), // TODO replace with another impl Params: DefaultParams(), } } -// NewGenesisState returns a new genesis state for the module. -func NewGenesisState(plugin interfaces.FeeMarket, params Params) *GenesisState { +// NewGenesisState returns a new genesis state for the module. Panics if it cannot marshal plugin. +func NewGenesisState(plugin interfaces.FeeMarketImplementation, params Params) *GenesisState { + bz := MustNewPlugin(plugin) + return &GenesisState{ - Plugin: plugin, + Plugin: bz, Params: params, } } @@ -29,10 +31,6 @@ func NewGenesisState(plugin interfaces.FeeMarket, params Params) *GenesisState { // ValidateBasic performs basic validation of the genesis state data returning an // error for any failed validation criteria. func (gs *GenesisState) ValidateBasic() error { - if err := gs.Plugin.ValidateBasic(); err != nil { - return err - } - return gs.Params.ValidateBasic() } diff --git a/x/feemarket/types/genesis.pb.go b/x/feemarket/types/genesis.pb.go index ddaba0c..3b32037 100644 --- a/x/feemarket/types/genesis.pb.go +++ b/x/feemarket/types/genesis.pb.go @@ -8,7 +8,6 @@ import ( _ "github.com/cosmos/cosmos-proto" _ "github.com/cosmos/gogoproto/gogoproto" proto "github.com/cosmos/gogoproto/proto" - interfaces "github.com/skip-mev/feemarket/x/feemarket/interfaces" io "io" math "math" math_bits "math/bits" @@ -28,7 +27,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the feemarket module's genesis state. type GenesisState struct { // Plugin is the FeeMarket implementation plugged into the feemarket module. - Plugin interfaces.FeeMarket `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin"` + // Must implement x/feemarket/types/FeeMarketImplementation + Plugin []byte `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"` // Params are the parameters for the feemarket module. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } @@ -66,11 +66,11 @@ func (m *GenesisState) XXX_DiscardUnknown() { var xxx_messageInfo_GenesisState proto.InternalMessageInfo -func (m *GenesisState) GetPlugin() interfaces.FeeMarket { +func (m *GenesisState) GetPlugin() []byte { if m != nil { return m.Plugin } - return interfaces.FeeMarket{} + return nil } func (m *GenesisState) GetParams() Params { @@ -136,24 +136,24 @@ func init() { } var fileDescriptor_2180652c84279298 = []byte{ - // 259 bytes of a gzipped FileDescriptorProto + // 271 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x49, 0x4b, 0x4d, 0xcd, 0x4d, 0x2c, 0xca, 0x4e, 0x2d, 0xd1, 0x47, 0xb0, 0xca, 0x0c, 0xf5, 0xd3, 0x53, 0xf3, 0x52, 0x8b, 0x33, 0x8b, 0xf5, 0x0a, 0x8a, 0xf2, 0x4b, 0xf2, 0x85, 0xc4, 0xe0, 0x72, 0x7a, 0x08, 0x56, 0x99, 0xa1, 0x94, 0x48, 0x7a, 0x7e, 0x7a, 0x3e, 0x58, 0x89, 0x3e, 0x88, 0x05, 0x51, 0x2d, 0x25, 0x99, - 0x9c, 0x5f, 0x9c, 0x9b, 0x5f, 0x1c, 0x0f, 0x91, 0x80, 0x70, 0xa0, 0x52, 0x6a, 0x38, 0xac, 0x43, - 0x98, 0x0a, 0x56, 0xa7, 0xd4, 0xcb, 0xc8, 0xc5, 0xe3, 0x0e, 0x71, 0x42, 0x70, 0x49, 0x62, 0x49, - 0xaa, 0x90, 0x3d, 0x17, 0x5b, 0x41, 0x4e, 0x69, 0x7a, 0x66, 0x9e, 0x04, 0xa3, 0x02, 0xa3, 0x06, - 0xb7, 0x91, 0xa2, 0x1e, 0x76, 0x27, 0xe9, 0xb9, 0xa5, 0xa6, 0xfa, 0x82, 0x39, 0x4e, 0x2c, 0x27, - 0xee, 0xc9, 0x33, 0x04, 0x41, 0xb5, 0x09, 0xd9, 0x70, 0xb1, 0x15, 0x24, 0x16, 0x25, 0xe6, 0x16, - 0x4b, 0x30, 0x81, 0x0d, 0x90, 0xc3, 0x65, 0x40, 0x00, 0x58, 0x15, 0x5c, 0x37, 0x98, 0xa7, 0xa4, - 0xc4, 0xc5, 0x06, 0x11, 0x17, 0x92, 0xe0, 0x62, 0x4f, 0xcd, 0x4b, 0x4c, 0xca, 0x49, 0x4d, 0x01, - 0xbb, 0x84, 0x23, 0x08, 0xc6, 0x75, 0xf2, 0x3c, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, - 0x07, 0x8f, 0xe4, 0x18, 0x27, 0x3c, 0x96, 0x63, 0xb8, 0xf0, 0x58, 0x8e, 0xe1, 0xc6, 0x63, 0x39, - 0x86, 0x28, 0xfd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc, 0x5c, 0xfd, 0xe2, 0xec, - 0xcc, 0x02, 0xdd, 0xdc, 0xd4, 0x32, 0x24, 0xff, 0x57, 0x20, 0xb1, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, - 0x93, 0xd8, 0xc0, 0xa1, 0x60, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x27, 0x07, 0xda, 0xbd, 0x9e, - 0x01, 0x00, 0x00, + 0x9c, 0x5f, 0x9c, 0x9b, 0x5f, 0x1c, 0x0f, 0x91, 0x80, 0x70, 0x20, 0x52, 0x4a, 0x33, 0x18, 0xb9, + 0x78, 0xdc, 0x21, 0x46, 0x07, 0x97, 0x24, 0x96, 0xa4, 0x0a, 0x79, 0x71, 0xb1, 0x15, 0xe4, 0x94, + 0xa6, 0x67, 0xe6, 0x49, 0x30, 0x2a, 0x30, 0x6a, 0xf0, 0x38, 0x19, 0x9d, 0xda, 0xa2, 0xab, 0x87, + 0xdd, 0x36, 0x3d, 0xb7, 0xd4, 0x54, 0x5f, 0x30, 0xc7, 0x33, 0xb7, 0x20, 0x27, 0x35, 0x37, 0x35, + 0xaf, 0x24, 0xb1, 0x24, 0x33, 0x3f, 0x2f, 0x08, 0x6a, 0x82, 0x90, 0x0d, 0x17, 0x5b, 0x41, 0x62, + 0x51, 0x62, 0x6e, 0xb1, 0x04, 0x93, 0x02, 0xa3, 0x06, 0xb7, 0x91, 0x1c, 0x2e, 0x83, 0x02, 0xc0, + 0xaa, 0x9c, 0x58, 0x4e, 0xdc, 0x93, 0x67, 0x08, 0x82, 0xea, 0x51, 0x52, 0xe2, 0x62, 0x83, 0x88, + 0x0b, 0x49, 0x70, 0xb1, 0xa7, 0xe6, 0x25, 0x26, 0xe5, 0xa4, 0xa6, 0x80, 0x1d, 0xc5, 0x11, 0x04, + 0xe3, 0x3a, 0x79, 0x9e, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, + 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x7e, 0x7a, + 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x71, 0x76, 0x66, 0x81, 0x6e, 0x6e, + 0x6a, 0x19, 0x52, 0x88, 0x56, 0x20, 0xb1, 0x4b, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0x01, + 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x51, 0xd8, 0x65, 0x0e, 0x81, 0x01, 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -186,16 +186,13 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { } i-- dAtA[i] = 0x12 - { - size, err := m.Plugin.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintGenesis(dAtA, i, uint64(size)) + if len(m.Plugin) > 0 { + i -= len(m.Plugin) + copy(dAtA[i:], m.Plugin) + i = encodeVarintGenesis(dAtA, i, uint64(len(m.Plugin))) + i-- + dAtA[i] = 0xa } - i-- - dAtA[i] = 0xa return len(dAtA) - i, nil } @@ -249,8 +246,10 @@ func (m *GenesisState) Size() (n int) { } var l int _ = l - l = m.Plugin.Size() - n += 1 + l + sovGenesis(uint64(l)) + l = len(m.Plugin) + if l > 0 { + n += 1 + l + sovGenesis(uint64(l)) + } l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) return n @@ -307,7 +306,7 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Plugin", wireType) } - var msglen int + var byteLen int for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowGenesis @@ -317,23 +316,24 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - msglen |= int(b&0x7F) << shift + byteLen |= int(b&0x7F) << shift if b < 0x80 { break } } - if msglen < 0 { + if byteLen < 0 { return ErrInvalidLengthGenesis } - postIndex := iNdEx + msglen + postIndex := iNdEx + byteLen if postIndex < 0 { return ErrInvalidLengthGenesis } if postIndex > l { return io.ErrUnexpectedEOF } - if err := m.Plugin.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + m.Plugin = append(m.Plugin[:0], dAtA[iNdEx:postIndex]...) + if m.Plugin == nil { + m.Plugin = []byte{} } iNdEx = postIndex case 2: diff --git a/x/feemarket/types/genesis_test.go b/x/feemarket/types/genesis_test.go index cfd8daa..07edc74 100644 --- a/x/feemarket/types/genesis_test.go +++ b/x/feemarket/types/genesis_test.go @@ -3,11 +3,10 @@ package types_test import ( "testing" - "github.com/skip-mev/feemarket/x/feemarket/interfaces" + "github.com/skip-mev/feemarket/x/feemarket/plugins/defaultmarket" "github.com/stretchr/testify/require" - "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" "github.com/skip-mev/feemarket/x/feemarket/types" ) @@ -18,15 +17,7 @@ func TestGenesis(t *testing.T) { }) t.Run("can accept a valid genesis state with a valid FeeMarket type", func(t *testing.T) { - plugin := types.MustNewPlugin(mock.NewFeeMarket()) - gs := types.NewGenesisState(plugin, types.NewParams(false)) + gs := types.NewGenesisState(defaultmarket.NewDefaultFeeMarket(), types.NewParams(false)) require.NoError(t, gs.ValidateBasic()) }) - - t.Run("can reject a genesis with empty implementation", func(t *testing.T) { - plugin := interfaces.FeeMarket{Implementation: make([]byte, 0)} - - gs := types.NewGenesisState(plugin, types.NewParams(false)) - require.Error(t, gs.ValidateBasic()) - }) } diff --git a/x/feemarket/types/plugins.go b/x/feemarket/types/plugins.go index c4ca669..94b3d80 100644 --- a/x/feemarket/types/plugins.go +++ b/x/feemarket/types/plugins.go @@ -4,11 +4,11 @@ import "github.com/skip-mev/feemarket/x/feemarket/interfaces" // MustNewPlugin creates a new instance of a FeeMarket plugin by marshalling a // FeeMarketImplementation to bytes. Will panic() if marshalling fails. -func MustNewPlugin(implementation interfaces.FeeMarketImplementation) interfaces.FeeMarket { +func MustNewPlugin(implementation interfaces.FeeMarketImplementation) []byte { implBz, err := implementation.Marshal() if err != nil { panic(err) } - return interfaces.FeeMarket{Implementation: implBz} + return implBz } diff --git a/x/feemarket/types/plugins_test.go b/x/feemarket/types/plugins_test.go index b02669f..4e7e1bd 100644 --- a/x/feemarket/types/plugins_test.go +++ b/x/feemarket/types/plugins_test.go @@ -5,14 +5,14 @@ import ( "github.com/stretchr/testify/require" - "github.com/skip-mev/feemarket/x/feemarket/plugins/mock" + "github.com/skip-mev/feemarket/x/feemarket/plugins/defaultmarket" "github.com/skip-mev/feemarket/x/feemarket/types" ) func TestMustNewPlugin(t *testing.T) { t.Run("create valid plugin", func(t *testing.T) { require.NotPanics(t, func() { - types.MustNewPlugin(mock.NewFeeMarket()) + types.MustNewPlugin(defaultmarket.NewDefaultFeeMarket()) }) }) } From a98397c44d49b5ec4c34b1efb596d6650dcec653 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 16:02:22 -0500 Subject: [PATCH 24/28] simplify --- x/feemarket/types/genesis.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/x/feemarket/types/genesis.go b/x/feemarket/types/genesis.go index e23b912..43cda84 100644 --- a/x/feemarket/types/genesis.go +++ b/x/feemarket/types/genesis.go @@ -3,11 +3,10 @@ package types import ( "encoding/json" - "github.com/skip-mev/feemarket/x/feemarket/plugins/defaultmarket" + "github.com/cosmos/cosmos-sdk/codec" "github.com/skip-mev/feemarket/x/feemarket/interfaces" - - "github.com/cosmos/cosmos-sdk/codec" + "github.com/skip-mev/feemarket/x/feemarket/plugins/defaultmarket" ) // NewDefaultGenesisState returns a default genesis state for the module. From 08b16f4c03bd74e64e4c372bb1d63f71f17ce09e Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 16:02:48 -0500 Subject: [PATCH 25/28] simplify --- x/feemarket/types/genesis_test.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/x/feemarket/types/genesis_test.go b/x/feemarket/types/genesis_test.go index 07edc74..cdb8ee9 100644 --- a/x/feemarket/types/genesis_test.go +++ b/x/feemarket/types/genesis_test.go @@ -3,10 +3,9 @@ package types_test import ( "testing" - "github.com/skip-mev/feemarket/x/feemarket/plugins/defaultmarket" - "github.com/stretchr/testify/require" + "github.com/skip-mev/feemarket/x/feemarket/plugins/defaultmarket" "github.com/skip-mev/feemarket/x/feemarket/types" ) From 53ead85ae9bb6d5763fe0c657b26c98fe6aedbb4 Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 16:08:13 -0500 Subject: [PATCH 26/28] create file --- x/feemarket/types/codec.go | 1 + 1 file changed, 1 insertion(+) create mode 100644 x/feemarket/types/codec.go diff --git a/x/feemarket/types/codec.go b/x/feemarket/types/codec.go new file mode 100644 index 0000000..ab1254f --- /dev/null +++ b/x/feemarket/types/codec.go @@ -0,0 +1 @@ +package types From f7bd1aa92ad125ab4d1236c21c7685bff37e0e6b Mon Sep 17 00:00:00 2001 From: aljo242 Date: Thu, 9 Nov 2023 16:08:59 -0500 Subject: [PATCH 27/28] ppopulate --- x/feemarket/types/codec.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/x/feemarket/types/codec.go b/x/feemarket/types/codec.go index ab1254f..2269b95 100644 --- a/x/feemarket/types/codec.go +++ b/x/feemarket/types/codec.go @@ -1 +1,25 @@ package types + +import ( + "github.com/cosmos/cosmos-sdk/codec" + "github.com/cosmos/cosmos-sdk/codec/legacy" + "github.com/cosmos/cosmos-sdk/codec/types" + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/cosmos/cosmos-sdk/types/msgservice" +) + +// RegisterLegacyAminoCodec registers the necessary x/feemarket interfaces (messages) on the +// provided LegacyAmino codec. +func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { + legacy.RegisterAminoMsg(cdc, &MsgParams{}, "feemarket/MsgParams") +} + +// RegisterInterfaces registers the x/feemarket interfaces (messages + msg server) on the +// provided InterfaceRegistry. +func RegisterInterfaces(registry types.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgParams{}, + ) + + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) +} From 9635e4cc59ca90f270c1075d09db5576c8adb3ee Mon Sep 17 00:00:00 2001 From: aljo242 Date: Fri, 10 Nov 2023 11:11:23 -0500 Subject: [PATCH 28/28] register interfaces --- x/feemarket/types/codec.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/x/feemarket/types/codec.go b/x/feemarket/types/codec.go index 2269b95..a5ec84c 100644 --- a/x/feemarket/types/codec.go +++ b/x/feemarket/types/codec.go @@ -6,12 +6,18 @@ import ( "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/types/msgservice" + + "github.com/skip-mev/feemarket/x/feemarket/interfaces" + "github.com/skip-mev/feemarket/x/feemarket/plugins/defaultmarket" ) // RegisterLegacyAminoCodec registers the necessary x/feemarket interfaces (messages) on the // provided LegacyAmino codec. func RegisterLegacyAminoCodec(cdc *codec.LegacyAmino) { legacy.RegisterAminoMsg(cdc, &MsgParams{}, "feemarket/MsgParams") + + cdc.RegisterInterface((*interfaces.FeeMarketImplementation)(nil), nil) + cdc.RegisterConcrete(&defaultmarket.DefaultMarket{}, "feemarket/DefaultMarket", nil) } // RegisterInterfaces registers the x/feemarket interfaces (messages + msg server) on the @@ -21,5 +27,11 @@ func RegisterInterfaces(registry types.InterfaceRegistry) { &MsgParams{}, ) + registry.RegisterInterface( + "feemarket.feemarket.v1.FeeMarketImplementation", + (*interfaces.FeeMarketImplementation)(nil), + &defaultmarket.DefaultMarket{}, + ) + msgservice.RegisterMsgServiceDesc(registry, &_Msg_serviceDesc) }