sanity check on constructor arguments

This commit is contained in:
Ricardo Guilherme Schmidt 2018-09-13 11:08:20 -03:00
parent 25c92d5228
commit a37440c75e
No known key found for this signature in database
GPG Key ID: 3F95A3AD0B607030
1 changed files with 4 additions and 0 deletions

View File

@ -72,6 +72,10 @@ contract UsernameRegistrar is Controlled, ApproveAndCallFallBack {
)
public
{
require(address(_token) != address(0), "No ERC20Token address defined.");
require(address(_ensRegistry) != address(0), "No ENS address defined.");
require(address(_resolver) != address(0), "No Resolver address defined.");
require(_ensNode != bytes32(0), "No ENS node defined.");
token = _token;
ensRegistry = _ensRegistry;
resolver = _resolver;