Use a tuple as a constructor parameter

Asked by Dipesh on Telegram

I have defined a struct in my contract. This struct needs to go into the constructor as one of the parameter, but for some reason, I am getting an error. Can anyone help please


pragma solidity ^0.6.0;

pragma experimental ABIEncoderV2;

contract MyContract {
    struct details {
        address targetAddress;
        uint256 qty;

    constructor(details[] memory bulkMints) public {



Error entering tuple interactively using the CLI

$ npx oz deploy
Nothing to compile, all contracts are up to date.
? Choose the kind of deployment regular
? Pick a network development
? Pick a contract to deploy MyContract
? bulkMints: tuple[]: [(0x90F8bf6A479f320ead074411a4B0e7944Ea8c9C1, 1)]
>> Enter a valid tuple[] such as: [(Hello world, 42), (Hello world, 42)]

There is an open Issue for this: