blockchainsoliditysmartcontractsremixcontract

Error encoding arguments: Error: invalid BigNumber string (argument="value", value="", code=INVALID_ARGUMENT, version=bignumber/5.5.0)


Getting this error! creation of local errored:strong text

// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.5;
contract local{

   uint256 count;
   function getter() public view returns(uint256) {
       return count ;
   }

   constructor (uint256 change){
       count  = change;
  }
}

Solution

  • You need to pass a non-empty unsigned integer value to the constructor since you have declared a variable of this type in the constructor.

    In Remix IDE, you can do that under the Deploy & run transactions tab, next to the orange Deploy button. In my example, I passed the value 123.

    screenshot