There is an issue with the validateTreasury script whereby a user may use the same proposal to execute the treasury effect multiple times (basically as long as there is enough ADA in the treasury to cover it).
The issue is that the tally UTXO is only referenced in validateTreasury instead of being spent - here.
Probable fix - spend the proposal (tally) UTXO instead of referencing it, and check that it is spent in validateTreasury - so use txInfoInputs instead of txInfoReferenceInputs in the link above.
This change will also require changes to the validateTally script as spending the tally UTXO at this treasury step would mean that the validateTally script will fail, so you will maybe need to introduce a Redeemer and add a new branch for when the tally UTXO is being spent during the treasury disbursal step.
cc @Randy1Burrell
There is an issue with the
validateTreasuryscript whereby a user may use the same proposal to execute the treasury effect multiple times (basically as long as there is enough ADA in the treasury to cover it).The issue is that the
tally UTXOis only referenced invalidateTreasuryinstead of being spent - here.Probable fix - spend the proposal (tally) UTXO instead of referencing it, and check that it is spent in
validateTreasury- so usetxInfoInputsinstead oftxInfoReferenceInputsin the link above.This change will also require changes to the
validateTallyscript as spending the tally UTXO at this treasury step would mean that thevalidateTallyscript will fail, so you will maybe need to introduce aRedeemerand add a new branch for when the tally UTXO is being spent during the treasury disbursal step.cc @Randy1Burrell