Skip to content

Commit

Permalink
ServiceRegistry() takes a token what token
Browse files Browse the repository at this point in the history
a token for registration fees.

This closes #735
  • Loading branch information
pirapira authored and LefterisJP committed Mar 13, 2019
1 parent fce62c3 commit 2f2a8b2
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 20 deletions.
9 changes: 5 additions & 4 deletions raiden_contracts/contracts/services/ServiceRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ contract ServiceRegistry is Utils {
mapping(address => string) public urls; // URLs of services for HTTP access
address[] public service_addresses; // list of available services (ethereum addresses)

constructor(address _token_address) public {
require(_token_address != address(0x0));
require(contractExists(_token_address));
// @param _token_for_registration The address of the ERC20 token contract that services use for registration fees
constructor(address _token_for_registration) public {
require(_token_for_registration != address(0x0));
require(contractExists(_token_for_registration));

token = Token(_token_address);
token = Token(_token_for_registration);
// Check if the contract is indeed a token contract
require(token.totalSupply() > 0);
}
Expand Down
Loading

0 comments on commit 2f2a8b2

Please sign in to comment.