Skip to content

Commit

Permalink
HIP 18 (#42)
Browse files Browse the repository at this point in the history
* Sync to main in preparation for 0.15.0 tag (#39)

* Reference node properties controlling HTS behavior

Signed-off-by: tinker-michaelj <[email protected]>

* Again clarify use of master

Signed-off-by: tinker-michaelj <[email protected]>

* Update from head of schedule-develop in hashgraph/hedera-services (#2)

Signed-off-by: tinker-michaelj <[email protected]>

* Standardize memos for non-schedule entities (#3)

* Standardize memos for non-schedule entities

Signed-off-by: tinker-michaelj <[email protected]>

* Fix typo in field number

Signed-off-by: tinker-michaelj <[email protected]>

* Use google.protobuf.StringValue for new memo fields

Signed-off-by: tinker-michaelj <[email protected]>

* Comment on deprecated memoField choice

Signed-off-by: tinker-michaelj <[email protected]>

* Port schedule txn comments (#5)

* Port schedule txn comments

Signed-off-by: tinker-michaelj <[email protected]>

* Add further comments

Signed-off-by: tinker-michaelj <[email protected]>

* Apply the same changes to hedera-protobufs repo. (#4)

Signed-off-by: ljianghedera <[email protected]>

Co-authored-by: ljianghedera <[email protected]>

* Separate messages used for balances proto under hedera/streams (#6)

* Separate messages used for balances proto under hedera/streams

Signed-off-by: tinker-michaelj <[email protected]>

* Restructure proto directories

Signed-off-by: tinker-michaelj <[email protected]>

* Change java_package for AccountBalanceFile.proto messages

Signed-off-by: tinker-michaelj <[email protected]>

* Extract TokenBalance(s) to BasicTypes

Signed-off-by: tinker-michaelj <[email protected]>

* Include decimals in queries of token/account balances and relationships (#8)

Signed-off-by: tinker-michaelj <[email protected]>

* Include Leemon's edits from Services issue #974 (#10)

Signed-off-by: tinker-michaelj <[email protected]>

* Add scheduled transaction id to TransactionReceipt + ScheduleGetInfo types (#12)

* Prepare to tag 0.12.0 release (#11)

* Reference node properties controlling HTS behavior

Signed-off-by: tinker-michaelj <[email protected]>

* Again clarify use of master

Signed-off-by: tinker-michaelj <[email protected]>

* Update from head of schedule-develop in hashgraph/hedera-services (#2)

Signed-off-by: tinker-michaelj <[email protected]>

* Standardize memos for non-schedule entities (#3)

* Standardize memos for non-schedule entities

Signed-off-by: tinker-michaelj <[email protected]>

* Fix typo in field number

Signed-off-by: tinker-michaelj <[email protected]>

* Use google.protobuf.StringValue for new memo fields

Signed-off-by: tinker-michaelj <[email protected]>

* Comment on deprecated memoField choice

Signed-off-by: tinker-michaelj <[email protected]>

* Port schedule txn comments (#5)

* Port schedule txn comments

Signed-off-by: tinker-michaelj <[email protected]>

* Add further comments

Signed-off-by: tinker-michaelj <[email protected]>

* Apply the same changes to hedera-protobufs repo. (#4)

Signed-off-by: ljianghedera <[email protected]>

Co-authored-by: ljianghedera <[email protected]>

* Separate messages used for balances proto under hedera/streams (#6)

* Separate messages used for balances proto under hedera/streams

Signed-off-by: tinker-michaelj <[email protected]>

* Restructure proto directories

Signed-off-by: tinker-michaelj <[email protected]>

* Change java_package for AccountBalanceFile.proto messages

Signed-off-by: tinker-michaelj <[email protected]>

* Extract TokenBalance(s) to BasicTypes

Signed-off-by: tinker-michaelj <[email protected]>

* Include decimals in queries of token/account balances and relationships (#8)

Signed-off-by: tinker-michaelj <[email protected]>

* Include Leemon's edits from Services issue #974 (#10)

Signed-off-by: tinker-michaelj <[email protected]>

Co-authored-by: ljianghedera <[email protected]>

* Update README.md

* Add scheduledTransactionID fields to TransactionReceipt and ScheduleGetInfo

Signed-off-by: tinker-michaelj <[email protected]>

* Update README

Signed-off-by: tinker-michaelj <[email protected]>

Co-authored-by: ljianghedera <[email protected]>

* 00017 d hcs message size (#19)

* Add response code for Hcs message size limit.

Signed-off-by: ljianghedera <[email protected]>

* Add the response code for HCS message too large.

Signed-off-by: ljianghedera <[email protected]>

* Update protobufs to satisfy revised scheduled txns spec (#15)

* Update protobufs to satisfy revised scheduled txns spec

Signed-off-by: tinker-michaelj <[email protected]>

* Improve comment readability

Signed-off-by: tinker-michaelj <[email protected]>

* Make explicit mention of scheduling.whitelist

Signed-off-by: tinker-michaelj <[email protected]>

* Incorporate reviewer feedback

Signed-off-by: tinker-michaelj <[email protected]>

* Standardize on payerAccountID

Signed-off-by: tinker-michaelj <[email protected]>

* Add scheduledTransactionID to ScheduleInfo

Signed-off-by: tinker-michaelj <[email protected]>

* Clarify effects of schedule deletion

Signed-off-by: tinker-michaelj <[email protected]>

* Include expiration time in getScheduleInfo response

Signed-off-by: tinker-michaelj <[email protected]>

* Change now-obsolete UNPARSEABLE_SCHEDULED_TRANSACTION response code to SCHEDULED_TRANSACTION_NOT_IN_WHITELIST; remove UNSCHEDULABLE_TRANSACTION

Signed-off-by: tinker-michaelj <[email protected]>

* Remove unneeded imports

Signed-off-by: tinker-michaelj <[email protected]>

* Replace deleted/executed flags with consensus timestamps

Signed-off-by: tinker-michaelj <[email protected]>

* Update info on ScheduleCreate receipt on duplicate creation

Signed-off-by: tinker-michaelj <[email protected]>

* Incorporate reviewer feedback

Signed-off-by: tinker-michaelj <[email protected]>

* Use oneof to enforce mutual exclusion of schedule deletion and execution

Signed-off-by: tinker-michaelj <[email protected]>

* Use lower_snake_case for field names in oneof to ease transition to standard naming convention

Signed-off-by: tinker-michaelj <[email protected]>

* Redirect to ResponseCode doc section from Schedule* ops

Signed-off-by: tinker-michaelj <[email protected]>

* Add ThrottleDefinitions types (#23)

* Create ThrottleDefinitions message

Signed-off-by: tinker-michaelj <[email protected]>

* Add throttle-specific response codes

Signed-off-by: tinker-michaelj <[email protected]>

* Add more general response codes for throttle defs

Signed-off-by: tinker-michaelj <[email protected]>

* Add comments to the throttle types

Signed-off-by: tinker-michaelj <[email protected]>

* Clarify some comments

Signed-off-by: tinker-michaelj <[email protected]>

* Update to milliOpsPerSec/burstPeriodMs

Signed-off-by: tinker-michaelj <[email protected]>

* Fix typo

Signed-off-by: tinker-michaelj <[email protected]>

* Be more concise

Signed-off-by: tinker-michaelj <[email protected]>

* Be explicit about milli-ops

Signed-off-by: tinker-michaelj <[email protected]>

* Emphasize only ed25519 keys are supported (#26)

Signed-off-by: tinker-michaelj <[email protected]>

* Revise address book types to 0.13.0 standard (#27)

* Update to final version of address book messages

Signed-off-by: tinker-michaelj <[email protected]>

* Align with issue 750 consensus format

Signed-off-by: tinker-michaelj <[email protected]>

* Change ServiceEndpoint types

Signed-off-by: tinker-michaelj <[email protected]>

* Match comments from issue

Signed-off-by: tinker-michaelj <[email protected]>

* Update comment

Signed-off-by: tinker-michaelj <[email protected]>

* Add details

Signed-off-by: tinker-michaelj <[email protected]>

* Specify fallback use of deprecated fields

Signed-off-by: tinker-michaelj <[email protected]>

* Minor revision

Signed-off-by: tinker-michaelj <[email protected]>

* Add full semver meta to SemanticVersion (#33)

* Add full semver meta to SemanticVersion

Signed-off-by: tinker-michaelj <[email protected]>

* Add top-level comment on SemanticVersion

Signed-off-by: tinker-michaelj <[email protected]>

* Abbreviate SemanticVersion optional fields

Signed-off-by: tinker-michaelj <[email protected]>

* Add ACCOUNT_EXPIRED_AND_PENDING_REMOVAL response code (#35)

Signed-off-by: tinker-michaelj <[email protected]>

* Feature: NFT Tokens (#37)

* feat(tokens): nfts

Signed-off-by: failfmi <[email protected]>

* feat: multiple fee data per hedera functionality; sub type distinguishing different fee data

Signed-off-by: failfmi <[email protected]>

* deprecate feedata property

Signed-off-by: Daniel Ivanov <[email protected]>

* style: rename repeated fee data field

Signed-off-by: failfmi <[email protected]>

* Error ResponseCodes

Signed-off-by: Georgi Yazovaliyski <[email protected]>

Co-authored-by: Daniel Ivanov <[email protected]>
Co-authored-by: Georgi Yazovaliyski <[email protected]>

* Sync develop with main (#38)

* Prepare for 0.13.0 tag (#28)

* Reference node properties controlling HTS behavior

Signed-off-by: tinker-michaelj <[email protected]>

* Again clarify use of master

Signed-off-by: tinker-michaelj <[email protected]>

* Update from head of schedule-develop in hashgraph/hedera-services (#2)

Signed-off-by: tinker-michaelj <[email protected]>

* Standardize memos for non-schedule entities (#3)

* Standardize memos for non-schedule entities

Signed-off-by: tinker-michaelj <[email protected]>

* Fix typo in field number

Signed-off-by: tinker-michaelj <[email protected]>

* Use google.protobuf.StringValue for new memo fields

Signed-off-by: tinker-michaelj <[email protected]>

* Comment on deprecated memoField choice

Signed-off-by: tinker-michaelj <[email protected]>

* Port schedule txn comments (#5)

* Port schedule txn comments

Signed-off-by: tinker-michaelj <[email protected]>

* Add further comments

Signed-off-by: tinker-michaelj <[email protected]>

* Apply the same changes to hedera-protobufs repo. (#4)

Signed-off-by: ljianghedera <[email protected]>

Co-authored-by: ljianghedera <[email protected]>

* Separate messages used for balances proto under hedera/streams (#6)

* Separate messages used for balances proto under hedera/streams

Signed-off-by: tinker-michaelj <[email protected]>

* Restructure proto directories

Signed-off-by: tinker-michaelj <[email protected]>

* Change java_package for AccountBalanceFile.proto messages

Signed-off-by: tinker-michaelj <[email protected]>

* Extract TokenBalance(s) to BasicTypes

Signed-off-by: tinker-michaelj <[email protected]>

* Include decimals in queries of token/account balances and relationships (#8)

Signed-off-by: tinker-michaelj <[email protected]>

* Include Leemon's edits from Services issue #974 (#10)

Signed-off-by: tinker-michaelj <[email protected]>

* Add scheduled transaction id to TransactionReceipt + ScheduleGetInfo types (#12)

* Prepare to tag 0.12.0 release (#11)

* Reference node properties controlling HTS behavior

Signed-off-by: tinker-michaelj <[email protected]>

* Again clarify use of master

Signed-off-by: tinker-michaelj <[email protected]>

* Update from head of schedule-develop in hashgraph/hedera-services (#2)

Signed-off-by: tinker-michaelj <[email protected]>

* Standardize memos for non-schedule entities (#3)

* Standardize memos for non-schedule entities

Signed-off-by: tinker-michaelj <[email protected]>

* Fix typo in field number

Signed-off-by: tinker-michaelj <[email protected]>

* Use google.protobuf.StringValue for new memo fields

Signed-off-by: tinker-michaelj <[email protected]>

* Comment on deprecated memoField choice

Signed-off-by: tinker-michaelj <[email protected]>

* Port schedule txn comments (#5)

* Port schedule txn comments

Signed-off-by: tinker-michaelj <[email protected]>

* Add further comments

Signed-off-by: tinker-michaelj <[email protected]>

* Apply the same changes to hedera-protobufs repo. (#4)

Signed-off-by: ljianghedera <[email protected]>

Co-authored-by: ljianghedera <[email protected]>

* Separate messages used for balances proto under hedera/streams (#6)

* Separate messages used for balances proto under hedera/streams

Signed-off-by: tinker-michaelj <[email protected]>

* Restructure proto directories

Signed-off-by: tinker-michaelj <[email protected]>

* Change java_package for AccountBalanceFile.proto messages

Signed-off-by: tinker-michaelj <[email protected]>

* Extract TokenBalance(s) to BasicTypes

Signed-off-by: tinker-michaelj <[email protected]>

* Include decimals in queries of token/account balances and relationships (#8)

Signed-off-by: tinker-michaelj <[email protected]>

* Include Leemon's edits from Services issue #974 (#10)

Signed-off-by: tinker-michaelj <[email protected]>

Co-authored-by: ljianghedera <[email protected]>

* Update README.md

* Add scheduledTransactionID fields to TransactionReceipt and ScheduleGetInfo

Signed-off-by: tinker-michaelj <[email protected]>

* Update README

Signed-off-by: tinker-michaelj <[email protected]>

Co-authored-by: ljianghedera <[email protected]>

* 00017 d hcs message size (#19)

* Add response code for Hcs message size limit.

Signed-off-by: ljianghedera <[email protected]>

* Add the response code for HCS message too large.

Signed-off-by: ljianghedera <[email protected]>

* Update protobufs to satisfy revised scheduled txns spec (#15)

* Update protobufs to satisfy revised scheduled txns spec

Signed-off-by: tinker-michaelj <[email protected]>

* Improve comment readability

Signed-off-by: tinker-michaelj <[email protected]>

* Make explicit mention of scheduling.whitelist

Signed-off-by: tinker-michaelj <[email protected]>

* Incorporate reviewer feedback

Signed-off-by: tinker-michaelj <[email protected]>

* Standardize on payerAccountID

Signed-off-by: tinker-michaelj <[email protected]>

* Add scheduledTransactionID to ScheduleInfo

Signed-off-by: tinker-michaelj <[email protected]>

* Clarify effects of schedule deletion

Signed-off-by: tinker-michaelj <[email protected]>

* Include expiration time in getScheduleInfo response

Signed-off-by: tinker-michaelj <[email protected]>

* Change now-obsolete UNPARSEABLE_SCHEDULED_TRANSACTION response code to SCHEDULED_TRANSACTION_NOT_IN_WHITELIST; remove UNSCHEDULABLE_TRANSACTION

Signed-off-by: tinker-michaelj <[email protected]>

* Remove unneeded imports

Signed-off-by: tinker-michaelj <[email protected]>

* Replace deleted/executed flags with consensus timestamps

Signed-off-by: tinker-michaelj <[email protected]>

* Update info on ScheduleCreate receipt on duplicate creation

Signed-off-by: tinker-michaelj <[email protected]>

* Incorporate reviewer feedback

Signed-off-by: tinker-michaelj <[email protected]>

* Use oneof to enforce mutual exclusion of schedule deletion and execution

Signed-off-by: tinker-michaelj <[email protected]>

* Use lower_snake_case for field names in oneof to ease transition to standard naming convention

Signed-off-by: tinker-michaelj <[email protected]>

* Redirect to ResponseCode doc section from Schedule* ops

Signed-off-by: tinker-michaelj <[email protected]>

* Add ThrottleDefinitions types (#23)

* Create ThrottleDefinitions message

Signed-off-by: tinker-michaelj <[email protected]>

* Add throttle-specific response codes

Signed-off-by: tinker-michaelj <[email protected]>

* Add more general response codes for throttle defs

Signed-off-by: tinker-michaelj <[email protected]>

* Add comments to the throttle types

Signed-off-by: tinker-michaelj <[email protected]>

* Clarify some comments

Signed-off-by: tinker-michaelj <[email protected]>

* Update to milliOpsPerSec/burstPeriodMs

Signed-off-by: tinker-michaelj <[email protected]>

* Fix typo

Signed-off-by: tinker-michaelj <[email protected]>

* Be more concise

Signed-off-by: tinker-michaelj <[email protected]>

* Be explicit about milli-ops

Signed-off-by: tinker-michaelj <[email protected]>

* Emphasize only ed25519 keys are supported (#26)

Signed-off-by: tinker-michaelj <[email protected]>

* Revise address book types to 0.13.0 standard (#27)

* Update to final version of address book messages

Signed-off-by: tinker-michaelj <[email protected]>

* Align with issue 750 consensus format

Signed-off-by: tinker-michaelj <[email protected]>

* Change ServiceEndpoint types

Signed-off-by: tinker-michaelj <[email protected]>

* Match comments from issue

Signed-off-by: tinker-michaelj <[email protected]>

* Update comment

Signed-off-by: tinker-michaelj <[email protected]>

* Add details

Signed-off-by: tinker-michaelj <[email protected]>

* Specify fallback use of deprecated fields

Signed-off-by: tinker-michaelj <[email protected]>

* Minor revision

Signed-off-by: tinker-michaelj <[email protected]>

Co-authored-by: ljianghedera <[email protected]>
Co-authored-by: ljianghedera <[email protected]>

* Key list (#34)

* Update BasicTypes.proto

* Update BasicTypes.proto

* Update FileDelete.proto

* Update FileCreate.proto

* Update FileAppend.proto

* Update FileUpdate.proto

* Update BasicTypes.proto

* Update FileCreate.proto

* Update BasicTypes.proto

* Update FileCreate.proto

* Update FileUpdate.proto

* Update FileAppend.proto

* Update FileDelete.proto

* Update BasicTypes.proto

* Update BasicTypes.proto

* Update BasicTypes.proto

* Update BasicTypes.proto

* Update BasicTypes.proto

* Update FileAppend.proto

* Update FileCreate.proto

* Update FileDelete.proto

* Update FileUpdate.proto

* Update FileUpdate.proto

* Update FileUpdate.proto

* Update BasicTypes.proto

* Update BasicTypes.proto

* Update BasicTypes.proto

* Update FileCreate.proto

Co-authored-by: ljianghedera <[email protected]>
Co-authored-by: ljianghedera <[email protected]>
Co-authored-by: SimiHunjan <[email protected]>

Co-authored-by: ljianghedera <[email protected]>
Co-authored-by: ljianghedera <[email protected]>
Co-authored-by: failfmi <[email protected]>
Co-authored-by: Daniel Ivanov <[email protected]>
Co-authored-by: Georgi Yazovaliyski <[email protected]>
Co-authored-by: SimiHunjan <[email protected]>

* added messages for custom token fee type and custom hbar fee type

Signed-off-by: anighanta <[email protected]>

* 041- add response code RECEIVER_SIG_REQUIRED

Signed-off-by: anighanta <[email protected]>

* add a Fraction type to denote percentages more elegently

Signed-off-by: anighanta <[email protected]>

* typo fix

Signed-off-by: anighanta <[email protected]>

* Encapsulate TokenFee and HbarFee in a single message

Signed-off-by: anighanta <[email protected]>

* Define fixed and fractional fee to avoid illegal combinations

Signed-off-by: anighanta <[email protected]>

* fix typo

Signed-off-by: anighanta <[email protected]>

* add missing import and typo fix

Signed-off-by: anighanta <[email protected]>

* added description to the the fields and renamed recevingAccountId to feeCollector

Signed-off-by: anighanta <[email protected]>

* Splitting the CustomFees out in a separate class.

Signed-off-by: Quan Nguyen <[email protected]>

* Consolidate all the CustomFees into one type of message for using in report as well.

Signed-off-by: Quan Nguyen <[email protected]>

* Add some comments and the CustomFeeCharged message + imports

Signed-off-by: tinker-michaelj <[email protected]>

* added customFeesKey to TokenCreate, TokenGetInfo, TokenUpdate

Signed-off-by: abhishek-hedera <[email protected]>

* add a few ResponseCodes

Signed-off-by: Neeharika-Sompalli <[email protected]>

* Added missing comments for CryptoTransfer message.

Signed-off-by: ljianghedera <[email protected]>

* Add TOKEN_MAX_SUPPLY_REACHED

Signed-off-by: tinker-michaelj <[email protected]>

* Add SENDER_DOES_NOT_OWN_NFT_SERIAL_NO

Signed-off-by: tinker-michaelj <[email protected]>

* Include CUSTOM_FEE_NOT_FULLY_SPECIFIED

Signed-off-by: tinker-michaelj <[email protected]>

* Add INVALID_CUSTOM_FEE_KEY and TOKEN_HAS_NO_CUSTOM_FEE_KEY

Signed-off-by: tinker-michaelj <[email protected]>

* Address reviewer comments

Signed-off-by: tinker-michaelj <[email protected]>

* Reduce wordiness

Signed-off-by: tinker-michaelj <[email protected]>

* Reduce wordiness

Signed-off-by: tinker-michaelj <[email protected]>

* Clean up wording

Signed-off-by: tinker-michaelj <[email protected]>

* Remove unneeded import

Signed-off-by: tinker-michaelj <[email protected]>

* Clean up wording

Signed-off-by: tinker-michaelj <[email protected]>

* Fix TokenGetInfo

Signed-off-by: tinker-michaelj <[email protected]>

* Remove custom fee key response codes

Signed-off-by: tinker-michaelj <[email protected]>

* Tweak response code names

Signed-off-by: tinker-michaelj <[email protected]>

* Change all sint64 to int64

Signed-off-by: tinker-michaelj <[email protected]>

* Add CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE

Signed-off-by: tinker-michaelj <[email protected]>

* Clarify custom_fees in TokenUpdate. Add INVALID_CUSTOM_FRACTIONAL_FEES_SUM response code.

Signed-off-by: Quan Nguyen <[email protected]>

Co-authored-by: Michael Tinker <[email protected]>
Co-authored-by: ljianghedera <[email protected]>
Co-authored-by: ljianghedera <[email protected]>
Co-authored-by: failfmi <[email protected]>
Co-authored-by: Daniel Ivanov <[email protected]>
Co-authored-by: Georgi Yazovaliyski <[email protected]>
Co-authored-by: SimiHunjan <[email protected]>
Co-authored-by: Quan Nguyen <[email protected]>
Co-authored-by: abhishek-hedera <[email protected]>
Co-authored-by: Neeharika-Sompalli <[email protected]>
  • Loading branch information
11 people authored Jun 24, 2021
1 parent 37f38c0 commit b1fcf9e
Show file tree
Hide file tree
Showing 8 changed files with 97 additions and 4 deletions.
7 changes: 6 additions & 1 deletion services/BasicTypes.proto
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ message TokenTransferList {
repeated NftTransfer nftTransfers = 3; // Applicable to tokens of type NON_FUNGIBLE_UNIQUE. Multiple list of NftTransfers, each of which has a sender and receiver account, including the serial number of the NFT
}

/* A rational number, used to set the amount of a value transfer to collect as a custom fee */
message Fraction {
int64 numerator = 1; // The rational's numerator
int64 denominator = 2; // The rational's denominator; a zero value will result in FRACTION_DIVIDES_BY_ZERO
}

/* Unique identifier for a topic (used by the consensus service) */
message TopicID {
int64 shardNum = 1; // The shard number (nonnegative)
Expand Down Expand Up @@ -138,7 +144,6 @@ enum TokenType {
NON_FUNGIBLE_UNIQUE = 1;
}


/**
* Possible FeeData Object SubTypes. Supplementary to the main HederaFunctionality Type.
* When not explicitly specified, DEFAULT is used.
Expand Down
6 changes: 3 additions & 3 deletions services/CryptoTransfer.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ option java_multiple_files = true;

import "BasicTypes.proto";

/* Transfer cryptocurrency from some accounts to other accounts. The accounts list can contain up to 10 accounts. The amounts list must be the same length as the accounts list. Each negative amount is withdrawn from the corresponding account (a sender), and each positive one is added to the corresponding account (a receiver). The amounts list must sum to zero. Each amount is a number of tinyBars (there are 100,000,000 tinyBars in one Hbar).
/* Transfers cryptocurrency among two or more accounts by making the desired adjustments to their balances. Each transfer list can specify up to 10 adjustments. Each negative amount is withdrawn from the corresponding account (a sender), and each positive one is added to the corresponding account (a receiver). The amounts list must sum to zero. Each amount is a number of tinybars (there are 100,000,000 tinybars in one hbar).
If any sender account fails to have sufficient hbars, then the entire transaction fails, and none of those transfers occur, though the transaction fee is still charged. This transaction must be signed by the keys for all the sending accounts, and for any receiving accounts that have receiverSigRequired == true. The signatures are in the same order as the accounts, skipping those accounts that don't need a signature.
*/
message CryptoTransferTransactionBody {
TransferList transfers = 1;
repeated TokenTransferList tokenTransfers = 2;
TransferList transfers = 1; // The desired hbar balance adjustments
repeated TokenTransferList tokenTransfers = 2; // The desired token unit balance adjustments; if any custom fees are assessed, the ledger will try to deduct them from the payer of this CryptoTransfer, resolving the transaction to INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE if this is not possible
}
65 changes: 65 additions & 0 deletions services/CustomFees.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
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.
* ‍
*/

import "BasicTypes.proto";

/* A fraction of the transferred units of a token to assess as a fee. The amount assessed
will never be less than the given minimum_amount, and never greater than the given maximum_amount.
The denomination is always units of the token to which this fractional fee is attached. */
message FractionalFee {
Fraction fractional_amount = 1; // The fraction of the transferred units to assess as a fee
int64 minimum_amount = 2; // The minimum amount to assess
int64 maximum_amount = 3; // The maximum amount to assess (zero implies no maximum)
}

/* A fixed number of units (hbar or token) to asssess as a fee during a CryptoTransfer
that transfers units of the token to which this fixed fee is attached. */
message FixedFee {
int64 amount = 1; // The number of units to assess as a fee
TokenID denominating_token_id = 2; // The denomination of the fee; taken as hbar if left unset
}

/* A transfer fee to assess during a CryptoTransfer that transfers units of the token
to which the fee is attached. A custom fee may be either fixed or fractional, and must specify
a fee collector account to receive the assessed fees. Only positive fees may be assessed. */
message CustomFee {
oneof fee {
FixedFee fixed_fee = 1; // Fixed fee to be charged
FractionalFee fractional_fee = 2; // Fractional fee to be charged
}
AccountID fee_collector_account_id = 3; // The account to receive the custom fee
}

/* A custom transfer fee that was assessed during handling of a CryptoTransfer. */
message AssessedCustomFee {
int64 amount = 1; // The number of units assessed for the fee
TokenID token_id = 2; // The denomination of the fee; taken as hbar if left unset
AccountID fee_collector_account_id = 3; // The account to receive the assessed fee
}

/* The custom fees attached to a token; may be marked as mutable or immutable. */
message CustomFees {
bool can_update_with_admin_key = 1; // Whether the fees can be updated with the token's admin key; once this is false, it can never be made true again
repeated CustomFee custom_fees = 2; // All the custom fees attached to the token
}
15 changes: 15 additions & 0 deletions services/ResponseCode.proto
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ enum ResponseCodeEnum {
EXPIRATION_REDUCTION_NOT_ALLOWED = 110; // The expiration date/time on a smart contract may not be reduced
MAX_GAS_LIMIT_EXCEEDED = 111; //Gas exceeded currently allowable gas limit per transaction
MAX_FILE_SIZE_EXCEEDED = 112; // File size exceeded the currently allowable limit
RECEIVER_SIG_REQUIRED = 113; // When a valid signature is not provided for operations on account with receiverSigRequired=true

INVALID_TOPIC_ID = 150; // The Topic ID specified is not in the system.
INVALID_ADMIN_KEY = 155; // A provided admin key was invalid.
INVALID_SUBMIT_KEY = 156; // A provided submit key was invalid.
Expand Down Expand Up @@ -237,4 +239,17 @@ enum ResponseCodeEnum {
METADATA_TOO_LONG = 227; // Nft metadata is too long
BATCH_SIZE_LIMIT_EXCEEDED = 228; // Repeated operations count exceeds the limit
QUERY_RANGE_LIMIT_EXCEEDED = 229; // The range of data to be gathered exceeds the limit
FRACTION_DIVIDES_BY_ZERO = 230; // A custom fractional fee set a denominator of zero
INSUFFICIENT_PAYER_BALANCE_FOR_CUSTOM_FEE = 231; // The transaction payer could not afford a custom fee
CUSTOM_FEES_LIST_TOO_LONG = 232; // The customFees list is longer than allowed limit 10
INVALID_CUSTOM_FEE_COLLECTOR = 233; // Any of the feeCollector accounts for customFees is invalid
INVALID_TOKEN_ID_IN_CUSTOM_FEES = 234; // Any of the token Ids in customFees is invalid
TOKEN_NOT_ASSOCIATED_TO_FEE_COLLECTOR = 235; // Any of the token Ids in customFees are not associated to feeCollector
TOKEN_MAX_SUPPLY_REACHED = 236; // A token cannot have more units minted due to its configured supply ceiling
SENDER_DOES_NOT_OWN_NFT_SERIAL_NO = 237; // The transaction attempted to move an NFT serial number from an account other than its owner
CUSTOM_FEE_NOT_FULLY_SPECIFIED = 238; // A custom fee schedule entry did not specify either a fixed or fractional fee
CUSTOM_FEE_MUST_BE_POSITIVE = 239; // Only positive fees may be assessed at this time
CUSTOM_FEES_ARE_MARKED_IMMUTABLE = 240; // Once custom fees are marked as immutable, they can never be changed (or made mutable again)
CUSTOM_FEE_OUTSIDE_NUMERIC_RANGE = 241; // A fractional custom fee exceeded the range of a 64-bit signed integer
INVALID_CUSTOM_FRACTIONAL_FEES_SUM = 242; // The sum of all custom fractional fees must be strictly less than 1
}
2 changes: 2 additions & 0 deletions services/TokenCreate.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ option java_multiple_files = true;

import "Duration.proto";
import "BasicTypes.proto";
import "CustomFees.proto";
import "Timestamp.proto";

/*
Expand Down Expand Up @@ -60,4 +61,5 @@ message TokenCreateTransactionBody {
TokenType tokenType = 17; // IWA compatibility. Specifies the token type. Defaults to FUNGIBLE_COMMON
TokenSupplyType supplyType = 18; // IWA compatibility. Specified the token supply type. Defaults to INFINITE
int64 maxSupply = 19; // IWA Compatibility. Depends on TokenSupplyType. For tokens of type FUNGIBLE_COMMON - the maximum number of tokens that can be in circulation. For tokens of type NON_FUNGIBLE_UNIQUE - the maximum number of NFTs (serial numbers) that can be minted. This field can never be changed!
CustomFees custom_fees = 20; // Custom fees to be assessed during a CryptoTransfer that transfers units of this token
}
2 changes: 2 additions & 0 deletions services/TokenGetInfo.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ option java_package = "com.hederahashgraph.api.proto.java";
option java_multiple_files = true;

import "BasicTypes.proto";
import "CustomFees.proto";
import "QueryHeader.proto";
import "ResponseHeader.proto";
import "Timestamp.proto";
Expand Down Expand Up @@ -60,6 +61,7 @@ message TokenInfo {
TokenType tokenType = 19; // The token type
TokenSupplyType supplyType = 20; // The token supply type
int64 maxSupply = 21; // For tokens of type FUNGIBLE_COMMON - The Maximum number of fungible tokens that can be in circulation. For tokens of type NON_FUNGIBLE_UNIQUE - the maximum number of NFTs (serial numbers) that can be in circulation
CustomFees custom_fees = 22; // Custom fees to be assessed during a CryptoTransfer that transfers units of this token
}

/* Response when the client sends the node TokenGetInfoQuery */
Expand Down
2 changes: 2 additions & 0 deletions services/TokenUpdate.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ option java_package = "com.hederahashgraph.api.proto.java";
option java_multiple_files = true;

import "BasicTypes.proto";
import "CustomFees.proto";
import "Duration.proto";
import "Timestamp.proto";
import "google/protobuf/wrappers.proto";
Expand Down Expand Up @@ -53,4 +54,5 @@ message TokenUpdateTransactionBody {
Duration autoRenewPeriod = 11; // The new interval at which the auto-renew account will be charged to extend the token's expiry.
Timestamp expiry = 12; // The new expiry time of the token. Expiry can be updated even if admin key is not set. If the provided expiry is earlier than the current token expiry, transaction wil resolve to INVALID_EXPIRATION_TIME
google.protobuf.StringValue memo = 13; // If set, the new memo to be associated with the token (UTF-8 encoding max 100 bytes)
CustomFees custom_fees = 14; // If set, the new custom fees to be assessed during a CryptoTransfer that transfers units of this token. If the can_update_with_admin_key field is already set to false for the token, this TokenUpdate will resolve to CUSTOM_FEES_ARE_MARKED_IMMUTABLE. If the can_update_with_admin_key field is set to false in this TokenUpdate, the new custom fees will take effect and stay immutable afterwards.
}
2 changes: 2 additions & 0 deletions services/TransactionRecord.proto
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ option java_multiple_files = true;

import "Timestamp.proto";
import "BasicTypes.proto";
import "CustomFees.proto";
import "TransactionReceipt.proto";
import "CryptoTransfer.proto";
import "ContractCallLocal.proto";
Expand All @@ -46,4 +47,5 @@ message TransactionRecord {
TransferList transferList = 10; // All hbar transfers as a result of this transaction, such as fees, or transfers performed by the transaction, or by a smart contract it calls, or by the creation of threshold records that it triggers.
repeated TokenTransferList tokenTransferLists = 11; // All Token transfers as a result of this transaction
ScheduleID scheduleRef = 12; // Reference to the scheduled transaction ID that this transaction record represent
repeated AssessedCustomFee assessed_custom_fees = 13; // All custom fees that were assessed during a CryptoTransfer, and must be paid if the transaction status resolved to SUCCESS
}

0 comments on commit b1fcf9e

Please sign in to comment.