{"action":"created","issue":{"url":"https://api.github.com/repos/daostack/arc.js/issues/160","repository_url":"https://api.github.com/repos/daostack/arc.js","labels_url":"https://api.github.com/repos/daostack/arc.js/issues/160/labels{/name}","comments_url":"https://api.github.com/repos/daostack/arc.js/issues/160/comments","events_url":"https://api.github.com/repos/daostack/arc.js/issues/160/events","html_url":"https://github.com/daostack/arc.js/issues/160","id":308357136,"number":160,"title":"Refactor contract wrappers access, round two","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},"labels":[{"id":774821392,"url":"https://api.github.com/repos/daostack/arc.js/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":854117320,"url":"https://api.github.com/repos/daostack/arc.js/labels/potentiallyBreaking","name":"potentiallyBreaking","color":"c93f00","default":false},{"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":3,"created_at":"2018-03-25T15:06:49Z","updated_at":"2018-03-26T14:01:48Z","closed_at":null,"author_association":"COLLABORATOR","body":"Refactor how contract wrappers are served up.\r\n\r\nAt the very least, improve the documentation [here](https://daostack.github.io/arc.js/Home/#how-to-obtain-a-contract-wrapper)\r\n- explain again what a wrapper is\r\n- provide use cases that add value to each way of obtaining a wrapper\r\n- move docs for the `WrapperService` out of the README (but provide the link to its API page, \"for further reference\").\r\n\r\nPotential API improvements:\r\n- `WrapperService.wrappers.UpgradeScheme` can be accessible via `ContractWrappers.UpgradeScheme`\r\n- `WrapperService.factories.UpgradeScheme` can be accessible via `ContractWrapperFactories.UpgradeScheme`\r\n- `WrapperService.wrappersByType.schemes` can be accessible via `ContractWrapperTypes.schemes`\r\n\r\n... where `ContractWrappers`,  `ContractWrapperFactories` and `ContractWrapperTypes` are accessible via `import`.  The idea here is to hide the WrapperService, subtracting one level of indirection in the access to these three collections.\r\n\r\n- each wrapper can have a static property `factory` that is the factory for the contract (maybe would be protected).\r\n- each wrapper could have static `at` and `new` and `deployed` methods that are implemented internally by the wrapper's factory.  (Not 100% sure this is reasonably feasible -- gotta confirm)\r\n\r\nThe idea of the above two items is to enable access to the factory methods via the wrappers themselves.  This is closer to what Truffle does, which might be appreciated by developers accustomed to working with Truffle.\r\n\r\n- rename `UpgradeScheme` to `UpgradeSchemeFactory` and `UpgradeSchemeWrapper` to `UpgradeScheme`\r\n\r\n`import { UpgradeScheme } from \"@daostack/arc.js\"` would return the wrapper instance hydrated as it was deployed."},"comment":{"url":"https://api.github.com/repos/daostack/arc.js/issues/comments/376176415","html_url":"https://github.com/daostack/arc.js/issues/160#issuecomment-376176415","issue_url":"https://api.github.com/repos/daostack/arc.js/issues/160","id":376176415,"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-26T14:01:48Z","updated_at":"2018-03-26T14:01:48Z","author_association":"COLLABORATOR","body":"> this does sound better to me\r\n\r\n@tibetsprague I want to make sure it sounds not just \"better\", but best.  Can you think of any ways to make it best?  :-)"}}
{"actor":{"display_login":"dkent600"}}