EatTheBlocks Forum

Misunderstanding in the day15-DAO lesson of the DAPP30 training


There is something I don’t understand in the day15-DAO lesson of the DAPP30 training.
It concerns the frontend part.

I don’t understand why we use the admin account (accounts[0]) in the updateShares and in the updateProposals functions.

From my point of view we should use the investors’ accounts (accounts[1], accounts[2] and accounts[3].

Here is the code:
async function updateShares() {

const shares = await contract.methods





async function updateProposals() {

const nextProposalId = parseInt(await contract.methods



const proposals = [];

for(let i = 0; i < nextProposalId; i++) { 

  const [proposal, hasVoted] = await Promise.all([


    contract.methods.votes(accounts[0], i).call()


  proposals.push({...proposal, hasVoted});




Thank you for your help.

Take care