github.com/s7techlab/cckit@v0.10.5/examples/token/service/config_erc20/config_erc20.proto (about)

     1  syntax = "proto3";
     2  
     3  option go_package = "github.com/s7techlab/cckit/examples/token/service/config_erc20";
     4  package examples.erc20_service.service.config_erc20;
     5  
     6  import "google/api/annotations.proto";
     7  import "google/protobuf/empty.proto";
     8  
     9  // ERC-20 Config getters
    10  service ConfigERC20Service {
    11  
    12    // Returns the name of the token.
    13    rpc GetName(google.protobuf.Empty) returns (NameResponse) {
    14      option (google.api.http) = {
    15        get: "/name"
    16      };
    17    }
    18  
    19    // Returns the symbol of the token, usually a shorter version of the name.
    20    rpc GetSymbol(google.protobuf.Empty) returns (SymbolResponse) {
    21      option (google.api.http) = {
    22        get: "/symbol"
    23      };
    24    }
    25  
    26    // Returns the number of decimals used to get its user representation.
    27    // For example, if decimals equals 2, a balance of 505 tokens should be displayed to a user as 5,05 (505 / 10 ** 2).
    28    rpc GetDecimals (google.protobuf.Empty) returns (DecimalsResponse) {
    29      option (google.api.http) = {
    30        get: "/decimals"
    31      };
    32    }
    33  
    34    // Returns the amount of tokens in existence.
    35    rpc GetTotalSupply (google.protobuf.Empty) returns (TotalSupplyResponse) {
    36      option (google.api.http) = {
    37        get: "/total-supply"
    38      };
    39    }
    40  }
    41  
    42  message NameResponse {
    43    string name = 1;
    44  }
    45  
    46  message SymbolResponse {
    47    string symbol = 1;
    48  }
    49  
    50  message DecimalsResponse {
    51    uint32 decimals = 1;
    52  }
    53  
    54  message TotalSupplyResponse {
    55    uint64 total_supply = 1;
    56  }