20 #include <ripple/protocol/STIssue.h>
22 #include <ripple/basics/Log.h>
23 #include <ripple/basics/contract.h>
24 #include <ripple/protocol/SystemParameters.h>
25 #include <ripple/protocol/jss.h>
27 #include <boost/algorithm/string.hpp>
28 #include <boost/multiprecision/cpp_int.hpp>
29 #include <boost/regex.hpp>
43 issue_.currency = sit.get160();
44 if (!
isXRP(issue_.currency))
45 issue_.account = sit.get160();
49 if (
isXRP(issue_.currency) !=
isXRP(issue_.account))
50 Throw<std::runtime_error>(
51 "invalid issue: currency and account native mismatch");
55 :
STBase{name}, issue_{issue}
57 if (
isXRP(issue_.currency) !=
isXRP(issue_.account))
58 Throw<std::runtime_error>(
59 "invalid issue: currency and account native mismatch");
91 return v && (*v == *
this);
103 return std::make_unique<STIssue>(sit, name);
115 return emplace(n, buf, std::move(*
this));
void add(Serializer &s) const override
A currency issued by an account.
STBase * copy(std::size_t n, void *buf) const override
SerializedTypeID getSType() const override
Json::Value getJson(JsonOptions) const override
static STBase * emplace(std::size_t n, void *buf, T &&val)
bool isEquivalent(const STBase &t) const override
std::string getText() const
AccountID const & xrpAccount()
Compute AccountID from public key.
bool isXRP(AccountID const &c)
Issue issueFromJson(Json::Value const &v)
static std::unique_ptr< STIssue > construct(SerialIter &, SField const &name)
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
int addBitString(base_uint< Bits, Tag > const &v)
Note, should be treated as flags that can be | and &.
Json::Value to_json(Issue const &is)
A type which can be exported to a well known binary format.
Issue const & xrpIssue()
Returns an asset specifier that represents XRP.
std::string getText() const override
bool isDefault() const override
STBase * move(std::size_t n, void *buf) override