I'm looking over the Bancor Smart Token code and noticed that when the SmartToken constructor is called in place of where modifiers usually go there is a declaration of the ERC20Token constructor function ERC20Token(_name, _symbol, _decimals)
I can't seem to find any documentation or posts about this, however I'm guessing this is how you would specify which constructors should be called from parent contracts that a child might inherit?
I was able to get the same effects by changing the smart token contract declaration from contract SmartToken is ISmartToken, Owned, ERC20Token, TokenHolder
to
contract SmartToken is ISmartToken, Owned, ERC20Token("some name", "some symbol", 18), TokenHolder
Smart Token Constructor Function:
function SmartToken(string _name, string _symbol, uint8 _decimals)
ERC20Token(_name, _symbol, _decimals)
{
NewSmartToken(address(this));
}
ERC20 Token Constructor Function:
function ERC20Token(string _name, string _symbol, uint8 _decimals) {
require(bytes(_name).length > 0 && bytes(_symbol).length > 0); // validate input
name = _name;
symbol = _symbol;
decimals = _decimals;
}