{"action":"created","issue":{"url":"https://api.github.com/repos/OriginProtocol/platform/issues/94","repository_url":"https://api.github.com/repos/OriginProtocol/platform","labels_url":"https://api.github.com/repos/OriginProtocol/platform/issues/94/labels{/name}","comments_url":"https://api.github.com/repos/OriginProtocol/platform/issues/94/comments","events_url":"https://api.github.com/repos/OriginProtocol/platform/issues/94/events","html_url":"https://github.com/OriginProtocol/platform/issues/94","id":313890180,"number":94,"title":"Remove Truffle","user":{"login":"wanderingstan","id":673455,"avatar_url":"https://avatars2.githubusercontent.com/u/673455?v=4","gravatar_id":"","url":"https://api.github.com/users/wanderingstan","html_url":"https://github.com/wanderingstan","followers_url":"https://api.github.com/users/wanderingstan/followers","following_url":"https://api.github.com/users/wanderingstan/following{/other_user}","gists_url":"https://api.github.com/users/wanderingstan/gists{/gist_id}","starred_url":"https://api.github.com/users/wanderingstan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wanderingstan/subscriptions","organizations_url":"https://api.github.com/users/wanderingstan/orgs","repos_url":"https://api.github.com/users/wanderingstan/repos","events_url":"https://api.github.com/users/wanderingstan/events{/privacy}","received_events_url":"https://api.github.com/users/wanderingstan/received_events","type":"User","site_admin":false},"labels":[{"id":844743497,"url":"https://api.github.com/repos/OriginProtocol/platform/labels/smart%20contracts","name":"smart contracts","color":"6ebbc9","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-12T21:15:02Z","updated_at":"2018-04-12T22:16:00Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"There have been several suggestions about removing [Truffle](http://truffleframework.com/) from our workflow, notably from @nick . Most recently in [demo-dapp issue 105](https://github.com/OriginProtocol/demo-dapp/issues/105#issuecomment-380913119). As a team we've been burned a few times by people having different versions of truffle. \r\n\r\nFeatures around compiling and deploying can be done with `solc`, and `ganache-cli` is a better test chain than `truffle develop`\r\n\r\n@jsulinski added list of cons:\r\n\r\n* Issues with builds require deleting the ./builds directory [1] [2]\r\n* lacks full support for events involving more than one contract [3]\r\n* sometimes uses trailing versions of web3.js [4]\r\n* doesn't support getting a transaction hash before mining, which web3.js does support [5] [6]\r\n\r\n[1] https://github.com/trufflesuite/truffle/issues/596\r\n[2] https://github.com/trufflesuite/truffle/issues/693\r\n[3] https://github.com/trufflesuite/truffle/issues/555\r\n[4] https://github.com/trufflesuite/truffle-contract/pull/95/commits\r\n[5] https://github.com/trufflesuite/truffle-contract/issues/100\r\n[6] https://github.com/trufflesuite/truffle-contract/issues/42\r\n\r\n@joshfraser This is a big one and your input would be valuable here. "},"comment":{"url":"https://api.github.com/repos/OriginProtocol/platform/issues/comments/380960956","html_url":"https://github.com/OriginProtocol/platform/issues/94#issuecomment-380960956","issue_url":"https://api.github.com/repos/OriginProtocol/platform/issues/94","id":380960956,"user":{"login":"nick","id":939,"avatar_url":"https://avatars0.githubusercontent.com/u/939?v=4","gravatar_id":"","url":"https://api.github.com/users/nick","html_url":"https://github.com/nick","followers_url":"https://api.github.com/users/nick/followers","following_url":"https://api.github.com/users/nick/following{/other_user}","gists_url":"https://api.github.com/users/nick/gists{/gist_id}","starred_url":"https://api.github.com/users/nick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nick/subscriptions","organizations_url":"https://api.github.com/users/nick/orgs","repos_url":"https://api.github.com/users/nick/repos","events_url":"https://api.github.com/users/nick/events{/privacy}","received_events_url":"https://api.github.com/users/nick/received_events","type":"User","site_admin":false},"created_at":"2018-04-12T22:16:00Z","updated_at":"2018-04-12T22:16:00Z","author_association":"COLLABORATOR","body":"I added a few deployment related helper scripts here:\r\n\r\nhttps://github.com/OriginProtocol/identity-playground/tree/master/scripts\r\n\r\nThe actual deployment is just a web3 call:\r\n\r\nhttps://github.com/OriginProtocol/identity-playground/blob/master/test/_helper.js#L116-L151\r\n\r\nOnce the deploy script is called, we can put the returned address into a simple neworkid:contract mapping similar to how truffle does it... \r\n\r\n```\r\nmodule.exports  = {\r\n  2: { Listings: \"0xabc123\" }, // Ropsten\r\n  3: { Listings: \"0xabc345\" }, // Rinkeby\r\n}\r\n```\r\n\r\nTo instantiate the contract in the web app would be something like this:\r\n\r\n```\r\nvar Listing = require('./Listing.js')\r\nvar deployedContracts = require('./deployedContracts')\r\nvar netId = await web3.eth.getId()\r\nvar listingInstance = new web3.eth.Contract(Listing.abi, deployedContracts[netId].Listing)\r\n```"}}
{"actor":{"display_login":"nick"}}