Introduce NFT support (XLS020)

This commit is contained in:
Nik Bougalis
2021-08-13 20:41:11 -07:00
committed by manojsdoshi
parent 525aaecbca
commit 70779f6850
97 changed files with 10386 additions and 774 deletions

View File

@@ -42,65 +42,74 @@ transResults()
TERUnderlyingType,
std::pair<char const* const, char const* const>> const results
{
MAKE_ERROR(tecCLAIM, "Fee claimed. Sequence used. No action."),
MAKE_ERROR(tecDIR_FULL, "Can not add entry to full directory."),
MAKE_ERROR(tecFAILED_PROCESSING, "Failed to correctly process transaction."),
MAKE_ERROR(tecINSUF_RESERVE_LINE, "Insufficient reserve to add trust line."),
MAKE_ERROR(tecINSUF_RESERVE_OFFER, "Insufficient reserve to create offer."),
MAKE_ERROR(tecNO_DST, "Destination does not exist. Send XRP to create it."),
MAKE_ERROR(tecNO_DST_INSUF_XRP, "Destination does not exist. Too little XRP sent to create it."),
MAKE_ERROR(tecNO_LINE_INSUF_RESERVE, "No such line. Too little reserve to create it."),
MAKE_ERROR(tecNO_LINE_REDUNDANT, "Can't set non-existent line to default."),
MAKE_ERROR(tecPATH_DRY, "Path could not send partial amount."),
MAKE_ERROR(tecPATH_PARTIAL, "Path could not send full amount."),
MAKE_ERROR(tecNO_ALTERNATIVE_KEY, "The operation would remove the ability to sign transactions with the account."),
MAKE_ERROR(tecNO_REGULAR_KEY, "Regular key is not set."),
MAKE_ERROR(tecOVERSIZE, "Object exceeded serialization limits."),
MAKE_ERROR(tecUNFUNDED, "Not enough XRP to satisfy the reserve requirement."),
MAKE_ERROR(tecUNFUNDED_ADD, "DEPRECATED."),
MAKE_ERROR(tecUNFUNDED_OFFER, "Insufficient balance to fund created offer."),
MAKE_ERROR(tecUNFUNDED_PAYMENT, "Insufficient XRP balance to send."),
MAKE_ERROR(tecOWNERS, "Non-zero owner count."),
MAKE_ERROR(tecNO_ISSUER, "Issuer account does not exist."),
MAKE_ERROR(tecNO_AUTH, "Not authorized to hold asset."),
MAKE_ERROR(tecNO_LINE, "No such line."),
MAKE_ERROR(tecINSUFF_FEE, "Insufficient balance to pay fee."),
MAKE_ERROR(tecFROZEN, "Asset is frozen."),
MAKE_ERROR(tecNO_TARGET, "Target account does not exist."),
MAKE_ERROR(tecNO_PERMISSION, "No permission to perform requested operation."),
MAKE_ERROR(tecNO_ENTRY, "No matching entry found."),
MAKE_ERROR(tecINSUFFICIENT_RESERVE, "Insufficient reserve to complete requested operation."),
MAKE_ERROR(tecNEED_MASTER_KEY, "The operation requires the use of the Master Key."),
MAKE_ERROR(tecDST_TAG_NEEDED, "A destination tag is required."),
MAKE_ERROR(tecINTERNAL, "An internal error has occurred during processing."),
MAKE_ERROR(tecCRYPTOCONDITION_ERROR, "Malformed, invalid, or mismatched conditional or fulfillment."),
MAKE_ERROR(tecINVARIANT_FAILED, "One or more invariants for the transaction were not satisfied."),
MAKE_ERROR(tecEXPIRED, "Expiration time is passed."),
MAKE_ERROR(tecDUPLICATE, "Ledger object already exists."),
MAKE_ERROR(tecKILLED, "FillOrKill offer killed."),
MAKE_ERROR(tecHAS_OBLIGATIONS, "The account cannot be deleted since it has obligations."),
MAKE_ERROR(tecTOO_SOON, "It is too early to attempt the requested operation. Please wait."),
MAKE_ERROR(tecCLAIM, "Fee claimed. Sequence used. No action."),
MAKE_ERROR(tecDIR_FULL, "Can not add entry to full directory."),
MAKE_ERROR(tecFAILED_PROCESSING, "Failed to correctly process transaction."),
MAKE_ERROR(tecINSUF_RESERVE_LINE, "Insufficient reserve to add trust line."),
MAKE_ERROR(tecINSUF_RESERVE_OFFER, "Insufficient reserve to create offer."),
MAKE_ERROR(tecNO_DST, "Destination does not exist. Send XRP to create it."),
MAKE_ERROR(tecNO_DST_INSUF_XRP, "Destination does not exist. Too little XRP sent to create it."),
MAKE_ERROR(tecNO_LINE_INSUF_RESERVE, "No such line. Too little reserve to create it."),
MAKE_ERROR(tecNO_LINE_REDUNDANT, "Can't set non-existent line to default."),
MAKE_ERROR(tecPATH_DRY, "Path could not send partial amount."),
MAKE_ERROR(tecPATH_PARTIAL, "Path could not send full amount."),
MAKE_ERROR(tecNO_ALTERNATIVE_KEY, "The operation would remove the ability to sign transactions with the account."),
MAKE_ERROR(tecNO_REGULAR_KEY, "Regular key is not set."),
MAKE_ERROR(tecOVERSIZE, "Object exceeded serialization limits."),
MAKE_ERROR(tecUNFUNDED, "Not enough XRP to satisfy the reserve requirement."),
MAKE_ERROR(tecUNFUNDED_ADD, "DEPRECATED."),
MAKE_ERROR(tecUNFUNDED_OFFER, "Insufficient balance to fund created offer."),
MAKE_ERROR(tecUNFUNDED_PAYMENT, "Insufficient XRP balance to send."),
MAKE_ERROR(tecOWNERS, "Non-zero owner count."),
MAKE_ERROR(tecNO_ISSUER, "Issuer account does not exist."),
MAKE_ERROR(tecNO_AUTH, "Not authorized to hold asset."),
MAKE_ERROR(tecNO_LINE, "No such line."),
MAKE_ERROR(tecINSUFF_FEE, "Insufficient balance to pay fee."),
MAKE_ERROR(tecFROZEN, "Asset is frozen."),
MAKE_ERROR(tecNO_TARGET, "Target account does not exist."),
MAKE_ERROR(tecNO_PERMISSION, "No permission to perform requested operation."),
MAKE_ERROR(tecNO_ENTRY, "No matching entry found."),
MAKE_ERROR(tecINSUFFICIENT_RESERVE, "Insufficient reserve to complete requested operation."),
MAKE_ERROR(tecNEED_MASTER_KEY, "The operation requires the use of the Master Key."),
MAKE_ERROR(tecDST_TAG_NEEDED, "A destination tag is required."),
MAKE_ERROR(tecINTERNAL, "An internal error has occurred during processing."),
MAKE_ERROR(tecCRYPTOCONDITION_ERROR, "Malformed, invalid, or mismatched conditional or fulfillment."),
MAKE_ERROR(tecINVARIANT_FAILED, "One or more invariants for the transaction were not satisfied."),
MAKE_ERROR(tecEXPIRED, "Expiration time is passed."),
MAKE_ERROR(tecDUPLICATE, "Ledger object already exists."),
MAKE_ERROR(tecKILLED, "FillOrKill offer killed."),
MAKE_ERROR(tecHAS_OBLIGATIONS, "The account cannot be deleted since it has obligations."),
MAKE_ERROR(tecTOO_SOON, "It is too early to attempt the requested operation. Please wait."),
MAKE_ERROR(tecMAX_SEQUENCE_REACHED, "The maximum sequence number was reached."),
MAKE_ERROR(tecNO_SUITABLE_NFTOKEN_PAGE, "A suitable NFToken page could not be located."),
MAKE_ERROR(tecNFTOKEN_BUY_SELL_MISMATCH, "The 'Buy' and 'Sell' NFToken offers are mismatched."),
MAKE_ERROR(tecNFTOKEN_OFFER_TYPE_MISMATCH, "The type of NFToken offer is incorrect."),
MAKE_ERROR(tecCANT_ACCEPT_OWN_NFTOKEN_OFFER, "An NFToken offer cannot be claimed by its owner."),
MAKE_ERROR(tecINSUFFICIENT_FUNDS, "Not enough funds available to complete requested transaction."),
MAKE_ERROR(tecOBJECT_NOT_FOUND, "A requested object could not be located."),
MAKE_ERROR(tecINSUFFICIENT_PAYMENT, "The payment is not sufficient."),
MAKE_ERROR(tefALREADY, "The exact transaction was already in this ledger."),
MAKE_ERROR(tefBAD_ADD_AUTH, "Not authorized to add account."),
MAKE_ERROR(tefBAD_AUTH, "Transaction's public key is not authorized."),
MAKE_ERROR(tefBAD_LEDGER, "Ledger in unexpected state."),
MAKE_ERROR(tefBAD_QUORUM, "Signatures provided do not meet the quorum."),
MAKE_ERROR(tefBAD_SIGNATURE, "A signature is provided for a non-signer."),
MAKE_ERROR(tefCREATED, "Can't add an already created account."),
MAKE_ERROR(tefEXCEPTION, "Unexpected program state."),
MAKE_ERROR(tefFAILURE, "Failed to apply."),
MAKE_ERROR(tefINTERNAL, "Internal error."),
MAKE_ERROR(tefMASTER_DISABLED, "Master key is disabled."),
MAKE_ERROR(tefMAX_LEDGER, "Ledger sequence too high."),
MAKE_ERROR(tefNO_AUTH_REQUIRED, "Auth is not required."),
MAKE_ERROR(tefNOT_MULTI_SIGNING, "Account has no appropriate list of multi-signers."),
MAKE_ERROR(tefPAST_SEQ, "This sequence number has already passed."),
MAKE_ERROR(tefWRONG_PRIOR, "This previous transaction does not match."),
MAKE_ERROR(tefBAD_AUTH_MASTER, "Auth for unclaimed account needs correct master key."),
MAKE_ERROR(tefINVARIANT_FAILED, "Fee claim violated invariants for the transaction."),
MAKE_ERROR(tefTOO_BIG, "Transaction affects too many items."),
MAKE_ERROR(tefNO_TICKET, "Ticket is not in ledger."),
MAKE_ERROR(tefALREADY, "The exact transaction was already in this ledger."),
MAKE_ERROR(tefBAD_ADD_AUTH, "Not authorized to add account."),
MAKE_ERROR(tefBAD_AUTH, "Transaction's public key is not authorized."),
MAKE_ERROR(tefBAD_LEDGER, "Ledger in unexpected state."),
MAKE_ERROR(tefBAD_QUORUM, "Signatures provided do not meet the quorum."),
MAKE_ERROR(tefBAD_SIGNATURE, "A signature is provided for a non-signer."),
MAKE_ERROR(tefCREATED, "Can't add an already created account."),
MAKE_ERROR(tefEXCEPTION, "Unexpected program state."),
MAKE_ERROR(tefFAILURE, "Failed to apply."),
MAKE_ERROR(tefINTERNAL, "Internal error."),
MAKE_ERROR(tefMASTER_DISABLED, "Master key is disabled."),
MAKE_ERROR(tefMAX_LEDGER, "Ledger sequence too high."),
MAKE_ERROR(tefNO_AUTH_REQUIRED, "Auth is not required."),
MAKE_ERROR(tefNOT_MULTI_SIGNING, "Account has no appropriate list of multi-signers."),
MAKE_ERROR(tefPAST_SEQ, "This sequence number has already passed."),
MAKE_ERROR(tefWRONG_PRIOR, "This previous transaction does not match."),
MAKE_ERROR(tefBAD_AUTH_MASTER, "Auth for unclaimed account needs correct master key."),
MAKE_ERROR(tefINVARIANT_FAILED, "Fee claim violated invariants for the transaction."),
MAKE_ERROR(tefTOO_BIG, "Transaction affects too many items."),
MAKE_ERROR(tefNO_TICKET, "Ticket is not in ledger."),
MAKE_ERROR(tefNFTOKEN_IS_NOT_TRANSFERABLE, "The specified NFToken is not transferable."),
MAKE_ERROR(telLOCAL_ERROR, "Local failure."),
MAKE_ERROR(telBAD_DOMAIN, "Domain too long."),
@@ -116,43 +125,44 @@ transResults()
MAKE_ERROR(telCAN_NOT_QUEUE_FEE, "Can not queue at this time: fee insufficient to replace queued transaction."),
MAKE_ERROR(telCAN_NOT_QUEUE_FULL, "Can not queue at this time: queue is full."),
MAKE_ERROR(temMALFORMED, "Malformed transaction."),
MAKE_ERROR(temBAD_AMOUNT, "Can only send positive amounts."),
MAKE_ERROR(temBAD_CURRENCY, "Malformed: Bad currency."),
MAKE_ERROR(temBAD_EXPIRATION, "Malformed: Bad expiration."),
MAKE_ERROR(temBAD_FEE, "Invalid fee, negative or not XRP."),
MAKE_ERROR(temBAD_ISSUER, "Malformed: Bad issuer."),
MAKE_ERROR(temBAD_LIMIT, "Limits must be non-negative."),
MAKE_ERROR(temBAD_OFFER, "Malformed: Bad offer."),
MAKE_ERROR(temBAD_PATH, "Malformed: Bad path."),
MAKE_ERROR(temBAD_PATH_LOOP, "Malformed: Loop in path."),
MAKE_ERROR(temBAD_QUORUM, "Malformed: Quorum is unreachable."),
MAKE_ERROR(temBAD_REGKEY, "Malformed: Regular key cannot be same as master key."),
MAKE_ERROR(temBAD_SEND_XRP_LIMIT, "Malformed: Limit quality is not allowed for XRP to XRP."),
MAKE_ERROR(temBAD_SEND_XRP_MAX, "Malformed: Send max is not allowed for XRP to XRP."),
MAKE_ERROR(temBAD_SEND_XRP_NO_DIRECT, "Malformed: No Ripple direct is not allowed for XRP to XRP."),
MAKE_ERROR(temBAD_SEND_XRP_PARTIAL, "Malformed: Partial payment is not allowed for XRP to XRP."),
MAKE_ERROR(temBAD_SEND_XRP_PATHS, "Malformed: Paths are not allowed for XRP to XRP."),
MAKE_ERROR(temBAD_SEQUENCE, "Malformed: Sequence is not in the past."),
MAKE_ERROR(temBAD_SIGNATURE, "Malformed: Bad signature."),
MAKE_ERROR(temBAD_SIGNER, "Malformed: No signer may duplicate account or other signers."),
MAKE_ERROR(temBAD_SRC_ACCOUNT, "Malformed: Bad source account."),
MAKE_ERROR(temBAD_TRANSFER_RATE, "Malformed: Transfer rate must be >= 1.0 and <= 2.0"),
MAKE_ERROR(temBAD_WEIGHT, "Malformed: Weight must be a positive value."),
MAKE_ERROR(temDST_IS_SRC, "Destination may not be source."),
MAKE_ERROR(temDST_NEEDED, "Destination not specified."),
MAKE_ERROR(temINVALID, "The transaction is ill-formed."),
MAKE_ERROR(temINVALID_FLAG, "The transaction has an invalid flag."),
MAKE_ERROR(temREDUNDANT, "Sends same currency to self."),
MAKE_ERROR(temRIPPLE_EMPTY, "PathSet with no paths."),
MAKE_ERROR(temUNCERTAIN, "In process of determining result. Never returned."),
MAKE_ERROR(temUNKNOWN, "The transaction requires logic that is not implemented yet."),
MAKE_ERROR(temDISABLED, "The transaction requires logic that is currently disabled."),
MAKE_ERROR(temBAD_TICK_SIZE, "Malformed: Tick size out of range."),
MAKE_ERROR(temINVALID_ACCOUNT_ID, "Malformed: A field contains an invalid account ID."),
MAKE_ERROR(temCANNOT_PREAUTH_SELF, "Malformed: An account may not preauthorize itself."),
MAKE_ERROR(temINVALID_COUNT, "Malformed: Count field outside valid range."),
MAKE_ERROR(temSEQ_AND_TICKET, "Transaction contains a TicketSequence and a non-zero Sequence."),
MAKE_ERROR(temMALFORMED, "Malformed transaction."),
MAKE_ERROR(temBAD_AMOUNT, "Can only send positive amounts."),
MAKE_ERROR(temBAD_CURRENCY, "Malformed: Bad currency."),
MAKE_ERROR(temBAD_EXPIRATION, "Malformed: Bad expiration."),
MAKE_ERROR(temBAD_FEE, "Invalid fee, negative or not XRP."),
MAKE_ERROR(temBAD_ISSUER, "Malformed: Bad issuer."),
MAKE_ERROR(temBAD_LIMIT, "Limits must be non-negative."),
MAKE_ERROR(temBAD_OFFER, "Malformed: Bad offer."),
MAKE_ERROR(temBAD_PATH, "Malformed: Bad path."),
MAKE_ERROR(temBAD_PATH_LOOP, "Malformed: Loop in path."),
MAKE_ERROR(temBAD_QUORUM, "Malformed: Quorum is unreachable."),
MAKE_ERROR(temBAD_REGKEY, "Malformed: Regular key cannot be same as master key."),
MAKE_ERROR(temBAD_SEND_XRP_LIMIT, "Malformed: Limit quality is not allowed for XRP to XRP."),
MAKE_ERROR(temBAD_SEND_XRP_MAX, "Malformed: Send max is not allowed for XRP to XRP."),
MAKE_ERROR(temBAD_SEND_XRP_NO_DIRECT, "Malformed: No Ripple direct is not allowed for XRP to XRP."),
MAKE_ERROR(temBAD_SEND_XRP_PARTIAL, "Malformed: Partial payment is not allowed for XRP to XRP."),
MAKE_ERROR(temBAD_SEND_XRP_PATHS, "Malformed: Paths are not allowed for XRP to XRP."),
MAKE_ERROR(temBAD_SEQUENCE, "Malformed: Sequence is not in the past."),
MAKE_ERROR(temBAD_SIGNATURE, "Malformed: Bad signature."),
MAKE_ERROR(temBAD_SIGNER, "Malformed: No signer may duplicate account or other signers."),
MAKE_ERROR(temBAD_SRC_ACCOUNT, "Malformed: Bad source account."),
MAKE_ERROR(temBAD_TRANSFER_RATE, "Malformed: Transfer rate must be >= 1.0 and <= 2.0"),
MAKE_ERROR(temBAD_WEIGHT, "Malformed: Weight must be a positive value."),
MAKE_ERROR(temDST_IS_SRC, "Destination may not be source."),
MAKE_ERROR(temDST_NEEDED, "Destination not specified."),
MAKE_ERROR(temINVALID, "The transaction is ill-formed."),
MAKE_ERROR(temINVALID_FLAG, "The transaction has an invalid flag."),
MAKE_ERROR(temREDUNDANT, "The transaction is redundant."),
MAKE_ERROR(temRIPPLE_EMPTY, "PathSet with no paths."),
MAKE_ERROR(temUNCERTAIN, "In process of determining result. Never returned."),
MAKE_ERROR(temUNKNOWN, "The transaction requires logic that is not implemented yet."),
MAKE_ERROR(temDISABLED, "The transaction requires logic that is currently disabled."),
MAKE_ERROR(temBAD_TICK_SIZE, "Malformed: Tick size out of range."),
MAKE_ERROR(temINVALID_ACCOUNT_ID, "Malformed: A field contains an invalid account ID."),
MAKE_ERROR(temCANNOT_PREAUTH_SELF, "Malformed: An account may not preauthorize itself."),
MAKE_ERROR(temINVALID_COUNT, "Malformed: Count field outside valid range."),
MAKE_ERROR(temSEQ_AND_TICKET, "Transaction contains a TicketSequence and a non-zero Sequence."),
MAKE_ERROR(temBAD_NFTOKEN_TRANSFER_FEE, "Malformed: The NFToken transfer fee must be between 1 and 5000, inclusive."),
MAKE_ERROR(terRETRY, "Retry transaction."),
MAKE_ERROR(terFUNDS_SPENT, "DEPRECATED."),
@@ -166,6 +176,7 @@ transResults()
MAKE_ERROR(terOWNERS, "Non-zero owner count."),
MAKE_ERROR(terQUEUED, "Held until escalated fee drops."),
MAKE_ERROR(terPRE_TICKET, "Ticket is not yet in ledger."),
MAKE_ERROR(tesSUCCESS, "The transaction was applied. Only final in a validated ledger."),
};
// clang-format on