github.com/Finschia/finschia-sdk@v0.48.1/proto/lbm/token/v1/token.proto (about)

     1  syntax = "proto3";
     2  package lbm.token.v1;
     3  
     4  option go_package                      = "github.com/Finschia/finschia-sdk/x/token";
     5  option (gogoproto.equal_all)           = false;
     6  option (gogoproto.goproto_getters_all) = false;
     7  
     8  import "gogoproto/gogo.proto";
     9  
    10  // Params defines the parameters for the token module.
    11  message Params {}
    12  
    13  // Contract defines token information.
    14  message Contract {
    15    // id defines the unique identifier of the contract.
    16    string id = 1;
    17    // name defines the human-readable name of the contract. mandatory (not ERC20 compliant).
    18    string name = 2;
    19    // symbol is an abbreviated name for contract. mandatory (not ERC20 compliant).
    20    string symbol = 3;
    21    // an uri for the image of the contract stored off chain.
    22    string uri = 4;
    23    // meta is a brief description of contract.
    24    string meta = 5;
    25    // decimals is the number of decimals which one must divide the amount by to get its user representation.
    26    int32 decimals = 6;
    27    // mintable represents whether the token is allowed to mint or burn.
    28    bool mintable = 7;
    29  }
    30  
    31  // Attribute defines a key and value of the attribute.
    32  message Attribute {
    33    string key   = 1;
    34    string value = 2;
    35  }
    36  
    37  // Permission enumerates the valid permissions on a contract.
    38  enum Permission {
    39    option (gogoproto.goproto_enum_prefix) = false;
    40  
    41    // unspecified defines the default permission which is invalid.
    42    PERMISSION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "PermissionUnspecified"];
    43  
    44    // PERMISSION_MODIFY defines a permission to modify a contract.
    45    PERMISSION_MODIFY = 1 [(gogoproto.enumvalue_customname) = "PermissionModify"];
    46    // PERMISSION_MINT defines a permission to mint tokens of a contract.
    47    PERMISSION_MINT = 2 [(gogoproto.enumvalue_customname) = "PermissionMint"];
    48    // PERMISSION_BURN defines a permission to burn tokens of a contract.
    49    PERMISSION_BURN = 3 [(gogoproto.enumvalue_customname) = "PermissionBurn"];
    50  }
    51  
    52  // Deprecated: use Permission
    53  //
    54  // LegacyPermission enumerates the valid permissions on a contract.
    55  enum LegacyPermission {
    56    option (gogoproto.goproto_enum_stringer) = false;
    57    option (gogoproto.goproto_enum_prefix)   = false;
    58  
    59    // unspecified defines the default permission which is invalid.
    60    LEGACY_PERMISSION_UNSPECIFIED = 0 [(gogoproto.enumvalue_customname) = "LegacyPermissionUnspecified"];
    61  
    62    // modify defines a permission to modify a contract.
    63    LEGACY_PERMISSION_MODIFY = 1 [(gogoproto.enumvalue_customname) = "LegacyPermissionModify"];
    64    // mint defines a permission to mint tokens of a contract.
    65    LEGACY_PERMISSION_MINT = 2 [(gogoproto.enumvalue_customname) = "LegacyPermissionMint"];
    66    // burn defines a permission to burn tokens of a contract.
    67    LEGACY_PERMISSION_BURN = 3 [(gogoproto.enumvalue_customname) = "LegacyPermissionBurn"];
    68  }
    69  
    70  // Authorization defines an authorization given to the operator on tokens of the holder.
    71  message Authorization {
    72    // address of the token holder which approves the authorization.
    73    string holder = 1;
    74    // address of the operator which the authorization is granted to.
    75    string operator = 2;
    76  }
    77  
    78  // Grant defines permission given to a grantee.
    79  message Grant {
    80    // address of the grantee.
    81    string grantee = 1;
    82    // permission on the contract.
    83    Permission permission = 2;
    84  }