{"action":"opened","issue":{"url":"https://api.github.com/repos/uzyn/ethereum-webpack-example-dapp/issues/10","repository_url":"https://api.github.com/repos/uzyn/ethereum-webpack-example-dapp","labels_url":"https://api.github.com/repos/uzyn/ethereum-webpack-example-dapp/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/uzyn/ethereum-webpack-example-dapp/issues/10/comments","events_url":"https://api.github.com/repos/uzyn/ethereum-webpack-example-dapp/issues/10/events","html_url":"https://github.com/uzyn/ethereum-webpack-example-dapp/issues/10","id":236042131,"number":10,"title":"Cannot read property 'name' of undefined","user":{"login":"IAMtheIAM","id":13709948,"avatar_url":"https://avatars3.githubusercontent.com/u/13709948?v=3","gravatar_id":"","url":"https://api.github.com/users/IAMtheIAM","html_url":"https://github.com/IAMtheIAM","followers_url":"https://api.github.com/users/IAMtheIAM/followers","following_url":"https://api.github.com/users/IAMtheIAM/following{/other_user}","gists_url":"https://api.github.com/users/IAMtheIAM/gists{/gist_id}","starred_url":"https://api.github.com/users/IAMtheIAM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IAMtheIAM/subscriptions","organizations_url":"https://api.github.com/users/IAMtheIAM/orgs","repos_url":"https://api.github.com/users/IAMtheIAM/repos","events_url":"https://api.github.com/users/IAMtheIAM/events{/privacy}","received_events_url":"https://api.github.com/users/IAMtheIAM/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-06-15T00:00:56Z","updated_at":"2017-06-15T00:00:56Z","closed_at":null,"body":"\r\n```\r\nmain.js:110 Uncaught TypeError: Cannot read property 'name' of undefined\r\n    at renderTokenDetails (main.js:110)\r\n    at window.onload (main.js:68)\r\n```\r\n\r\n```\r\n\tfunction renderTokenDetails() {\r\n\t  document.getElementById('token-name').innerHTML = _MyToken.MyToken.name();\r\n\t  document.getElementById('token-symbol').innerHTML = _MyToken.MyToken.symbol();\r\n\t  document.getElementById('total-supply').innerHTML = _MyToken.MyToken.totalSupply();\r\n\t  document.getElementById('version').innerHTML = _MyToken.MyToken.version();\r\n\t}\r\n```\r\n\r\n`_MyToken.` gets compiled by webpack with a model containing this as properties:\r\n```\r\nMyToken.sol:MyToken:Contract\r\nMyToken.sol:tokenRecipient:Contract\r\nweb3:Web3\r\n__proto__:Object\r\n```\r\nSo it can't find the member `MyToken` since it doesn't exist. Can you test your app. '\r\n\r\nAlso it was necessary to put `pragma solidity ^0.4.4;` at the top of `MyToken.sol` to get it to compile."}}
{"actor":{"display_login":"IAMtheIAM"}}