Last active
July 17, 2018 15:11
-
-
Save AnthonyAkentiev/43b662dccc9f17e1ca1736c96e5af98d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract ILiquidVoting { | |
// возвращает только делегированную силу | |
function getDelegatedPowerOf(address _of) public view returns(uint); | |
// получить кол-во делегируемых МНОЮ силы адресу _to | |
function getDelegatedPowerByMe(address _to) public view returns(uint); | |
// делегировать токены | |
function delegateTo(address _to, uint _tokenAmount) public; | |
function removeDelegation(address _to) public; | |
} | |
// Поведение (должны быть тесты на каждое условие): | |
// 1 - Нельзя переделигировать другому | |
// 2 - Если в системе 1000 токенов, то суммарная getPowerOf() должна быть == 1000 всегда | |
// 3 - Если один раз вызывали delegateTo(X, 10) а затем delegateTo(X, 20) то getDelegatedByMeTo(X) должно вернуть 20 | |
// 4 - Я всегда (без ограничений по времени) могу отменить делегирование (без ограничений с другой стороны) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment