|
xrpld
|
Namespaces | |
| namespace | amm |
| namespace | batch |
| Helpers for constructing Batch test transactions. | |
| namespace | check |
| Check operations. | |
| namespace | credentials |
| namespace | delegate |
| namespace | deposit |
| Deposit preauthorize operations. | |
| namespace | detail |
| namespace | did |
| DID operations. | |
| namespace | directory |
| Directory operations. | |
| namespace | escrow |
| Escrow operations. | |
| namespace | ledger_state_fix |
| LedgerStateFix operations. | |
| namespace | loan |
| namespace | loan_broker |
| namespace | oracle |
| namespace | paychan |
| Paychan operations. | |
| namespace | pdomain |
| namespace | proposal |
| Helpers for constructing TransactionProposal test transactions. | |
| namespace | sponsor |
| namespace | ticket |
| Ticket operations. | |
| namespace | token |
Classes | |
| class | Account |
| Immutable cryptographic account descriptor. More... | |
| struct | AccountIdField |
| struct | AccountTxnId |
| class | AMM |
| Convenience class to test AMM functionality. More... | |
| class | AMMTest |
| class | AMMTestBase |
| struct | AnyAmount |
| Amount specifier with an option for any issuer. More... | |
| struct | AnyT |
| struct | AutofillT |
| class | Balance |
| A balance matches. More... | |
| struct | BasicProp |
| struct | BidArg |
| struct | BlobField |
| struct | BookSpec |
| struct | ClawbackArg |
| struct | ConfidentialSendChainState |
| When building multiple confidential sends from the same account inside a single batch transaction, pass this state to the transaction builder for each subsequent send so that its proof references the post previous-send encrypted balance rather than the stale pre-send ledger state. More... | |
| struct | CreateArg |
| class | DeliverMin |
| Sets the DeliverMin on a JTx. More... | |
| struct | DepositArg |
| class | DestTag |
| Set DestinationTag on a JTx. More... | |
| struct | DirectStepInfo |
| struct | DisabledT |
| class | Domain |
| Set the domain on a JTx. More... | |
| struct | Dtag |
| Set the destination tag on a JTx. More... | |
| class | Env |
| A transaction testing environment. More... | |
| class | EnvSs |
| A transaction testing environment wrapper. More... | |
| struct | EpsilonT |
| class | Expiration |
| Set Expiration on a JTx. More... | |
| class | Fee |
| Set the fee on a JTx. More... | |
| class | Flags |
| Match set account flags. More... | |
| class | Gate |
| struct | IncrementT |
| Used for Fee() calls that use an owner reserve increment. More... | |
| struct | InvoiceId |
| class | IOU |
| Converts to IOU Issue or STAmount. More... | |
| struct | IssuerArgs |
| class | Json |
| Inject raw JSON. More... | |
| struct | JTx |
| Execution context for applying a JSON transaction. More... | |
| struct | JTxField |
| Generic helper class for helper classes that set a field on a JTx. More... | |
| struct | JTxField< SField, StoredValue, StoredValue > |
| struct | JTxFieldWrapper |
| struct | JTxFieldWrapper< BlobField > |
| struct | LastLedgerSeq |
| class | LPToken |
| class | Memo |
| Add a memo to a JTx. More... | |
| class | MemoData |
| class | MemoFormat |
| class | MemoType |
| class | MPT |
| Converts to MPT Issue or STAmount. More... | |
| struct | MPTAuthorize |
| Arguments for building an MPTokenAuthorize test transaction. More... | |
| class | MptBalance |
| Test helper that checks MPT issuance or holder balances. More... | |
| struct | MPTConfidentialClawback |
| Arguments for building a ConfidentialMPTClawback test transaction. More... | |
| struct | MPTConfidentialSend |
| Arguments for building a ConfidentialMPTSend test transaction. More... | |
| struct | MPTConvert |
| Arguments for building a ConfidentialMPTConvert test transaction. More... | |
| struct | MPTConvertBack |
| Arguments for building a ConfidentialMPTConvertBack test transaction. More... | |
| struct | MPTCreate |
| Arguments for building an MPTokenIssuanceCreate test transaction. More... | |
| struct | MPTDestroy |
| Arguments for building an MPTokenIssuanceDestroy test transaction. More... | |
| struct | MPTEndpointStepInfo |
| class | MptFlags |
| Test helper that checks MPT flag settings after creation. More... | |
| struct | MPTHolderKeyUpdate |
| Arguments for building a ConfidentialMPTHolderKeyUpdate test transaction. More... | |
| struct | MPTInit |
| Arguments for initializing funded MPT test accounts and issuance. More... | |
| struct | MPTInitDef |
| Full constructor arguments for MPTTester initialization. More... | |
| struct | MPTMergeInbox |
| Arguments for building a ConfidentialMPTMergeInbox test transaction. More... | |
| struct | MPTMirrorUpdate |
| Arguments for building a ConfidentialMPTMirrorUpdate test transaction. More... | |
| struct | MPTSet |
| Arguments for building an MPTokenIssuanceSet test transaction. More... | |
| class | MPTTester |
| Test helper for creating, mutating, and asserting MPT and confidential MPT ledger state. More... | |
| class | Msig |
| Set a multisignature on a JTx. More... | |
| class | Nflags |
| Match clear account flags. More... | |
| struct | None |
| struct | NoneT |
| class | OwnerCount |
| class | Owners |
| Match the number of items in the account's owner directory. More... | |
| struct | ParseError |
| Thrown when parse fails. More... | |
| class | Path |
| Add a path. More... | |
| class | Paths |
| Set Paths, SendMax on a JTx. More... | |
| struct | PedersenProofParams |
| Stores the parameters that are exclusively used to generate a Pedersen linkage proof. More... | |
| class | PermissionedDEX |
| struct | PrettyAmount |
| Represents an XRP, IOU, or MPT quantity This customizes the string conversion and supports XRP conversions from integer and floating point. More... | |
| struct | PrettyAsset |
| struct | Prop |
| Set a property on a JTx. More... | |
| struct | PropType |
| class | QualityIn |
| Sets the literal QualityIn on a trust JTx. More... | |
| class | QualityInPercent |
| Sets the QualityIn on a trust JTx. More... | |
| class | QualityOut |
| Sets the literal QualityOut on a trust JTx. More... | |
| class | QualityOutPercent |
| Sets the QualityOut on a trust JTx as a percentage. More... | |
| struct | Reg |
| class | Require |
| Check a set of conditions. More... | |
| class | RequireAny |
| Test helper that accepts any condition supplied by a callback. More... | |
| class | Rpc |
| Set the expected result code for a JTx The test will fail if the code doesn't match. More... | |
| class | Sendmax |
| Sets the SendMax on a JTx. More... | |
| struct | Seq |
| Set the sequence number on a JTx. More... | |
| class | Sig |
| Set the regular signature on a JTx. More... | |
| struct | Signer |
| A signer in a SignerList. More... | |
| class | SourceTag |
| Set SourceTag on a JTx. More... | |
| class | SponsoredOwners |
| Match the account's SponsoredOwnerCount field: the number of owned objects whose reserve is sponsored by another account. More... | |
| class | SponsoringAccountCount |
| Match the account's SponsoringAccountCount field: the number of accounts whose base reserve this account sponsors. More... | |
| class | SponsoringOwners |
| Match the account's SponsoringOwnerCount field: the number of objects (owned by other accounts) whose reserve this account sponsors. More... | |
| struct | Stag |
| Set the source tag on a JTx. More... | |
| struct | StAmountField |
| class | SuiteLogs |
| class | Ter |
| Set the expected result code for a JTx The test will fail if the code doesn't match. More... | |
| struct | TestAMMArg |
| struct | TestAMMArgs |
| struct | TimePointField |
| class | Txflags |
| Set the flags on a JTx. More... | |
| struct | UInt256Field |
| struct | ValueUnitField |
| struct | Vault |
| struct | VoteArg |
| struct | WithdrawArg |
| struct | WithSourceLocation |
| Wrapper that captures std::source_location when implicitly constructed. More... | |
| struct | XRPEndpointStepInfo |
| struct | XrpT |
Typedefs | |
| using | Checks = OwnerCount<ltCHECK> |
| Match the number of checks on the account. | |
| using | Holders = std::vector<Account> |
| using | SigLists = OwnerCount<ltSIGNER_LIST> |
| The number of signer lists matches. | |
| using | Lines = OwnerCount<ltRIPPLE_STATE> |
| Match the number of trust lines in the account's owner directory. | |
| using | Offers = OwnerCount<ltOFFER> |
| Match the number of offers in the account's owner directory. | |
| using | MPTokens = OwnerCount<ltMPTOKEN> |
| Match the number of MPToken in the account's owner directory. | |
| using | RequireT = std::function<void(Env&)> |
| using | RequiresT = std::vector<RequireT> |
| template<class SField, class UnitTag, class ValueType = typename SField::type::value_type> | |
| using | ValueUnitWrapper = JTxFieldWrapper<ValueUnitField<SField, UnitTag, ValueType>> |
| template<class SField, class StoredValue = typename SField::type::value_type> | |
| using | SimpleField = JTxFieldWrapper<JTxField<SField, StoredValue>> |
| using | Tickets = OwnerCount<ltTICKET> |
| Match the number of tickets on the account. | |
Enumerations | |
| enum class | Fund { All , Acct , Gw , TokenOnly } |
Functions | |
| bool | operator== (Account const &lhs, Account const &rhs) noexcept |
| template<class Hasher> | |
| void | hash_append (Hasher &h, Account const &v) noexcept |
| auto | operator<=> (Account const &lhs, Account const &rhs) noexcept |
| json::Value | acctdelete (Account const &account, Account const &dest) |
| Delete account. | |
| void | incLgrSeqForAccDel (jtx::Env &env, jtx::Account const &acc, std::uint32_t margin=0) |
| std::vector< STAmount > | fund (jtx::Env &env, jtx::Account const &gw, std::vector< jtx::Account > const &accounts, std::vector< STAmount > const &amts, Fund how) |
| std::vector< STAmount > | fund (jtx::Env &env, jtx::Account const &gw, std::vector< jtx::Account > const &accounts, STAmount const &xrp, std::vector< STAmount > const &amts={}, Fund how=Fund::All) |
| std::vector< STAmount > | fund (jtx::Env &env, std::vector< jtx::Account > const &accounts, STAmount const &xrp, std::vector< STAmount > const &amts={}, Fund how=Fund::All, std::optional< Account > const &mptIssuer=std::nullopt) |
| bool | operator== (PrettyAmount const &lhs, PrettyAmount const &rhs) |
| std::ostream & | operator<< (std::ostream &os, PrettyAmount const &amount) |
| template<class Integer> requires (std::is_integral_v<Integer>) | |
| PrettyAmount | drops (Integer i) |
| Returns an XRP PrettyAmount, which is trivially convertible to STAmount. | |
| PrettyAmount | drops (XRPAmount i) |
| Returns an XRP PrettyAmount, which is trivially convertible to STAmount. | |
| std::ostream & | operator<< (std::ostream &os, IOU const &iou) |
| std::ostream & | operator<< (std::ostream &os, MPT const &mpt) |
| template<class... Args> | |
| std::array< Account, 1+sizeof...(Args)> | noripple (Account const &account, Args const &... args) |
| Designate accounts as no-ripple in Env::fund. | |
| FeatureBitset | testableAmendments () |
| std::vector< FeatureBitset > | amendmentCombinations (std::initializer_list< UInt256 > features, FeatureBitset seed) |
| Returns all 2^N permutations of a seed FeatureBitset with each subset of the given features excluded. | |
| std::unique_ptr< Config > | envconfig () |
| creates and initializes a default configuration for jtx::Env | |
| template<class F, class... Args> | |
| std::unique_ptr< Config > | envconfig (F &&modfunc, Args &&... args) |
| creates and initializes a default configuration for jtx::Env and invokes the provided function/lambda with the configuration object. | |
| std::unique_ptr< Config > | onlineDelete (std::unique_ptr< Config > cfg, std::uint32_t deleteInterval=8) |
| adjust config to enable online_delete | |
| std::unique_ptr< Config > | noAdmin (std::unique_ptr< Config >) |
| adjust config so no admin ports are enabled | |
| std::unique_ptr< Config > | secureGateway (std::unique_ptr< Config >) |
| std::unique_ptr< Config > | adminLocalnet (std::unique_ptr< Config >) |
| std::unique_ptr< Config > | secureGatewayLocalnet (std::unique_ptr< Config >) |
| std::unique_ptr< Config > | singleThreadIo (std::unique_ptr< Config >) |
| std::unique_ptr< Config > | validator (std::unique_ptr< Config >, std::string const &) |
| adjust configuration with params needed to be a validator | |
| std::unique_ptr< Config > | addGrpcConfig (std::unique_ptr< Config >) |
| add a grpc address and port to config | |
| std::unique_ptr< Config > | addGrpcConfigWithSecureGateway (std::unique_ptr< Config >, std::string const &secureGateway) |
| add a grpc address, port and secureGateway to config | |
| std::unique_ptr< Config > | addGrpcConfigWithTLS (std::unique_ptr< Config >, std::string const &certPath, std::string const &keyPath) |
| add a grpc address, port and TLS certificate/key paths to config | |
| std::unique_ptr< Config > | addGrpcConfigWithTLSAndClientCA (std::unique_ptr< Config >, std::string const &certPath, std::string const &keyPath, std::string const &clientCAPath) |
| add a grpc address, port and TLS certificate/key/client CA paths to config | |
| std::unique_ptr< Config > | addGrpcConfigWithTLSAndCertChain (std::unique_ptr< Config >, std::string const &certPath, std::string const &keyPath, std::string const &certChainPath) |
| add a grpc address, port and TLS with server cert chain to config | |
| std::unique_ptr< Config > | makeConfig (std::map< std::string, std::string > extraTxQ={}, std::map< std::string, std::string > extraVoting={}) |
| json::Value | fset (Account const &account, std::uint32_t on, std::uint32_t off=0) |
| Add and/or remove flag. | |
| json::Value | fclear (Account const &account, std::uint32_t off) |
| Remove account flag. | |
| static Number | number (STAmount const &a) |
| template<typename T> | |
| static std::string | toPlaces (T const d, std::uint8_t places) |
| void | doBalance (Env &env, AccountID const &account, bool kNone, STAmount const &value, Issue const &issue) |
| void | doBalance (Env &env, AccountID const &account, bool kNone, STAmount const &value, MPTIssue const &mptIssue) |
| static MPTCreate | makeMPTCreate (MPTInitDef const &arg) |
| static Buffer | parseSenderEncAmt (json::Value const &jv) |
| std::optional< ConfidentialSendChainState > | computeNextSendChainState (std::uint64_t currentSpending, Slice const ¤tEncSpending, std::uint32_t currentVersion, std::uint64_t sendAmt, Slice const &senderEncAmt) |
| Use this when building a second (or later) confidential send from the same account in the same batch. | |
| json::Value | signers (Account const &account, std::uint32_t quorum, std::vector< Signer > const &v) |
| json::Value | signers (Account const &account, NoneT) |
| Remove a signer list. | |
| json::Value | offer (Account const &account, STAmount const &takerPays, STAmount const &takerGets, std::uint32_t flags=0) |
| Create an offer. | |
| json::Value | offerCancel (Account const &account, std::uint32_t offerSeq) |
| Cancel an offer. | |
| json::Value | pay (AccountID const &account, AccountID const &to, AnyAmount amount) |
| Create a payment. | |
| json::Value | pay (Account const &account, Account const &to, AnyAmount amount) |
| UInt256 | setupDomain (jtx::Env &env, std::vector< jtx::Account > const &accounts, jtx::Account const &domainOwner, std::string const &credType) |
| static void | insertQualityIntoJtx (SField const &field, std::uint32_t value, JTx &jt) |
| json::Value | rate (Account const &account, double multiplier) |
| Set a transfer rate. | |
| json::Value | regkey (Account const &account, DisabledT) |
| Disable the regular key. | |
| json::Value | regkey (Account const &account, Account const &signer) |
| Set a regular key. | |
| json::Value | getAccountOffers (Env &env, AccountID const &acct, bool current) |
| json::Value | getAccountLines (Env &env, AccountID const &acctId) |
| bool | checkArraySize (json::Value const &val, unsigned int size) |
| std::uint32_t | ownerCount (Env const &env, Account const &account) |
| uint64_t | mptEscrowed (jtx::Env const &env, jtx::Account const &account, jtx::MPT const &mpt) |
| uint64_t | issuerMPTEscrowed (jtx::Env const &env, jtx::MPT const &mpt) |
| jtx::PrettyAmount | issuerBalance (jtx::Env &env, jtx::Account const &account, Issue const &issue) |
| jtx::PrettyAmount | issuerEscrowed (jtx::Env &env, jtx::Account const &account, Issue const &issue) |
| std::uint32_t | sponsoredOwnerCount (Env const &env, Account const &account) |
| std::uint32_t | sponsoringOwnerCount (Env const &env, Account const &account) |
| std::uint32_t | sponsoringAccountCount (Env const &env, Account const &account) |
| void | stpathAppendOne (STPath &st, Account const &account) |
| void | stpathAppendOne (STPath &st, STPathElement const &pe) |
| bool | equal (STAmount const &sa1, STAmount const &sa2) |
| static void | addSourceAsset (json::Value &jv, PathAsset const &srcAsset, std::optional< AccountID > const &srcIssuer) |
| json::Value | rpf (jtx::Account const &src, jtx::Account const &dst, STAmount const &dstAmount, std::optional< STAmount > const &sendMax, std::optional< PathAsset > const &srcAsset, std::optional< AccountID > const &srcIssuer) |
| jtx::Env | pathTestEnv (beast::unit_test::Suite &suite) |
| json::Value | findPathsRequest (jtx::Env &env, jtx::Account const &src, jtx::Account const &dst, STAmount const &saDstAmount, std::optional< STAmount > const &saSendMax, std::optional< PathAsset > const &srcAsset, std::optional< AccountID > const &srcIssuer, std::optional< UInt256 > const &domain) |
| std::tuple< STPathSet, STAmount, STAmount > | findPaths (jtx::Env &env, jtx::Account const &src, jtx::Account const &dst, STAmount const &saDstAmount, std::optional< STAmount > const &saSendMax, std::optional< PathAsset > const &srcAsset, std::optional< AccountID > const &srcIssuer, std::optional< UInt256 > const &domain) |
| std::tuple< STPathSet, STAmount, STAmount > | findPathsByElement (jtx::Env &env, jtx::Account const &src, jtx::Account const &dst, STAmount const &saDstAmount, std::optional< STAmount > const &saSendMax, std::optional< STPathElement > const &srcElement, std::optional< AccountID > const &srcIssuer, std::optional< UInt256 > const &domain) |
| XRPAmount | txFee (Env const &env, std::uint16_t n) |
| PrettyAmount | xrpMinusFee (Env const &env, std::int64_t xrpAmount) |
| bool | expectHolding (Env const &env, AccountID const &account, STAmount const &value, bool defaultLimits) |
| bool | expectHolding (Env const &env, AccountID const &account, None const &, Issue const &issue) |
| bool | expectHolding (Env const &env, AccountID const &account, None const &, MPTIssue const &mptIssue) |
| bool | expectHolding (Env const &env, AccountID const &account, None const &value) |
| bool | expectMPT (Env const &env, AccountID const &account, STAmount const &value) |
| bool | expectOffers (Env const &env, AccountID const &account, std::uint16_t size, std::vector< Amounts > const &toMatch) |
| std::vector< SLE::const_pointer > | ownerDirEntries (ReadView const &view, AccountID const &account) |
| Return the ledger entries in an account's owner directory. | |
| json::Value | ledgerEntryRoot (Env &env, Account const &acct) |
| json::Value | ledgerEntryState (Env &env, Account const &acctA, Account const &acctB, std::string const ¤cy) |
| json::Value | ledgerEntryOffer (jtx::Env &env, jtx::Account const &acct, std::uint32_t offerSeq) |
| json::Value | ledgerEntryMPT (jtx::Env &env, jtx::Account const &acct, MPTID const &mptID) |
| json::Value | getBookOffers (jtx::Env &env, Asset const &takerPays, Asset const &takerGets) |
| json::Value | accountBalance (Env &env, Account const &acct) |
| bool | expectLedgerEntryRoot (Env &env, Account const &acct, STAmount const &expectedValue) |
| void | nOffers (Env &env, std::size_t n, Account const &account, STAmount const &in, STAmount const &out) |
| STPathElement | cpe (PathAsset const &pa) |
| STPathElement | allPathElements (AccountID const &a, Asset const &asset) |
| STPathElement | ipe (Asset const &asset) |
| STPathElement | iape (AccountID const &account) |
| STPathElement | ape (AccountID const &a) |
| bool | equal (std::unique_ptr< xrpl::Step > const &s1, DirectStepInfo const &dsi) |
| bool | equal (std::unique_ptr< xrpl::Step > const &s1, MPTEndpointStepInfo const &dsi) |
| bool | equal (std::unique_ptr< xrpl::Step > const &s1, XRPEndpointStepInfo const &xrpStepInfo) |
| bool | equal (std::unique_ptr< xrpl::Step > const &s1, xrpl::Book const &bsi) |
| json::Value | trust (Account const &account, STAmount const &amount, std::uint32_t flags=0) |
| Modify a trust line. | |
| json::Value | trust (Account const &account, STAmount const &amount, Account const &peer, std::uint32_t flags) |
| Change flags on a trust line. | |
| json::Value | claw (Account const &account, STAmount const &amount, std::optional< Account > const &mptHolder) |
| STObject | parse (json::Value const &jv) |
| Convert JSON to STObject. | |
| SignatureRole | signatureRole (SField const *subField) |
| The role that signs into an optional signature subfield. | |
| void | sign (json::Value const &jv, Account const &account, json::Value &sigObject, HashPrefix prefix=HashPrefix::TxSign) |
| Sign automatically into a specific Json field of the jv object. | |
| void | sign (json::Value &jv, Account const &account) |
| Sign automatically. | |
| void | fillFee (json::Value &jv, ReadView const &view) |
| Set the fee automatically. | |
| void | fillSeq (json::Value &jv, ReadView const &view) |
| Set the sequence number automatically. | |
| json::Value | cmdToJSONRPC (std::vector< std::string > const &args, beast::Journal j, unsigned int apiVersion) |
| Given an xrpld unit test rpc command, return the corresponding JSON. | |
| Buffer | gMakeZeroBuffer (std::size_t size) |
| Create a zero-initialized buffer for malformed cryptography test inputs. | |
| json::Value | noop (Account const &account) |
| The null transaction. | |
| template<class... Args> | |
| RequireT | required (Args const &... args) |
| Compose many condition functors into one. | |
| void | sortSigners (std::vector< Reg > &signers) |
| json::Value | getAccountOffers (Env &env, Account const &acct, bool current=false) |
| json::Value | getAccountLines (Env &env, Account const &acct) |
| template<typename... IOU> | |
| json::Value | getAccountLines (Env &env, AccountID const &acctId, IOU... ious) |
| bool | hasEnvelope2 (json::Value const &reply) |
Reports whether reply carries the version 2 envelope: jsonrpc equal to rpc::kJsonRpcVersion and ripplerpc equal to rpc::kRippleRpcVersion2, both present. | |
| void | setEnvelope2 (json::Value &request) |
Sets the version 2 envelope on request: jsonrpc to rpc::kJsonRpcVersion and ripplerpc to rpc::kRippleRpcVersion2. | |
| bool | checkVL (Slice const &result, std::string const &expected) |
| bool | checkVL (SLE::ConstRef sle, SField const &field, std::string const &expected) |
| template<class T> requires (std::is_constructible_v<Account, T>) | |
| void | stpathAppendOne (STPath &st, T const &t) |
| template<class T, class... Args> | |
| void | stpathAppend (STPath &st, T const &t, Args const &... args) |
| template<class... Args> | |
| void | stpathsetAppend (STPathSet &st, STPath const &p, Args const &... args) |
| template<class... Args> | |
| STPath | stpath (Args const &... args) |
| template<class... Args> | |
| bool | same (STPathSet const &st1, Args const &... args) |
| template<typename... Amts> | |
| bool | expectHolding (Env const &env, AccountID const &account, STAmount const &value, Amts const &... amts) |
| template<class Iter> | |
| bool | strandEqualHelper (Iter i) |
| template<class Iter, class StepInfo, class... Args> | |
| bool | strandEqualHelper (Iter i, StepInfo &&si, Args &&... args) |
| template<class... Args> | |
| bool | equal (Strand const &strand, Args &&... args) |
| UInt256 | getCheckIndex (AccountID const &account, std::uint32_t const sequence) |
| template<class Suite> | |
| void | checkMetrics (Suite &test, jtx::Env &env, std::size_t expectedCount, std::optional< std::size_t > expectedMaxCount, std::size_t expectedInLedger, std::size_t expectedPerLedger, std::uint64_t expectedMinFeeLevel=kBaseFeeLevel.fee(), std::uint64_t expectedMedFeeLevel=kMinEscalationFeeLevel.fee(), std::source_location const location=std::source_location::current()) |
| template<typename TTester> | |
| void | testHelper2TokensMix (TTester &&tester) |
| template<typename TTester> | |
| void | testHelper3TokensMix (TTester &&tester) |
Variables | |
| static auto | gAmmmpt = MPT("AMM") |
| constexpr XRPAmount | kJtxDropsPerXrp {1'000'000} |
| XrpT const | XRP {} |
| Converts to XRP Issue or STAmount. | |
| static EpsilonT const | kEpsilon |
| AnyT const | kAny {} |
| Returns an amount representing "any issuer". | |
| constexpr auto | kDefaultSeed = "shUwVw52ofnCUX5m7kPTKzJdr4HEH" |
| auto const | kMptDexFlags = tfMPTCanTrade | tfMPTCanTransfer |
| static MPTInit const | kMptInitNoFund {.fund = false} |
| static NoneT const | kNone |
| static AutofillT const | kAutofill |
| static DisabledT const | kDisabled |
| static IncrementT const | kIncrement |
| auto const | kData = JTxFieldWrapper<BlobField>(sfData) |
| General field definitions, or fields used in multiple transaction namespaces. | |
| auto const | kAmount = JTxFieldWrapper<StAmountField>(sfAmount) |
| constexpr FeeLevel64 | kBaseFeeLevel {TxQ::kBaseLevel} |
| constexpr FeeLevel64 | kMinEscalationFeeLevel = kBaseFeeLevel * 500 |
| using xrpl::test::jtx::Checks = OwnerCount<ltCHECK> |
| using xrpl::test::jtx::Holders = std::vector<Account> |
| using xrpl::test::jtx::SigLists = OwnerCount<ltSIGNER_LIST> |
The number of signer lists matches.
Definition at line 121 of file multisign.h.
| using xrpl::test::jtx::Lines = OwnerCount<ltRIPPLE_STATE> |
| using xrpl::test::jtx::Offers = OwnerCount<ltOFFER> |
| using xrpl::test::jtx::MPTokens = OwnerCount<ltMPTOKEN> |
| using xrpl::test::jtx::RequireT = std::function<void(Env&)> |
Definition at line 10 of file requires.h.
Definition at line 11 of file requires.h.
| using xrpl::test::jtx::ValueUnitWrapper = JTxFieldWrapper<ValueUnitField<SField, UnitTag, ValueType>> |
Definition at line 309 of file jtx/TestHelpers.h.
| using xrpl::test::jtx::SimpleField = JTxFieldWrapper<JTxField<SField, StoredValue>> |
Definition at line 313 of file jtx/TestHelpers.h.
| using xrpl::test::jtx::Tickets = OwnerCount<ltTICKET> |
|
strong |
Definition at line 150 of file jtx/Account.h.
|
noexcept |
Definition at line 157 of file jtx/Account.h.
Definition at line 162 of file jtx/Account.h.
| json::Value xrpl::test::jtx::acctdelete | ( | jtx::Account const & | account, |
| jtx::Account const & | dest ) |
Delete account.
If successful transfer remaining XRP to dest.
Definition at line 17 of file acctdelete.cpp.
| void xrpl::test::jtx::incLgrSeqForAccDel | ( | jtx::Env & | env, |
| jtx::Account const & | acc, | ||
| std::uint32_t | margin = 0 ) |
Definition at line 30 of file acctdelete.cpp.
| std::vector< STAmount > xrpl::test::jtx::fund | ( | jtx::Env & | env, |
| jtx::Account const & | gw, | ||
| std::vector< jtx::Account > const & | accounts, | ||
| std::vector< STAmount > const & | amts, | ||
| Fund | how ) |
Definition at line 34 of file AMMTest.cpp.
| std::vector< STAmount > xrpl::test::jtx::fund | ( | jtx::Env & | env, |
| jtx::Account const & | gw, | ||
| std::vector< jtx::Account > const & | accounts, | ||
| STAmount const & | xrp, | ||
| std::vector< STAmount > const & | amts = {}, | ||
| Fund | how = Fund::All ) |
Definition at line 92 of file AMMTest.cpp.
| std::vector< STAmount > xrpl::test::jtx::fund | ( | jtx::Env & | env, |
| std::vector< jtx::Account > const & | accounts, | ||
| STAmount const & | xrp, | ||
| std::vector< STAmount > const & | amts = {}, | ||
| Fund | how = Fund::All, | ||
| std::optional< Account > const & | mptIssuer = std::nullopt ) |
Definition at line 45 of file AMMTest.cpp.
| bool xrpl::test::jtx::operator== | ( | PrettyAmount const & | lhs, |
| PrettyAmount const & | rhs ) |
Definition at line 160 of file src/test/jtx/amount.h.
| std::ostream & xrpl::test::jtx::operator<< | ( | std::ostream & | os, |
| PrettyAmount const & | amount ) |
Definition at line 45 of file amount.cpp.
| PrettyAmount xrpl::test::jtx::drops | ( | Integer | i | ) |
Returns an XRP PrettyAmount, which is trivially convertible to STAmount.
Example: drops(10) Returns PrettyAmount of 10 drops
Definition at line 361 of file src/test/jtx/amount.h.
| PrettyAmount xrpl::test::jtx::drops | ( | XRPAmount | i | ) |
Returns an XRP PrettyAmount, which is trivially convertible to STAmount.
Example: drops(view->fee().basefee) Returns PrettyAmount of 10 drops
Definition at line 374 of file src/test/jtx/amount.h.
| std::ostream & xrpl::test::jtx::operator<< | ( | std::ostream & | os, |
| IOU const & | iou ) |
Definition at line 106 of file amount.cpp.
| std::ostream & xrpl::test::jtx::operator<< | ( | std::ostream & | os, |
| MPT const & | mpt ) |
Definition at line 113 of file amount.cpp.
| std::array< Account, 1+sizeof...(Args)> xrpl::test::jtx::noripple | ( | Account const & | account, |
| Args const &... | args ) |
| FeatureBitset xrpl::test::jtx::testableAmendments | ( | ) |
| std::vector< FeatureBitset > xrpl::test::jtx::amendmentCombinations | ( | std::initializer_list< UInt256 > | features, |
| FeatureBitset | seed ) |
Returns all 2^N permutations of a seed FeatureBitset with each subset of the given features excluded.
The seed is included as the first element.
Useful for running a test over every combination of optional amendments so that each case is exercised both with and without each feature.
| std::unique_ptr< Config > xrpl::test::jtx::envconfig | ( | ) |
creates and initializes a default configuration for jtx::Env
Definition at line 38 of file envconfig.h.
| std::unique_ptr< Config > xrpl::test::jtx::envconfig | ( | F && | modfunc, |
| Args &&... | args ) |
creates and initializes a default configuration for jtx::Env and invokes the provided function/lambda with the configuration object.
| modfunc | callable function or lambda to modify the default config. The first argument to the function must be std::unique_ptr to xrpl::Config. The function takes ownership of the unique_ptr and relinquishes ownership by returning a unique_ptr. |
| args | additional arguments that will be passed to the config modifier function (optional) |
Definition at line 61 of file envconfig.h.
| std::unique_ptr< Config > xrpl::test::jtx::onlineDelete | ( | std::unique_ptr< Config > | cfg, |
| std::uint32_t | deleteInterval = 8 ) |
adjust config to enable online_delete
| cfg | config instance to be modified |
| deleteInterval | how many new ledgers should be available before rotating. Defaults to 8, because the standalone minimum is 8. |
Definition at line 67 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::noAdmin | ( | std::unique_ptr< Config > | cfg | ) |
adjust config so no admin ports are enabled
this is intended for use with envconfig, as in envconfig(noAdmin)
| cfg | config instance to be modified |
Definition at line 76 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::secureGateway | ( | std::unique_ptr< Config > | cfg | ) |
Definition at line 84 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::adminLocalnet | ( | std::unique_ptr< Config > | cfg | ) |
Definition at line 93 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::secureGatewayLocalnet | ( | std::unique_ptr< Config > | cfg | ) |
Definition at line 101 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::singleThreadIo | ( | std::unique_ptr< Config > | cfg | ) |
Definition at line 110 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::validator | ( | std::unique_ptr< Config > | cfg, |
| std::string const & | seed ) |
adjust configuration with params needed to be a validator
this is intended for use with envconfig, as in envconfig(validator, myseed)
| cfg | config instance to be modified |
| seed | seed string for use in secret key generation. A fixed default value will be used if this string is empty |
Definition at line 119 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::addGrpcConfig | ( | std::unique_ptr< Config > | cfg | ) |
add a grpc address and port to config
This is intended for use with envconfig, for tests that require a grpc server. If this function is not called, grpc server will not start
| cfg | config instance to be modified |
Definition at line 128 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::addGrpcConfigWithSecureGateway | ( | std::unique_ptr< Config > | cfg, |
| std::string const & | secureGateway ) |
add a grpc address, port and secureGateway to config
This is intended for use with envconfig, for tests that require a grpc server. If this function is not called, grpc server will not start
| cfg | config instance to be modified |
Definition at line 136 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::addGrpcConfigWithTLS | ( | std::unique_ptr< Config > | cfg, |
| std::string const & | certPath, | ||
| std::string const & | keyPath ) |
add a grpc address, port and TLS certificate/key paths to config
This is intended for use with envconfig, for tests that require a grpc server with TLS enabled.
| cfg | config instance to be modified |
| certPath | path to SSL certificate file |
| keyPath | path to SSL private key file |
Definition at line 148 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::addGrpcConfigWithTLSAndClientCA | ( | std::unique_ptr< Config > | cfg, |
| std::string const & | certPath, | ||
| std::string const & | keyPath, | ||
| std::string const & | clientCAPath ) |
add a grpc address, port and TLS certificate/key/client CA paths to config
This is intended for use with envconfig, for tests that require a grpc server with mutual TLS (client certificate verification) enabled.
| cfg | config instance to be modified |
| certPath | path to SSL certificate file |
| keyPath | path to SSL private key file |
| clientCAPath | path to SSL client CA certificate file for mTLS |
Definition at line 161 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::addGrpcConfigWithTLSAndCertChain | ( | std::unique_ptr< Config > | cfg, |
| std::string const & | certPath, | ||
| std::string const & | keyPath, | ||
| std::string const & | certChainPath ) |
add a grpc address, port and TLS with server cert chain to config
This is intended for use with envconfig, for tests that require a grpc server with TLS enabled and intermediate CA certificates.
| cfg | config instance to be modified |
| certPath | path to SSL certificate file |
| keyPath | path to SSL private key file |
| certChainPath | path to SSL intermediate CA certificate(s) file |
Definition at line 176 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::makeConfig | ( | std::map< std::string, std::string > | extraTxQ = {}, |
| std::map< std::string, std::string > | extraVoting = {} ) |
Definition at line 191 of file envconfig.cpp.
| json::Value xrpl::test::jtx::fset | ( | Account const & | account, |
| std::uint32_t | on, | ||
| std::uint32_t | off = 0 ) |
| json::Value xrpl::test::jtx::fclear | ( | Account const & | account, |
| std::uint32_t | off ) |
|
static |
Definition at line 30 of file amount.cpp.
| void xrpl::test::jtx::doBalance | ( | Env & | env, |
| AccountID const & | account, | ||
| bool | kNone, | ||
| STAmount const & | value, | ||
| Issue const & | issue ) |
Definition at line 21 of file balance.cpp.
| void xrpl::test::jtx::doBalance | ( | Env & | env, |
| AccountID const & | account, | ||
| bool | kNone, | ||
| STAmount const & | value, | ||
| MPTIssue const & | mptIssue ) |
Definition at line 56 of file balance.cpp.
|
static |
|
static |
| std::optional< ConfidentialSendChainState > xrpl::test::jtx::computeNextSendChainState | ( | std::uint64_t | currentSpending, |
| Slice const & | currentEncSpending, | ||
| std::uint32_t | currentVersion, | ||
| std::uint64_t | sendAmt, | ||
| Slice const & | senderEncAmt ) |
Use this when building a second (or later) confidential send from the same account in the same batch.
Pass the state to the chain aware transaction builder so that the next proof is constructed against the correct post-send encrypted balance and version.
| currentSpending | Decrypted spending balance before the send. |
| currentEncSpending | sfConfidentialBalanceSpending before the send. |
| currentVersion | sfConfidentialBalanceVersion before the send. |
| sendAmt | Plaintext amount being sent. |
| senderEncAmt | sfSenderEncryptedAmount from the send transaction. |
| json::Value xrpl::test::jtx::signers | ( | Account const & | account, |
| std::uint32_t | quorum, | ||
| std::vector< Signer > const & | v ) |
Definition at line 31 of file multisign.cpp.
| json::Value xrpl::test::jtx::signers | ( | Account const & | account, |
| NoneT | ) |
Remove a signer list.
Definition at line 51 of file multisign.cpp.
| json::Value xrpl::test::jtx::offer | ( | Account const & | account, |
| STAmount const & | takerPays, | ||
| STAmount const & | takerGets, | ||
| std::uint32_t | flags ) |
| json::Value xrpl::test::jtx::offerCancel | ( | Account const & | account, |
| std::uint32_t | offerSeq ) |
| json::Value xrpl::test::jtx::pay | ( | AccountID const & | account, |
| AccountID const & | to, | ||
| AnyAmount | amount ) |
| json::Value xrpl::test::jtx::pay | ( | Account const & | account, |
| Account const & | to, | ||
| AnyAmount | amount ) |
| UInt256 xrpl::test::jtx::setupDomain | ( | jtx::Env & | env, |
| std::vector< jtx::Account > const & | accounts, | ||
| jtx::Account const & | domainOwner, | ||
| std::string const & | credType ) |
Definition at line 19 of file permissioned_dex.cpp.
|
static |
Definition at line 26 of file quality2.cpp.
| json::Value xrpl::test::jtx::rate | ( | Account const & | account, |
| double | multiplier ) |
| json::Value xrpl::test::jtx::regkey | ( | Account const & | account, |
| DisabledT | ) |
Disable the regular key.
Definition at line 13 of file regkey.cpp.
| json::Value xrpl::test::jtx::regkey | ( | Account const & | account, |
| Account const & | signer ) |
Set a regular key.
Definition at line 22 of file regkey.cpp.
| json::Value xrpl::test::jtx::getAccountOffers | ( | Env & | env, |
| AccountID const & | acct, | ||
| bool | current ) |
Definition at line 65 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::getAccountLines | ( | Env & | env, |
| AccountID const & | acctId ) |
Definition at line 73 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 81 of file TestHelpers.cpp.
| std::uint32_t xrpl::test::jtx::ownerCount | ( | Env const & | env, |
| Account const & | account ) |
Definition at line 87 of file TestHelpers.cpp.
| uint64_t xrpl::test::jtx::mptEscrowed | ( | jtx::Env const & | env, |
| jtx::Account const & | account, | ||
| jtx::MPT const & | mpt ) |
Definition at line 95 of file TestHelpers.cpp.
Definition at line 104 of file TestHelpers.cpp.
| jtx::PrettyAmount xrpl::test::jtx::issuerBalance | ( | jtx::Env & | env, |
| jtx::Account const & | account, | ||
| Issue const & | issue ) |
Definition at line 113 of file TestHelpers.cpp.
| jtx::PrettyAmount xrpl::test::jtx::issuerEscrowed | ( | jtx::Env & | env, |
| jtx::Account const & | account, | ||
| Issue const & | issue ) |
Definition at line 127 of file TestHelpers.cpp.
| std::uint32_t xrpl::test::jtx::sponsoredOwnerCount | ( | Env const & | env, |
| Account const & | account ) |
Definition at line 141 of file TestHelpers.cpp.
| std::uint32_t xrpl::test::jtx::sponsoringOwnerCount | ( | Env const & | env, |
| Account const & | account ) |
Definition at line 147 of file TestHelpers.cpp.
| std::uint32_t xrpl::test::jtx::sponsoringAccountCount | ( | Env const & | env, |
| Account const & | account ) |
Definition at line 153 of file TestHelpers.cpp.
Definition at line 161 of file TestHelpers.cpp.
| void xrpl::test::jtx::stpathAppendOne | ( | STPath & | st, |
| STPathElement const & | pe ) |
Definition at line 167 of file TestHelpers.cpp.
Definition at line 173 of file TestHelpers.cpp.
|
static |
Definition at line 179 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::rpf | ( | jtx::Account const & | src, |
| jtx::Account const & | dst, | ||
| STAmount const & | dstAmount, | ||
| std::optional< STAmount > const & | sendMax, | ||
| std::optional< PathAsset > const & | srcAsset, | ||
| std::optional< AccountID > const & | srcIssuer ) |
Definition at line 203 of file TestHelpers.cpp.
| jtx::Env xrpl::test::jtx::pathTestEnv | ( | beast::unit_test::Suite & | suite | ) |
Definition at line 229 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::findPathsRequest | ( | jtx::Env & | env, |
| jtx::Account const & | src, | ||
| jtx::Account const & | dst, | ||
| STAmount const & | saDstAmount, | ||
| std::optional< STAmount > const & | saSendMax, | ||
| std::optional< PathAsset > const & | srcAsset, | ||
| std::optional< AccountID > const & | srcIssuer, | ||
| std::optional< UInt256 > const & | domain ) |
Definition at line 244 of file TestHelpers.cpp.
| std::tuple< STPathSet, STAmount, STAmount > xrpl::test::jtx::findPaths | ( | jtx::Env & | env, |
| jtx::Account const & | src, | ||
| jtx::Account const & | dst, | ||
| STAmount const & | saDstAmount, | ||
| std::optional< STAmount > const & | saSendMax, | ||
| std::optional< PathAsset > const & | srcAsset, | ||
| std::optional< AccountID > const & | srcIssuer, | ||
| std::optional< UInt256 > const & | domain ) |
Definition at line 313 of file TestHelpers.cpp.
| std::tuple< STPathSet, STAmount, STAmount > xrpl::test::jtx::findPathsByElement | ( | jtx::Env & | env, |
| jtx::Account const & | src, | ||
| jtx::Account const & | dst, | ||
| STAmount const & | saDstAmount, | ||
| std::optional< STAmount > const & | saSendMax, | ||
| std::optional< STPathElement > const & | srcElement, | ||
| std::optional< AccountID > const & | srcIssuer, | ||
| std::optional< UInt256 > const & | domain ) |
Definition at line 362 of file TestHelpers.cpp.
| XRPAmount xrpl::test::jtx::txFee | ( | Env const & | env, |
| std::uint16_t | n ) |
Definition at line 391 of file TestHelpers.cpp.
| PrettyAmount xrpl::test::jtx::xrpMinusFee | ( | Env const & | env, |
| std::int64_t | xrpAmount ) |
Definition at line 397 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 404 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 434 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 440 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 446 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 454 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 462 of file TestHelpers.cpp.
| std::vector< SLE::const_pointer > xrpl::test::jtx::ownerDirEntries | ( | ReadView const & | view, |
| AccountID const & | account ) |
Return the ledger entries in an account's owner directory.
Definition at line 488 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::ledgerEntryRoot | ( | Env & | env, |
| Account const & | acct ) |
Definition at line 496 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::ledgerEntryState | ( | Env & | env, |
| Account const & | acctA, | ||
| Account const & | acctB, | ||
| std::string const & | currency ) |
Definition at line 505 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::ledgerEntryOffer | ( | jtx::Env & | env, |
| jtx::Account const & | acct, | ||
| std::uint32_t | offerSeq ) |
Definition at line 517 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::ledgerEntryMPT | ( | jtx::Env & | env, |
| jtx::Account const & | acct, | ||
| MPTID const & | mptID ) |
Definition at line 526 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::getBookOffers | ( | jtx::Env & | env, |
| Asset const & | takerPays, | ||
| Asset const & | takerGets ) |
Definition at line 535 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::accountBalance | ( | Env & | env, |
| Account const & | acct ) |
Definition at line 545 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 552 of file TestHelpers.cpp.
| void xrpl::test::jtx::nOffers | ( | Env & | env, |
| std::size_t | n, | ||
| Account const & | account, | ||
| STAmount const & | in, | ||
| STAmount const & | out ) |
Definition at line 561 of file TestHelpers.cpp.
| STPathElement xrpl::test::jtx::cpe | ( | PathAsset const & | pa | ) |
Definition at line 577 of file TestHelpers.cpp.
| STPathElement xrpl::test::jtx::allPathElements | ( | AccountID const & | a, |
| Asset const & | asset ) |
Definition at line 590 of file TestHelpers.cpp.
| STPathElement xrpl::test::jtx::ipe | ( | Asset const & | asset | ) |
Definition at line 596 of file TestHelpers.cpp.
| STPathElement xrpl::test::jtx::iape | ( | AccountID const & | account | ) |
Definition at line 617 of file TestHelpers.cpp.
| STPathElement xrpl::test::jtx::ape | ( | AccountID const & | a | ) |
Definition at line 624 of file TestHelpers.cpp.
| bool xrpl::test::jtx::equal | ( | std::unique_ptr< xrpl::Step > const & | s1, |
| DirectStepInfo const & | dsi ) |
Definition at line 630 of file TestHelpers.cpp.
| bool xrpl::test::jtx::equal | ( | std::unique_ptr< xrpl::Step > const & | s1, |
| MPTEndpointStepInfo const & | dsi ) |
Definition at line 638 of file TestHelpers.cpp.
| bool xrpl::test::jtx::equal | ( | std::unique_ptr< xrpl::Step > const & | s1, |
| XRPEndpointStepInfo const & | xrpStepInfo ) |
Definition at line 646 of file TestHelpers.cpp.
| bool xrpl::test::jtx::equal | ( | std::unique_ptr< xrpl::Step > const & | s1, |
| xrpl::Book const & | bsi ) |
Definition at line 654 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::trust | ( | Account const & | account, |
| STAmount const & | amount, | ||
| std::uint32_t | flags ) |
| json::Value xrpl::test::jtx::trust | ( | Account const & | account, |
| STAmount const & | amount, | ||
| Account const & | peer, | ||
| std::uint32_t | flags ) |
| json::Value xrpl::test::jtx::claw | ( | Account const & | account, |
| STAmount const & | amount, | ||
| std::optional< Account > const & | mptHolder ) |
| STObject xrpl::test::jtx::parse | ( | json::Value const & | jv | ) |
Convert JSON to STObject.
This throws on failure, the JSON must be correct.
Definition at line 33 of file utility.cpp.
| SignatureRole xrpl::test::jtx::signatureRole | ( | SField const * | subField | ) |
The role that signs into an optional signature subfield.
| subField | The signature field, or nullptr for the transaction's own signature. Throws if the field does not hold a transaction signature. |
Definition at line 42 of file utility.cpp.
| void xrpl::test::jtx::sign | ( | json::Value const & | jv, |
| Account const & | account, | ||
| json::Value & | sigObject, | ||
| HashPrefix | prefix = HashPrefix::TxSign ) |
Sign automatically into a specific Json field of the jv object.
| prefix | Prefix to insert before the serialized transaction when hashing. Use signingPrefix to get the prefix that matches the field that holds sigObject. |
Definition at line 52 of file utility.cpp.
| void xrpl::test::jtx::sign | ( | json::Value & | jv, |
| Account const & | account ) |
Sign automatically.
Definition at line 63 of file utility.cpp.
| void xrpl::test::jtx::fillFee | ( | json::Value & | jv, |
| ReadView const & | view ) |
Set the fee automatically.
Definition at line 69 of file utility.cpp.
| void xrpl::test::jtx::fillSeq | ( | json::Value & | jv, |
| ReadView const & | view ) |
Set the sequence number automatically.
Definition at line 93 of file utility.cpp.
| json::Value xrpl::test::jtx::cmdToJSONRPC | ( | std::vector< std::string > const & | args, |
| beast::Journal | j, | ||
| unsigned int | apiVersion ) |
Given an xrpld unit test rpc command, return the corresponding JSON.
Definition at line 107 of file utility.cpp.
|
nodiscard |
Create a zero-initialized buffer for malformed cryptography test inputs.
xrpl::Buffer(size) allocates uninitialized heap memory. Because CI runs unit tests sequentially in the same process, uninitialized memory can recycle valid secp256k1 keys or Pedersen commitments from earlier tests. Explicitly zeroing the buffer guarantees structural validation fails deterministically.
| size | The number of zero bytes to allocate. |
| json::Value xrpl::test::jtx::noop | ( | Account const & | account | ) |
| RequireT xrpl::test::jtx::required | ( | Args const &... | args | ) |
| void xrpl::test::jtx::sortSigners | ( | std::vector< Reg > & | signers | ) |
Definition at line 41 of file SignerUtils.h.
| json::Value xrpl::test::jtx::getAccountOffers | ( | Env & | env, |
| Account const & | acct, | ||
| bool | current = false ) |
Definition at line 327 of file jtx/TestHelpers.h.
| json::Value xrpl::test::jtx::getAccountLines | ( | Env & | env, |
| Account const & | acct ) |
Definition at line 336 of file jtx/TestHelpers.h.
| json::Value xrpl::test::jtx::getAccountLines | ( | Env & | env, |
| AccountID const & | acctId, | ||
| IOU... | ious ) |
Definition at line 343 of file jtx/TestHelpers.h.
|
nodiscard |
Reports whether reply carries the version 2 envelope: jsonrpc equal to rpc::kJsonRpcVersion and ripplerpc equal to rpc::kRippleRpcVersion2, both present.
| reply | The reply to inspect. |
Definition at line 380 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::setEnvelope2 | ( | json::Value & | request | ) |
Sets the version 2 envelope on request: jsonrpc to rpc::kJsonRpcVersion and ripplerpc to rpc::kRippleRpcVersion2.
| request | The request to stamp. |
Definition at line 393 of file jtx/TestHelpers.h.
|
nodiscard |
Definition at line 431 of file jtx/TestHelpers.h.
|
nodiscard |
Definition at line 440 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::stpathAppendOne | ( | STPath & | st, |
| T const & | t ) |
Definition at line 452 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::stpathAppend | ( | STPath & | st, |
| T const & | t, | ||
| Args const &... | args ) |
Definition at line 463 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::stpathsetAppend | ( | STPathSet & | st, |
| STPath const & | p, | ||
| Args const &... | args ) |
Definition at line 472 of file jtx/TestHelpers.h.
| STPath xrpl::test::jtx::stpath | ( | Args const &... | args | ) |
Definition at line 484 of file jtx/TestHelpers.h.
| bool xrpl::test::jtx::same | ( | STPathSet const & | st1, |
| Args const &... | args ) |
Definition at line 493 of file jtx/TestHelpers.h.
| bool xrpl::test::jtx::expectHolding | ( | Env const & | env, |
| AccountID const & | account, | ||
| STAmount const & | value, | ||
| Amts const &... | amts ) |
Definition at line 594 of file jtx/TestHelpers.h.
| bool xrpl::test::jtx::strandEqualHelper | ( | Iter | i | ) |
Definition at line 701 of file jtx/TestHelpers.h.
| bool xrpl::test::jtx::strandEqualHelper | ( | Iter | i, |
| StepInfo && | si, | ||
| Args &&... | args ) |
Definition at line 709 of file jtx/TestHelpers.h.
| bool xrpl::test::jtx::equal | ( | Strand const & | strand, |
| Args &&... | args ) |
Definition at line 718 of file jtx/TestHelpers.h.
| UInt256 xrpl::test::jtx::getCheckIndex | ( | AccountID const & | account, |
| std::uint32_t const | sequence ) |
Definition at line 761 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::checkMetrics | ( | Suite & | test, |
| jtx::Env & | env, | ||
| std::size_t | expectedCount, | ||
| std::optional< std::size_t > | expectedMaxCount, | ||
| std::size_t | expectedInLedger, | ||
| std::size_t | expectedPerLedger, | ||
| std::uint64_t | expectedMinFeeLevel = kBaseFeeLevel.fee(), | ||
| std::uint64_t | expectedMedFeeLevel = kMinEscalationFeeLevel.fee(), | ||
| std::source_location const | location = std::source_location::current() ) |
Definition at line 768 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::testHelper2TokensMix | ( | TTester && | tester | ) |
Definition at line 1043 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::testHelper3TokensMix | ( | TTester && | tester | ) |
Definition at line 1052 of file jtx/TestHelpers.h.
|
constexpr |
Definition at line 70 of file src/test/jtx/amount.h.
| XrpT const xrpl::test::jtx::XRP {} |
|
static |
Definition at line 393 of file src/test/jtx/amount.h.
| AnyT const xrpl::test::jtx::kAny {} |
Returns an amount representing "any issuer".
Definition at line 120 of file amount.cpp.
|
constexpr |
Definition at line 116 of file envconfig.cpp.
| auto const xrpl::test::jtx::kMptDexFlags = tfMPTCanTrade | tfMPTCanTransfer |
|
static |
| auto const xrpl::test::jtx::kData = JTxFieldWrapper<BlobField>(sfData) |
General field definitions, or fields used in multiple transaction namespaces.
Definition at line 318 of file jtx/TestHelpers.h.
| auto const xrpl::test::jtx::kAmount = JTxFieldWrapper<StAmountField>(sfAmount) |
Definition at line 320 of file jtx/TestHelpers.h.
|
constexpr |
Definition at line 757 of file jtx/TestHelpers.h.
|
constexpr |
Definition at line 758 of file jtx/TestHelpers.h.