-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add interface * mock * md * md * md * lint fix * module * add proto * fmt * move files * proto-cute * nit fix
- Loading branch information
Showing
16 changed files
with
2,566 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/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 = 2 [ (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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
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 ]; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
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 {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package mock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.