{"action":"created","issue":{"url":"https://api.github.com/repos/JoinColony/colonyJS/issues/121","repository_url":"https://api.github.com/repos/JoinColony/colonyJS","labels_url":"https://api.github.com/repos/JoinColony/colonyJS/issues/121/labels{/name}","comments_url":"https://api.github.com/repos/JoinColony/colonyJS/issues/121/comments","events_url":"https://api.github.com/repos/JoinColony/colonyJS/issues/121/events","html_url":"https://github.com/JoinColony/colonyJS/pull/121","id":326733210,"number":121,"title":"Add declarative parameter type mapping for ContractMethods","user":{"login":"JamesLefrere","id":5450382,"avatar_url":"https://avatars0.githubusercontent.com/u/5450382?v=4","gravatar_id":"","url":"https://api.github.com/users/JamesLefrere","html_url":"https://github.com/JamesLefrere","followers_url":"https://api.github.com/users/JamesLefrere/followers","following_url":"https://api.github.com/users/JamesLefrere/following{/other_user}","gists_url":"https://api.github.com/users/JamesLefrere/gists{/gist_id}","starred_url":"https://api.github.com/users/JamesLefrere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JamesLefrere/subscriptions","organizations_url":"https://api.github.com/users/JamesLefrere/orgs","repos_url":"https://api.github.com/users/JamesLefrere/repos","events_url":"https://api.github.com/users/JamesLefrere/events{/privacy}","received_events_url":"https://api.github.com/users/JamesLefrere/received_events","type":"User","site_admin":false},"labels":[{"id":801744067,"url":"https://api.github.com/repos/JoinColony/colonyJS/labels/Code%20review%20me!!11one","name":"Code review me!!11one","color":"fbca04","default":false},{"id":762892474,"url":"https://api.github.com/repos/JoinColony/colonyJS/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-26T12:03:10Z","updated_at":"2018-05-26T12:05:40Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/JoinColony/colonyJS/pulls/121","html_url":"https://github.com/JoinColony/colonyJS/pull/121","diff_url":"https://github.com/JoinColony/colonyJS/pull/121.diff","patch_url":"https://github.com/JoinColony/colonyJS/pull/121.patch"},"body":"## Description\r\n\r\nIn order to add some new features (more flexible number support #113 , custom parameter types, checking against empty values #86 ), this PR makes the definition of the parameter types ('address', 'boolean', 'string', 'number') declarative. \r\n\r\nAll of the logic to validate input values, convert input values to contract arguments, and convert contract responses to output values is now defined in one place.\r\n\r\nIt's also possible to define custom types in other packages (such as `@colony/colony-js-client`.\r\n\r\nAs far as interacting with the client is concerned, there should be no differences; the tests/integration tests should confirm this.\r\n\r\n## Other changes\r\n\r\n* Added much more thorough test coverage for each parameter type\r\n* Move old imported functions (`validate, getMethodArgs, getMethodReturnValue`) to `ContractMethod` (the functionality should be the same)\r\n* `ContractMethod`: Simplify performing validation, converting input/output values\r\n* Add `getValidatedArgs` public method for `ContractMethod`\r\n* Export `addParamType` from `@colony/colony-js-contract-client`\r\n* Add jest flow-typed definition (Flow was unable to find some definitions without it)\r\n\r\n## TODO\r\n\r\n> ⚠️  NOTE: Please make sure all items are checked or remove the TODO list before closing the PR\r\n\r\n- [ ] Run the colonyDapp integration tests for this branch and confirm that they pass\r\n\r\nContributes to #86\r\nContributes to #113 \r\n"},"comment":{"url":"https://api.github.com/repos/JoinColony/colonyJS/issues/comments/392257094","html_url":"https://github.com/JoinColony/colonyJS/pull/121#issuecomment-392257094","issue_url":"https://api.github.com/repos/JoinColony/colonyJS/issues/121","id":392257094,"user":{"login":"chmanie","id":2174084,"avatar_url":"https://avatars2.githubusercontent.com/u/2174084?v=4","gravatar_id":"","url":"https://api.github.com/users/chmanie","html_url":"https://github.com/chmanie","followers_url":"https://api.github.com/users/chmanie/followers","following_url":"https://api.github.com/users/chmanie/following{/other_user}","gists_url":"https://api.github.com/users/chmanie/gists{/gist_id}","starred_url":"https://api.github.com/users/chmanie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chmanie/subscriptions","organizations_url":"https://api.github.com/users/chmanie/orgs","repos_url":"https://api.github.com/users/chmanie/repos","events_url":"https://api.github.com/users/chmanie/events{/privacy}","received_events_url":"https://api.github.com/users/chmanie/received_events","type":"User","site_admin":false},"created_at":"2018-05-26T12:05:40Z","updated_at":"2018-05-26T12:05:40Z","author_association":"MEMBER","body":"Can we run the integration tests before I start reviewing?"}}
{"actor":{"display_login":"chmanie"}}