Skip to content

Commit

Permalink
refactor: update tokenfactory version to v1 (#1194)
Browse files Browse the repository at this point in the history
## Description

This PR updates the Proto file versions of `tokenfactory` from `v1beta1`
to `v1`. The module has already undergone extensive testing within the
Osmosis chain, which allows us to use the `v1` version instead of
`v1beta1`. This update improves the naming system and aligns it better
with the module's stability.

<!-- Add a description of the changes that this PR introduces and the
files that
are the most critical to review. -->

---

### Author Checklist

*All items are required. Please add a note to the item if the item is
not applicable and
please add links to any relevant follow up issues.*

I have...

- [x] included the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] added `!` to the type prefix if API or client breaking change
- [x] targeted the correct branch (see [PR
Targeting](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building
modules](https://docs.cosmos.network/v0.44/building-modules/intro.html)
- [ ] included the necessary unit and integration
[tests](https://github.com/desmos-labs/desmos/blob/master/CONTRIBUTING.md#testing)
- [ ] added a changelog entry to `CHANGELOG.md`
- [ ] included comments for [documenting Go
code](https://blog.golang.org/godoc)
- [ ] updated the relevant documentation or specification
- [x] reviewed "Files changed" and left comments if necessary
- [x] confirmed all CI checks have passed

### Reviewers Checklist

*All items are required. Please add a note if the item is not applicable
and please add
your handle next to the items reviewed if you only reviewed selected
items.*

I have...

- [ ] confirmed the correct [type
prefix](https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json)
in the PR title
- [ ] confirmed `!` in the type prefix if API or client breaking change
- [ ] confirmed all author checklist items have been addressed
- [ ] reviewed state machine logic
- [ ] reviewed API design and naming
- [ ] reviewed documentation is accurate
- [ ] reviewed tests and test coverage
- [ ] manually tested (if applicable)

---------

Co-authored-by: RiccardoM <RiccardoM@users.noreply.github.com>
  • Loading branch information
RiccardoM and RiccardoM authored Jul 11, 2023
1 parent 696cbca commit 9057cc7
Show file tree
Hide file tree
Showing 14 changed files with 247 additions and 251 deletions.
2 changes: 1 addition & 1 deletion client/docs/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"url": "./tmp-swagger-gen/desmos/supply/v1/query.swagger.json"
},
{
"url": "./tmp-swagger-gen/desmos/tokenfactory/v1beta1/query.swagger.json"
"url": "./tmp-swagger-gen/desmos/tokenfactory/v1/query.swagger.json"
}
]
}
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions client/docs/swagger-ui/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14797,7 +14797,7 @@ paths:
format: uint64
tags:
- Query
/desmos/tokenfactory/v1beta1/params:
/desmos/tokenfactory/v1/params:
get:
summary: >-
Params defines a gRPC query method that returns the tokenfactory
Expand Down Expand Up @@ -14836,7 +14836,7 @@ paths:
DenomCreationFee defines the fee to be charged on the
creation of a new

denom. The fee is drawn from the subspace treasruy
denom. The fee is drawn from the subspace treasury
account, and

burned.
Expand Down Expand Up @@ -14867,7 +14867,7 @@ paths:
format: byte
tags:
- Query
/desmos/tokenfactory/v1beta1/subspaces/{subspace_id}/denoms:
/desmos/tokenfactory/v1/subspaces/{subspace_id}/denoms:
get:
summary: |-
SubspaceDenoms defines a gRPC query method for fetching all
Expand Down Expand Up @@ -23601,7 +23601,7 @@ definitions:
total_supply:
type: string
title: QueryTotalResponse is the response type for the Query/Total RPC method
desmos.tokenfactory.v1beta1.Params:
desmos.tokenfactory.v1.Params:
type: object
properties:
denom_creation_fee:
Expand All @@ -23622,14 +23622,14 @@ definitions:
DenomCreationFee defines the fee to be charged on the creation of a
new

denom. The fee is drawn from the subspace treasruy account, and
denom. The fee is drawn from the subspace treasury account, and

burned.
description: |-
Params defines the parameters for the tokenfactory module.

Since: Desmos 6.0.0
desmos.tokenfactory.v1beta1.QueryParamsResponse:
desmos.tokenfactory.v1.QueryParamsResponse:
type: object
properties:
params:
Expand Down Expand Up @@ -23657,11 +23657,11 @@ definitions:
DenomCreationFee defines the fee to be charged on the creation of
a new

denom. The fee is drawn from the subspace treasruy account, and
denom. The fee is drawn from the subspace treasury account, and

burned.
description: QueryParamsResponse is the response type for the Query/Params RPC method.
desmos.tokenfactory.v1beta1.QuerySubspaceDenomsResponse:
desmos.tokenfactory.v1.QuerySubspaceDenomsResponse:
type: object
properties:
denoms:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
syntax = "proto3";
package desmos.tokenfactory.v1beta1;
package desmos.tokenfactory.v1;

import "amino/amino.proto";
import "gogoproto/gogo.proto";
import "desmos/tokenfactory/v1beta1/params.proto";
import "desmos/tokenfactory/v1beta1/models.proto";
import "desmos/tokenfactory/v1/params.proto";
import "desmos/tokenfactory/v1/models.proto";

option go_package = "github.com/desmos-labs/desmos/v5/x/tokenfactory/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
syntax = "proto3";
package desmos.tokenfactory.v1beta1;
package desmos.tokenfactory.v1;

import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";

option go_package = "github.com/desmos-labs/desmos/v5/x/tokenfactory/types";

// DenomAuthorityMetadata specifies metadata for addresses that have specific
// capabilities over a token factory denom. Right now there is only one Admin
// permission, but is planned to be extended to the future.
// DenomAuthorityMetadata contains the metadata for a single token denom.
message DenomAuthorityMetadata {
option (gogoproto.equal) = true;

// Can be empty for no admin, or a valid osmosis address
// Admin of the denomination.
// Can be empty for no admin, or a valid Desmos address
string admin = 1 [
(gogoproto.moretags) = "yaml:\"admin\"",
(cosmos_proto.scalar) = "cosmos.AddressString"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package desmos.tokenfactory.v1beta1;
package desmos.tokenfactory.v1;

import "amino/amino.proto";
import "gogoproto/gogo.proto";
Expand All @@ -8,7 +8,7 @@ import "cosmos/bank/v1beta1/bank.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/msg/v1/msg.proto";

import "desmos/tokenfactory/v1beta1/params.proto";
import "desmos/tokenfactory/v1/params.proto";

option go_package = "github.com/desmos-labs/desmos/v5/x/tokenfactory/types";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
syntax = "proto3";
package desmos.tokenfactory.v1beta1;
package desmos.tokenfactory.v1;

import "amino/amino.proto";
import "gogoproto/gogo.proto";
Expand All @@ -14,7 +14,7 @@ message Params {
option (amino.name) = "desmos/x/tokenfactory/Params";

// DenomCreationFee defines the fee to be charged on the creation of a new
// denom. The fee is drawn from the subspace treasruy account, and
// denom. The fee is drawn from the subspace treasury account, and
// burned.
repeated cosmos.base.v1beta1.Coin denom_creation_fee = 1 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
syntax = "proto3";
package desmos.tokenfactory.v1beta1;
package desmos.tokenfactory.v1;

import "amino/amino.proto";
import "gogoproto/gogo.proto";
import "google/api/annotations.proto";
import "desmos/tokenfactory/v1beta1/params.proto";
import "desmos/tokenfactory/v1/params.proto";

option go_package = "github.com/desmos-labs/desmos/v5/x/tokenfactory/types";

Expand All @@ -13,15 +13,15 @@ service Query {
// Params defines a gRPC query method that returns the tokenfactory module's
// parameters.
rpc Params(QueryParamsRequest) returns (QueryParamsResponse) {
option (google.api.http).get = "/desmos/tokenfactory/v1beta1/params";
option (google.api.http).get = "/desmos/tokenfactory/v1/params";
}

// SubspaceDenoms defines a gRPC query method for fetching all
// denominations created by a specific subspace.
rpc SubspaceDenoms(QuerySubspaceDenomsRequest)
returns (QuerySubspaceDenomsResponse) {
option (google.api.http).get =
"/desmos/tokenfactory/v1beta1/subspaces/{subspace_id}/denoms";
"/desmos/tokenfactory/v1/subspaces/{subspace_id}/denoms";
}
}

Expand Down
62 changes: 31 additions & 31 deletions x/tokenfactory/types/genesis.pb.go

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

49 changes: 24 additions & 25 deletions x/tokenfactory/types/models.pb.go

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

Loading

0 comments on commit 9057cc7

Please sign in to comment.