RigoBlock / contracts

[DEPRECATED] directory of our contracts
Apache License 2.0
1 stars 0 forks source link

watch out authority requirements #11

Closed gabririgo closed 6 years ago

gabririgo commented 6 years ago

when factory is whitelisted a fund is created and registered, although we have to check what is going on, as there might be a further whitelister requirement which prevents from interacting with the funds/eventful contracts

modifier approved_drago_only(address _drago) { Authority auth = Authority(authority); if (auth.isWhitelistedDrago(_drago)) _; }

the modifier requires the drago to be whitelisted by a whitelister --> factory has to be whitelister in authority --> double check whether we can automatically set it, as otherwise there might be an error vector if whitelister is not initialized properly for new factories

gabririgo commented 6 years ago

in Authority the following amend has to be tested, but should work. When tested we can close this issue

function setAuthority(address _authority, bool _isWhitelisted) public only_owner {
accounts[_authority].account = _authority; accounts[_authority].authorized = _isWhitelisted; accounts[_authority].groups[_isWhitelisted].authority = _isWhitelisted; //TODO: test setting authority as whitelister as per following function: // setWhitelister(_authority, _isWhitelisted); types.list.push(List(_authority)); SetAuthority(_authority); }

gabririgo commented 6 years ago

done. not an approved authority is also a whitelister straight away. this means factories can register funds and just need 1 approval as authority