|
xrpld
|
Namespaces | |
| namespace | oracle |
| namespace | amm |
| namespace | batch |
| Helpers for constructing Batch test transactions. | |
| namespace | check |
| Check operations. | |
| namespace | credentials |
| namespace | delegate |
| namespace | deposit |
| Deposit preauthorize operations. | |
| namespace | did |
| DID operations. | |
| namespace | directory |
| Directory operations. | |
| namespace | escrow |
| Escrow operations. | |
| namespace | ledgerStateFix |
| LedgerStateFix operations. | |
| namespace | pdomain |
| namespace | paychan |
| namespace | detail |
| namespace | loanBroker |
| namespace | loan |
| namespace | ticket |
| Ticket operations. | |
| namespace | token |
Classes | |
| class | Account |
| Immutable cryptographic account descriptor. More... | |
| struct | AccountTxnId |
| class | LPToken |
| struct | CreateArg |
| struct | DepositArg |
| struct | WithdrawArg |
| struct | VoteArg |
| struct | BidArg |
| struct | ClawbackArg |
| class | AMM |
| Convenience class to test AMM functionality. More... | |
| struct | TestAMMArg |
| struct | TestAMMArgs |
| class | AMMTestBase |
| class | AMMTest |
| struct | None |
| 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 | BookSpec |
| struct | XrpT |
| struct | EpsilonT |
| class | IOU |
| Converts to IOU Issue or STAmount. More... | |
| class | MPT |
| Converts to MPT Issue or STAmount. More... | |
| struct | AnyT |
| struct | AnyAmount |
| Amount specifier with an option for any issuer. More... | |
| class | Balance |
| A balance matches. More... | |
| struct | BasicProp |
| struct | PropType |
| class | DeliverMin |
| Sets the DeliverMin on a JTx. More... | |
| class | Domain |
| Set the domain on a JTx. More... | |
| struct | WithSourceLocation |
| Wrapper that captures std::source_location when implicitly constructed. More... | |
| class | SuiteLogs |
| class | Env |
| A transaction testing environment. More... | |
| class | EnvSs |
| A transaction testing environment wrapper. More... | |
| class | Fee |
| Set the fee on a JTx. More... | |
| class | Flags |
| Match set account flags. More... | |
| class | Nflags |
| Match clear account flags. More... | |
| struct | MPTSetFlagMapping |
| struct | InvoiceId |
| struct | JTx |
| Execution context for applying a JSON transaction. More... | |
| class | Json |
| Inject raw JSON. More... | |
| struct | LastLedgerSeq |
| class | Memo |
| Add a memo to a JTx. More... | |
| class | MemoData |
| class | MemoFormat |
| class | MemoType |
| class | MptFlags |
| Test helper that checks MPT flag settings after creation. More... | |
| class | MptBalance |
| Test helper that checks MPT issuance or holder balances. More... | |
| class | RequireAny |
| Test helper that accepts any condition supplied by a callback. More... | |
| struct | MPTCreate |
| Arguments for building an MPTokenIssuanceCreate 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 | MPTDestroy |
| Arguments for building an MPTokenIssuanceDestroy test transaction. More... | |
| struct | MPTAuthorize |
| Arguments for building an MPTokenAuthorize test transaction. More... | |
| struct | MPTSet |
| Arguments for building an MPTokenIssuanceSet test transaction. More... | |
| struct | MPTConvert |
| Arguments for building a ConfidentialMPTConvert test transaction. More... | |
| struct | MPTMergeInbox |
| Arguments for building a ConfidentialMPTMergeInbox test transaction. More... | |
| struct | MPTConfidentialSend |
| Arguments for building a ConfidentialMPTSend test transaction. More... | |
| struct | MPTConvertBack |
| Arguments for building a ConfidentialMPTConvertBack test transaction. More... | |
| struct | MPTConfidentialClawback |
| Arguments for building a ConfidentialMPTClawback test transaction. More... | |
| struct | PedersenProofParams |
| Stores the parameters that are exclusively used to generate a Pedersen linkage proof. More... | |
| 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... | |
| class | MPTTester |
| Test helper for creating, mutating, and asserting MPT and confidential MPT ledger state. More... | |
| struct | Signer |
| A signer in a SignerList. More... | |
| class | Msig |
| Set a multisignature on a JTx. More... | |
| class | OwnerCount |
| class | Owners |
| Match the number of items in the account's owner directory. More... | |
| class | Paths |
| Set Paths, SendMax on a JTx. More... | |
| class | Path |
| Add a path. More... | |
| class | PermissionedDEX |
| struct | Prop |
| Set a property on a JTx. More... | |
| 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... | |
| class | Require |
| Check a set of conditions. 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 | Reg |
| struct | Dtag |
| Set the destination tag on a JTx. More... | |
| struct | Stag |
| Set the source tag on a JTx. More... | |
| struct | NoneT |
| struct | AutofillT |
| struct | DisabledT |
| struct | IncrementT |
| Used for Fee() calls that use an owner reserve increment. More... | |
| class | Ter |
| Set the expected result code for a JTx The test will fail if the code doesn't match. More... | |
| struct | JTxField |
| Generic helper class for helper classes that set a field on a JTx. More... | |
| struct | JTxField< SField, StoredValue, StoredValue > |
| struct | TimePointField |
| struct | UInt256Field |
| struct | AccountIdField |
| struct | StAmountField |
| struct | BlobField |
| struct | ValueUnitField |
| struct | JTxFieldWrapper |
| struct | JTxFieldWrapper< BlobField > |
| class | Gate |
| struct | DirectStepInfo |
| struct | MPTEndpointStepInfo |
| struct | XRPEndpointStepInfo |
| class | Expiration |
| Set Expiration on a JTx. More... | |
| class | SourceTag |
| Set SourceTag on a JTx. More... | |
| class | DestTag |
| Set DestinationTag on a JTx. More... | |
| struct | IssuerArgs |
| class | Txflags |
| Set the flags on a JTx. More... | |
| struct | ParseError |
| Thrown when parse fails. More... | |
| struct | Vault |
| struct | XChainBridgeObjects |
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 | require_t = std::function<void(Env&)> |
| using | requires_t = std::vector<require_t> |
| 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. | |
| using | JValueVec = std::vector<json::Value> |
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) |
| bool | operator!= (PrettyAmount const &lhs, PrettyAmount const &rhs) |
| std::ostream & | operator<< (std::ostream &os, PrettyAmount const &amount) |
| template<class Integer, class = std::enable_if_t<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) |
| Buffer | signClaimAttestation (PublicKey const &pk, SecretKey const &sk, STXChainBridge const &bridge, AccountID const &sendingAccount, STAmount const &sendingAmount, AccountID const &rewardAccount, bool wasLockingChainSend, std::uint64_t claimID, std::optional< AccountID > const &dst) |
| Buffer | signCreateAccountAttestation (PublicKey const &pk, SecretKey const &sk, STXChainBridge const &bridge, AccountID const &sendingAccount, STAmount const &sendingAmount, STAmount const &rewardAmount, AccountID const &rewardAccount, bool wasLockingChainSend, std::uint64_t createCount, AccountID const &dst) |
| 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 > | 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) |
| 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 &env, AccountID const &account, STAmount const &value, bool defaultLimits) |
| bool | expectHolding (Env &env, AccountID const &account, None const &, Issue const &issue) |
| bool | expectHolding (Env &env, AccountID const &account, None const &, MPTIssue const &mptIssue) |
| bool | expectHolding (Env &env, AccountID const &account, None const &value) |
| bool | expectMPT (Env &env, AccountID const &account, STAmount const &value) |
| bool | expectOffers (Env &env, AccountID const &account, std::uint16_t size, std::vector< Amounts > const &toMatch) |
| 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. | |
| void | sign (json::Value &jv, Account const &account, json::Value &sigObject) |
| 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. | |
| json::Value | bridge (Account const &lockingChainDoor, Issue const &lockingChainIssue, Account const &issuingChainDoor, Issue const &issuingChainIssue) |
| json::Value | bridgeRpc (Account const &lockingChainDoor, Issue const &lockingChainIssue, Account const &issuingChainDoor, Issue const &issuingChainIssue) |
| json::Value | bridgeCreate (Account const &acc, json::Value const &bridge, STAmount const &reward, std::optional< STAmount > const &minAccountCreate) |
| json::Value | bridgeModify (Account const &acc, json::Value const &bridge, std::optional< STAmount > const &reward, std::optional< STAmount > const &minAccountCreate) |
| json::Value | xchainCreateClaimId (Account const &acc, json::Value const &bridge, STAmount const &reward, Account const &otherChainSource) |
| json::Value | xchainCommit (Account const &acc, json::Value const &bridge, std::uint32_t claimID, AnyAmount const &amt, std::optional< Account > const &dst) |
| json::Value | xchainClaim (Account const &acc, json::Value const &bridge, std::uint32_t claimID, AnyAmount const &amt, Account const &dst) |
| json::Value | sidechainXchainAccountCreate (Account const &acc, json::Value const &bridge, Account const &dst, AnyAmount const &amt, AnyAmount const &reward) |
| json::Value | claimAttestation (jtx::Account const &submittingAccount, json::Value const &jvBridge, jtx::Account const &sendingAccount, jtx::AnyAmount const &sendingAmount, jtx::Account const &rewardAccount, bool wasLockingChainSend, std::uint64_t claimID, std::optional< jtx::Account > const &dst, jtx::Signer const &signer) |
| json::Value | createAccountAttestation (jtx::Account const &submittingAccount, json::Value const &jvBridge, jtx::Account const &sendingAccount, jtx::AnyAmount const &sendingAmount, jtx::AnyAmount const &rewardAmount, jtx::Account const &rewardAccount, bool wasLockingChainSend, std::uint64_t createCount, jtx::Account const &dst, jtx::Signer const &signer) |
| JValueVec | claimAttestations (jtx::Account const &submittingAccount, json::Value const &jvBridge, jtx::Account const &sendingAccount, jtx::AnyAmount const &sendingAmount, std::vector< jtx::Account > const &rewardAccounts, bool wasLockingChainSend, std::uint64_t claimID, std::optional< jtx::Account > const &dst, std::vector< jtx::Signer > const &signers, std::size_t const numAtts, std::size_t const fromIdx) |
| JValueVec | createAccountAttestations (jtx::Account const &submittingAccount, json::Value const &jvBridge, jtx::Account const &sendingAccount, jtx::AnyAmount const &sendingAmount, jtx::AnyAmount const &rewardAmount, std::vector< jtx::Account > const &rewardAccounts, bool wasLockingChainSend, std::uint64_t createCount, jtx::Account const &dst, std::vector< jtx::Signer > const &signers, std::size_t const numAtts, std::size_t const fromIdx) |
| 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> | |
| require_t | required (Args const &... args) |
| Compose many condition functors into one. | |
| void | sortSigners (std::vector< Reg > &signers) |
| template<typename Input> requires requires(Input& v) { std::begin(v); std::end(v); } | |
| auto | makeVector (Input const &input) |
| 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 | checkVL (Slice const &result, std::string const &expected) |
| bool | checkVL (SLE::const_ref sle, SField const &field, std::string const &expected) |
| template<class T> | |
| std::enable_if_t< std::is_constructible_v< Account, T > > | 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 &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 uSequence) |
| 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) |
| json::Value | sidechainXchainAccountClaim (Account const &acc, json::Value const &bridge, Account const &dst, AnyAmount const &amt) |
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" |
| static constexpr std::array< MPTSetFlagMapping, 6 > | mptSetFlagMappings |
| 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) |
| static constexpr FeeLevel64 | kBaseFeeLevel {TxQ::kBaseLevel} |
| static constexpr FeeLevel64 | kMinEscalationFeeLevel = kBaseFeeLevel * 500 |
| constexpr std::size_t | kUtXchainDefaultNumSigners = 5 |
| constexpr std::size_t | kUtXchainDefaultQuorum = 4 |
| 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 99 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::require_t = 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 272 of file jtx/TestHelpers.h.
| using xrpl::test::jtx::simpleField = JTxFieldWrapper<JTxField<SField, StoredValue>> |
Definition at line 276 of file jtx/TestHelpers.h.
| using xrpl::test::jtx::tickets = OwnerCount<ltTICKET> |
Definition at line 13 of file xchain_bridge.h.
|
strong |
Definition at line 126 of file jtx/Account.h.
|
noexcept |
Definition at line 133 of file jtx/Account.h.
Definition at line 138 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 144 of file src/test/jtx/amount.h.
| bool xrpl::test::jtx::operator!= | ( | PrettyAmount const & | lhs, |
| PrettyAmount const & | rhs ) |
Definition at line 150 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 343 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 354 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.
| Buffer xrpl::test::jtx::signClaimAttestation | ( | PublicKey const & | pk, |
| SecretKey const & | sk, | ||
| STXChainBridge const & | bridge, | ||
| AccountID const & | sendingAccount, | ||
| STAmount const & | sendingAmount, | ||
| AccountID const & | rewardAccount, | ||
| bool | wasLockingChainSend, | ||
| std::uint64_t | claimID, | ||
| std::optional< AccountID > const & | dst ) |
Definition at line 16 of file attester.cpp.
| Buffer xrpl::test::jtx::signCreateAccountAttestation | ( | PublicKey const & | pk, |
| SecretKey const & | sk, | ||
| STXChainBridge const & | bridge, | ||
| AccountID const & | sendingAccount, | ||
| STAmount const & | sendingAmount, | ||
| STAmount const & | rewardAmount, | ||
| AccountID const & | rewardAccount, | ||
| bool | wasLockingChainSend, | ||
| std::uint64_t | createCount, | ||
| AccountID const & | dst ) |
Definition at line 33 of file attester.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 28 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 49 of file envconfig.h.
| 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 64 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::secureGateway | ( | std::unique_ptr< Config > | cfg | ) |
Definition at line 72 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::adminLocalnet | ( | std::unique_ptr< Config > | cfg | ) |
Definition at line 81 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::secureGatewayLocalnet | ( | std::unique_ptr< Config > | cfg | ) |
Definition at line 89 of file envconfig.cpp.
| std::unique_ptr< Config > xrpl::test::jtx::singleThreadIo | ( | std::unique_ptr< Config > | cfg | ) |
Definition at line 98 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 107 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 116 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 124 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 136 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 149 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 164 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 179 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 70 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::getAccountLines | ( | Env & | env, |
| AccountID const & | acctId ) |
Definition at line 78 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 86 of file TestHelpers.cpp.
| std::uint32_t xrpl::test::jtx::ownerCount | ( | Env const & | env, |
| Account const & | account ) |
Definition at line 92 of file TestHelpers.cpp.
Definition at line 100 of file TestHelpers.cpp.
| void xrpl::test::jtx::stpathAppendOne | ( | STPath & | st, |
| STPathElement const & | pe ) |
Definition at line 106 of file TestHelpers.cpp.
Definition at line 112 of file TestHelpers.cpp.
|
static |
Definition at line 118 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 142 of file TestHelpers.cpp.
| jtx::Env xrpl::test::jtx::pathTestEnv | ( | beast::unit_test::Suite & | suite | ) |
Definition at line 168 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 183 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 248 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 297 of file TestHelpers.cpp.
| XRPAmount xrpl::test::jtx::txFee | ( | Env const & | env, |
| std::uint16_t | n ) |
Definition at line 326 of file TestHelpers.cpp.
| PrettyAmount xrpl::test::jtx::xrpMinusFee | ( | Env const & | env, |
| std::int64_t | xrpAmount ) |
Definition at line 332 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 339 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 369 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 375 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 381 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 389 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 397 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::ledgerEntryRoot | ( | Env & | env, |
| Account const & | acct ) |
Definition at line 423 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 432 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::ledgerEntryOffer | ( | jtx::Env & | env, |
| jtx::Account const & | acct, | ||
| std::uint32_t | offerSeq ) |
Definition at line 444 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::ledgerEntryMPT | ( | jtx::Env & | env, |
| jtx::Account const & | acct, | ||
| MPTID const & | mptID ) |
Definition at line 453 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::getBookOffers | ( | jtx::Env & | env, |
| Asset const & | takerPays, | ||
| Asset const & | takerGets ) |
Definition at line 462 of file TestHelpers.cpp.
| json::Value xrpl::test::jtx::accountBalance | ( | Env & | env, |
| Account const & | acct ) |
Definition at line 472 of file TestHelpers.cpp.
|
nodiscard |
Definition at line 479 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 582 of file TestHelpers.cpp.
| STPathElement xrpl::test::jtx::cpe | ( | PathAsset const & | pa | ) |
Definition at line 598 of file TestHelpers.cpp.
| STPathElement xrpl::test::jtx::allPathElements | ( | AccountID const & | a, |
| Asset const & | asset ) |
Definition at line 611 of file TestHelpers.cpp.
| STPathElement xrpl::test::jtx::ipe | ( | Asset const & | asset | ) |
Definition at line 617 of file TestHelpers.cpp.
| STPathElement xrpl::test::jtx::iape | ( | AccountID const & | account | ) |
Definition at line 638 of file TestHelpers.cpp.
| STPathElement xrpl::test::jtx::ape | ( | AccountID const & | a | ) |
Definition at line 645 of file TestHelpers.cpp.
| bool xrpl::test::jtx::equal | ( | std::unique_ptr< xrpl::Step > const & | s1, |
| DirectStepInfo const & | dsi ) |
Definition at line 651 of file TestHelpers.cpp.
| bool xrpl::test::jtx::equal | ( | std::unique_ptr< xrpl::Step > const & | s1, |
| MPTEndpointStepInfo const & | dsi ) |
Definition at line 659 of file TestHelpers.cpp.
| bool xrpl::test::jtx::equal | ( | std::unique_ptr< xrpl::Step > const & | s1, |
| XRPEndpointStepInfo const & | xrpStepInfo ) |
Definition at line 667 of file TestHelpers.cpp.
| bool xrpl::test::jtx::equal | ( | std::unique_ptr< xrpl::Step > const & | s1, |
| xrpl::Book const & | bsi ) |
Definition at line 675 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 31 of file utility.cpp.
| void xrpl::test::jtx::sign | ( | json::Value & | jv, |
| Account const & | account, | ||
| json::Value & | sigObject ) |
Sign automatically into a specific Json field of the jv object.
Definition at line 40 of file utility.cpp.
| void xrpl::test::jtx::sign | ( | json::Value & | jv, |
| Account const & | account ) |
Sign automatically.
Definition at line 51 of file utility.cpp.
| void xrpl::test::jtx::fillFee | ( | json::Value & | jv, |
| ReadView const & | view ) |
Set the fee automatically.
Definition at line 57 of file utility.cpp.
| void xrpl::test::jtx::fillSeq | ( | json::Value & | jv, |
| ReadView const & | view ) |
Set the sequence number automatically.
Definition at line 80 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 94 of file utility.cpp.
| json::Value xrpl::test::jtx::bridge | ( | Account const & | lockingChainDoor, |
| Issue const & | lockingChainIssue, | ||
| Account const & | issuingChainDoor, | ||
| Issue const & | issuingChainIssue ) |
Definition at line 32 of file xchain_bridge.cpp.
| json::Value xrpl::test::jtx::bridgeRpc | ( | Account const & | lockingChainDoor, |
| Issue const & | lockingChainIssue, | ||
| Account const & | issuingChainDoor, | ||
| Issue const & | issuingChainIssue ) |
Definition at line 48 of file xchain_bridge.cpp.
| json::Value xrpl::test::jtx::bridgeCreate | ( | Account const & | acc, |
| json::Value const & | bridge, | ||
| STAmount const & | reward, | ||
| std::optional< STAmount > const & | minAccountCreate ) |
Definition at line 63 of file xchain_bridge.cpp.
| json::Value xrpl::test::jtx::bridgeModify | ( | Account const & | acc, |
| json::Value const & | bridge, | ||
| std::optional< STAmount > const & | reward, | ||
| std::optional< STAmount > const & | minAccountCreate ) |
Definition at line 85 of file xchain_bridge.cpp.
| json::Value xrpl::test::jtx::xchainCreateClaimId | ( | Account const & | acc, |
| json::Value const & | bridge, | ||
| STAmount const & | reward, | ||
| Account const & | otherChainSource ) |
Definition at line 108 of file xchain_bridge.cpp.
| json::Value xrpl::test::jtx::xchainCommit | ( | Account const & | acc, |
| json::Value const & | bridge, | ||
| std::uint32_t | claimID, | ||
| AnyAmount const & | amt, | ||
| std::optional< Account > const & | dst ) |
Definition at line 126 of file xchain_bridge.cpp.
| json::Value xrpl::test::jtx::xchainClaim | ( | Account const & | acc, |
| json::Value const & | bridge, | ||
| std::uint32_t | claimID, | ||
| AnyAmount const & | amt, | ||
| Account const & | dst ) |
Definition at line 147 of file xchain_bridge.cpp.
| json::Value xrpl::test::jtx::sidechainXchainAccountCreate | ( | Account const & | acc, |
| json::Value const & | bridge, | ||
| Account const & | dst, | ||
| AnyAmount const & | amt, | ||
| AnyAmount const & | reward ) |
Definition at line 167 of file xchain_bridge.cpp.
| json::Value xrpl::test::jtx::claimAttestation | ( | jtx::Account const & | submittingAccount, |
| json::Value const & | jvBridge, | ||
| jtx::Account const & | sendingAccount, | ||
| jtx::AnyAmount const & | sendingAmount, | ||
| jtx::Account const & | rewardAccount, | ||
| bool | wasLockingChainSend, | ||
| std::uint64_t | claimID, | ||
| std::optional< jtx::Account > const & | dst, | ||
| jtx::Signer const & | signer ) |
Definition at line 187 of file xchain_bridge.cpp.
| json::Value xrpl::test::jtx::createAccountAttestation | ( | jtx::Account const & | submittingAccount, |
| json::Value const & | jvBridge, | ||
| jtx::Account const & | sendingAccount, | ||
| jtx::AnyAmount const & | sendingAmount, | ||
| jtx::AnyAmount const & | rewardAmount, | ||
| jtx::Account const & | rewardAccount, | ||
| bool | wasLockingChainSend, | ||
| std::uint64_t | createCount, | ||
| jtx::Account const & | dst, | ||
| jtx::Signer const & | signer ) |
Definition at line 236 of file xchain_bridge.cpp.
| JValueVec xrpl::test::jtx::claimAttestations | ( | jtx::Account const & | submittingAccount, |
| json::Value const & | jvBridge, | ||
| jtx::Account const & | sendingAccount, | ||
| jtx::AnyAmount const & | sendingAmount, | ||
| std::vector< jtx::Account > const & | rewardAccounts, | ||
| bool | wasLockingChainSend, | ||
| std::uint64_t | claimID, | ||
| std::optional< jtx::Account > const & | dst, | ||
| std::vector< jtx::Signer > const & | signers, | ||
| std::size_t const | numAtts, | ||
| std::size_t const | fromIdx ) |
Definition at line 288 of file xchain_bridge.cpp.
| JValueVec xrpl::test::jtx::createAccountAttestations | ( | jtx::Account const & | submittingAccount, |
| json::Value const & | jvBridge, | ||
| jtx::Account const & | sendingAccount, | ||
| jtx::AnyAmount const & | sendingAmount, | ||
| jtx::AnyAmount const & | rewardAmount, | ||
| std::vector< jtx::Account > const & | rewardAccounts, | ||
| bool | wasLockingChainSend, | ||
| std::uint64_t | createCount, | ||
| jtx::Account const & | dst, | ||
| std::vector< jtx::Signer > const & | signers, | ||
| std::size_t const | numAtts, | ||
| std::size_t const | fromIdx ) |
Definition at line 322 of file xchain_bridge.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 | ) |
| require_t xrpl::test::jtx::required | ( | Args const &... | args | ) |
| void xrpl::test::jtx::sortSigners | ( | std::vector< Reg > & | signers | ) |
Definition at line 41 of file SignerUtils.h.
| auto xrpl::test::jtx::makeVector | ( | Input const & | input | ) |
Definition at line 290 of file jtx/TestHelpers.h.
| json::Value xrpl::test::jtx::getAccountOffers | ( | Env & | env, |
| Account const & | acct, | ||
| bool | current = false ) |
Definition at line 304 of file jtx/TestHelpers.h.
| json::Value xrpl::test::jtx::getAccountLines | ( | Env & | env, |
| Account const & | acct ) |
Definition at line 313 of file jtx/TestHelpers.h.
| json::Value xrpl::test::jtx::getAccountLines | ( | Env & | env, |
| AccountID const & | acctId, | ||
| IOU... | ious ) |
Definition at line 320 of file jtx/TestHelpers.h.
|
nodiscard |
Definition at line 353 of file jtx/TestHelpers.h.
|
nodiscard |
Definition at line 362 of file jtx/TestHelpers.h.
| std::enable_if_t< std::is_constructible_v< Account, T > > xrpl::test::jtx::stpathAppendOne | ( | STPath & | st, |
| T const & | t ) |
Definition at line 374 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::stpathAppend | ( | STPath & | st, |
| T const & | t, | ||
| Args const &... | args ) |
Definition at line 384 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::stpathsetAppend | ( | STPathSet & | st, |
| STPath const & | p, | ||
| Args const &... | args ) |
Definition at line 393 of file jtx/TestHelpers.h.
| STPath xrpl::test::jtx::stpath | ( | Args const &... | args | ) |
Definition at line 405 of file jtx/TestHelpers.h.
| bool xrpl::test::jtx::same | ( | STPathSet const & | st1, |
| Args const &... | args ) |
Definition at line 414 of file jtx/TestHelpers.h.
| bool xrpl::test::jtx::expectHolding | ( | Env & | env, |
| AccountID const & | account, | ||
| STAmount const & | value, | ||
| Amts const &... | amts ) |
Definition at line 519 of file jtx/TestHelpers.h.
| bool xrpl::test::jtx::strandEqualHelper | ( | Iter | i | ) |
Definition at line 680 of file jtx/TestHelpers.h.
| bool xrpl::test::jtx::strandEqualHelper | ( | Iter | i, |
| StepInfo && | si, | ||
| Args &&... | args ) |
Definition at line 688 of file jtx/TestHelpers.h.
| bool xrpl::test::jtx::equal | ( | Strand const & | strand, |
| Args &&... | args ) |
Definition at line 697 of file jtx/TestHelpers.h.
| uint256 xrpl::test::jtx::getCheckIndex | ( | AccountID const & | account, |
| std::uint32_t | uSequence ) |
Definition at line 738 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 745 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::testHelper2TokensMix | ( | TTester && | tester | ) |
Definition at line 1012 of file jtx/TestHelpers.h.
| void xrpl::test::jtx::testHelper3TokensMix | ( | TTester && | tester | ) |
Definition at line 1021 of file jtx/TestHelpers.h.
| json::Value xrpl::test::jtx::sidechainXchainAccountClaim | ( | Account const & | acc, |
| json::Value const & | bridge, | ||
| Account const & | dst, | ||
| AnyAmount const & | amt ) |
|
constexpr |
Definition at line 58 of file src/test/jtx/amount.h.
| XrpT const xrpl::test::jtx::XRP {} |
|
static |
Definition at line 373 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 104 of file envconfig.cpp.
|
staticconstexpr |
| 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 280 of file jtx/TestHelpers.h.
| auto const xrpl::test::jtx::kAmount = JTxFieldWrapper<StAmountField>(sfAmount) |
Definition at line 282 of file jtx/TestHelpers.h.
|
staticconstexpr |
Definition at line 734 of file jtx/TestHelpers.h.
|
staticconstexpr |
Definition at line 735 of file jtx/TestHelpers.h.
|
constexpr |
Definition at line 15 of file xchain_bridge.h.
|
constexpr |
Definition at line 16 of file xchain_bridge.h.