Skip to content

Commit

Permalink
refactor: x/nft audit changes (#14055)
Browse files Browse the repository at this point in the history
## Description

ref: #13991 



---

### 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...

- [ ] 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
- [ ] targeted the correct branch (see [PR Targeting](https://github.com/cosmos/cosmos-sdk/blob/main/CONTRIBUTING.md#pr-targeting))
- [ ] provided a link to the relevant issue or specification
- [ ] followed the guidelines for [building modules](https://github.com/cosmos/cosmos-sdk/blob/main/docs/building-modules)
- [ ] included the necessary unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/main/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
- [ ] reviewed "Files changed" and left comments if necessary
- [ ] 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)
  • Loading branch information
likhita-809 authored Nov 30, 2022
1 parent 6239cdf commit ac6b19d
Show file tree
Hide file tree
Showing 30 changed files with 501 additions and 264 deletions.
24 changes: 17 additions & 7 deletions api/cosmos/nft/v1beta1/event.pulsar.go

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

1 change: 1 addition & 0 deletions api/cosmos/nft/v1beta1/genesis.pulsar.go

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

34 changes: 27 additions & 7 deletions api/cosmos/nft/v1beta1/query.pulsar.go

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

4 changes: 2 additions & 2 deletions proto/cosmos/auth/v1beta1/query.proto
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,14 @@ message AddressStringToBytesResponse {
// Since: cosmos-sdk 0.46.2
message QueryAccountAddressByIDRequest {
// Deprecated, use account_id instead
//
//
// id is the account number of the address to be queried. This field
// should have been an uint64 (like all account numbers), and will be
// updated to uint64 in a future version of the auth query.
int64 id = 1 [deprecated = true];

// account_id is the account number of the address to be queried.
//
//
// Since: cosmos-sdk 0.47
uint64 account_id = 2;
}
Expand Down
6 changes: 3 additions & 3 deletions proto/cosmos/crisis/v1beta1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ message MsgVerifyInvariant {
option (gogoproto.goproto_getters) = false;

// sender is the account address of private key to send coins to fee collector account.
string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
string sender = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];

// name of the invariant module.
string invariant_module_name = 2;

// invariant_route is the msg's invariant route.
string invariant_route = 3;
string invariant_route = 3;
}

// MsgVerifyInvariantResponse defines the Msg/VerifyInvariant response type.
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/gov/v1beta1/gov.proto
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ message TallyResult {
// Vote defines a vote on a governance proposal.
// A Vote consists of a proposal ID, the voter, and the vote option.
message Vote {
option (gogoproto.equal) = false;
option (gogoproto.equal) = false;

uint64 proposal_id = 1 [(gogoproto.jsontag) = "id", (amino.field_name) = "id", (amino.dont_omitempty) = true];
string voter = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"];
Expand Down
2 changes: 1 addition & 1 deletion proto/cosmos/mint/v1beta1/mint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ message Minter {

// Params defines the parameters for the x/mint module.
message Params {
option (amino.name) = "cosmos-sdk/x/mint/Params";
option (amino.name) = "cosmos-sdk/x/mint/Params";

// type of coin to mint
string mint_denom = 1;
Expand Down
29 changes: 23 additions & 6 deletions proto/cosmos/nft/v1beta1/event.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,39 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/nft";

// EventSend is emitted on Msg/Send
message EventSend {
// class_id associated with the nft
string class_id = 1;
string id = 2;
string sender = 3;

// id is a unique identifier of the nft
string id = 2;

// sender is the address of the owner of nft
string sender = 3;

// receiver is the receiver address of nft
string receiver = 4;
}

// EventMint is emitted on Mint
message EventMint {
// class_id associated with the nft
string class_id = 1;
string id = 2;
string owner = 3;

// id is a unique identifier of the nft
string id = 2;

// owner is the owner address of the nft
string owner = 3;
}

// EventBurn is emitted on Burn
message EventBurn {
// class_id associated with the nft
string class_id = 1;
string id = 2;
string owner = 3;

// id is a unique identifier of the nft
string id = 2;

// owner is the owner address of the nft
string owner = 3;
}
4 changes: 3 additions & 1 deletion proto/cosmos/nft/v1beta1/genesis.proto
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ option go_package = "github.com/cosmos/cosmos-sdk/x/nft";
message GenesisState {
// class defines the class of the nft type.
repeated cosmos.nft.v1beta1.Class classes = 1;
repeated Entry entries = 2;

// entry defines all nft owned by a person.
repeated Entry entries = 2;
}

// Entry Defines all nft owned by a person
Expand Down
Loading

0 comments on commit ac6b19d

Please sign in to comment.