Truffle migration ERC721 hit a require or revert statement somewhere in its constructor

Pretty new to solidity. I created a contract HydroBloxAuthority where in the constructor 2 new contracts get created :

 HydroBloxConsumptionMeter public consumptionMeter;
    HydroBloxProductionMeter public productionMeter;

    constructor() {
        consumptionMeter = new HydroBloxConsumptionMeter();
        productionMeter = new HydroBloxProductionMeter();
    }

In both of these contracts constructor the ERC721 constructor gets called like so:

constructor() ERC721("HydroBloxProductionMeter", "HBPM") {}
constructor() ERC721("HydroBloxConsumptionMeter", "HBCM") {}

When running the migration script


const HydroBloxAuth = artifacts.require("HydroBloxAuthority");



module.exports = async function (deployer) {

  let hbAuthority = await deployer.deploy(HydroBloxAuth);
  


};

and deploying HydroBloxAuthority with truffle I get the error :
"HydroBloxAuthority" hit a require or revert statement somewhere in its constructor.

Any help ?

Thanks in advance.

1 Like