comment transferOwnershipToGiver

This commit is contained in:
alf40k 2017-10-22 20:50:48 -04:00
parent 3a8e906ee9
commit 8eb3a6930d
1 changed files with 14 additions and 6 deletions

View File

@ -422,18 +422,26 @@ contract LiquidPledging is LiquidPledgingBase {
doTransfer(idPledge, toPledge, amount); doTransfer(idPledge, toPledge, amount);
} }
/// @notice `transferOwnershipToGiver` allows for the transfer of
/// value back to the Giver, value is placed in a pledged state
/// without being attached to a project, delegation chain, or timeline.
/// @param idPledge Id of the pledge to be transfered.
/// @param amount Quantity of value that's being transfered
/// @param idReceiver The new owner of the pledge
function transferOwnershipToGiver( function transferOwnershipToGiver(
uint64 idPledge, uint64 idPledge,
uint amount, uint amount,
uint64 idReceiver uint64 idReceiver
) internal { ) internal {
uint64 toPledge = findOrCreatePledge( uint64 toPledge = findOrCreatePledge(
idReceiver, idReceiver,
new uint64[](0), new uint64[](0),
0, 0,
0, 0,
0, 0,
PaymentState.Pledged); PaymentState.Pledged
);
doTransfer(idPledge, toPledge, amount); doTransfer(idPledge, toPledge, amount);
} }