What must I use instead of the speedy nodes for the moralis DAO?

Now i get this issue…At least its it the right directory now i think

Have you installed that package?

npm install -D @nomiclabs/hardhat-waffle

There should have been instructions when you set up the hardhat project for which additional packages you needed to install if you don’t have it.

Did that just as you posted thanks man…Really appreciate it

And onto the next error😂

Error HH100: Network mumbai doesn’t exist

Check your hardhat.config.js if you’re trying to deploy a network named mumbai; does this network exist?

It should look something like:

module.exports = {
  networks: {
    mumbai: {
      url: urlhere,
      accounts: privatekeyhere,
    }, 
  },
  solidity: '0.8.4',
};

Right next error…Idk at this point

I installed the solidity extension but had to downgrade the version becuase of problems it was casuing…now its at v0.0.135…harhat only supports 0.4.11 and above but now it gives me these errors…

Hello?..Sorry Under pressure here

Reloaded the extension and get this now…Instead of successful deployment

It says it compiles succesfully

Gald mate…I really need your help here ASAP

Glad*Sorry typo…

Make sure that you have that “Lock” contract (same name) that you’re using in your deployDAO script. If you do, try recompiling your contract, it says it can’t find the artifact files for it.

Okay thanks i did that and get this

Okay so replaced this :


With this…
Screenshot 2022-08-17 at 23.40.47

and get this :

That error means you’re trying to use the Dao variable before you’ve declared/created it (with const Dao). Check your deploy script.

Put it there before now same error
Screenshot 2022-08-18 at 00.24.14

You’re trying to use Dao.deploy(), this should be named something else since you’re trying to declare another variable of the same name with const Dao. Can you post your deploy script?

Sure

// We require the Hardhat Runtime Environment explicitly here. This is optional
// but useful for running the script in a standalone fashion through node <script>.
//
// You can also run a script with npx hardhat run <script>. If you do that, Hardhat
// will compile your contracts, add the Hardhat Runtime Environment’s members to the
// global scope, and execute the script.
const hre = require(“hardhat”);

async function main() {
const currentTimestampInSeconds = Math.round(Date.now() / 1000);
const ONE_YEAR_IN_SECS = 365 * 24 * 60 * 60;
const unlockTime = currentTimestampInSeconds + ONE_YEAR_IN_SECS;

const lockedAmount = hre.ethers.utils.parseEther(“1”);
const Dao = await Dao.deploy();
hre.ethers.getContractFactory(“Dao”);

await lock.deployed();

console.log(
Lock with 1 ETH and unlock timestamp ${unlockTime} deployed to ${lock.address}
);
}

// We recommend this pattern to be able to use async/await everywhere
// and properly handle errors.
main().catch((error) => {
console.error(error);
process.exitCode = 1;
});

You can read this on how to post code.

There is no Dao defined anywhere when you try to use Dao.deploy(). Did you follow a guide or tutorial for this particular script?

You can look at this guide for how to set up contract instances in your scripts.

So something like:

const Dao = await hre.ethers.getContractFactory("Dao");
const dao = await Dao.deploy();