0

Everything is working fine if we remove the array of addresses which is the last parameter in my function call. I have 14 parameters in my contract and if I am passing 14 parameters, Then also it gives me an error of missing argument required 15 arguments.

I am using hardhat for testing my contracts.

enter image description here

My contract:-

 function initializeERC20(
        string calldata _name,
        string calldata _symbol,
        uint256 _totalDeposit,
        uint256 _minDeposit,
        uint256 _maxDeposit,
        uint256 _ownerFee,
        uint256 _days,
        bool _feeUSDC,
        uint256 _quorum,
        uint256 _threshold,
        address _gnosisAddress,
        address _USDC,
        address _emitter,
        address[] memory _daoAdmins
    ) public initializer {}

Hardhat deploy script:-

   var adminArr = [owner.address]
   const implementationContract = await implementation.deploy();
    await implementationContract.deployed();
    await implementationContract.initializeERC20(
      "Testing",
      "TEST",
      1000000000,
      10000000,
      100000000,
      10,
      10,
      true,
      50,
      50,
      gnosisSafe.address,
      usdcContract.address,
      emitterContract.address,
      adminArr,
    );

This is an openzeppline inicilizible contract so while deploying the contract we don't pass any parameter.

1
  • 1
    Are you able to compile this contract? It is giving me stack too deep error since you are taking in too many inputs. Nov 23 at 6:36

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy