Skip to content
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

fix: align with protobuf standards #7

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Unit Tests

on:
pull_request:
push:

jobs:
unit-tests:
Expand Down
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
31 changes: 31 additions & 0 deletions proto/circle/fiattokenfactory/v1/genesis.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
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";

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;
}
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,17 +1,18 @@
syntax = "proto3";
package noble.fiattokenfactory;

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 "cosmos/base/query/v1beta1/pagination.proto";
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 "gogoproto/gogo.proto";
import "google/api/annotations.proto";

Expand All @@ -21,61 +22,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";
}
}

Expand Down Expand Up @@ -113,7 +114,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 @@ -149,24 +150,24 @@ 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];
}
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
30 changes: 0 additions & 30 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