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 new TokenReturn transaction #103

Open
anighanta opened this issue Oct 16, 2021 · 1 comment · May be fixed by #104
Open

Add new TokenReturn transaction #103

anighanta opened this issue Oct 16, 2021 · 1 comment · May be fixed by #104
Assignees
Labels
enhancement New feature or request

Comments

@anighanta
Copy link
Contributor

anighanta commented Oct 16, 2021

Problem

follow : hashgraph/hedera-services#2331

Solution

Add a new transaction TokenReturn whose body includes a (AccountID account, TokenID tokenType) pair.

When handled, it will:

  1. Return all units or NFTs of tokenType owned by account to tokenType's treasury.
  2. Dissociate account from tokenType.
  3. Charge no custom fees.

As long as account's key signs the transaction, the TokenReturn will succeed, even if account is frozen for the tokenType, or has KYC revoked for the tokenType; and even if tokenType is paused.

Alternatives

No response

@anighanta anighanta added the enhancement New feature or request label Oct 16, 2021
@anighanta anighanta self-assigned this Oct 16, 2021
@anighanta
Copy link
Contributor Author

anighanta commented Oct 16, 2021

token_return.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 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 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
   */
  AccounID account = 2;
}

@anighanta anighanta changed the title A new ReturnToken transaction A new TokenReturn transaction Oct 18, 2021
@anighanta anighanta changed the title A new TokenReturn transaction Add new TokenReturn transaction Oct 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant