mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 15:20:54 +00:00
refactor: Enable clang-tidy readability-identifier-naming check (#6571)
This commit is contained in:
@@ -19,10 +19,10 @@
|
||||
|
||||
namespace xrpl::test::jtx::token {
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
mint(jtx::Account const& account, std::uint32_t nfTokenTaxon)
|
||||
{
|
||||
Json::Value jv;
|
||||
json::Value jv;
|
||||
jv[sfAccount.jsonName] = account.human();
|
||||
jv[sfNFTokenTaxon.jsonName] = nfTokenTaxon;
|
||||
jv[sfTransactionType.jsonName] = jss::NFTokenMint;
|
||||
@@ -30,27 +30,27 @@ mint(jtx::Account const& account, std::uint32_t nfTokenTaxon)
|
||||
}
|
||||
|
||||
void
|
||||
xferFee::operator()(Env& env, JTx& jt) const
|
||||
XferFee::operator()(Env& env, JTx& jt) const
|
||||
{
|
||||
jt.jv[sfTransferFee.jsonName] = xferFee_;
|
||||
}
|
||||
|
||||
void
|
||||
issuer::operator()(Env& env, JTx& jt) const
|
||||
Issuer::operator()(Env& env, JTx& jt) const
|
||||
{
|
||||
jt.jv[sfIssuer.jsonName] = issuer_;
|
||||
}
|
||||
|
||||
void
|
||||
uri::operator()(Env& env, JTx& jt) const
|
||||
Uri::operator()(Env& env, JTx& jt) const
|
||||
{
|
||||
jt.jv[sfURI.jsonName] = uri_;
|
||||
}
|
||||
|
||||
void
|
||||
amount::operator()(Env& env, JTx& jt) const
|
||||
Amount::operator()(Env& env, JTx& jt) const
|
||||
{
|
||||
jt.jv[sfAmount.jsonName] = amount_.getJson(JsonOptions::none);
|
||||
jt.jv[sfAmount.jsonName] = amount_.getJson(JsonOptions::KNone);
|
||||
}
|
||||
|
||||
uint256
|
||||
@@ -82,54 +82,54 @@ getID(
|
||||
flags, xferFee, issuer, nft::toTaxon(nfTokenTaxon), nftSeq);
|
||||
}
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
burn(jtx::Account const& account, uint256 const& nftokenID)
|
||||
{
|
||||
Json::Value jv;
|
||||
json::Value jv;
|
||||
jv[sfAccount.jsonName] = account.human();
|
||||
jv[sfNFTokenID.jsonName] = to_string(nftokenID);
|
||||
jv[jss::TransactionType] = jss::NFTokenBurn;
|
||||
return jv;
|
||||
}
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
createOffer(jtx::Account const& account, uint256 const& nftokenID, STAmount const& amount)
|
||||
{
|
||||
Json::Value jv;
|
||||
json::Value jv;
|
||||
jv[sfAccount.jsonName] = account.human();
|
||||
jv[sfNFTokenID.jsonName] = to_string(nftokenID);
|
||||
jv[sfAmount.jsonName] = amount.getJson(JsonOptions::none);
|
||||
jv[sfAmount.jsonName] = amount.getJson(JsonOptions::KNone);
|
||||
jv[jss::TransactionType] = jss::NFTokenCreateOffer;
|
||||
return jv;
|
||||
}
|
||||
|
||||
void
|
||||
owner::operator()(Env& env, JTx& jt) const
|
||||
Owner::operator()(Env& env, JTx& jt) const
|
||||
{
|
||||
jt.jv[sfOwner.jsonName] = owner_;
|
||||
}
|
||||
|
||||
void
|
||||
expiration::operator()(Env& env, JTx& jt) const
|
||||
Expiration::operator()(Env& env, JTx& jt) const
|
||||
{
|
||||
jt.jv[sfExpiration.jsonName] = expires_;
|
||||
}
|
||||
|
||||
void
|
||||
destination::operator()(Env& env, JTx& jt) const
|
||||
Destination::operator()(Env& env, JTx& jt) const
|
||||
{
|
||||
jt.jv[sfDestination.jsonName] = dest_;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
static Json::Value
|
||||
static json::Value
|
||||
cancelOfferImpl(jtx::Account const& account, T const& nftokenOffers)
|
||||
{
|
||||
Json::Value jv;
|
||||
json::Value jv;
|
||||
jv[sfAccount.jsonName] = account.human();
|
||||
if (!empty(nftokenOffers))
|
||||
{
|
||||
jv[sfNFTokenOffers.jsonName] = Json::arrayValue;
|
||||
jv[sfNFTokenOffers.jsonName] = json::ArrayValue;
|
||||
for (uint256 const& nftokenOffer : nftokenOffers)
|
||||
jv[sfNFTokenOffers.jsonName].append(to_string(nftokenOffer));
|
||||
}
|
||||
@@ -137,51 +137,51 @@ cancelOfferImpl(jtx::Account const& account, T const& nftokenOffers)
|
||||
return jv;
|
||||
}
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
cancelOffer(jtx::Account const& account, std::initializer_list<uint256> const& nftokenOffers)
|
||||
{
|
||||
return cancelOfferImpl(account, nftokenOffers);
|
||||
}
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
cancelOffer(jtx::Account const& account, std::vector<uint256> const& nftokenOffers)
|
||||
{
|
||||
return cancelOfferImpl(account, nftokenOffers);
|
||||
}
|
||||
|
||||
void
|
||||
rootIndex::operator()(Env& env, JTx& jt) const
|
||||
RootIndex::operator()(Env& env, JTx& jt) const
|
||||
{
|
||||
jt.jv[sfRootIndex.jsonName] = rootIndex_;
|
||||
}
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
acceptBuyOffer(jtx::Account const& account, uint256 const& offerIndex)
|
||||
{
|
||||
Json::Value jv;
|
||||
json::Value jv;
|
||||
jv[sfAccount.jsonName] = account.human();
|
||||
jv[sfNFTokenBuyOffer.jsonName] = to_string(offerIndex);
|
||||
jv[jss::TransactionType] = jss::NFTokenAcceptOffer;
|
||||
return jv;
|
||||
}
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
acceptSellOffer(jtx::Account const& account, uint256 const& offerIndex)
|
||||
{
|
||||
Json::Value jv;
|
||||
json::Value jv;
|
||||
jv[sfAccount.jsonName] = account.human();
|
||||
jv[sfNFTokenSellOffer.jsonName] = to_string(offerIndex);
|
||||
jv[jss::TransactionType] = jss::NFTokenAcceptOffer;
|
||||
return jv;
|
||||
}
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
brokerOffers(
|
||||
jtx::Account const& account,
|
||||
uint256 const& buyOfferIndex,
|
||||
uint256 const& sellOfferIndex)
|
||||
{
|
||||
Json::Value jv;
|
||||
json::Value jv;
|
||||
jv[sfAccount.jsonName] = account.human();
|
||||
jv[sfNFTokenBuyOffer.jsonName] = to_string(buyOfferIndex);
|
||||
jv[sfNFTokenSellOffer.jsonName] = to_string(sellOfferIndex);
|
||||
@@ -190,29 +190,29 @@ brokerOffers(
|
||||
}
|
||||
|
||||
void
|
||||
brokerFee::operator()(Env& env, JTx& jt) const
|
||||
BrokerFee::operator()(Env& env, JTx& jt) const
|
||||
{
|
||||
jt.jv[sfNFTokenBrokerFee.jsonName] = brokerFee_.getJson(JsonOptions::none);
|
||||
jt.jv[sfNFTokenBrokerFee.jsonName] = brokerFee_.getJson(JsonOptions::KNone);
|
||||
}
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
setMinter(jtx::Account const& account, jtx::Account const& minter)
|
||||
{
|
||||
Json::Value jt = fset(account, asfAuthorizedNFTokenMinter);
|
||||
json::Value jt = fset(account, asfAuthorizedNFTokenMinter);
|
||||
jt[sfNFTokenMinter.fieldName] = minter.human();
|
||||
return jt;
|
||||
}
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
clearMinter(jtx::Account const& account)
|
||||
{
|
||||
return fclear(account, asfAuthorizedNFTokenMinter);
|
||||
}
|
||||
|
||||
Json::Value
|
||||
json::Value
|
||||
modify(jtx::Account const& account, uint256 const& nftokenID)
|
||||
{
|
||||
Json::Value jv;
|
||||
json::Value jv;
|
||||
jv[sfAccount.jsonName] = account.human();
|
||||
jv[sfNFTokenID.jsonName] = to_string(nftokenID);
|
||||
jv[jss::TransactionType] = jss::NFTokenModify;
|
||||
|
||||
Reference in New Issue
Block a user