mirror of
https://github.com/Xahau/xahaud.git
synced 2025-12-06 17:27:52 +00:00
Hooks-chaining alpha
This is a squash of 241 commits from https://github.com/XRPL-Labs/xrpld-hooks/tree/hooks-chaining Ready for forward porting to rippled 1.8.3
This commit is contained in:
@@ -54,6 +54,7 @@ LedgerFormats::LedgerFormats()
|
||||
{sfDomain, soeOPTIONAL},
|
||||
{sfTickSize, soeOPTIONAL},
|
||||
{sfTicketCount, soeOPTIONAL},
|
||||
{sfHookStateCount, soeOPTIONAL}
|
||||
},
|
||||
commonFields);
|
||||
|
||||
@@ -66,6 +67,9 @@ LedgerFormats::LedgerFormats()
|
||||
{sfTakerGetsCurrency, soeOPTIONAL}, // for order book directories
|
||||
{sfTakerGetsIssuer, soeOPTIONAL}, // for order book directories
|
||||
{sfExchangeRate, soeOPTIONAL}, // for order book directories
|
||||
{sfHookNamespace, soeOPTIONAL}, // for hook state directories
|
||||
{sfOwnerNode, soeOPTIONAL}, // for hook state directories
|
||||
{sfReferenceCount, soeOPTIONAL}, // for hook state directories
|
||||
{sfIndexes, soeREQUIRED},
|
||||
{sfRootIndex, soeREQUIRED},
|
||||
{sfIndexNext, soeOPTIONAL},
|
||||
@@ -177,6 +181,43 @@ LedgerFormats::LedgerFormats()
|
||||
},
|
||||
commonFields);
|
||||
|
||||
add(jss::Hook,
|
||||
ltHOOK,
|
||||
{
|
||||
{sfAccount, soeOPTIONAL},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfPreviousTxnID, soeREQUIRED},
|
||||
{sfPreviousTxnLgrSeq, soeREQUIRED},
|
||||
{sfHooks, soeREQUIRED}
|
||||
},
|
||||
commonFields);
|
||||
|
||||
add(jss::HookDefinition,
|
||||
ltHOOK_DEFINITION,
|
||||
{
|
||||
{sfHookHash, soeREQUIRED},
|
||||
{sfHookOn, soeREQUIRED},
|
||||
{sfHookNamespace, soeREQUIRED},
|
||||
{sfHookParameters, soeREQUIRED},
|
||||
{sfHookApiVersion, soeREQUIRED},
|
||||
{sfCreateCode, soeREQUIRED},
|
||||
{sfHookSetTxnID, soeREQUIRED},
|
||||
{sfReferenceCount, soeREQUIRED},
|
||||
{sfFee, soeREQUIRED}
|
||||
},
|
||||
commonFields);
|
||||
|
||||
add(jss::HookState,
|
||||
ltHOOK_STATE,
|
||||
{
|
||||
{sfAccount, soeOPTIONAL}, //RH TODO: this can be removed for production
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
{sfHookStateKey, soeREQUIRED},
|
||||
{sfHookStateData, soeREQUIRED},
|
||||
{sfHookNamespace, soeOPTIONAL} // as can this
|
||||
},
|
||||
commonFields);
|
||||
|
||||
add(jss::PayChannel,
|
||||
ltPAYCHAN,
|
||||
{
|
||||
@@ -234,6 +275,15 @@ LedgerFormats::LedgerFormats()
|
||||
{sfValidatorToReEnable, soeOPTIONAL},
|
||||
},
|
||||
commonFields);
|
||||
|
||||
add(jss::Emitted,
|
||||
ltEMITTED,
|
||||
{
|
||||
{sfEmittedTxn, soeOPTIONAL},
|
||||
{sfOwnerNode, soeREQUIRED},
|
||||
},
|
||||
commonFields);
|
||||
|
||||
}
|
||||
|
||||
LedgerFormats const&
|
||||
|
||||
Reference in New Issue
Block a user