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

     1  syntax = "proto3";
     2  
     3  option go_package = "github.com/s7techlab/cckit/examples/token/service/burnable";
     4  package examples.erc20_service.service.balance;
     5  
     6  import "google/api/annotations.proto";
     7  import "google/protobuf/empty.proto";
     8  import "mwitkow/go-proto-validators/validator.proto";
     9  
    10  // Burnable balance
    11  service BurnableService {
    12  
    13    rpc Burn (BurnRequest) returns (BurnResponse) {
    14      option (google.api.http) = {
    15        post: "/burn"
    16      };
    17    }
    18  }
    19  
    20  message BurnRequest  {
    21    string address = 1 [(validator.field) = {string_not_empty : true}];
    22    string token = 2;
    23    uint64 amount = 3 [(validator.field) = {int_gt: 0}];
    24  }
    25  
    26  message BurnResponse {
    27    string sender_address = 1;
    28    string recipient_address = 2;
    29    string token = 3;
    30    uint64 amount = 4;
    31  }
    32  
    33  
    34  // Burned event is emitted when Transfer method has been invoked
    35  message Burned  {
    36    string sender_address = 1;
    37    string recipient_address = 2;
    38    uint64 amount = 3;
    39  }