From da9a2766470f22d2b6db24954f5a76be90b76fad Mon Sep 17 00:00:00 2001 From: Griff Green Date: Fri, 29 Sep 2017 11:06:11 +0200 Subject: [PATCH] Added comments and asserted 80 char per line --- contracts/ILiquidPledgingPlugin.sol | 37 +++++++++++++++++++---------- 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/contracts/ILiquidPledgingPlugin.sol b/contracts/ILiquidPledgingPlugin.sol index f217cfe..a9d7f26 100644 --- a/contracts/ILiquidPledgingPlugin.sol +++ b/contracts/ILiquidPledgingPlugin.sol @@ -1,19 +1,32 @@ pragma solidity ^0.4.11; contract ILiquidPledgingPlugin { - - /// @param context In which context it is affected. - /// 0 -> owner from - /// 1 -> First delegate from - /// 2 -> Second delegate from + /// @notice Plugins are used (much like web hooks) to initiate an action + /// upon any donation, delegation, or transfer; this is an optional feature + /// and allows for extreme customization of the contract + /// @param context The situation that is triggering the plugin: + /// 0 -> Plugin for the owner transferring pledge to another party + /// 1 -> Plugin for the first delegate transferring pledge to another party + /// 2 -> Plugin for the second delegate transferring pledge to another party /// ... - /// 255 -> proposedProject from + /// 255 -> Plugin for the proposedProject transferring pledge to another party /// - /// 256 -> owner to - /// 257 -> First delegate to - /// 258 -> Second delegate to + /// 256 -> Plugin for the owner receiving pledge to another party + /// 257 -> Plugin for the first delegate receiving pledge to another party + /// 258 -> Plugin for the second delegate receiving pledge to another party /// ... - /// 511 -> proposedProject to - function beforeTransfer(uint64 noteManager, uint64 noteFrom, uint64 noteTo, uint64 context, uint amount) returns (uint maxAllowed); - function afterTransfer(uint64 noteManager, uint64 noteFrom, uint64 noteTo, uint64 context, uint amount); + /// 511 -> Plugin for the proposedProject receiving pledge to another party + function beforeTransfer( + uint64 noteManager, + uint64 noteFrom, + uint64 noteTo, + uint64 context, + uint amount + ) returns (uint maxAllowed); + function afterTransfer( + uint64 noteManager, + uint64 noteFrom, + uint64 noteTo, + uint64 context, + uint amount); }