Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
format proto
Browse files Browse the repository at this point in the history
  • Loading branch information
taryune committed Nov 9, 2023
1 parent 3c476f0 commit c9548c2
Show file tree
Hide file tree
Showing 24 changed files with 139 additions and 177 deletions.
7 changes: 7 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: v1
breaking:
use:
- FILE
lint:
use:
- DEFAULT
17 changes: 8 additions & 9 deletions proto/mycel/epochs/epoch_info.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,24 @@ import "google/protobuf/timestamp.proto";
option go_package = "github.com/mycel-domain/mycel/x/epochs/types";

message EpochInfo {
string identifier = 1;
string identifier = 1;
google.protobuf.Timestamp startTime = 2 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"start_time\""
];
google.protobuf.Duration duration = 3[
google.protobuf.Duration duration = 3 [
(gogoproto.nullable) = false,
(gogoproto.stdduration) = true,
(gogoproto.jsontag) = "duration,omitempty",
(gogoproto.moretags) = "yaml:\"duration\""
];
int64 currentEpoch = 4;
google.protobuf.Timestamp currentEpochStartTime = 5[
];
int64 currentEpoch = 4;
google.protobuf.Timestamp currentEpochStartTime = 5 [
(gogoproto.stdtime) = true,
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"current_epoch_start_time\""
];
bool epochCountingStarted = 6;
int64 currentEpochStartHeight = 7;
];
bool epochCountingStarted = 6;
int64 currentEpochStartHeight = 7;
}

3 changes: 1 addition & 2 deletions proto/mycel/epochs/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ syntax = "proto3";
package mycel.epochs;

import "gogoproto/gogo.proto";
import "mycel/epochs/params.proto";
import "mycel/epochs/epoch_info.proto";
import "mycel/epochs/params.proto";

option go_package = "github.com/mycel-domain/mycel/x/epochs/types";

// GenesisState defines the epochs module's genesis state.
message GenesisState {
repeated EpochInfo epochs = 1 [(gogoproto.nullable) = false];
}

1 change: 0 additions & 1 deletion proto/mycel/epochs/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ option go_package = "github.com/mycel-domain/mycel/x/epochs/types";
// Params defines the parameters for the module.
message Params {
option (gogoproto.goproto_stringer) = false;

}
24 changes: 9 additions & 15 deletions proto/mycel/epochs/query.proto
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
syntax = "proto3";

package mycel.epochs;

import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "mycel/epochs/params.proto";
import "mycel/epochs/epoch_info.proto";
import "mycel/epochs/params.proto";

option go_package = "github.com/mycel-domain/mycel/x/epochs/types";

// Query defines the gRPC querier service.
service Query {

// Parameters queries the parameters of the module.
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/mycel/epochs/params";

}

// Queries a list of EpochInfo items.
rpc EpochInfo (QueryGetEpochInfoRequest) returns (QueryGetEpochInfoResponse) {
rpc EpochInfo(QueryGetEpochInfoRequest) returns (QueryGetEpochInfoResponse) {
option (google.api.http).get = "/mycel/epochs/epoch_info/{identifier}";

}
rpc EpochInfoAll (QueryAllEpochInfoRequest) returns (QueryAllEpochInfoResponse) {
rpc EpochInfoAll(QueryAllEpochInfoRequest) returns (QueryAllEpochInfoResponse) {
option (google.api.http).get = "/mycel/epochs/epoch_info";

}
}

// QueryParamsRequest is request type for the Query/Params RPC method.
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];
}
Expand All @@ -52,7 +47,6 @@ message QueryAllEpochInfoRequest {
}

message QueryAllEpochInfoResponse {
repeated EpochInfo epochInfo = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
repeated EpochInfo epochInfo = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

2 changes: 1 addition & 1 deletion proto/mycel/epochs/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ package mycel.epochs;
option go_package = "github.com/mycel-domain/mycel/x/epochs/types";

// Msg defines the Msg service.
service Msg {}
service Msg {}
14 changes: 7 additions & 7 deletions proto/mycel/furnace/burn_amount.proto
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
syntax = "proto3";
package mycel.furnace;

import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/mycel-domain/mycel/x/furnace/types";
import "gogoproto/gogo.proto";
import "cosmos/base/v1beta1/coin.proto";

message BurnAmount {
uint64 index = 1;
bool burnStarted = 2;
uint64 index = 1;
bool burnStarted = 2;
uint64 totalEpochs = 3;
uint64 currentEpoch = 4;
cosmos.base.v1beta1.Coin totalBurnAmount = 5 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin cumulativeBurntAmount = 6 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin totalBurnAmount = 5 [(gogoproto.nullable) = false];
cosmos.base.v1beta1.Coin cumulativeBurntAmount = 6 [(gogoproto.nullable) = false];
}

3 changes: 1 addition & 2 deletions proto/mycel/furnace/epoch_burn_config.proto
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
syntax = "proto3";
package mycel.furnace;


import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/mycel-domain/mycel/x/furnace/types";

message EpochBurnConfig {
string epochIdentifier = 1;
string epochIdentifier = 1;
uint64 currentBurnAmountIndex = 2;
uint64 defaultTotalEpochs = 3;
google.protobuf.Timestamp startTime = 4 [
Expand Down
12 changes: 5 additions & 7 deletions proto/mycel/furnace/genesis.proto
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
syntax = "proto3";

package mycel.furnace;

import "gogoproto/gogo.proto";
import "mycel/furnace/params.proto";
import "mycel/furnace/epoch_burn_config.proto";
import "mycel/furnace/burn_amount.proto";
import "mycel/furnace/epoch_burn_config.proto";
import "mycel/furnace/params.proto";

option go_package = "github.com/mycel-domain/mycel/x/furnace/types";

// GenesisState defines the furnace module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
EpochBurnConfig epochBurnConfig = 2 [(gogoproto.nullable) = false];
repeated BurnAmount burnAmounts = 3 [(gogoproto.nullable) = false];
Params params = 1 [(gogoproto.nullable) = false];
EpochBurnConfig epochBurnConfig = 2 [(gogoproto.nullable) = false];
repeated BurnAmount burnAmounts = 3 [(gogoproto.nullable) = false];
}

1 change: 0 additions & 1 deletion proto/mycel/furnace/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ option go_package = "github.com/mycel-domain/mycel/x/furnace/types";
// Params defines the parameters for the module.
message Params {
option (gogoproto.goproto_stringer) = false;

}
33 changes: 13 additions & 20 deletions proto/mycel/furnace/query.proto
Original file line number Diff line number Diff line change
@@ -1,48 +1,42 @@
syntax = "proto3";

package mycel.furnace;

import "cosmos/base/query/v1beta1/pagination.proto";
import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "mycel/furnace/params.proto";
import "mycel/furnace/epoch_burn_config.proto";
import "mycel/furnace/burn_amount.proto";
import "cosmos/base/v1beta1/coin.proto";
import "mycel/furnace/epoch_burn_config.proto";
import "mycel/furnace/params.proto";

option go_package = "github.com/mycel-domain/mycel/x/furnace/types";

// Query defines the gRPC querier service.
service Query {

// Parameters queries the parameters of the module.
rpc Params (QueryParamsRequest) returns (QueryParamsResponse) {
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/mycel-domain/mycel/furnace/params";

}

// Queries a EpochBurnConfig by index.
rpc EpochBurnConfig (QueryGetEpochBurnConfigRequest) returns (QueryGetEpochBurnConfigResponse) {
rpc EpochBurnConfig(QueryGetEpochBurnConfigRequest) returns (QueryGetEpochBurnConfigResponse) {
option (google.api.http).get = "/mycel-domain/mycel/furnace/epoch_burn_config";

}

// Queries a list of BurnAmount items.
rpc BurnAmount (QueryGetBurnAmountRequest) returns (QueryGetBurnAmountResponse) {
rpc BurnAmount(QueryGetBurnAmountRequest) returns (QueryGetBurnAmountResponse) {
option (google.api.http).get = "/mycel-domain/mycel/furnace/burn_amount/{index}";

}
rpc BurnAmountAll (QueryAllBurnAmountRequest) returns (QueryAllBurnAmountResponse) {
rpc BurnAmountAll(QueryAllBurnAmountRequest) returns (QueryAllBurnAmountResponse) {
option (google.api.http).get = "/mycel-domain/mycel/furnace/burn_amount";

}
}

// QueryParamsRequest is request type for the Query/Params RPC method.
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];
}
Expand All @@ -66,7 +60,6 @@ message QueryAllBurnAmountRequest {
}

message QueryAllBurnAmountResponse {
repeated BurnAmount burnAmount = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
repeated BurnAmount burnAmount = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

2 changes: 1 addition & 1 deletion proto/mycel/furnace/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ package mycel.furnace;
option go_package = "github.com/mycel-domain/mycel/x/furnace/types";

// Msg defines the Msg service.
service Msg {}
service Msg {}
3 changes: 2 additions & 1 deletion proto/mycel/registry/domain_ownership.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
syntax = "proto3";
package mycel.registry;

option go_package = "github.com/mycel-domain/mycel/x/registry/types";
import "cosmos_proto/cosmos.proto";

option go_package = "github.com/mycel-domain/mycel/x/registry/types";

message OwnedDomain {
string name = 1;
string parent = 2;
Expand Down
11 changes: 5 additions & 6 deletions proto/mycel/registry/genesis.proto
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
syntax = "proto3";

package mycel.registry;

import "gogoproto/gogo.proto";
import "mycel/registry/domain_ownership.proto";
import "mycel/registry/params.proto";
import "mycel/registry/top_level_domain.proto";
import "mycel/registry/second_level_domain.proto";
import "mycel/registry/domain_ownership.proto";
import "mycel/registry/top_level_domain.proto";

option go_package = "github.com/mycel-domain/mycel/x/registry/types";

// GenesisState defines the registry module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
repeated TopLevelDomain topLevelDomains = 2 [(gogoproto.nullable) = false];
Params params = 1 [(gogoproto.nullable) = false];
repeated TopLevelDomain topLevelDomains = 2 [(gogoproto.nullable) = false];
repeated SecondLevelDomain secondLevelDomains = 3 [(gogoproto.nullable) = false];
repeated DomainOwnership domainOwnerships = 4 [(gogoproto.nullable) = false];
repeated DomainOwnership domainOwnerships = 4 [(gogoproto.nullable) = false];
}
12 changes: 4 additions & 8 deletions proto/mycel/registry/network_name.proto
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,20 @@ enum NetworkName {
//Shardeum
// SHARDEUM_MAINNET_ = 20015;
// SHARDEUM_TESTNET_ = 20016;
SHARDEUM_BETANET_SPHINX= 20017;
SHARDEUM_BETANET_SPHINX = 20017;
// Zetachain
// ZETA_MAINNET_MAINNET = 20018;
ZETA_TESTNET_ATHENS = 20019;



// MOVE 3xxxx
//Aptos
APTOS_MAINNET_MAINNET = 30000;
APTOS_TESTNET_TESTNET = 30001;
APTOS_TESTNET_TESTNET = 30001;
// Sui
SUI_MAINNET_MAINNET = 30002;
SUI_TESTNET_TESTNET = 30003;
SUI_TESTNET_TESTNET = 30003;

// SOLANA 4xxxx
SOLANA_MAINNET_MAINNET = 40000;
SOLANA_TESTNET_TESTNET = 40001;
SOLANA_TESTNET_TESTNET = 40001;
}


Loading

0 comments on commit c9548c2

Please sign in to comment.