A few more comments
This commit is contained in:
parent
dfd1b4de37
commit
a6adb37190
|
@ -193,7 +193,7 @@ contract LiquidPledging is LiquidPledgingBase {
|
||||||
/// @notice Authorizes a payment be made from the `vault` can be used by the
|
/// @notice Authorizes a payment be made from the `vault` can be used by the
|
||||||
/// Giver to veto a pre-committed donation from a Delegate to an
|
/// Giver to veto a pre-committed donation from a Delegate to an
|
||||||
/// intendedProject
|
/// intendedProject
|
||||||
/// @param idPledge Id of the pledge that wants to be withdrawn.
|
/// @param idPledge Id of the pledge that is to be redeemed into ether
|
||||||
/// @param amount Quantity of ether (in wei) to be authorized
|
/// @param amount Quantity of ether (in wei) to be authorized
|
||||||
function withdraw(uint64 idPledge, uint amount) {
|
function withdraw(uint64 idPledge, uint amount) {
|
||||||
idPledge = normalizePledge(idPledge); // Updates pledge info
|
idPledge = normalizePledge(idPledge); // Updates pledge info
|
||||||
|
@ -216,8 +216,9 @@ contract LiquidPledging is LiquidPledgingBase {
|
||||||
vault.authorizePayment(bytes32(idNewPledge), owner.addr, amount);
|
vault.authorizePayment(bytes32(idNewPledge), owner.addr, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice Method called by the vault to confirm a payment.
|
/// @notice `onlyVault` Confirms a withdraw request changing the PledgeState
|
||||||
/// @param idPledge Id of the pledge that wants to be withdrawn.
|
/// from Paying to Paid
|
||||||
|
/// @param idPledge Id of the pledge that is to be withdrawn
|
||||||
/// @param amount Quantity of ether (in wei) to be withdrawn
|
/// @param amount Quantity of ether (in wei) to be withdrawn
|
||||||
function confirmPayment(uint64 idPledge, uint amount) onlyVault {
|
function confirmPayment(uint64 idPledge, uint amount) onlyVault {
|
||||||
Pledge storage p = findPledge(idPledge);
|
Pledge storage p = findPledge(idPledge);
|
||||||
|
@ -236,9 +237,10 @@ contract LiquidPledging is LiquidPledgingBase {
|
||||||
doTransfer(idPledge, idNewPledge, amount);
|
doTransfer(idPledge, idNewPledge, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice Method called by the vault to cancel a payment.
|
/// @notice `onlyVault` Cancels a withdraw request, changing the PledgeState
|
||||||
/// @param idPledge Id of the pledge that wants to be canceled for withdraw.
|
/// from Paying back to Pledged
|
||||||
/// @param amount Quantity of ether (in wei) to be rolled back
|
/// @param idPledge Id of the pledge that's withdraw is to be canceled
|
||||||
|
/// @param amount Quantity of ether (in wei) to be canceled
|
||||||
function cancelPayment(uint64 idPledge, uint amount) onlyVault {
|
function cancelPayment(uint64 idPledge, uint amount) onlyVault {
|
||||||
Pledge storage p = findPledge(idPledge);
|
Pledge storage p = findPledge(idPledge);
|
||||||
|
|
||||||
|
@ -259,8 +261,8 @@ contract LiquidPledging is LiquidPledgingBase {
|
||||||
doTransfer(idPledge, oldPledge, amount);
|
doTransfer(idPledge, oldPledge, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice Method called to cancel this project.
|
/// @notice Changes the `project.canceled` flag to `true`; cannot be undone
|
||||||
/// @param idProject Id of the projct that wants to be canceled.
|
/// @param idProject Id of the project that is to be canceled
|
||||||
function cancelProject(uint64 idProject) {
|
function cancelProject(uint64 idProject) {
|
||||||
PledgeAdmin storage project = findAdmin(idProject);
|
PledgeAdmin storage project = findAdmin(idProject);
|
||||||
checkAdminOwner(project);
|
checkAdminOwner(project);
|
||||||
|
@ -269,9 +271,11 @@ contract LiquidPledging is LiquidPledgingBase {
|
||||||
CancelProject(idProject);
|
CancelProject(idProject);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// @notice Method called to cancel specific pledge.
|
/// @notice Transfers `amount` in `idPledge` back to the `oldPledge` that
|
||||||
/// @param idPledge Id of the pledge that should be canceled.
|
/// that sent it there in the first place, a Ctrl-z
|
||||||
/// @param amount Quantity of Ether that wants to be rolled back.
|
/// @param idPledge Id of the pledge that is to be canceled
|
||||||
|
/// @param amount Quantity of ether (in wei) to be transfered to the
|
||||||
|
/// `oldPledge`
|
||||||
function cancelPledge(uint64 idPledge, uint amount) {
|
function cancelPledge(uint64 idPledge, uint amount) {
|
||||||
idPledge = normalizePledge(idPledge);
|
idPledge = normalizePledge(idPledge);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue