I would like to have a modifier that looks like this:
modifier restrictTargetType(uint contractType) {
if (contractTypes[target] != contractType) { throw; }
_
}
Where target
is an address passed as a function argument. Simply naming the function argument target
isn't sufficient, and gives me an Error: Undeclared identifier.