Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TokenReturn transaction #104

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions services/basic_types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -1017,6 +1017,11 @@ enum HederaFunctionality {
* Unpause the Token
*/
TokenUnpause = 80;

/**
* Return the Token
*/
TokenReturn = 81;
}

/**
Expand Down
6 changes: 6 additions & 0 deletions services/schedulable_transaction_body.proto
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import "token_associate.proto";
import "token_dissociate.proto";
import "token_pause.proto";
import "token_unpause.proto";
import "token_return.proto";

import "schedule_delete.proto";

Expand Down Expand Up @@ -255,5 +256,10 @@ message SchedulableTransactionBody {
* Marks a schedule in the network's action queue as deleted, preventing it from executing
*/
ScheduleDeleteTransactionBody scheduleDelete = 34;

/**
* Returns the token
*/
TokenReturnTransactionBody tokenReturn = 37;
}
}
50 changes: 50 additions & 0 deletions services/token_return.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
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";
option java_multiple_files = true;

import "basic_types.proto";

/**
* An account returns the token back to its treasury and dissociates from it.
* This operation is free from customFee and does not stop if account is frozen for the token or
* kyc on this token is revoked for this account or even if the token is paused.
* If the provided account is not found, the transaction will resolve to INVALID_ACCOUNT_ID.
* If the provided token 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 the provided token is not associated with the provided account, the transaction will resolve to TOKEN_NOT_ASSOCIATED_TO_ACCOUNT.
*/
message TokenReturnTransactionBody {
/**
* The token to be returned.
*/
TokenID token = 1;

/**
* The account which returns the token to its treasury
*/
AccountID account = 2;
}
3 changes: 3 additions & 0 deletions services/token_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -127,4 +127,7 @@ service TokenService {

// Unpause the token
rpc unpauseToken (Transaction) returns (TransactionResponse);

// Return the token
rpc returnToken (Transaction) returns (TransactionResponse);
}
6 changes: 6 additions & 0 deletions services/transaction_body.proto
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ import "token_dissociate.proto";
import "token_fee_schedule_update.proto";
import "token_pause.proto";
import "token_unpause.proto";
import "token_return.proto";

import "schedule_create.proto";
import "schedule_delete.proto";
Expand Down Expand Up @@ -314,5 +315,10 @@ message TransactionBody {
* Adds one or more Ed25519 keys to the affirmed signers of a scheduled transaction
*/
ScheduleSignTransactionBody scheduleSign = 44;

/**
* Returns the token
*/
TokenReturnTransactionBody token_Return = 48;
}
}