I'm getting this error:
Error: invalid type (arg="type", value="function")
when trying to call this method on the contract IntOption
:
function create(
address target,
string memory name,
int initialValue,
function (address, string memory, int) external view validate
) public {
from my unit test. I'm trying to pass this function defined in Config4AccessControl
as argument for validate
:
function anyValue(address, string memory, int value) public pure {
// any value is ok
}
This is the unit test:
it("should not be defined after it's created", async () => {
const intOptions = await IntOption.new();
const ac = await Config4AccessControl.new();
await intOptions.create(addr1, 'foo', 1, ac.anyValue.address);