shgraph.hedera-protobuf-java-api.0.53.0.source-code.token_wipe_account.proto Maven / Gradle / Ivy
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";
/**
* Wipes the provided amount of tokens from the specified Account. Must be signed by the Token's
* Wipe key.
* If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID.
* If the provided account has been deleted, the transaction will resolve to ACCOUNT_DELETED.
* If the provided token is not found, the transaction will resolve to INVALID_TOKEN_ID.
* If the provided token has been deleted, the transaction will resolve to TOKEN_WAS_DELETED.
* If an Association between the provided token and account is not found, the transaction will
* resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT.
* If Wipe Key is not present in the Token, transaction results in TOKEN_HAS_NO_WIPE_KEY.
* If the provided account is the Token's Treasury Account, transaction results in
* CANNOT_WIPE_TOKEN_TREASURY_ACCOUNT
* On success, tokens are removed from the account and the total supply of the token is decreased by
* the wiped amount.
*
* If both amount and serialNumbers get filled, a INVALID_TRANSACTION_BODY response code will be
* returned.
* If the serialNumbers don't get filled for a non-fungible token type, a INVALID_WIPING_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 the serialNumbers list contains a non-positive integer as a serial number, a INVALID_NFT_ID
* 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.
*
* The amount provided is in the lowest denomination possible. Example:
* Token A has 2 decimals. In order to wipe 100 tokens from account, one must provide amount of
* 10000. In order to wipe 100.55 tokens, one must provide amount of 10055.
*/
message TokenWipeAccountTransactionBody {
/**
* The token for which the account will be wiped. If token does not exist, transaction results
* in INVALID_TOKEN_ID
*/
TokenID token = 1;
/**
* The account to be wiped
*/
AccountID account = 2;
/**
* Applicable to tokens of type FUNGIBLE_COMMON. The amount of tokens to wipe from the specified
* account. Amount must be a positive non-zero number in the lowest denomination possible, not
* bigger than the token balance of the account (0; balance]
*/
uint64 amount = 3;
/**
* Applicable to tokens of type NON_FUNGIBLE_UNIQUE. The list of serial numbers to be wiped.
*/
repeated int64 serialNumbers = 4;
}