You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The cashscript code for the minting smart contract allows for the user to add multiple inputs.
// Get userInput for mintconstuserAddress=awaitgetUserAddress();constuserUtxos=awaitelectrumServer.getUtxos(userAddress);constnetworkFeeMint=520;constfilteredUserUtxos=userUtxos.filter(val=>!val.token&&val.satoshis>=mintPriceSats+networkFeeMint,);constbchBalanceUser=userUtxos.reduce((total,utxo)=>utxo.token ? total : total+utxo.satoshis,0n);constuserInput=filteredUserUtxos[0];
this code could just as well select an array of userInputs to get to the required minting amount.
Next the fromP2PKH(userInput, userSig) in the transaction construction should be using this array of userInputs and then set the all signatures to be empty before adding each input to the listSourceOutputs .
The text was updated successfully, but these errors were encountered:
The cashscript code for the minting smart contract allows for the user to add multiple inputs.
this code could just as well select an array of userInputs to get to the required minting amount.
Next the
fromP2PKH(userInput, userSig)
in thetransaction
construction should be using this array of userInputs and then set the all signatures to be empty before adding each input to thelistSourceOutputs
.The text was updated successfully, but these errors were encountered: