{"action":"created","issue":{"url":"https://api.github.com/repos/eris-ltd/eris-contracts.js/issues/17","repository_url":"https://api.github.com/repos/eris-ltd/eris-contracts.js","labels_url":"https://api.github.com/repos/eris-ltd/eris-contracts.js/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/eris-ltd/eris-contracts.js/issues/17/comments","events_url":"https://api.github.com/repos/eris-ltd/eris-contracts.js/issues/17/events","html_url":"https://github.com/eris-ltd/eris-contracts.js/issues/17","id":135758591,"number":17,"title":"contracts returning strings don't work because utils.js toUtf8 is broken","user":{"login":"rlaveycal","id":6595659,"avatar_url":"https://avatars.githubusercontent.com/u/6595659?v=3","gravatar_id":"","url":"https://api.github.com/users/rlaveycal","html_url":"https://github.com/rlaveycal","followers_url":"https://api.github.com/users/rlaveycal/followers","following_url":"https://api.github.com/users/rlaveycal/following{/other_user}","gists_url":"https://api.github.com/users/rlaveycal/gists{/gist_id}","starred_url":"https://api.github.com/users/rlaveycal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rlaveycal/subscriptions","organizations_url":"https://api.github.com/users/rlaveycal/orgs","repos_url":"https://api.github.com/users/rlaveycal/repos","events_url":"https://api.github.com/users/rlaveycal/events{/privacy}","received_events_url":"https://api.github.com/users/rlaveycal/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"ebuchman","id":2300911,"avatar_url":"https://avatars.githubusercontent.com/u/2300911?v=3","gravatar_id":"","url":"https://api.github.com/users/ebuchman","html_url":"https://github.com/ebuchman","followers_url":"https://api.github.com/users/ebuchman/followers","following_url":"https://api.github.com/users/ebuchman/following{/other_user}","gists_url":"https://api.github.com/users/ebuchman/gists{/gist_id}","starred_url":"https://api.github.com/users/ebuchman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ebuchman/subscriptions","organizations_url":"https://api.github.com/users/ebuchman/orgs","repos_url":"https://api.github.com/users/ebuchman/repos","events_url":"https://api.github.com/users/ebuchman/events{/privacy}","received_events_url":"https://api.github.com/users/ebuchman/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2016-02-23T14:56:28Z","updated_at":"2016-03-07T03:38:38Z","closed_at":null,"body":"The utility function to decode a string returned by a contract is broken causing the value to always be undefined.\r\n\r\nthe method\r\n\r\n```\r\nvar toUtf8 = function(hex) {\r\n// Find termination\r\n    var str = \"\";\r\n    var i = 0, l = hex.length;\r\n    if (hex.substring(0, 2) === '0x') {\r\n        i = 2;\r\n    }\r\n    for (; i < l; i+=2) {\r\n        var code = parseInt(hex.substr(i, 2), 16);\r\n        str += String.fromCharCode(code);\r\n    }\r\n    // TODO find out why this is weird.\r\n    return hexToAscii(str);\r\n};\r\n```\r\n\r\nshould be\r\n\r\n```\r\nvar toUtf8 = function(hex) {\r\n    // TODO find out why this is weird.\r\n    return hexToAscii(hex);\r\n};\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/eris-ltd/eris-contracts.js/issues/comments/193076426","html_url":"https://github.com/eris-ltd/eris-contracts.js/issues/17#issuecomment-193076426","issue_url":"https://api.github.com/repos/eris-ltd/eris-contracts.js/issues/17","id":193076426,"user":{"login":"NodeGuy","id":2148537,"avatar_url":"https://avatars.githubusercontent.com/u/2148537?v=3","gravatar_id":"","url":"https://api.github.com/users/NodeGuy","html_url":"https://github.com/NodeGuy","followers_url":"https://api.github.com/users/NodeGuy/followers","following_url":"https://api.github.com/users/NodeGuy/following{/other_user}","gists_url":"https://api.github.com/users/NodeGuy/gists{/gist_id}","starred_url":"https://api.github.com/users/NodeGuy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NodeGuy/subscriptions","organizations_url":"https://api.github.com/users/NodeGuy/orgs","repos_url":"https://api.github.com/users/NodeGuy/repos","events_url":"https://api.github.com/users/NodeGuy/events{/privacy}","received_events_url":"https://api.github.com/users/NodeGuy/received_events","type":"User","site_admin":false},"created_at":"2016-03-07T03:38:38Z","updated_at":"2016-03-07T03:38:38Z","body":"Richard believes this is a bug in upstream and will file an issue there."}}