Skip to content

Commit

Permalink
Merge branch 'master' into milad/nft-send-authz-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
miladz68 authored Oct 31, 2023
2 parents 43f6440 + 53e9c98 commit 2e0078d
Show file tree
Hide file tree
Showing 44 changed files with 739 additions and 723 deletions.
9 changes: 0 additions & 9 deletions buf.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion docs/static/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7276,7 +7276,7 @@
},
"royalty_rate": {
"type": "string",
"description": "royalty_rate is a number between 0 and 1,which will be used in coreum native Dex. \nwhenever an NFT this class is traded on the Dex, the traded amount will be multiplied by this value\nthat will be transferred to the issuer of the NFT."
"description": "royalty_rate is a number between 0 and 1,which will be used in coreum native Dex.\nwhenever an NFT this class is traded on the Dex, the traded amount will be multiplied by this value\nthat will be transferred to the issuer of the NFT."
}
},
"description": "Class is a full representation of the non-fungible token class."
Expand Down
16 changes: 8 additions & 8 deletions proto/coreum/asset/ft/v1/authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,21 @@ syntax = "proto3";
package coreum.asset.ft.v1;

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

option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/ft/types";

// MintAuthorization allows the grantee to mint up to mint_limit coin from
// the granter's account.
message MintAuthorization {
option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization";
option (amino.name) = "cosmos-sdk/MintAuthorization";
option (amino.name) = "cosmos-sdk/MintAuthorization";

repeated cosmos.base.v1beta1.Coin mint_limit = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = false,
(gogoproto.nullable) = false,
(amino.dont_omitempty) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
Expand All @@ -25,11 +25,11 @@ message MintAuthorization {
// the granter's account.
message BurnAuthorization {
option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization";
option (amino.name) = "cosmos-sdk/BurnAuthorization";
option (amino.name) = "cosmos-sdk/BurnAuthorization";

repeated cosmos.base.v1beta1.Coin burn_limit = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = false,
(gogoproto.nullable) = false,
(amino.dont_omitempty) = false,
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins"
];
}
3 changes: 1 addition & 2 deletions proto/coreum/asset/ft/v1/event.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
syntax = "proto3";
package coreum.asset.ft.v1;

import "gogoproto/gogo.proto";

import "coreum/asset/ft/v1/token.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/ft/types";

Expand Down
15 changes: 8 additions & 7 deletions proto/coreum/asset/ft/v1/genesis.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
syntax = "proto3";
package coreum.asset.ft.v1;

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

import "coreum/asset/ft/v1/token.proto";
import "coreum/asset/ft/v1/params.proto";
import "coreum/asset/ft/v1/token.proto";
import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/ft/types";

Expand All @@ -20,7 +19,7 @@ message GenesisState {
// whitelisted_balances contains the whitelisted balances on all of the accounts
repeated Balance whitelisted_balances = 4 [(gogoproto.nullable) = false];
// pending_token_upgrades contains pending token upgrades.
repeated PendingTokenUpgrade pending_token_upgrades = 5 [(gogoproto.nullable) = false];
repeated PendingTokenUpgrade pending_token_upgrades = 5 [(gogoproto.nullable) = false];
}

// Balance defines an account address and balance pair used module genesis genesis state.
Expand All @@ -29,8 +28,10 @@ message Balance {
string address = 1;

// coins defines the different coins this balance holds.
repeated cosmos.base.v1beta1.Coin coins = 2
[(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins", (gogoproto.nullable) = false];
repeated cosmos.base.v1beta1.Coin coins = 2 [
(gogoproto.castrepeated) = "github.com/cosmos/cosmos-sdk/types.Coins",
(gogoproto.nullable) = false
];
}

// PendingTokenUpgrade stores the version of pending token upgrade.
Expand Down
4 changes: 2 additions & 2 deletions proto/coreum/asset/ft/v1/params.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
syntax = "proto3";
package coreum.asset.ft.v1;

import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "google/protobuf/timestamp.proto";
import "google/protobuf/duration.proto";
import "cosmos/base/v1beta1/coin.proto";
import "google/protobuf/timestamp.proto";

option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/ft/types";

Expand Down
11 changes: 5 additions & 6 deletions proto/coreum/asset/ft/v1/query.proto
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
syntax = "proto3";
package coreum.asset.ft.v1;

import "coreum/asset/ft/v1/params.proto";
import "coreum/asset/ft/v1/token.proto";
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/v1beta1/coin.proto";
import "cosmos/base/query/v1beta1/pagination.proto";

import "coreum/asset/ft/v1/token.proto";
import "coreum/asset/ft/v1/params.proto";

option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/ft/types";

Expand Down Expand Up @@ -152,7 +151,7 @@ message QueryFrozenBalanceRequest {
}

message QueryFrozenBalanceResponse {
// balance contains the frozen balance with the queried account and denom
// balance contains the frozen balance with the queried account and denom
cosmos.base.v1beta1.Coin balance = 1 [(gogoproto.nullable) = false];
}

Expand Down
12 changes: 7 additions & 5 deletions proto/coreum/asset/ft/v1/tx.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@ syntax = "proto3";
package coreum.asset.ft.v1;

import "amino/amino.proto";
import "coreum/asset/ft/v1/params.proto";
import "coreum/asset/ft/v1/token.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";

import "coreum/asset/ft/v1/params.proto";
import "coreum/asset/ft/v1/token.proto";

option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/ft/types";
option (gogoproto.goproto_getters_all) = false;

Expand Down Expand Up @@ -46,7 +45,7 @@ service Msg {
rpc UpgradeTokenV1(MsgUpgradeTokenV1) returns (EmptyResponse);

// UpdateParams is a governance operation to modify the parameters of the module.
// NOTE: all parameters must be provided.
// NOTE: all parameters must be provided.
rpc UpdateParams(MsgUpdateParams) returns (EmptyResponse);
}

Expand Down Expand Up @@ -135,7 +134,10 @@ message MsgUpdateParams {
option (amino.name) = "cosmos-sdk/MsgUpdateParams";

string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true];
Params params = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}

message EmptyResponse {}
8 changes: 4 additions & 4 deletions proto/coreum/asset/nft/v1/authz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@ syntax = "proto3";
package coreum.asset.nft.v1;

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

option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/nft/types";

// SendAuthorization allows the grantee to send specific NFTs from the granter's account.
message SendAuthorization {
option (cosmos_proto.implements_interface) = "cosmos.authz.v1beta1.Authorization";
option (amino.name) = "cosmos-sdk/nft/SendAuthorization";
option (amino.name) = "cosmos-sdk/nft/SendAuthorization";
repeated NFTIdentifier nfts = 1 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}

Expand Down
28 changes: 13 additions & 15 deletions proto/coreum/asset/nft/v1/event.proto
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
syntax = "proto3";
package coreum.asset.nft.v1;

import "gogoproto/gogo.proto";

import "coreum/asset/nft/v1/nft.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/nft/types";

Expand All @@ -25,45 +24,44 @@ message EventClassIssued {

message EventFrozen {
string class_id = 1;
string id = 2;
string owner = 3;
string id = 2;
string owner = 3;
}

message EventUnfrozen {
string class_id = 1;
string id = 2;
string owner = 3;
string id = 2;
string owner = 3;
}

message EventClassFrozen {
string class_id = 1;
string account = 3;
string account = 3;
}

message EventClassUnfrozen {
string class_id = 1;
string account = 3;
string account = 3;
}


message EventAddedToWhitelist {
string class_id = 1;
string id = 2;
string account = 3;
string id = 2;
string account = 3;
}

message EventRemovedFromWhitelist {
string class_id = 1;
string id = 2;
string account = 3;
string id = 2;
string account = 3;
}

message EventAddedToClassWhitelist {
string class_id = 1;
string account = 2;
string account = 2;
}

message EventRemovedFromClassWhitelist {
string class_id = 1;
string account = 2;
string account = 2;
}
38 changes: 23 additions & 15 deletions proto/coreum/asset/nft/v1/genesis.proto
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
syntax = "proto3";
package coreum.asset.nft.v1;

import "gogoproto/gogo.proto";

import "coreum/asset/nft/v1/params.proto";
import "coreum/asset/nft/v1/nft.proto";
import "coreum/asset/nft/v1/params.proto";
import "gogoproto/gogo.proto";

option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/nft/types";

Expand All @@ -14,32 +13,41 @@ message GenesisState {
Params params = 1 [(gogoproto.nullable) = false];
// class_definitions keep the non-fungible token class definitions state
repeated ClassDefinition class_definitions = 2 [(gogoproto.nullable) = false];
repeated FrozenNFT frozen_nfts = 3 [(gogoproto.nullable) = false, (gogoproto.customname) = "FrozenNFTs"];
repeated WhitelistedNFTAccounts whitelisted_nft_accounts = 4 [(gogoproto.nullable) = false, (gogoproto.customname) = "WhitelistedNFTAccounts"];
repeated BurntNFT burnt_nfts = 5 [(gogoproto.nullable) = false, (gogoproto.customname) = "BurntNFTs"];
repeated FrozenNFT frozen_nfts = 3 [
(gogoproto.nullable) = false,
(gogoproto.customname) = "FrozenNFTs"
];
repeated WhitelistedNFTAccounts whitelisted_nft_accounts = 4 [
(gogoproto.nullable) = false,
(gogoproto.customname) = "WhitelistedNFTAccounts"
];
repeated BurntNFT burnt_nfts = 5 [
(gogoproto.nullable) = false,
(gogoproto.customname) = "BurntNFTs"
];
repeated ClassWhitelistedAccounts class_whitelisted_accounts = 6 [(gogoproto.nullable) = false];
repeated ClassFrozenAccounts class_frozen_accounts = 7 [(gogoproto.nullable) = false];
}

message FrozenNFT {
string classID = 1;
repeated string nftIDs = 2;
string classID = 1;
repeated string nftIDs = 2;
}

message WhitelistedNFTAccounts {
string classID = 1;
string nftID = 2;
repeated string accounts = 4;
string classID = 1;
string nftID = 2;
repeated string accounts = 4;
}

message ClassWhitelistedAccounts {
string classID = 1;
repeated string accounts = 2;
string classID = 1;
repeated string accounts = 2;
}

message ClassFrozenAccounts {
string classID = 1;
repeated string accounts = 2;
string classID = 1;
repeated string accounts = 2;
}

message BurntNFT {
Expand Down
8 changes: 4 additions & 4 deletions proto/coreum/asset/nft/v1/nft.proto
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ message ClassDefinition {
string id = 1 [(gogoproto.customname) = "ID"];
string issuer = 2;
repeated ClassFeature features = 3;
// royalty_rate is a number between 0 and 1,which will be used in coreum native Dex.
// royalty_rate is a number between 0 and 1,which will be used in coreum native Dex.
// whenever an NFT this class is traded on the Dex, the traded amount will be multiplied by this value
// that will be transferred to the issuer of the NFT.
// that will be transferred to the issuer of the NFT.
string royalty_rate = 4 [
(gogoproto.nullable) = false,
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"
Expand All @@ -39,9 +39,9 @@ message Class {
string uri_hash = 7 [(gogoproto.customname) = "URIHash"];
google.protobuf.Any data = 8;
repeated ClassFeature features = 9;
// royalty_rate is a number between 0 and 1,which will be used in coreum native Dex.
// royalty_rate is a number between 0 and 1,which will be used in coreum native Dex.
// whenever an NFT this class is traded on the Dex, the traded amount will be multiplied by this value
// that will be transferred to the issuer of the NFT.
// that will be transferred to the issuer of the NFT.
string royalty_rate = 10 [
(gogoproto.nullable) = false,
(gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Dec"
Expand Down
1 change: 0 additions & 1 deletion proto/coreum/asset/nft/v1/params.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ syntax = "proto3";
package coreum.asset.nft.v1;

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

import "gogoproto/gogo.proto";

option go_package = "github.com/CoreumFoundation/coreum/v3/x/asset/nft/types";
Expand Down
Loading

0 comments on commit 2e0078d

Please sign in to comment.