{"action":"created","issue":{"url":"https://api.github.com/repos/zeppelinos/labs/issues/130","repository_url":"https://api.github.com/repos/zeppelinos/labs","labels_url":"https://api.github.com/repos/zeppelinos/labs/issues/130/labels{/name}","comments_url":"https://api.github.com/repos/zeppelinos/labs/issues/130/comments","events_url":"https://api.github.com/repos/zeppelinos/labs/issues/130/events","html_url":"https://github.com/zeppelinos/labs/issues/130","id":354545863,"node_id":"MDU6SXNzdWUzNTQ1NDU4NjM=","number":130,"title":"Unstructure storage code doesn't work for onlyOwner methods.","user":{"login":"ProphetDaniel","id":5958020,"node_id":"MDQ6VXNlcjU5NTgwMjA=","avatar_url":"https://avatars2.githubusercontent.com/u/5958020?v=4","gravatar_id":"","url":"https://api.github.com/users/ProphetDaniel","html_url":"https://github.com/ProphetDaniel","followers_url":"https://api.github.com/users/ProphetDaniel/followers","following_url":"https://api.github.com/users/ProphetDaniel/following{/other_user}","gists_url":"https://api.github.com/users/ProphetDaniel/gists{/gist_id}","starred_url":"https://api.github.com/users/ProphetDaniel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ProphetDaniel/subscriptions","organizations_url":"https://api.github.com/users/ProphetDaniel/orgs","repos_url":"https://api.github.com/users/ProphetDaniel/repos","events_url":"https://api.github.com/users/ProphetDaniel/events{/privacy}","received_events_url":"https://api.github.com/users/ProphetDaniel/received_events","type":"User","site_admin":false},"labels":[{"id":1037983295,"node_id":"MDU6TGFiZWwxMDM3OTgzMjk1","url":"https://api.github.com/repos/zeppelinos/labs/labels/status:more-info","name":"status:more-info","color":"eda1aa","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-28T02:25:46Z","updated_at":"2018-08-30T22:57:42Z","closed_at":null,"author_association":"NONE","body":"If you try to call a method from the proxy with unstructured upgradeability pattern as follows:\r\n\r\n```javascript\r\n    await aContractInstanceByProxy.anOnlyOnwerMethod(anAddress, {\r\n      from: owner\r\n    });\r\n```\r\n\r\nIt gives you an error:\r\n```\r\nError encountered, bailing. Network state unknown. Review successful transactions manually.\r\nError: VM Exception while processing transaction: revert\r\n    at Object.InvalidResponse (C:\\Users\\Daniel\\AppData\\Roaming\\npm\\node_modules\\truffle\\build\\webpack:\\~\\web3\\lib\\web3\\errors.j\r\ns:38:1)\r\n    at C:\\Users\\Daniel\\AppData\\Roaming\\npm\\node_modules\\truffle\\build\\webpack:\\~\\web3\\lib\\web3\\requestmanager.js:86:1\r\n    at C:\\Users\\Daniel\\AppData\\Roaming\\npm\\node_modules\\truffle\\build\\webpack:\\packages\\truffle-migrate\\index.js:225:1\r\n    at C:\\Users\\Daniel\\AppData\\Roaming\\npm\\node_modules\\truffle\\build\\webpack:\\packages\\truffle-provider\\wrapper.js:134:1\r\n    at XMLHttpRequest.request.onreadystatechange (C:\\Users\\Daniel\\AppData\\Roaming\\npm\\node_modules\\truffle\\build\\webpack:\\~\\web\r\n3\\lib\\web3\\httpprovider.js:128:1)\r\n    at XMLHttpRequestEventTarget.dispatchEvent (C:\\Users\\Daniel\\AppData\\Roaming\\npm\\node_modules\\truffle\\build\\webpack:\\~\\xhr2\\\r\nlib\\xhr2.js:64:1)\r\n    at XMLHttpRequest._setReadyState (C:\\Users\\Daniel\\AppData\\Roaming\\npm\\node_modules\\truffle\\build\\webpack:\\~\\xhr2\\lib\\xhr2.j\r\ns:354:1)\r\n    at XMLHttpRequest._onHttpResponseEnd (C:\\Users\\Daniel\\AppData\\Roaming\\npm\\node_modules\\truffle\\build\\webpack:\\~\\xhr2\\lib\\xh\r\nr2.js:509:1)\r\n    at IncomingMessage.<anonymous> (C:\\Users\\Daniel\\AppData\\Roaming\\npm\\node_modules\\truffle\\build\\webpack:\\~\\xhr2\\lib\\xhr2.js:\r\n469:1)\r\n    at emitNone (events.js:111:20)\r\n    at IncomingMessage.emit (events.js:208:7)\r\n    at endReadableNT (_stream_readable.js:1064:12)\r\n    at _combinedTickCallback (internal/process/next_tick.js:138:11)\r\n    at process._tickDomainCallback (internal/process/next_tick.js:218:9)\r\n\r\n```\r\n\r\nBut if you call directly without the proxy it works:\r\n```javascript\r\n    await aContractInstance.anOnlyOnwerMethod(anAddress, {\r\n      from: owner\r\n    });\r\n```\r\n\r\nOr if you edit the contract and remove onlyOwner from the metod then still call by proxy it also works.\r\n"},"comment":{"url":"https://api.github.com/repos/zeppelinos/labs/issues/comments/417493987","html_url":"https://github.com/zeppelinos/labs/issues/130#issuecomment-417493987","issue_url":"https://api.github.com/repos/zeppelinos/labs/issues/130","id":417493987,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzQ5Mzk4Nw==","user":{"login":"spalladino","id":429604,"node_id":"MDQ6VXNlcjQyOTYwNA==","avatar_url":"https://avatars2.githubusercontent.com/u/429604?v=4","gravatar_id":"","url":"https://api.github.com/users/spalladino","html_url":"https://github.com/spalladino","followers_url":"https://api.github.com/users/spalladino/followers","following_url":"https://api.github.com/users/spalladino/following{/other_user}","gists_url":"https://api.github.com/users/spalladino/gists{/gist_id}","starred_url":"https://api.github.com/users/spalladino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spalladino/subscriptions","organizations_url":"https://api.github.com/users/spalladino/orgs","repos_url":"https://api.github.com/users/spalladino/repos","events_url":"https://api.github.com/users/spalladino/events{/privacy}","received_events_url":"https://api.github.com/users/spalladino/received_events","type":"User","site_admin":false},"created_at":"2018-08-30T22:57:42Z","updated_at":"2018-08-30T22:57:42Z","author_association":"MEMBER","body":"Also, and if you don't mind me asking: why are you using the Proxy contracts directly, instead of via the [ZeppelinOS CLI](https://docs.zeppelinos.org/docs/setup.html)? Do you have any particular use case that doesn't fit?"}}
{"actor":{"display_login":"spalladino"}}