Build Your Own DAO - Helping Each Other

task("accounts", "Prints the list of the accounts", async(taskArgs, hre) => {

  const accounts = await hre.ethers.getSigners();

  for(const account of accounts){

    console.log(account.address);

  }

});

what does do this part of code in hardhat.config.js?
is it neccesary?
it is not given in

where can I get link to node endpoint address on ethereum mainnet if Moralis does not provide speedy node anymore?

You can use our node partner https://moralis.io/largenodes

which link should I use as endpoint node?
I will deploy my DAO to Ethereum Mainnet,
should I name it ETHEREUM_MAINNET?

I think you can use either of Consensus client HTTPS endpoint or Execution client HTTPS endpoint (Access and credentials). You can name the Chainstack node/project whatever you want.

in my deployDAO.js file I have 4 more variables and a console.log:

Where is that extra code from? Just remove it for now as you’re trying to get the default tutorial/project as it is working.

what does do this part of code in hardhat.config.js?

You can leave it. It prints the list of the accounts/addresses available.

getting error when run yarn test how can I fix this.

 at HTMLUnknownElement.callCallback (node_modules/react-dom/cjs/react-dom.development.js:3945:14)

FAIL src/App.test.js (10.576 s)
× renders learn react link (622 ms)

● renders learn react link

NoMoralisContextProviderError: Make sure to only call useMoralis within a  <MoralisProvider>

  3 |
  4 | test('renders learn react link', () => {
> 5 |   render(<App />);
    |   ^
  6 |   const linkElement = screen.getByText(/learn react/i);
  7 |   expect(linkElement).toBeInTheDocument();
  8 | });

Also, getting error on the web3uikit when run yarn install from the final project. need help on how to get pass this. Thanks!

For the ethereumjs-abi error, try a solution from this thread.

Don’t worry about the test for now, just get it working first.

Hello team,

This is my first DAO project. I have been following for tutorial and trying to build my own DAO. However, I am now at 30:49 of this tutorial and cannot move on to the next step. Whenever I run “npx hardhat clean”, it would show "Error HH8: There’s one or more errors in my config file:

*Invalid value undefined for hardhatConfig.networks.mumbai.url - Expected a value of type string.
*Invalid account: #0 for network: mumbai - Expected string, received undefined."

I am aware of the speedynote from Moralis is no longer available. Therefore, I am using Chainstack and copied an Access and credentials HTTPS endpoint and pasted on POLYGON_MUMBAI inside the .env file.

Look forward to your helps for this Error HH8

thank you

Looks like your .env file is outside the smartcontract folder. Try move it in rather

Hi Qudusayo,

Thank you so much for your help. I was able to move along and deployed my smart contract to Mumbai. Somehow, my smart contract is having problem with 4. voteOnProposal. I am not too sure what went wrong here.

is there anything I could do to make this smart contract works? or should I just start over again?

Thank you for taking your time to help me with this.

When you ran this function, it reverted due to this line.

The contract by default only allows voting within 100 blocks from when the proposal was created. So you need to create another proposal (createProposal function).

Thank you glad,

I was just wondering if there is a way to increase the default limit of 100 blocks?

I am now @59:25 of this tutorial and I am not too sure how to sync Moralis to my smartcontract.

  1. Which Topic should I select in the below screenshot to replace “proposalCreated(unit256, string, unit256, address);” in the video?

  1. There seems to have no where that I could input the “functions” to “Abi”

Thank you so for your helps

I was just wondering if there is a way to increase the default limit of 100 blocks?

Yes you will need to adjust and redeploy the contract. At this line you can change the number from 100.

I am now @59:25 of this tutorial and I am not too sure how to sync Moralis to my smartcontract.

You need to select “Custom Event” when you go to create a sync. From there, you copy in your contract’s ABI (the tutorial should cover where to get this) and then you will be able to select the proposalCreated event.

I can see the proposal status when running the app locally, however, when I deployed the build version to the web server, I don’t see the status. I can still click the staus. Not sure where to fix it.

however, when I deployed the build version to the web server, I don’t see the status.

How have you deployed it? If it is live, can you post the link. Make sure it works locally first (npm run build / yarn build and then serve the build folder from a local webserver).

I ran npm run build and drop the build folder to the webserver.

here is the link. https://taupe-meringue-6718c4.netlify.app/

I ran npm run build and drop the build folder to the webserver.

I mean a local webserver that you run locally from your build folder e.g. npx serve, not deployed (Netlify).

running npx serve -s build also gets the same issue with the status column not displaying. the hyperlink works when you click.