Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Your Name committed Aug 14, 2024
1 parent 80512f1 commit 8139262
Show file tree
Hide file tree
Showing 21 changed files with 90 additions and 101 deletions.
13 changes: 6 additions & 7 deletions proto/ssc/billing/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ package ssc.billing;
option go_package = "github.com/sagaxyz/ssc/x/billing/types";

message BillingEvent {
// option (gogoproto.goproto_stringer) = false;
string chainId = 1;
string amount = 2;
string memo = 3;
bool success = 4;
bool debit = 5;
// option (gogoproto.goproto_stringer) = false;
string chainId = 1;
string amount = 2;
string memo = 3;
bool success = 4;
bool debit = 5;
}

2 changes: 1 addition & 1 deletion proto/ssc/billing/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ option go_package = "github.com/sagaxyz/ssc/x/billing/types";

// GenesisState defines the billing module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
Params params = 1 [ (gogoproto.nullable) = false ];
// this line is used by starport scaffolding # genesis/proto/state
}
22 changes: 13 additions & 9 deletions proto/ssc/billing/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,20 @@ service Query {
option (google.api.http).get = "/sagaxyz/ssc/billing/params";
}
// Queries a list of GetBillingHistory items.
rpc GetBillingHistory(QueryGetBillingHistoryRequest) returns (QueryGetBillingHistoryResponse) {
option (google.api.http).get = "/sagaxyz/ssc/billing/get_billing_history/{chainId}";
}
rpc GetBillingHistory(QueryGetBillingHistoryRequest)
returns (QueryGetBillingHistoryResponse) {
option (google.api.http).get =
"/sagaxyz/ssc/billing/get_billing_history/{chainId}";
}

// Queries a list of GetValidatorPayoutHistory items.
rpc GetValidatorPayoutHistory(QueryGetValidatorPayoutHistoryRequest) returns (QueryGetValidatorPayoutHistoryResponse) {
option (google.api.http).get = "/sagaxyz/ssc/billing/get_validator_payout_history/{validatorAddress}";
}
// Queries a list of GetValidatorPayoutHistory items.
rpc GetValidatorPayoutHistory(QueryGetValidatorPayoutHistoryRequest)
returns (QueryGetValidatorPayoutHistoryResponse) {
option (google.api.http).get =
"/sagaxyz/ssc/billing/get_validator_payout_history/{validatorAddress}";
}

// this line is used by starport scaffolding # 2
// this line is used by starport scaffolding # 2
}

// QueryParamsRequest is request type for the Query/Params RPC method.
Expand All @@ -36,7 +40,7 @@ message QueryParamsRequest {}
// QueryParamsResponse is response type for the Query/Params RPC method.
message QueryParamsResponse {
// params holds all the parameters of this module.
Params params = 1 [(gogoproto.nullable) = false];
Params params = 1 [ (gogoproto.nullable) = false ];
}

