github.com/Finschia/finschia-sdk@v0.48.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 [(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 [(gogoproto.nullable) = false, (gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int"];
    74  }
    75  
    76  // Balance defines a balance of an address.
    77  message Balance {
    78    option (gogoproto.equal) = true;
    79  
    80    string        address = 1;
    81    repeated Coin amount  = 2 [(gogoproto.nullable) = false, (gogoproto.castrepeated) = "Coins"];
    82  }
    83  
    84  // ContractClasses defines token classes belong to a contract.
    85  message ContractClasses {
    86    // contract id associated with the contract.
    87    string contract_id = 1;
    88    // classes
    89    repeated google.protobuf.Any classes = 2
    90        [(gogoproto.nullable) = false, (cosmos_proto.accepts_interface) = "TokenClass"];
    91  }
    92  
    93  // ContractNFTs defines token classes belong to a contract.
    94  message ContractNFTs {
    95    // contract id associated with the contract.
    96    string contract_id = 1;
    97    // nfts
    98    repeated NFT nfts = 2 [(gogoproto.nullable) = false];
    99  }
   100  
   101  // ContractAuthorizations defines authorizations belong to a contract.
   102  message ContractAuthorizations {
   103    // contract id associated with the contract.
   104    string contract_id = 1;
   105    // authorizations
   106    repeated Authorization authorizations = 2 [(gogoproto.nullable) = false];
   107  }
   108  
   109  // ContractGrant defines grants belong to a contract.
   110  message ContractGrants {
   111    // contract id associated with the contract.
   112    string contract_id = 1;
   113    // grants
   114    repeated Grant grants = 2 [(gogoproto.nullable) = false];
   115  }
   116  
   117  // NextClassIDs defines the next class ids of the contract.
   118  message NextClassIDs {
   119    // contract id associated with the contract.
   120    string contract_id = 1;
   121    // id for the fungible tokens.
   122    string fungible = 2 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Uint", (gogoproto.nullable) = false];
   123    // id for the non-fungible tokens.
   124    string non_fungible = 3 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Uint", (gogoproto.nullable) = false];
   125  }
   126  
   127  // ContractNextTokenIDs defines the next token ids belong to a contract.
   128  message ContractNextTokenIDs {
   129    string               contract_id = 1;
   130    repeated NextTokenID token_ids   = 2 [(gogoproto.nullable) = false];
   131  }
   132  
   133  // NextTokenID defines the next (non-fungible) token id of the token class.
   134  message NextTokenID {
   135    // class id associated with the token class.
   136    string class_id = 1;
   137    // id for the token.
   138    string id = 2 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Uint", (gogoproto.nullable) = false];
   139  }
   140  
   141  // ContractTokenRelations defines token relations belong to a contract.
   142  message ContractTokenRelations {
   143    // contract id associated with the contract.
   144    string contract_id = 1;
   145    // relations
   146    repeated TokenRelation relations = 2 [(gogoproto.nullable) = false];
   147  }
   148  
   149  // TokenRelation defines relations between two tokens.
   150  message TokenRelation {
   151    // self
   152    string self = 1;
   153    // other
   154    string other = 2;
   155  }