Skip to content

Commit

Permalink
feat: make HederaResponseCodes.sol up-to-date with the latest proto…
Browse files Browse the repository at this point in the history
…bufs ones (#1218)

chore: update response codes

Signed-off-by: nikolay <[email protected]>
  • Loading branch information
natanasow authored Feb 3, 2025
1 parent b332345 commit 6fa33ab
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions contracts/system-contracts/HederaResponseCodes.sol
Original file line number Diff line number Diff line change
Expand Up @@ -308,4 +308,62 @@ library HederaResponseCodes {
int32 internal constant INSUFFICIENT_BALANCES_FOR_STORAGE_RENT = 327; // The combined balances of a contract and its auto-renew account (if any) did not cover the rent charged for net new storage used in a transaction.
int32 internal constant MAX_CHILD_RECORDS_EXCEEDED = 328; // A contract transaction tried to use more than the allowed number of child records, via either system contract records or internal contract creations.
int32 internal constant INSUFFICIENT_BALANCES_FOR_RENEWAL_FEES = 329; // The combined balances of a contract and its auto-renew account (if any) or balance of an account did not cover the auto-renewal fees in a transaction.
int32 internal constant TRANSACTION_HAS_UNKNOWN_FIELDS = 330; // A transaction's protobuf message includes unknown fields; could mean that a client expects not-yet-released functionality to be available.
int32 internal constant ACCOUNT_IS_IMMUTABLE = 331; // The account cannot be modified. Account's key is not set
int32 internal constant ALIAS_ALREADY_ASSIGNED = 332; // An alias that is assigned to an account or contract cannot be assigned to another account or contract.
int32 internal constant INVALID_METADATA_KEY = 333; // A provided metadata key was invalid. Verification includes, for example, checking the size of Ed25519 and ECDSA(secp256k1) public keys.
int32 internal constant TOKEN_HAS_NO_METADATA_KEY = 334; // Metadata key is not set on token
int32 internal constant MISSING_TOKEN_METADATA = 335; // Token Metadata is not provided
int32 internal constant MISSING_SERIAL_NUMBERS = 336; // NFT serial numbers are missing in the TokenUpdateNftsTransactionBody
int32 internal constant TOKEN_HAS_NO_ADMIN_KEY = 337; // Admin key is not set on token
int32 internal constant NODE_DELETED = 338; // A transaction failed because the consensus node identified is deleted from the address book.
int32 internal constant INVALID_NODE_ID = 339; // A transaction failed because the consensus node identified is not valid or does not exist in state.
int32 internal constant INVALID_GOSSIP_ENDPOINT = 340; // A transaction failed because one or more entries in the list of service endpoints for the `gossip_endpoint` field is invalid.<br/> The most common cause for this response is a service endpoint that has the domain name (DNS) set rather than address and port.
int32 internal constant INVALID_NODE_ACCOUNT_ID = 341; // A transaction failed because the node account identifier provided does not exist or is not valid. One common source of this error is providing a node account identifier using the "alias" form rather than "numeric" form.
int32 internal constant INVALID_NODE_DESCRIPTION = 342; // A transaction failed because the description field cannot be encoded as UTF-8 or is more than 100 bytes when encoded.
int32 internal constant INVALID_SERVICE_ENDPOINT = 343; // A transaction failed because one or more entries in the list of service endpoints for the `service_endpoint` field is invalid.<br/> The most common cause for this response is a service endpoint that has the domain name (DNS) set rather than address and port.
int32 internal constant INVALID_GOSSIP_CA_CERTIFICATE = 344; // A transaction failed because the TLS certificate provided for the node is missing or invalid.
int32 internal constant INVALID_GRPC_CERTIFICATE = 345; // A transaction failed because the hash provided for the gRPC certificate is present but invalid.
int32 internal constant INVALID_MAX_AUTO_ASSOCIATIONS = 346; // The maximum automatic associations value is not valid. The most common cause for this error is a value less than `-1`.
int32 internal constant MAX_NODES_CREATED = 347; // The maximum number of nodes allowed in the address book have been created.
int32 internal constant IP_FQDN_CANNOT_BE_SET_FOR_SAME_ENDPOINT = 348; // In ServiceEndpoint, domain_name and ipAddressV4 are mutually exclusive.
int32 internal constant GOSSIP_ENDPOINT_CANNOT_HAVE_FQDN = 349; // Fully qualified domain name is not allowed in gossip_endpoint.
int32 internal constant FQDN_SIZE_TOO_LARGE = 350; // In ServiceEndpoint, domain_name size too large.
int32 internal constant INVALID_ENDPOINT = 351; // ServiceEndpoint is invalid.
int32 internal constant GOSSIP_ENDPOINTS_EXCEEDED_LIMIT = 352; // The number of gossip endpoints exceeds the limit.
int32 internal constant TOKEN_REFERENCE_REPEATED = 353; // The transaction attempted to use duplicate `TokenReference`. This affects `TokenReject` attempting to reject same token reference more than once.
int32 internal constant INVALID_OWNER_ID = 354; // The account id specified as the owner in `TokenReject` is invalid or does not exist.
int32 internal constant TOKEN_REFERENCE_LIST_SIZE_LIMIT_EXCEEDED = 355; // The transaction attempted to use more than the allowed number of `TokenReference`.
int32 internal constant SERVICE_ENDPOINTS_EXCEEDED_LIMIT = 356; // The number of service endpoints exceeds the limit.
int32 internal constant INVALID_IPV4_ADDRESS = 357; // The IPv4 address is invalid.
int32 internal constant EMPTY_TOKEN_REFERENCE_LIST = 358; // The transaction attempted to use empty `TokenReference` list.
int32 internal constant UPDATE_NODE_ACCOUNT_NOT_ALLOWED = 359; // The node account is not allowed to be updated.
int32 internal constant TOKEN_HAS_NO_METADATA_OR_SUPPLY_KEY = 360; // The token has no metadata or supply key.
int32 internal constant EMPTY_PENDING_AIRDROP_ID_LIST = 361; // The list of `PendingAirdropId`s is empty and MUST NOT be empty.
int32 internal constant PENDING_AIRDROP_ID_REPEATED = 362; // A `PendingAirdropId` is repeated in a `claim` or `cancel` transaction.
int32 internal constant PENDING_AIRDROP_ID_LIST_TOO_LONG = 363; // The number of `PendingAirdropId` values in the list exceeds the maximum allowable number.
int32 internal constant PENDING_NFT_AIRDROP_ALREADY_EXISTS = 364; // A pending airdrop already exists for the specified NFT.
int32 internal constant ACCOUNT_HAS_PENDING_AIRDROPS = 365; // The identified account is sender for one or more pending airdrop(s) and cannot be deleted. The requester SHOULD cancel all pending airdrops before resending this transaction.
int32 internal constant THROTTLED_AT_CONSENSUS = 366; // Consensus throttle did not allow execution of this transaction. The transaction should be retried after a modest delay.
int32 internal constant INVALID_PENDING_AIRDROP_ID = 367; // The provided pending airdrop id is invalid. This pending airdrop MAY already be claimed or cancelled. The client SHOULD query a mirror node to determine the current status of the pending airdrop.
int32 internal constant TOKEN_AIRDROP_WITH_FALLBACK_ROYALTY = 368; // The token to be airdropped has a fallback royalty fee and cannot be sent or claimed via an airdrop transaction.
int32 internal constant INVALID_TOKEN_IN_PENDING_AIRDROP = 369; // This airdrop claim is for a pending airdrop with an invalid token. The token might be deleted, or the sender may not have enough tokens to fulfill the offer. The client SHOULD query mirror node to determine the status of the pending airdrop and whether the sender can fulfill the offer.
int32 internal constant SCHEDULE_EXPIRY_IS_BUSY = 370; // A scheduled transaction configured to wait for expiry to execute was given an expiry time at which there is already too many transactions scheduled to expire; its creation must be retried with a different expiry.
int32 internal constant INVALID_GRPC_CERTIFICATE_HASH = 371; // The provided gRPC certificate hash is invalid.
int32 internal constant MISSING_EXPIRY_TIME = 372; // A scheduled transaction configured to wait for expiry to execute was not given an explicit expiration time.
int32 internal constant NO_SCHEDULING_ALLOWED_AFTER_SCHEDULED_RECURSION = 373; // A contract operation attempted to schedule another transaction after it had already scheduled a recursive contract call.
int32 internal constant RECURSIVE_SCHEDULING_LIMIT_REACHED = 374; // A contract can schedule recursive calls a finite number of times (this is approximately four million times with typical network configuration).
int32 internal constant WAITING_FOR_LEDGER_ID = 375; // The target network is waiting for the ledger ID to be set, which is a side effect of finishing the network's TSS construction.
int32 internal constant MAX_ENTRIES_FOR_FEE_EXEMPT_KEY_LIST_EXCEEDED = 376; // The provided fee exempt key list size exceeded the limit.
int32 internal constant FEE_EXEMPT_KEY_LIST_CONTAINS_DUPLICATED_KEYS = 377; // The provided fee exempt key list contains duplicated keys.
int32 internal constant INVALID_KEY_IN_FEE_EXEMPT_KEY_LIST = 378; // The provided fee exempt key list contains an invalid key.
int32 internal constant INVALID_FEE_SCHEDULE_KEY = 379; // The provided fee schedule key contains an invalid key.
int32 internal constant FEE_SCHEDULE_KEY_CANNOT_BE_UPDATED = 380; // If a fee schedule key is not set when we create a topic we cannot add it on update.
int32 internal constant FEE_SCHEDULE_KEY_NOT_SET = 381; // If the topic's custom fees are updated the topic SHOULD have a fee schedule key.
int32 internal constant MAX_CUSTOM_FEE_LIMIT_EXCEEDED = 382; // The fee amount is exceeding the amount that the payer is willing to pay.
int32 internal constant NO_VALID_MAX_CUSTOM_FEE = 383; // There are no corresponding custom fees.
int32 internal constant INVALID_MAX_CUSTOM_FEES = 384; // The provided list contains invalid max custom fee.
int32 internal constant DUPLICATE_DENOMINATION_IN_MAX_CUSTOM_FEE_LIST = 385; // The provided max custom fee list contains fees with duplicate denominations.
int32 internal constant DUPLICATE_ACCOUNT_ID_IN_MAX_CUSTOM_FEE_LIST = 386; // The provided max custom fee list contains fees with duplicate account id.
int32 internal constant MAX_CUSTOM_FEES_IS_NOT_SUPPORTED = 387; // Max custom fees list is not supported for this operation.
}

0 comments on commit 6fa33ab

Please sign in to comment.