2017-09-13 12:41:08 +00:00
|
|
|
|
|
|
|
//File: ./contracts/ILiquidPledgingPlugin.sol
|
|
|
|
pragma solidity ^0.4.11;
|
|
|
|
|
|
|
|
contract ILiquidPledgingPlugin {
|
2017-10-03 11:37:45 +00:00
|
|
|
/// @notice Plugins are used (much like web hooks) to initiate an action
|
2017-10-03 10:08:47 +00:00
|
|
|
/// upon any donation, delegation, or transfer; this is an optional feature
|
|
|
|
/// and allows for extreme customization of the contract
|
2017-10-03 11:37:45 +00:00
|
|
|
/// @param context The situation that is triggering the plugin:
|
|
|
|
/// 0 -> Plugin for the owner transferring pledge to another party
|
2017-10-03 10:08:47 +00:00
|
|
|
/// 1 -> Plugin for the first delegate transferring pledge to another party
|
|
|
|
/// 2 -> Plugin for the second delegate transferring pledge to another party
|
2017-09-13 12:41:08 +00:00
|
|
|
/// ...
|
2017-10-04 23:27:23 +00:00
|
|
|
/// 255 -> Plugin for the intendedProject transferring pledge to another party
|
2017-09-13 12:41:08 +00:00
|
|
|
///
|
2017-10-03 10:08:47 +00:00
|
|
|
/// 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
|
2017-09-13 12:41:08 +00:00
|
|
|
/// ...
|
2017-10-04 23:27:23 +00:00
|
|
|
/// 511 -> Plugin for the intendedProject receiving pledge to another party
|
2017-10-03 10:08:47 +00:00
|
|
|
function beforeTransfer(
|
2017-10-04 10:55:46 +00:00
|
|
|
uint64 pledgeManager,
|
|
|
|
uint64 pledgeFrom,
|
|
|
|
uint64 pledgeTo,
|
2017-10-03 10:08:47 +00:00
|
|
|
uint64 context,
|
|
|
|
uint amount
|
|
|
|
) returns (uint maxAllowed);
|
|
|
|
function afterTransfer(
|
2017-10-04 10:55:46 +00:00
|
|
|
uint64 pledgeManager,
|
|
|
|
uint64 pledgeFrom,
|
|
|
|
uint64 pledgeTo,
|
2017-10-03 10:08:47 +00:00
|
|
|
uint64 context,
|
|
|
|
uint amount);
|
2017-09-13 12:41:08 +00:00
|
|
|
}
|