forked from ComposableFi/picasso
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ComposableFi#224 from notional-labs/nguyen/tx-boun…
…dary-module Add Tx-boundary module
- Loading branch information
Showing
30 changed files
with
4,510 additions
and
2 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
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
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
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
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
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,21 @@ | ||
syntax = "proto3"; | ||
package centauri.txboundary.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/protobuf/duration.proto"; | ||
import "google/protobuf/timestamp.proto"; | ||
|
||
option go_package = "x/tx-boundary/types"; | ||
|
||
// Boundary defines the number of tx limit and block per tx generation time | ||
message Boundary { | ||
uint64 tx_limit = 1; | ||
uint64 blocks_per_generation = 2; | ||
} | ||
|
||
// Boundary defines the number of delegate and redelegate per Addr | ||
message LimitPerAddr { | ||
uint64 delegate_count = 1; | ||
uint64 reledegate_count = 2; | ||
int64 latest_update_block = 3; | ||
} |
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,21 @@ | ||
syntax = "proto3"; | ||
package centauri.txboundary.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "centauri/txboundary/v1beta1/boundary.proto"; | ||
|
||
option go_package = "x/tx-boundary/types"; | ||
|
||
// GenesisState defines the module various parameters when first | ||
// initialized | ||
message GenesisState { | ||
Boundary delegate_boundary = 1 [ | ||
(gogoproto.moretags) = "yaml:\"delegate_boundary\"", | ||
(gogoproto.nullable) = false | ||
]; | ||
Boundary redelegate_boundary = 2 [ | ||
(gogoproto.moretags) = "yaml:\"redelegate_boundary\"", | ||
(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,40 @@ | ||
syntax = "proto3"; | ||
package centauri.txboundary.v1beta1; | ||
|
||
import "gogoproto/gogo.proto"; | ||
import "google/api/annotations.proto"; | ||
import "centauri/txboundary/v1beta1/boundary.proto"; | ||
|
||
option go_package = "x/tx-boundary/types"; | ||
|
||
// Query provides defines the gRPC querier service. | ||
service Query { | ||
// DelegateBoundary returns the boundary for the delegate tx. | ||
rpc DelegateBoundary(QueryDelegateBoundaryRequest) returns (QueryDelegateBoundaryResponse) { | ||
option (google.api.http).get = "/cosmos/txboundary/v1beta1/delegateboundary"; | ||
} | ||
|
||
// RedelegateBoundary returns the boundary for the redelegate tx. | ||
rpc RedelegateBoundary(QueryRedelegateBoundaryRequest) returns (QueryRedelegateBoundaryResponse) { | ||
option (google.api.http).get = "/cosmos/txboundary/v1beta1/redelegateboundary"; | ||
} | ||
} | ||
|
||
// QueryDelegateBoundaryRequest is the request type for the Query/DelegateBoundary RPC method. | ||
message QueryDelegateBoundaryRequest {} | ||
|
||
// QueryDelegateBoundaryResponse is the response type for the Query/DelegateBoundary RPC method. | ||
message QueryDelegateBoundaryResponse { | ||
// boundary defines the boundary for the delegate tx | ||
Boundary boundary = 1 [ (gogoproto.nullable) = false ]; | ||
} | ||
|
||
// QueryRedelegateBoundaryRequest is the request type for the Query/ReDelegateBoundary RPC method. | ||
message QueryRedelegateBoundaryRequest {} | ||
|
||
// QueryRedelegateBoundaryResponse is the response type for the Query/ReDelegateBoundary RPC | ||
// method. | ||
message QueryRedelegateBoundaryResponse { | ||
// boundary defines the boundary for the redelegate tx | ||
Boundary boundary = 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,68 @@ | ||
syntax = "proto3"; | ||
package centauri.txboundary.v1beta1; | ||
|
||
import "cosmos/msg/v1/msg.proto"; | ||
import "amino/amino.proto"; | ||
import "gogoproto/gogo.proto"; | ||
import "cosmos_proto/cosmos.proto"; | ||
import "centauri/txboundary/v1beta1/boundary.proto"; | ||
import "cosmos/base/v1beta1/coin.proto"; | ||
|
||
option go_package = "x/tx-boundary/types"; | ||
|
||
// Msg defines the x/mint Msg service. | ||
service Msg { | ||
option (cosmos.msg.v1.service) = true; | ||
|
||
rpc UpdateDelegateBoundary(MsgUpdateDelegateBoundary) returns (MsgUpdateDelegateBoundaryResponse); | ||
|
||
rpc UpdateRedelegateBoundary(MsgUpdateRedelegateBoundary) returns (MsgUpdateRedelegateBoundaryResponse); | ||
} | ||
|
||
// MsgUpdateDelegateBoundary is the Msg/UpdateDelegateBoundary request type. | ||
// | ||
// Since: cosmos-sdk 0.47 | ||
message MsgUpdateDelegateBoundary { | ||
option (cosmos.msg.v1.signer) = "authority"; | ||
option (amino.name) = "centauri/x/txboundary/MsgUpdateDelegateBoundary"; | ||
|
||
// authority is the address that controls the module (defaults to x/gov unless | ||
// overwritten). | ||
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; | ||
|
||
// boundary defines the x/tx-boundary parameters to update. | ||
// | ||
// NOTE: All parameters must be supplied. | ||
Boundary boundary = 2 | ||
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; | ||
} | ||
|
||
// MsgUpdateDelegateBoundaryResponse defines the response structure for executing a | ||
// MsgUpdateDelegateBoundary message. | ||
// | ||
// Since: cosmos-sdk 0.47 | ||
message MsgUpdateDelegateBoundaryResponse {} | ||
|
||
// MsgUpdateRedelegateBoundary is the Msg/MsgUpdateRedelegateBoundary request type. | ||
// | ||
// Since: cosmos-sdk 0.47 | ||
message MsgUpdateRedelegateBoundary { | ||
option (cosmos.msg.v1.signer) = "authority"; | ||
option (amino.name) = "centauri/x/txboundary/MsgUpdateDelegateBoundary"; | ||
|
||
// authority is the address that controls the module (defaults to x/gov unless | ||
// overwritten). | ||
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; | ||
|
||
// boundary defines the x/tx-boundary parameters to update. | ||
// | ||
// NOTE: All parameters must be supplied. | ||
Boundary boundary = 2 | ||
[ (gogoproto.nullable) = false, (amino.dont_omitempty) = true ]; | ||
} | ||
|
||
// MsgUpdateRedelegateBoundaryResponse defines the response structure for executing a | ||
// MsgUpdateRedelegateBoundary message. | ||
// | ||
// Since: cosmos-sdk 0.47 | ||
message MsgUpdateRedelegateBoundaryResponse {} |
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.