-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(feemarket): add proto #4
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
36af853
add interface
f0fa6b1
mock
7523e45
Merge branch 'main' into aljo242/feemarket-interface
dbc62d6
md
2bb20f7
md
f0a006c
md
c84c9a7
lint fix
0ba663d
module
ff86779
add proto
7c5d658
fmt
7ce863c
move files
bc076d3
Merge branch 'aljo242/feemarket-interface' into aljo242/feemarket-proto
096c238
proto-cute
ee0b83f
nit fix
d8d4c4a
Merge branch 'aljo242/feemarket-interface' into aljo242/feemarket-proto
b86573f
Merge branch 'main' into aljo242/feemarket-proto
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is this path derived from?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh this is the proto dir
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yessir