rippled
Loading...
Searching...
No Matches
PermissionedDEXHelpers.h
1//------------------------------------------------------------------------------
2/*
3 This file is part of rippled: https://github.com/ripple/rippled
4 Copyright (c) 2025 Ripple Labs Inc.
5
6 Permission to use, copy, modify, and/or distribute this software for any
7 purpose with or without fee is hereby granted, provided that the above
8 copyright notice and this permission notice appear in all copies.
9
10 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17*/
18//==============================================================================
19
20#pragma once
21#include <xrpl/ledger/View.h>
22
23namespace ripple {
24namespace permissioned_dex {
25
26// Check if an account is in a permissioned domain
27[[nodiscard]] bool
29 ReadView const& view,
30 AccountID const& account,
31 Domain const& domainID);
32
33// Check if an offer is in the permissioned domain
34[[nodiscard]] bool
36 ReadView const& view,
37 uint256 const& offerID,
38 Domain const& domainID,
40
41} // namespace permissioned_dex
42
43} // namespace ripple
A generic endpoint for log messages.
Definition Journal.h:60
bool accountInDomain(ReadView const &view, AccountID const &account, Domain const &domainID)
bool offerInDomain(ReadView const &view, uint256 const &offerID, Domain const &domainID, beast::Journal j)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:25
base_uint< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition AccountID.h:48
base_uint< 256 > uint256
Definition base_uint.h:558
base_uint< 256 > Domain
Domain is a 256-bit hash representing a specific domain.
Definition UintTypes.h:67