Custom structure support

Hello,
I am using the Defender Admin with a custom function defined below but I got the following message:

Unsupported function. Currently Defender only supports functions with address, uint, int, boolean, string, non-nested structs and non-nested array arguments.

here is the code:
function create(address _externalAccount, uint256 _supply, LibShare.share[] memory _shares, bytes calldata _data)
For your information, here is the structure:
mapping (uint256 => LibShare.Share[]) public shares;
library LibShare { struct share { address payable account; uint32 value; }}

Is that what you consider a nested structure? It's just an array of a custom structure? Is there a way for Defender to support such type of data? I read somewhere on the website that I should contact OZ' support for such issue.
Thanks in advance.

1 Like

Hi Toufik, thanks for reaching out! Indeed, there currently are some limitations to the kinds of function signatures, and the one you are sharing falls into that category. We can enhance that though, but it will take us at least a week or two to ship the enhancement given our current roadmap.

1 Like

Thanks @MartinVerzilli for this answer.
Is there anything I can do to help with this?

If your project allows you to share the code, drop me an email at mverzilli@openzeppelin.com with the sol file, it’s always nice to test with real world code. That’s all at the moment :).

2 Likes

@Toufik and anyone else who might be interested: we just released a new version of Defender that supports calling admin actions with arrays of structs.

1 Like