shgraph.hapi.0.54.0.source-code.token_burn.proto Maven / Gradle / Ivy
The newest version!
syntax = "proto3";
package proto;
/*-
*
* Hedera Network Services Protobuf
*
* Copyright (C) 2018 - 2021 Hedera Hashgraph, LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
option java_package = "com.hederahashgraph.api.proto.java";
// <<>> This comment is special code for setting PBJ Compiler java package
option java_multiple_files = true;
import "basic_types.proto";
/**
* Burns tokens from the Token's treasury Account. If no Supply Key is defined, the transaction will
* resolve to TOKEN_HAS_NO_SUPPLY_KEY.
* The operation decreases the Total Supply of the Token. Total supply cannot go below zero.
* The amount provided must be in the lowest denomination possible. Example:
* Token A has 2 decimals. In order to burn 100 tokens, one must provide amount of 10000. In order
* to burn 100.55 tokens, one must provide amount of 10055.
* For non fungible tokens the transaction body accepts serialNumbers list of integers as a parameter.
*
* If the serialNumbers don't get filled for non-fungible token type, a INVALID_TOKEN_BURN_AMOUNT response
* code will be returned.
* If a zero amount is provided for a fungible token type, it will be treated as a regular transaction.
* If both amount and serialNumbers get filled, a INVALID_TRANSACTION_BODY response code will be
* returned.
* If the serialNumbers' list count is greater than the batch size limit global dynamic property, a
* BATCH_SIZE_LIMIT_EXCEEDED response code will be returned.
* If the serialNumbers list contains a non-positive integer as a serial number, a INVALID_NFT_ID
* response code will be returned.
*/
message TokenBurnTransactionBody {
/**
* The token for which to burn tokens. If token does not exist, transaction results in
* INVALID_TOKEN_ID
*/
TokenID token = 1;
/**
* Applicable to tokens of type FUNGIBLE_COMMON. The amount to burn from the Treasury Account.
* Amount must be a positive non-zero number, not bigger than the token balance of the treasury
* account (0; balance], represented in the lowest denomination.
*/
uint64 amount = 2;
/**
* Applicable to tokens of type NON_FUNGIBLE_UNIQUE. The list of serial numbers to be burned.
*/
repeated int64 serialNumbers = 3;
}