message QueryGetBillingHistoryRequest {
Expand Down
2 changes: 1 addition & 1 deletion proto/ssc/billing/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ option go_package = "github.com/sagaxyz/ssc/x/billing/types";
// Msg defines the Msg service.
service Msg {
option (cosmos.msg.v1.service) = true;
// this line is used by starport scaffolding # proto/tx/rpc
// this line is used by starport scaffolding # proto/tx/rpc
}

// this line is used by starport scaffolding # proto/tx/message
9 changes: 5 additions & 4 deletions proto/ssc/chainlet/chainlet.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,21 @@ import "ssc/chainlet/chainlet_params.proto";
option go_package = "github.com/sagaxyz/ssc/x/chainlet/types";

enum Status {
STATUS_OFFLINE = 0;
STATUS_ONLINE = 1;
STATUS_OFFLINE = 0;
STATUS_ONLINE = 1;
}

message Chainlet {
google.protobuf.Timestamp spawnTime = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
google.protobuf.Timestamp spawnTime = 1
[ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ];
string launcher = 2;
repeated string maintainers = 3;
string chainletStackName = 4;
string chainletStackVersion = 5;
string chainId = 6;
string chainletName = 7;
string denom = 8;
ChainletParams params = 9 [(gogoproto.nullable) = false];
ChainletParams params = 9 [ (gogoproto.nullable) = false ];
Status status = 10;
bool autoUpgradeStack = 11;
}
2 changes: 1 addition & 1 deletion proto/ssc/chainlet/chainlet_params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ message ChainletParams {
// Enables deployment access control
bool dacEnable = 3;
// Genesis accounts and balances
GenesisAccountBalances genAcctBalances = 4 [(gogoproto.nullable) = false];
GenesisAccountBalances genAcctBalances = 4 [ (gogoproto.nullable) = false ];
// Constant EIP-1559 base fee
string fixedBaseFee = 5;
string feeAccount = 6;
Expand Down
5 changes: 2 additions & 3 deletions proto/ssc/chainlet/chainlet_stack.proto
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ message ChainletStack {
string creator = 1;
string displayName = 2;
string description = 3;
repeated ChainletStackParams versions = 4 [(gogoproto.nullable) = false];
ChainletStackFees fees = 5 [(gogoproto.nullable) = false];
repeated ChainletStackParams versions = 4 [ (gogoproto.nullable) = false ];
ChainletStackFees fees = 5 [ (gogoproto.nullable) = false ];
}


message ChainletStackFees {
string epochFee = 1;
string epochLength = 2;
Expand Down
49 changes: 24 additions & 25 deletions proto/ssc/chainlet/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,47 +6,46 @@ import "gogoproto/gogo.proto";
option go_package = "github.com/sagaxyz/ssc/x/chainlet/types";

message EventLaunchChainlet {
// option (gogoproto.goproto_stringer) = false;
string chainName = 1;
string launcher = 2;
string chainId = 3;
string stack = 4;
string stackVersion = 5;
// option (gogoproto.goproto_stringer) = false;
string chainName = 1;
string launcher = 2;
string chainId = 3;
string stack = 4;
string stackVersion = 5;
}

message EventNewChainletStack {
// option (gogoproto.goproto_stringer) = false;
string creator = 1;
string name = 2;
string version = 3;
// option (gogoproto.goproto_stringer) = false;
string creator = 1;
string name = 2;
string version = 3;
}

message EventNewChainletStackVersion {
// option (gogoproto.goproto_stringer) = false;
string name = 1;
string version = 2;
// option (gogoproto.goproto_stringer) = false;
string name = 1;
string version = 2;
}

message EventChainletStackVersionDisabled {
// option (gogoproto.goproto_stringer) = false;
string name = 1;
string version = 2;
// option (gogoproto.goproto_stringer) = false;
string name = 1;
string version = 2;
}

message EventUpdateChainlet {
// option (gogoproto.goproto_stringer) = false;
string chainId = 1;
string stackVersion = 2;
// option (gogoproto.goproto_stringer) = false;
string chainId = 1;
string stackVersion = 2;
}

message EventChainletStopped {
// option (gogoproto.goproto_stringer) = false;
string chainId = 1;
// option (gogoproto.goproto_stringer) = false;
string chainId = 1;
}

message EventChainletRestarted {
// option (gogoproto.goproto_stringer) = false;
string chainId = 1;
string by = 2;
// option (gogoproto.goproto_stringer) = false;
string chainId = 1;
string by = 2;
}

4 changes: 1 addition & 3 deletions proto/ssc/chainlet/genesis_account_balances.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ message AccountBalance {
string balance = 2;
}

message GenesisAccountBalances {
repeated AccountBalance list = 1;
}
message GenesisAccountBalances { repeated AccountBalance list = 1; }
3 changes: 1 addition & 2 deletions proto/ssc/chainlet/vsc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ import "gogoproto/gogo.proto";

option go_package = "github.com/sagaxyz/ssc/x/chainlet/types";

message PendingVSC {
}
message PendingVSC {}
12 changes: 6 additions & 6 deletions proto/ssc/escrow/chainlet_account.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ import "cosmos_proto/cosmos.proto";

message ChainletAccount {
string chainId = 1;
cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin balance = 2 [ (gogoproto.nullable) = false ];
string shares = 3 [
(cosmos_proto.scalar) = "cosmos.Dec",
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
(gogoproto.nullable) = false
];
map<string,Funder> funders = 4 [(gogoproto.nullable) = false];
map<string, Funder> funders = 4 [ (gogoproto.nullable) = false ];
}

message Funder {
string shares = 1 [
(cosmos_proto.scalar) = "cosmos.Dec",
(cosmos_proto.scalar) = "cosmos.Dec",
(gogoproto.customtype) = "cosmossdk.io/math.LegacyDec",
(gogoproto.nullable) = false
(gogoproto.nullable) = false
];
}
1 change: 0 additions & 1 deletion proto/ssc/escrow/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ message EventDeposit {
string newTotal = 4;
}


message EventWithdraw {
string user = 1;
string chainlet = 2;
Expand Down
2 changes: 1 addition & 1 deletion proto/ssc/escrow/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ option go_package = "github.com/sagaxyz/ssc/x/escrow/types";

// GenesisState defines the escrow module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
Params params = 1 [ (gogoproto.nullable) = false ];
// this line is used by starport scaffolding # genesis/proto/state
}
34 changes: 15 additions & 19 deletions proto/ssc/escrow/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,18 @@ service Query {
option (google.api.http).get = "/sagaxyz/ssc/escrow/params";
}
// Queries a list of Balance items.
rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
option (google.api.http).get = "/sagaxyz/ssc/escrow/balance/{address}";
}
rpc Balance(QueryBalanceRequest) returns (QueryBalanceResponse) {
option (google.api.http).get = "/sagaxyz/ssc/escrow/balance/{address}";
}

// Queries a list of GetChainletAccount items.
rpc GetChainletAccount(QueryGetChainletAccountRequest) returns (QueryGetChainletAccountResponse) {
option (google.api.http).get = "/sagaxyz/ssc/escrow/get_chainlet_account/{chainId}";
}
// Queries a list of GetChainletAccount items.
rpc GetChainletAccount(QueryGetChainletAccountRequest)
returns (QueryGetChainletAccountResponse) {
option (google.api.http).get =
"/sagaxyz/ssc/escrow/get_chainlet_account/{chainId}";
}

// this line is used by starport scaffolding # 2
// this line is used by starport scaffolding # 2
}

// QueryParamsRequest is request type for the Query/Params RPC method.
Expand All @@ -35,23 +37,17 @@ message QueryParamsRequest {}
// QueryParamsResponse is response type for the Query/Params RPC method.
message QueryParamsResponse {
// params holds all the parameters of this module.
Params params = 1 [(gogoproto.nullable) = false];
Params params = 1 [ (gogoproto.nullable) = false ];
}

message QueryBalanceRequest {
string address = 1;
}
message QueryBalanceRequest { string address = 1; }

message QueryBalanceResponse {
string balance = 1;
}
message QueryBalanceResponse { string balance = 1; }

message QueryGetChainletAccountRequest {
string chainId = 1;
}
message QueryGetChainletAccountRequest { string chainId = 1; }

message QueryGetChainletAccountResponse {
ChainletAccount account = 1 [(gogoproto.nullable) = false];
ChainletAccount account = 1 [ (gogoproto.nullable) = false ];
}

// this line is used by starport scaffolding # 3
8 changes: 3 additions & 5 deletions proto/ssc/escrow/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ service Msg {
option (cosmos.msg.v1.service) = true;
rpc Deposit(MsgDeposit) returns (MsgDepositResponse);
rpc Withdraw(MsgWithdraw) returns (MsgWithdrawResponse);
// this line is used by starport scaffolding # proto/tx/rpc
// this line is used by starport scaffolding # proto/tx/rpc
}

message MsgDeposit {
Expand All @@ -22,16 +22,14 @@ message MsgDeposit {
string chainId = 3;
}

message MsgDepositResponse {
}
message MsgDepositResponse {}

message MsgWithdraw {
option (cosmos.msg.v1.signer) = "creator";
string creator = 1;
string chainId = 2;
}

message MsgWithdrawResponse {
}
message MsgWithdrawResponse {}

// this line is used by starport scaffolding # proto/tx/message
3 changes: 2 additions & 1 deletion proto/ssc/escrow/user_account.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ import "cosmos/base/v1beta1/coin.proto";
message UserAccount {

repeated string chainlets = 1;
repeated cosmos.base.v1beta1.Coin balance = 2 [(gogoproto.nullable) = false];
repeated cosmos.base.v1beta1.Coin balance = 2
[ (gogoproto.nullable) = false ];
}
4 changes: 2 additions & 2 deletions proto/ssc/peers/data.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import "cosmos_proto/cosmos.proto";

option go_package = "github.com/sagaxyz/ssc/x/peers/types";


message Data {
google.protobuf.Timestamp updated = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
google.protobuf.Timestamp updated = 1
[ (gogoproto.stdtime) = true, (gogoproto.nullable) = false ];
repeated string addresses = 2;
}
4 changes: 1 addition & 3 deletions proto/ssc/peers/events.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,4 @@ import "gogoproto/gogo.proto";

option go_package = "github.com/sagaxyz/ssc/x/peers/types";

message EventUpdatedChainlet {
string chainId = 1;
}
message EventUpdatedChainlet { string chainId = 1; }
2 changes: 1 addition & 1 deletion proto/ssc/peers/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ option go_package = "github.com/sagaxyz/ssc/x/peers/types";

// GenesisState defines the peers module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
Params params = 1 [ (gogoproto.nullable) = false ];
// this line is used by starport scaffolding # genesis/proto/state
}
7 changes: 3 additions & 4 deletions proto/ssc/peers/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,16 @@ service Query {
rpc Peers(QueryPeersRequest) returns (QueryPeersResponse) {
option (google.api.http).get = "/ssc/peers/peers";
}
// this line is used by starport scaffolding # 2
// this line is used by starport scaffolding # 2
}

// QueryParamsRequest is request type for the Query/Params RPC method.
message QueryParamsRequest {
}
message QueryParamsRequest {}

// QueryParamsResponse is response type for the Query/Params RPC method.
message QueryParamsResponse {
// params holds all the parameters of this module.
Params params = 1 [(gogoproto.nullable) = false];
Params params = 1 [ (gogoproto.nullable) = false ];
}

message QueryPeersRequest {
Expand Down
3 changes: 1 addition & 2 deletions proto/ssc/peers/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ message MsgSetPeers {
string chainId = 2;
repeated string peers = 3;
}
message MsgSetPeersResponse {
}
message MsgSetPeersResponse {}

// this line is used by starport scaffolding # proto/tx/message

0 comments on commit 8139262

Please sign in to comment.