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

     1  syntax = "proto3";
     2  package lbm.token.v1;
     3  
     4  import "gogoproto/gogo.proto";
     5  import "lbm/token/v1/token.proto";
     6  
     7  option go_package = "github.com/Finschia/finschia-sdk/x/token";
     8  
     9  option (gogoproto.equal_all)           = false;
    10  option (gogoproto.goproto_getters_all) = false;
    11  
    12  // Msg defines the token Msg service.
    13  service Msg {
    14    // Send defines a method to send tokens from one account to another account.
    15    // Fires:
    16    // - EventSent
    17    // - transfer (deprecated, not typed)
    18    rpc Send(MsgSend) returns (MsgSendResponse);
    19  
    20    // OperatorSend defines a method to send tokens from one account to another account by the operator.
    21    // Fires:
    22    // - EventSent
    23    // - transfer_from (deprecated, not typed)
    24    // Note: the approval has no value of limit (not ERC20 compliant).
    25    rpc OperatorSend(MsgOperatorSend) returns (MsgOperatorSendResponse);
    26  
    27    // RevokeOperator revoke the authorization of the operator to send the holder's tokens.
    28    // Fires:
    29    // - EventRevokedOperator
    30    // Note: it introduces breaking change, because the legacy clients cannot track this revocation.
    31    // Since: 0.46.0 (finschia)
    32    rpc RevokeOperator(MsgRevokeOperator) returns (MsgRevokeOperatorResponse);
    33  
    34    // AuthorizeOperator allows one to send tokens on behalf of the holder.
    35    // Fires:
    36    // - EventAuthorizedOperator
    37    // - approve_token (deprecated, not typed)
    38    rpc AuthorizeOperator(MsgAuthorizeOperator) returns (MsgAuthorizeOperatorResponse);
    39  
    40    // Issue defines a method to create a class of token.
    41    // it grants `mint`, `burn` and `modify` permissions on the token class to its creator (see also `mintable`).
    42    // Fires:
    43    // - EventIssue
    44    // - EventMinted
    45    // - issue (deprecated, not typed)
    46    rpc Issue(MsgIssue) returns (MsgIssueResponse);
    47  
    48    // GrantPermission allows one to mint or burn tokens or modify a token metadata.
    49    // Fires:
    50    // - EventGrant
    51    // - grant_perm (deprecated, not typed)
    52    rpc GrantPermission(MsgGrantPermission) returns (MsgGrantPermissionResponse);
    53  
    54    // RevokePermission abandons a permission.
    55    // Fires:
    56    // - EventAbandon
    57    // - revoke_perm (deprecated, not typed)
    58    rpc RevokePermission(MsgRevokePermission) returns (MsgRevokePermissionResponse);
    59  
    60    // Mint defines a method to mint tokens.
    61    // Fires:
    62    // - EventMinted
    63    // - mint (deprecated, not typed)
    64    rpc Mint(MsgMint) returns (MsgMintResponse);
    65  
    66    // Burn defines a method to burn tokens.
    67    // Fires:
    68    // - EventBurned
    69    // - burn (deprecated, not typed)
    70    rpc Burn(MsgBurn) returns (MsgBurnResponse);
    71  
    72    // OperatorBurn defines a method to burn tokens by the operator.
    73    // Fires:
    74    // - EventBurned
    75    // - burn_from (deprecated, not typed)
    76    rpc OperatorBurn(MsgOperatorBurn) returns (MsgOperatorBurnResponse);
    77  
    78    // Modify defines a method to modify a token class.
    79    // Fires:
    80    // - EventModified
    81    // - modify_token (deprecated, not typed)
    82    rpc Modify(MsgModify) returns (MsgModifyResponse);
    83  }
    84  
    85  // MsgSend defines the Msg/Send request type.
    86  //
    87  // Signer: `from`
    88  message MsgSend {
    89    // contract id associated with the token class.
    90    string contract_id = 1;
    91    // holder whose tokens are being sent.
    92    string from = 2;
    93    // recipient of the tokens.
    94    string to = 3;
    95    // number of tokens to send.
    96    string amount = 4 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
    97  }
    98  
    99  // MsgSendResponse defines the Msg/Send response type.
   100  message MsgSendResponse {}
   101  
   102  // MsgOperatorSend defines the Msg/OperatorSend request type.
   103  //
   104  // Signer: `operator`
   105  message MsgOperatorSend {
   106    // contract id associated with the token class.
   107    string contract_id = 1;
   108    // the address of the operator.
   109    string operator = 2;
   110    // the address which the transfer is from.
   111    string from = 3;
   112    // the address which the transfer is to.
   113    string to = 4;
   114    // the amount of the transfer.
   115    string amount = 5 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   116  }
   117  
   118  // MsgOperatorSendResponse defines the Msg/OperatorSend response type.
   119  message MsgOperatorSendResponse {}
   120  
   121  // MsgRevokeOperator defines the Msg/RevokeOperator request type.
   122  //
   123  // Signer: `holder`
   124  //
   125  // Since: 0.46.0 (finschia)
   126  message MsgRevokeOperator {
   127    // contract id associated with the token class.
   128    string contract_id = 1;
   129    // address of a holder which revokes the `operator` address as an operator.
   130    string holder = 2;
   131    // address to rescind as an operator for `holder`.
   132    string operator = 3;
   133  }
   134  
   135  // MsgRevokeOperatorResponse defines the Msg/RevokeOperator response type.
   136  //
   137  // Since: 0.46.0 (finschia)
   138  message MsgRevokeOperatorResponse {}
   139  
   140  // MsgAuthorizeOperator defines the Msg/AuthorizeOperator request type.
   141  //
   142  // Signer: `holder`
   143  message MsgAuthorizeOperator {
   144    // contract id associated with the token class.
   145    string contract_id = 1;
   146    // address of the token holder which approves the authorization.
   147    string holder = 2;
   148    // address of the operator which the authorization is granted to.
   149    string operator = 3;
   150  }
   151  
   152  // MsgAuthorizeOperatorResponse defines the Msg/AuthorizeOperator response type.
   153  message MsgAuthorizeOperatorResponse {}
   154  
   155  // MsgIssue defines the Msg/Issue request type.
   156  //
   157  // Signer: `owner`
   158  message MsgIssue {
   159    // name defines the human-readable name of the token class. mandatory (not ERC20 compliant).
   160    string name = 1;
   161    // symbol is an abbreviated name for token class. mandatory (not ERC20 compliant).
   162    string symbol = 2;
   163    // uri for the image of the token class stored off chain.
   164    string uri = 3;
   165    // meta is a brief description of token class.
   166    string meta = 4;
   167    // decimals is the number of decimals which one must divide the amount by to get its user representation.
   168    int32 decimals = 5;
   169    // mintable represents whether the token is allowed to mint.
   170    bool mintable = 6;
   171  
   172    // the address which all permissions on the token class will be granted to (not a permanent property).
   173    string owner = 7;
   174  
   175    // the address to send the minted token to. mandatory.
   176    string to = 8;
   177    // amount of tokens to mint on issuance. mandatory.
   178    string amount = 9 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   179  }
   180  
   181  // MsgIssueResponse defines the Msg/Issue response type.
   182  message MsgIssueResponse {
   183    // id of the new contract.
   184    string contract_id = 1;
   185  }
   186  
   187  // MsgGrantPermission defines the Msg/GrantPermission request type.
   188  //
   189  // Signer: `granter`
   190  message MsgGrantPermission {
   191    // contract id associated with the token class.
   192    string contract_id = 1;
   193    // address of the granter which must have the permission to give.
   194    string from = 2;
   195    // address of the grantee.
   196    string to = 3;
   197    // permission on the token class.
   198    string permission = 4;
   199  }
   200  
   201  // MsgGrantPermissionResponse defines the Msg/GrantPermission response type.
   202  message MsgGrantPermissionResponse {}
   203  
   204  // MsgRevokePermission defines the Msg/RevokePermission request type.
   205  //
   206  // Signer: `grantee`
   207  message MsgRevokePermission {
   208    // contract id associated with the token class.
   209    string contract_id = 1;
   210    // address of the grantee which abandons the permission.
   211    string from = 2;
   212    // permission on the token class.
   213    string permission = 3;
   214  }
   215  
   216  // MsgRevokePermissionResponse defines the Msg/RevokePermission response type.
   217  message MsgRevokePermissionResponse {}
   218  
   219  // MsgMint defines the Msg/Mint request type.
   220  //
   221  // Signer: `from`
   222  message MsgMint {
   223    // contract id associated with the token class.
   224    string contract_id = 1;
   225    // address which triggers the mint.
   226    string from = 2;
   227    // recipient of the tokens.
   228    string to = 3;
   229    // number of tokens to mint.
   230    string amount = 4 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   231  }
   232  
   233  // MsgMintResponse defines the Msg/Mint response type.
   234  message MsgMintResponse {}
   235  
   236  // MsgBurn defines the Msg/Burn request type.
   237  //
   238  // Signer: `from`
   239  message MsgBurn {
   240    // contract id associated with the token class.
   241    string contract_id = 1;
   242    // address whose tokens are being burned.
   243    string from = 2;
   244    // number of tokens to burn.
   245    string amount = 3 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   246  }
   247  
   248  // MsgBurnResponse defines the Msg/Burn response type.
   249  message MsgBurnResponse {}
   250  
   251  // MsgOperatorBurn defines the Msg/OperatorBurn request type.
   252  //
   253  // Signer: `operator`
   254  message MsgOperatorBurn {
   255    // contract id associated with the token class.
   256    string contract_id = 1;
   257    // address which triggers the burn.
   258    string operator = 2;
   259    // address which the tokens will be burnt from.
   260    string from = 3;
   261    // the amount of the burn.
   262    string amount = 4 [(gogoproto.customtype) = "github.com/Finschia/finschia-sdk/types.Int", (gogoproto.nullable) = false];
   263  }
   264  
   265  // MsgOperatorBurnResponse defines the Msg/OperatorBurn response type.
   266  message MsgOperatorBurnResponse {}
   267  
   268  // MsgModify defines the Msg/Modify request type.
   269  //
   270  // Signer: `owner`
   271  message MsgModify {
   272    // contract id associated with the contract.
   273    string contract_id = 1;
   274    // the address of the grantee which must have modify permission.
   275    string owner = 2;
   276    // changes to apply.
   277    // possible attribute keys are: name, uri, img_uri (deprecated), meta
   278    repeated Attribute changes = 3 [(gogoproto.nullable) = false];
   279  }
   280  
   281  // MsgModifyResponse defines the Msg/Modify response type.
   282  message MsgModifyResponse {}