github.com/Finschia/finschia-sdk@v0.49.1/proto/lbm/collection/v1/genesis.proto (about)

     1  syntax = "proto3";
     2  package lbm.collection.v1;
     3  
     4  import "google/protobuf/any.proto";
     5  import "gogoproto/gogo.proto";
     6  import "cosmos_proto/cosmos.proto";
     7  
     8  import "lbm/collection/v1/collection.proto";
     9  
    10  option go_package = "github.com/Finschia/finschia-sdk/x/collection";
    11  
    12  // GenesisState defines the collection module's genesis state.
    13  message GenesisState {
    14    // params defines all the paramaters of the module.
    15    Params params = 1 [(gogoproto.nullable) = false];
    16  
    17    // contracts defines the metadata of the contracts.
    18    repeated Contract contracts = 2 [(gogoproto.nullable) = false];
    19  
    20    // next ids for token classes.
    21    repeated NextClassIDs next_class_ids = 3 [(gogoproto.nullable) = false];
    22  
    23    // classes defines the metadata of the tokens.
    24    repeated ContractClasses classes = 4 [(gogoproto.nullable) = false];
    25  
    26    // next ids for (non-fungible) tokens.
    27    repeated ContractNextTokenIDs next_token_ids = 5 [(gogoproto.nullable) = false];
    28  
    29    // balances is an array containing the balances of all the accounts.
    30    repeated ContractBalances balances = 6 [(gogoproto.nullable) = false];
    31  
    32    // nfts is an array containing the nfts.
    33    repeated ContractNFTs nfts = 7 [(gogoproto.nullable) = false];
    34  
    35    // parents represents the parents of (non-fungible) tokens.
    36    repeated ContractTokenRelations parents = 8 [deprecated = true, (gogoproto.nullable) = false];
    37  
    38    // grants defines the grant information.
    39    repeated ContractGrants grants = 9 [(gogoproto.nullable) = false];
    40  
    41    // authorizations defines the approve information.
    42    repeated ContractAuthorizations authorizations = 10 [(gogoproto.nullable) = false];
    43  
    44    // supplies represents the total supplies of tokens.
    45    repeated ContractStatistics supplies = 11 [(gogoproto.nullable) = false];
    46  
    47    // burnts represents the total amount of burnt tokens.
    48    repeated ContractStatistics burnts = 12 [(gogoproto.nullable) = false];
    49  }
    50  
    51  // ContractBalances defines balances belong to a contract.
    52  // genesis state.
    53  message ContractBalances {
    54    // contract id associated with the contract.
    55    string contract_id = 1;
    56    // balances
    57    repeated Balance balances = 2 [(gogoproto.nullable) = false];
    58  }
    59  
    60  // ContractStatistics defines statistics belong to a contract.
    61  message ContractStatistics {
    62    // contract id associated with the contract.
    63    string contract_id = 1;
    64    // statistics
    65    repeated ClassStatistics statistics = 2 [(gogoproto.nullable) = false];
    66  }
    67  
    68  // ClassStatistics defines statistics belong to a token class.
    69  message ClassStatistics {
    70    // class id associated with the token class.
    71    string class_id = 1;
    72    // statistics
    73    string amount = 2
    74        [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int"];
    75  }
    76  
    77  // Balance defines a balance of an address.
    78  message Balance {
    79    option (gogoproto.equal) = true;
    80  
    81    string        address = 1;
    82    repeated Coin amount  = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Coins"];
    83  }
    84  
    85  // ContractClasses defines token classes belong to a contract.
    86  message ContractClasses {
    87    // contract id associated with the contract.
    88    string contract_id = 1;
    89    // classes
    90    repeated google.protobuf.Any classes = 2
    91        [(gogoproto.nullable) = false, (cosmos_proto.accepts_interface) = "TokenClass"];
    92  }
    93  
    94  // ContractNFTs defines token classes belong to a contract.
    95  message ContractNFTs {
    96    // contract id associated with the contract.
    97    string contract_id = 1;
    98    // nfts
    99    repeated NFT nfts = 2 [(gogoproto.nullable) = false];
   100  }
   101  
   102  // ContractAuthorizations defines authorizations belong to a contract.
   103  message ContractAuthorizations {
   104    // contract id associated with the contract.
   105    string contract_id = 1;
   106    // authorizations
   107    repeated Authorization authorizations = 2 [(gogoproto.nullable) = false];
   108  }
   109  
   110  // ContractGrant defines grants belong to a contract.
   111  message ContractGrants {
   112    // contract id associated with the contract.
   113    string contract_id = 1;
   114    // grants
   115    repeated Grant grants = 2 [(gogoproto.nullable) = false];
   116  }
   117  
   118  // NextClassIDs defines the next class ids of the contract.
   119  message NextClassIDs {
   120    // contract id associated with the contract.
   121    string contract_id = 1;
   122    // id for the fungible tokens.
   123    string fungible = 2 [
   124      deprecated             = true,
   125      (gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Uint",
   126      (gogoproto.nullable)   = false
   127    ];
   128    // id for the non-fungible tokens.
   129    string non_fungible = 3
   130        [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Uint", (gogoproto.nullable) = false];
   131  }
   132  
   133  // ContractNextTokenIDs defines the next token ids belong to a contract.
   134  message ContractNextTokenIDs {
   135    string               contract_id = 1;
   136    repeated NextTokenID token_ids   = 2 [(gogoproto.nullable) = false];
   137  }
   138  
   139  // NextTokenID defines the next (non-fungible) token id of the token class.
   140  message NextTokenID {
   141    // class id associated with the token class.
   142    string class_id = 1;
   143    // id for the token.
   144    string id = 2 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Uint", (gogoproto.nullable) = false];
   145  }
   146  
   147  // ContractTokenRelations defines token relations belong to a contract.
   148  message ContractTokenRelations {
   149    option deprecated = true;
   150  
   151    // contract id associated with the contract.
   152    string contract_id = 1;
   153    // relations
   154    repeated TokenRelation relations = 2 [(gogoproto.nullable) = false];
   155  }
   156  
   157  // TokenRelation defines relations between two tokens.
   158  message TokenRelation {
   159    option deprecated = true;
   160  
   161    // self
   162    string self = 1;
   163    // other
   164    string other = 2;
   165  }