{"action":"created","issue":{"url":"https://api.github.com/repos/daostack/arc.js/issues/113","repository_url":"https://api.github.com/repos/daostack/arc.js","labels_url":"https://api.github.com/repos/daostack/arc.js/issues/113/labels{/name}","comments_url":"https://api.github.com/repos/daostack/arc.js/issues/113/comments","events_url":"https://api.github.com/repos/daostack/arc.js/issues/113/events","html_url":"https://github.com/daostack/arc.js/issues/113","id":301618394,"number":113,"title":"Add function to return all \"members\" of a DAO","user":{"login":"tibetsprague","id":3741,"avatar_url":"https://avatars2.githubusercontent.com/u/3741?v=4","gravatar_id":"","url":"https://api.github.com/users/tibetsprague","html_url":"https://github.com/tibetsprague","followers_url":"https://api.github.com/users/tibetsprague/followers","following_url":"https://api.github.com/users/tibetsprague/following{/other_user}","gists_url":"https://api.github.com/users/tibetsprague/gists{/gist_id}","starred_url":"https://api.github.com/users/tibetsprague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tibetsprague/subscriptions","organizations_url":"https://api.github.com/users/tibetsprague/orgs","repos_url":"https://api.github.com/users/tibetsprague/repos","events_url":"https://api.github.com/users/tibetsprague/events{/privacy}","received_events_url":"https://api.github.com/users/tibetsprague/received_events","type":"User","site_admin":false},"labels":[{"id":854076193,"url":"https://api.github.com/repos/daostack/arc.js/labels/wrapperEnhancement","name":"wrapperEnhancement","color":"c9acef","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-03-02T01:11:40Z","updated_at":"2018-03-03T13:55:38Z","closed_at":null,"author_association":"COLLABORATOR","body":"For now this can be all addresses that have some reputation in the DAO, e.g. in Alchemy I do\r\n```    \r\n  const mintReputationEvents = dao.reputation.Mint({}, { fromBlock: 0 });\r\n    let memberAddresses : string[] = [];\r\n\r\n    const getMintReputationEvents = promisify(mintReputationEvents.get.bind(mintReputationEvents));\r\n    eventsArray = await getMintReputationEvents();\r\n    for (let cnt = 0; cnt < eventsArray.length; cnt++) {\r\n      memberAddresses.push(eventsArray[cnt].args.to);\r\n    }\r\n\r\n    memberAddresses = [...new Set(memberAddresses)]; // Dedupe\r\n\r\n    let members : { [ key : string ] : IMemberState } = {};\r\n    for (let cnt = 0; cnt < memberAddresses.length; cnt++) {\r\n      const address = memberAddresses[cnt];\r\n      let member = { address: address, tokens: 0, reputation: 0 };\r\n      const tokens = await dao.token.balanceOf.call(address)\r\n      member.tokens = Number(web3.fromWei(tokens, \"ether\"));\r\n      const reputation = await dao.reputation.reputationOf.call(address);\r\n      member.reputation = Number(web3.fromWei(reputation, \"ether\"));\r\n      members[address] = member;\r\n    }\r\n    daoData.members = members;\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/daostack/arc.js/issues/comments/370149199","html_url":"https://github.com/daostack/arc.js/issues/113#issuecomment-370149199","issue_url":"https://api.github.com/repos/daostack/arc.js/issues/113","id":370149199,"user":{"login":"dkent600","id":1821666,"avatar_url":"https://avatars0.githubusercontent.com/u/1821666?v=4","gravatar_id":"","url":"https://api.github.com/users/dkent600","html_url":"https://github.com/dkent600","followers_url":"https://api.github.com/users/dkent600/followers","following_url":"https://api.github.com/users/dkent600/following{/other_user}","gists_url":"https://api.github.com/users/dkent600/gists{/gist_id}","starred_url":"https://api.github.com/users/dkent600/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dkent600/subscriptions","organizations_url":"https://api.github.com/users/dkent600/orgs","repos_url":"https://api.github.com/users/dkent600/repos","events_url":"https://api.github.com/users/dkent600/events{/privacy}","received_events_url":"https://api.github.com/users/dkent600/received_events","type":"User","site_admin":false},"created_at":"2018-03-03T13:55:38Z","updated_at":"2018-03-03T13:55:38Z","author_association":"COLLABORATOR","body":"Slack:  https://daostack.slack.com/archives/C8JHP03K8/p1520085300000036"}}
{"actor":{"display_login":"dkent600"}}