diff --git a/hook/error.h b/hook/error.h index 63e0c03bb..0ad05774f 100644 --- a/hook/error.h +++ b/hook/error.h @@ -47,5 +47,7 @@ #define MEM_OVERLAP -43 #define TOO_MANY_STATE_MODIFICATIONS -44 #define TOO_MANY_NAMESPACES -45 +#define EXPORT_FAILURE -46 +#define TOO_MANY_EXPORTED_TXN -47 #define HOOK_ERROR_CODES #endif //HOOK_ERROR_CODES diff --git a/hook/extern.h b/hook/extern.h index ee34af6ff..728d4839d 100644 --- a/hook/extern.h +++ b/hook/extern.h @@ -329,5 +329,15 @@ meta_slot(uint32_t slot_no); extern int64_t xpop_slot(uint32_t slot_no_tx, uint32_t slot_no_meta); +extern int64_t +xport( + uint32_t write_ptr, + uint32_t write_len, + uint32_t read_ptr, + uint32_t read_len); + +extern int64_t +xport_reserve(uint32_t count); + #define HOOK_EXTERN #endif // HOOK_EXTERN diff --git a/hook/sfcodes.h b/hook/sfcodes.h index 8c7bc48f4..460bd8447 100644 --- a/hook/sfcodes.h +++ b/hook/sfcodes.h @@ -16,6 +16,7 @@ #define sfHookExecutionIndex ((1U << 16U) + 19U) #define sfHookApiVersion ((1U << 16U) + 20U) #define sfHookStateScale ((1U << 16U) + 21U) +#define sfHookExportCount ((1U << 16U) + 22U) #define sfNetworkID ((2U << 16U) + 1U) #define sfFlags ((2U << 16U) + 2U) #define sfSourceTag ((2U << 16U) + 3U) @@ -228,6 +229,7 @@ #define sfHookEmission ((14U << 16U) + 93U) #define sfMintURIToken ((14U << 16U) + 92U) #define sfAmountEntry ((14U << 16U) + 91U) +#define sfExportedTxn ((14U << 16U) + 90U) #define sfSigners ((15U << 16U) + 3U) #define sfSignerEntries ((15U << 16U) + 4U) #define sfTemplate ((15U << 16U) + 5U) diff --git a/hook/tts.h b/hook/tts.h index bd03b0399..6d628504a 100644 --- a/hook/tts.h +++ b/hook/tts.h @@ -34,6 +34,7 @@ #define ttURITOKEN_BUY 47 #define ttURITOKEN_CREATE_SELL_OFFER 48 #define ttURITOKEN_CANCEL_SELL_OFFER 49 +#define ttEXPORT 90 #define ttCRON 92 #define ttCRON_SET 93 #define ttREMARKS_SET 94