diff --git a/Stellar-contract.x b/Stellar-contract.x index 0e67dc3..6850d99 100644 --- a/Stellar-contract.x +++ b/Stellar-contract.x @@ -70,7 +70,12 @@ enum SCValType // symbolic SCVals used as the key for ledger entries for a contract's // instance and an address' nonce, respectively. SCV_LEDGER_KEY_CONTRACT_INSTANCE = 20, +#ifdef XDR_SPARSE_MAP + SCV_LEDGER_KEY_NONCE = 21, + SCV_SPARSE_MAP = 22 +#else SCV_LEDGER_KEY_NONCE = 21 +#endif }; enum SCErrorType @@ -285,6 +290,11 @@ case SCV_LEDGER_KEY_CONTRACT_INSTANCE: void; case SCV_LEDGER_KEY_NONCE: SCNonceKey nonce_key; + +#ifdef XDR_SPARSE_MAP +case SCV_SPARSE_MAP: + SCMap *sparseMap; +#endif }; struct SCMapEntry diff --git a/Stellar-ledger-entries.x b/Stellar-ledger-entries.x index b9a9a16..cc97e84 100644 --- a/Stellar-ledger-entries.x +++ b/Stellar-ledger-entries.x @@ -581,6 +581,10 @@ struct LedgerEntry void; case 1: LedgerEntryExtensionV1 v1; +#ifdef XDR_LEDGER_ENTRY_EXT_V2 + case 2: + ExtensionPoint v2; +#endif } ext; }; diff --git a/Stellar-ledger.x b/Stellar-ledger.x index a17036b..94baad3 100644 --- a/Stellar-ledger.x +++ b/Stellar-ledger.x @@ -522,7 +522,26 @@ struct TransactionMetaV4 }; -// This is in Stellar-ledger.x to due to a circular dependency +#ifdef XDR_TRANSACTION_META_V5 +struct TransactionMetaV5 +{ + ExtensionPoint ext; + + LedgerEntryChanges txChangesBefore; // tx level changes before operations + // are applied if any + OperationMetaV2 operations<>; // meta for each operation + LedgerEntryChanges txChangesAfter; // tx level changes after operations are + // applied if any + SorobanTransactionMetaV2* sorobanMeta; // Soroban-specific meta (only for + // Soroban transactions). + + TransactionEvent events<>; // Used for transaction-level events (like fee payment) + DiagnosticEvent diagnosticEvents<>; // Used for all diagnostic information + uint32 txIndex; // Index of the transaction in the ledger +}; +#endif + +// This is in Stellar-ledger.x to due to a circular dependency struct InvokeHostFunctionSuccessPreImage { SCVal returnValue; @@ -543,6 +562,10 @@ case 3: TransactionMetaV3 v3; case 4: TransactionMetaV4 v4; +#ifdef XDR_TRANSACTION_META_V5 +case 5: + TransactionMetaV5 v5; +#endif }; // This struct groups together changes on a per transaction basis diff --git a/Stellar-transaction.x b/Stellar-transaction.x index 9a14d6e..da396fe 100644 --- a/Stellar-transaction.x +++ b/Stellar-transaction.x @@ -64,7 +64,12 @@ enum OperationType LIQUIDITY_POOL_WITHDRAW = 23, INVOKE_HOST_FUNCTION = 24, EXTEND_FOOTPRINT_TTL = 25, +#ifdef XDR_HELLO_WORLD + RESTORE_FOOTPRINT = 26, + HELLO_WORLD = 27 +#else RESTORE_FOOTPRINT = 26 +#endif }; /* CreateAccount @@ -695,6 +700,10 @@ struct Operation ExtendFootprintTTLOp extendFootprintTTLOp; case RESTORE_FOOTPRINT: RestoreFootprintOp restoreFootprintOp; +#ifdef XDR_HELLO_WORLD + case HELLO_WORLD: + HelloWorldOp helloWorldOp; +#endif } body; }; @@ -1892,6 +1901,27 @@ case RESTORE_FOOTPRINT_INSUFFICIENT_REFUNDABLE_FEE: void; }; +#ifdef XDR_HELLO_WORLD +struct HelloWorldOp +{ + AccountID helloTo; +}; + +enum HelloWorldResultCode +{ + HELLO_WORLD_SUCCESS = 0, + HELLO_WORLD_MALFORMED = -1 +}; + +union HelloWorldResult switch (HelloWorldResultCode code) +{ +case HELLO_WORLD_SUCCESS: + void; +case HELLO_WORLD_MALFORMED: + void; +}; +#endif + /* High level Operation Result */ enum OperationResultCode { @@ -1964,6 +1994,10 @@ case opINNER: ExtendFootprintTTLResult extendFootprintTTLResult; case RESTORE_FOOTPRINT: RestoreFootprintResult restoreFootprintResult; +#ifdef XDR_HELLO_WORLD + case HELLO_WORLD: + HelloWorldResult helloWorldResult; +#endif } tr; case opBAD_AUTH: