move storage to concrete
This commit is contained in:
parent
aa93e03035
commit
b4e83ec6f1
|
@ -11,9 +11,21 @@ import "./DelegationProxyInterface.sol";
|
|||
*/
|
||||
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
|
||||
*/
|
||||
|
|
|
@ -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);
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue