# Custom structure support

**URL:** <https://forum.openzeppelin.com/t/custom-structure-support/9264>\
**Category:** Defender\
**Tags:** erc1155\
**Created:** [May 26, 2021, 7:45pm UTC](https://forum.openzeppelin.com/t/custom-structure-support/9264 "2021-05-26T19:45:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Toufik](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/toufik/32/6124_2.png) [@Toufik](https://forum.openzeppelin.com/u/Toufik)\
**Post date:** [May 26, 2021, 7:45pm UTC](https://forum.openzeppelin.com/t/custom-structure-support/9264/1 "2021-05-26T19:45:37Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![MartinVerzilli](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/martinverzilli/32/1912_2.png) [@MartinVerzilli](https://forum.openzeppelin.com/u/MartinVerzilli)\
**Post date:** [May 27, 2021, 9:29am UTC](https://forum.openzeppelin.com/t/custom-structure-support/9264/2 "2021-05-27T09:29:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Toufik](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/toufik/32/6124_2.png) [@Toufik](https://forum.openzeppelin.com/u/Toufik)\
**Post date:** [May 27, 2021, 12:35pm UTC](https://forum.openzeppelin.com/t/custom-structure-support/9264/3 "2021-05-27T12:35:25Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MartinVerzilli](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/martinverzilli/32/1912_2.png) [@MartinVerzilli](https://forum.openzeppelin.com/u/MartinVerzilli)\
**Post date:** [May 27, 2021, 1:03pm UTC](https://forum.openzeppelin.com/t/custom-structure-support/9264/4 "2021-05-27T13:03:29Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![MartinVerzilli](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/martinverzilli/32/1912_2.png) [@MartinVerzilli](https://forum.openzeppelin.com/u/MartinVerzilli)\
**Post date:** [June 14, 2021, 8:26am UTC](https://forum.openzeppelin.com/t/custom-structure-support/9264/5 "2021-06-14T08:26:13Z")

</div>

@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.
