move storage to concrete

This commit is contained in:
Ricardo Guilherme Schmidt 2018-05-22 13:01:24 -03:00
parent aa93e03035
commit b4e83ec6f1
2 changed files with 12 additions and 11 deletions

View File

@ -10,10 +10,22 @@ import "./DelegationProxyInterface.sol";
* @dev Creates a delegation proxy layer for MiniMeTokenInterface.
*/
contract DelegationProxy is DelegationProxyInterface {
//default delegation proxy, being used when user didn't set any delegation at this level.
address public parentProxy;
//snapshots of changes, allow delegation changes be done at any time without compromising vote results.
mapping (address => Delegation[]) public delegations;
//storage of indexes of the addresses to `delegations[to].from`
mapping (address => uint256) toIndexes;
struct Delegation {
uint128 fromBlock; //when this was updated
address to; //who recieved this delegaton
address[] from; //list of addresses that delegated to this address
}
/**
* @notice Calls Constructor
*/

View File

@ -5,17 +5,6 @@ import "../token/MiniMeTokenInterface.sol";
contract DelegationProxyInterface {
struct Delegation {
uint128 fromBlock; //when this was updated
address to; //who recieved this delegaton
address[] from; //list of addresses that delegated to this address
}
//default delegation proxy, being used when user didn't set any delegation at this level.
address public parentProxy;
//snapshots of changes, allow delegation changes be done at any time without compromising vote results.
mapping (address => Delegation[]) public delegations;
event Delegate(address who, address to);
/**