Skip to content

Commit

Permalink
Update createtoken RPC to allow Gov to create DATs
Browse files Browse the repository at this point in the history
  • Loading branch information
Bushstar committed Sep 27, 2024
1 parent a80b805 commit 5821904
Show file tree
Hide file tree
Showing 2 changed files with 230 additions and 59 deletions.
11 changes: 3 additions & 8 deletions src/dfi/rpc_tokens.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,9 @@ UniValue createtoken(const JSONRPCRequest &request) {
auto [view, accountView, vaultView] = GetSnapshots();
CTransactionRef optAuthTx;
std::set<CScript> auths;
rawTx.vin = GetAuthInputsSmart(pwallet,
rawTx.nVersion,
auths,
metaObj["isDAT"].getBool(),
optAuthTx,
txInputs,
*view,
request.metadata.coinSelectOpts);
const auto isDAT = metaObj["isDAT"].getBool();
rawTx.vin = GetAuthInputsSmart(
pwallet, rawTx.nVersion, auths, isDAT, optAuthTx, txInputs, *view, request.metadata.coinSelectOpts, isDAT);

rawTx.vout.push_back(CTxOut(GetTokenCreationFee(targetHeight), scriptMeta));
rawTx.vout.push_back(CTxOut(GetTokenCollateralAmount(), GetScriptForDestination(collateralDest)));
Expand Down
Loading

0 comments on commit 5821904

Please sign in to comment.