Skip to content

Commit

Permalink
fix: align with protobuf standards
Browse files Browse the repository at this point in the history
  • Loading branch information
johnletey committed Oct 23, 2023
1 parent ba491ab commit efdc39b
Show file tree
Hide file tree
Showing 29 changed files with 656 additions and 626 deletions.
4 changes: 0 additions & 4 deletions proto/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,3 @@ lint:
- SERVICE_SUFFIX
- RPC_REQUEST_STANDARD_NAME
- RPC_RESPONSE_STANDARD_NAME
# TODO: Remove the following exceptions later!
- FIELD_LOWER_SNAKE_CASE
- PACKAGE_DIRECTORY_MATCH
- PACKAGE_VERSION_SUFFIX
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

option go_package = "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfactory/types";

message Blacklisted {
bytes addressBz = 1;
bytes address_bz = 1;
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

option go_package = "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfactory/types";

Expand Down
33 changes: 33 additions & 0 deletions proto/circle/fiattokenfactory/v1/genesis.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
syntax = "proto3";

package circle.fiattokenfactory.v1;

import "circle/fiattokenfactory/v1/blacklisted.proto";
import "circle/fiattokenfactory/v1/blacklister.proto";
import "circle/fiattokenfactory/v1/master_minter.proto";
import "circle/fiattokenfactory/v1/minter_controller.proto";
import "circle/fiattokenfactory/v1/minters.proto";
import "circle/fiattokenfactory/v1/minting_denom.proto";
import "circle/fiattokenfactory/v1/owner.proto";
import "circle/fiattokenfactory/v1/params.proto";
import "circle/fiattokenfactory/v1/paused.proto";
import "circle/fiattokenfactory/v1/pauser.proto";
import "gogoproto/gogo.proto";
// this line is used by starport scaffolding # genesis/proto/import

option go_package = "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfactory/types";

// GenesisState defines the fiattokenfactory module's genesis state.
message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
repeated Blacklisted blacklisted_list = 2 [(gogoproto.nullable) = false];
Paused paused = 3;
MasterMinter master_minter = 4;
repeated Minters minters_list = 5 [(gogoproto.nullable) = false];
Pauser pauser = 6;
Blacklister blacklister = 7;
Owner owner = 8;
repeated MinterController minter_controller_list = 9 [(gogoproto.nullable) = false];
MintingDenom minting_denom = 10;
// this line is used by starport scaffolding # genesis/proto/state
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

option go_package = "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfactory/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

option go_package = "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfactory/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

option go_package = "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfactory/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

option go_package = "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfactory/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

import "gogoproto/gogo.proto";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

option go_package = "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfactory/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

option go_package = "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfactory/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
syntax = "proto3";
package noble.fiattokenfactory;

import "cosmos/base/query/v1beta1/pagination.proto";
package circle.fiattokenfactory.v1;

// this line is used by starport scaffolding # 1
import "fiattokenfactory/blacklisted.proto";
import "fiattokenfactory/blacklister.proto";
import "fiattokenfactory/master_minter.proto";
import "fiattokenfactory/minter_controller.proto";
import "fiattokenfactory/minters.proto";
import "fiattokenfactory/minting_denom.proto";
import "fiattokenfactory/owner.proto";
import "fiattokenfactory/params.proto";
import "fiattokenfactory/paused.proto";
import "fiattokenfactory/pauser.proto";
import "circle/fiattokenfactory/v1/blacklisted.proto";
import "circle/fiattokenfactory/v1/blacklister.proto";
import "circle/fiattokenfactory/v1/master_minter.proto";
import "circle/fiattokenfactory/v1/minter_controller.proto";
import "circle/fiattokenfactory/v1/minters.proto";
import "circle/fiattokenfactory/v1/minting_denom.proto";
import "circle/fiattokenfactory/v1/owner.proto";
import "circle/fiattokenfactory/v1/params.proto";
import "circle/fiattokenfactory/v1/paused.proto";
import "circle/fiattokenfactory/v1/pauser.proto";
import "cosmos/base/query/v1beta1/pagination.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";

Expand All @@ -22,61 +23,61 @@ option go_package = "github.com/circlefin/noble-fiattokenfactory/x/fiattokenfact
service Query {
// Parameters queries the parameters of the module.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/params";
option (google.api.http).get = "/circle/fiattokenfactory/v1/params";
}
// Queries a Blacklisted by index.
rpc Blacklisted(QueryGetBlacklistedRequest) returns (QueryGetBlacklistedResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/blacklisted/{address}";
option (google.api.http).get = "/circle/fiattokenfactory/v1/blacklisted/{address}";
}

// Queries a list of Blacklisted items.
rpc BlacklistedAll(QueryAllBlacklistedRequest) returns (QueryAllBlacklistedResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/blacklisted";
option (google.api.http).get = "/circle/fiattokenfactory/v1/blacklisted";
}

// Queries a Paused by index.
rpc Paused(QueryGetPausedRequest) returns (QueryGetPausedResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/paused";
option (google.api.http).get = "/circle/fiattokenfactory/v1/paused";
}
// Queries a MasterMinter by index.
rpc MasterMinter(QueryGetMasterMinterRequest) returns (QueryGetMasterMinterResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/master_minter";
option (google.api.http).get = "/circle/fiattokenfactory/v1/master_minter";
}
// Queries a Minters by index.
rpc Minters(QueryGetMintersRequest) returns (QueryGetMintersResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/minters/{address}";
option (google.api.http).get = "/circle/fiattokenfactory/v1/minters/{address}";
}

// Queries a list of Minters items.
rpc MintersAll(QueryAllMintersRequest) returns (QueryAllMintersResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/minters";
option (google.api.http).get = "/circle/fiattokenfactory/v1/minters";
}

// Queries a Pauser by index.
rpc Pauser(QueryGetPauserRequest) returns (QueryGetPauserResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/pauser";
option (google.api.http).get = "/circle/fiattokenfactory/v1/pauser";
}
// Queries a Blacklister by index.
rpc Blacklister(QueryGetBlacklisterRequest) returns (QueryGetBlacklisterResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/blacklister";
option (google.api.http).get = "/circle/fiattokenfactory/v1/blacklister";
}
// Queries a Owner by index.
rpc Owner(QueryGetOwnerRequest) returns (QueryGetOwnerResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/owner";
option (google.api.http).get = "/circle/fiattokenfactory/v1/owner";
}
// Queries a MinterController by index.
rpc MinterController(QueryGetMinterControllerRequest) returns (QueryGetMinterControllerResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/minter_controller/{controllerAddress}";
option (google.api.http).get = "/circle/fiattokenfactory/v1/minter_controller/{controller_address}";
}

// Queries a list of MinterController items.
rpc MinterControllerAll(QueryAllMinterControllerRequest) returns (QueryAllMinterControllerResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/minter_controller";
option (google.api.http).get = "/circle/fiattokenfactory/v1/minter_controller";
}

// Queries a MintingDenom by index.
rpc MintingDenom(QueryGetMintingDenomRequest) returns (QueryGetMintingDenomResponse) {
option (google.api.http).get = "/noble/fiattokenfactory/minting_denom";
option (google.api.http).get = "/circle/fiattokenfactory/v1/minting_denom";
}
// this line is used by starport scaffolding # 2
}
Expand Down Expand Up @@ -115,7 +116,7 @@ message QueryGetPausedResponse {
message QueryGetMasterMinterRequest {}

message QueryGetMasterMinterResponse {
MasterMinter masterMinter = 1 [(gogoproto.nullable) = false];
MasterMinter master_minter = 1 [(gogoproto.nullable) = false];
}
message QueryGetMintersRequest {
string address = 1;
Expand Down Expand Up @@ -151,25 +152,25 @@ message QueryGetOwnerResponse {
}

message QueryGetMinterControllerRequest {
string controllerAddress = 1;
string controller_address = 1;
}

message QueryGetMinterControllerResponse {
MinterController minterController = 1 [(gogoproto.nullable) = false];
MinterController minter_controller = 1 [(gogoproto.nullable) = false];
}

message QueryAllMinterControllerRequest {
cosmos.base.query.v1beta1.PageRequest pagination = 1;
}

message QueryAllMinterControllerResponse {
repeated MinterController minterController = 1 [(gogoproto.nullable) = false];
repeated MinterController minter_controller = 1 [(gogoproto.nullable) = false];
cosmos.base.query.v1beta1.PageResponse pagination = 2;
}

message QueryGetMintingDenomRequest {}

message QueryGetMintingDenomResponse {
MintingDenom mintingDenom = 1 [(gogoproto.nullable) = false];
MintingDenom minting_denom = 1 [(gogoproto.nullable) = false];
}
// this line is used by starport scaffolding # 3
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
syntax = "proto3";
package noble.fiattokenfactory;

package circle.fiattokenfactory.v1;

// this line is used by starport scaffolding # proto/tx/import
import "cosmos/base/v1beta1/coin.proto";
Expand Down
32 changes: 0 additions & 32 deletions proto/fiattokenfactory/genesis.proto

This file was deleted.

37 changes: 19 additions & 18 deletions x/fiattokenfactory/types/blacklisted.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit efdc39b

Please sign in to comment.