{"action":"created","comment":{"url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/comments/207376792","pull_request_review_id":142979672,"id":207376792,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzM3Njc5Mg==","diff_hunk":"@@ -0,0 +1,44 @@\n+import { SignedOrder } from '@0xproject/types';\n+import * as _ from 'lodash';\n+\n+import { constants } from './constants';\n+\n+export const marketOrdersOptimizationUtils = {","path":"packages/contract-wrappers/src/utils/market_orders_optimization_utils.ts","position":6,"original_position":6,"commit_id":"6e74896620137b462b78a9493278a30efd016c44","original_commit_id":"6e74896620137b462b78a9493278a30efd016c44","user":{"login":"abandeali1","id":18060168,"node_id":"MDQ6VXNlcjE4MDYwMTY4","avatar_url":"https://avatars0.githubusercontent.com/u/18060168?v=4","gravatar_id":"","url":"https://api.github.com/users/abandeali1","html_url":"https://github.com/abandeali1","followers_url":"https://api.github.com/users/abandeali1/followers","following_url":"https://api.github.com/users/abandeali1/following{/other_user}","gists_url":"https://api.github.com/users/abandeali1/gists{/gist_id}","starred_url":"https://api.github.com/users/abandeali1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abandeali1/subscriptions","organizations_url":"https://api.github.com/users/abandeali1/orgs","repos_url":"https://api.github.com/users/abandeali1/repos","events_url":"https://api.github.com/users/abandeali1/events{/privacy}","received_events_url":"https://api.github.com/users/abandeali1/received_events","type":"User","site_admin":false},"body":"I think this should be renamed to something like `calldataOptimizationUtils`, since there are functions that aren't market buys or sells that we will also eventually optimize (like `matchOrders`).","created_at":"2018-08-02T21:15:37Z","updated_at":"2018-08-02T21:17:21Z","html_url":"https://github.com/0xProject/0x-monorepo/pull/936#discussion_r207376792","pull_request_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/936","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/comments/207376792"},"html":{"href":"https://github.com/0xProject/0x-monorepo/pull/936#discussion_r207376792"},"pull_request":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/936"}}},"pull_request":{"url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/936","id":205611843,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NjExODQz","html_url":"https://github.com/0xProject/0x-monorepo/pull/936","diff_url":"https://github.com/0xProject/0x-monorepo/pull/936.diff","patch_url":"https://github.com/0xProject/0x-monorepo/pull/936.patch","issue_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/936","number":936,"state":"open","locked":false,"title":"ForwarderWrapper order optimizations","user":{"login":"BMillman19","id":1141340,"node_id":"MDQ6VXNlcjExNDEzNDA=","avatar_url":"https://avatars0.githubusercontent.com/u/1141340?v=4","gravatar_id":"","url":"https://api.github.com/users/BMillman19","html_url":"https://github.com/BMillman19","followers_url":"https://api.github.com/users/BMillman19/followers","following_url":"https://api.github.com/users/BMillman19/following{/other_user}","gists_url":"https://api.github.com/users/BMillman19/gists{/gist_id}","starred_url":"https://api.github.com/users/BMillman19/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/BMillman19/subscriptions","organizations_url":"https://api.github.com/users/BMillman19/orgs","repos_url":"https://api.github.com/users/BMillman19/repos","events_url":"https://api.github.com/users/BMillman19/events{/privacy}","received_events_url":"https://api.github.com/users/BMillman19/received_events","type":"User","site_admin":false},"body":"## Description\r\n\r\n* Because the forwarder contract makes assumptions about `makerAssetData` and `takerAssetData` of the input orders, we can convert them to null ('0x') values to save on gas.\r\n* This adds a `marketOrderOptimizationUtils` object that contains a set of pure functions for making order optimizations w/o mutation or side effects.\r\n\r\n## Testing instructions\r\n\r\n```bash\r\nyarn install && PKG=@0xproject/contract-wrappers yarn build\r\ncd packages/contract-wrappers && yarn test\r\n```\r\n\r\n## Types of changes\r\n\r\n<!--- What types of changes does your code introduce? Uncomment all the bullets that apply: -->\r\n\r\n<!-- * Bug fix (non-breaking change which fixes an issue) -->\r\n\r\n* New feature (non-breaking change which adds functionality)\r\n\r\n<!-- * Breaking change (fix or feature that would cause existing functionality to change) -->\r\n\r\n## Checklist:\r\n\r\n<!--- The following points should be used to indicate the progress of your PR.  Put an `x` in all the boxes that apply right now, and come back over time and check them off as you make progress.  If you're unsure about any of these, don't hesitate to ask. We're here to help! -->\r\n\r\n*   [ ] Prefixed the title of this PR with `[WIP]` if it is a work in progress.\r\n*   [ ] Prefixed the title of this PR with bracketed package name(s) corresponding to the changed package(s). For example: `[sol-cov] Fixed bug`.\r\n*   [ ] Added tests to cover my changes, or decided that tests would be too impractical.\r\n*   [ ] Updated documentation, or decided that no doc change is needed.\r\n*   [ ] Added new entries to the relevant CHANGELOG.jsons.\r\n","created_at":"2018-08-02T03:56:09Z","updated_at":"2018-08-02T21:17:21Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9261e7fda4d9f59d2b122798949aa1bafa0f9b25","assignee":null,"assignees":[],"requested_reviewers":[{"login":"dekz","id":27389,"node_id":"MDQ6VXNlcjI3Mzg5","avatar_url":"https://avatars0.githubusercontent.com/u/27389?v=4","gravatar_id":"","url":"https://api.github.com/users/dekz","html_url":"https://github.com/dekz","followers_url":"https://api.github.com/users/dekz/followers","following_url":"https://api.github.com/users/dekz/following{/other_user}","gists_url":"https://api.github.com/users/dekz/gists{/gist_id}","starred_url":"https://api.github.com/users/dekz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dekz/subscriptions","organizations_url":"https://api.github.com/users/dekz/orgs","repos_url":"https://api.github.com/users/dekz/repos","events_url":"https://api.github.com/users/dekz/events{/privacy}","received_events_url":"https://api.github.com/users/dekz/received_events","type":"User","site_admin":false},{"login":"fragosti","id":3066135,"node_id":"MDQ6VXNlcjMwNjYxMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/3066135?v=4","gravatar_id":"","url":"https://api.github.com/users/fragosti","html_url":"https://github.com/fragosti","followers_url":"https://api.github.com/users/fragosti/followers","following_url":"https://api.github.com/users/fragosti/following{/other_user}","gists_url":"https://api.github.com/users/fragosti/gists{/gist_id}","starred_url":"https://api.github.com/users/fragosti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fragosti/subscriptions","organizations_url":"https://api.github.com/users/fragosti/orgs","repos_url":"https://api.github.com/users/fragosti/repos","events_url":"https://api.github.com/users/fragosti/events{/privacy}","received_events_url":"https://api.github.com/users/fragosti/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":968380270,"node_id":"MDU6TGFiZWw5NjgzODAyNzA=","url":"https://api.github.com/repos/0xProject/0x-monorepo/labels/contract-wrappers","name":"contract-wrappers","color":"8fc6d6","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/936/commits","review_comments_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/936/comments","review_comment_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/936/comments","statuses_url":"https://api.github.com/repos/0xProject/0x-monorepo/statuses/6e74896620137b462b78a9493278a30efd016c44","head":{"label":"0xProject:feature/contract-wrappers/forwader-optimizations","ref":"feature/contract-wrappers/forwader-optimizations","sha":"6e74896620137b462b78a9493278a30efd016c44","user":{"login":"0xProject","id":24832717,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0ODMyNzE3","avatar_url":"https://avatars2.githubusercontent.com/u/24832717?v=4","gravatar_id":"","url":"https://api.github.com/users/0xProject","html_url":"https://github.com/0xProject","followers_url":"https://api.github.com/users/0xProject/followers","following_url":"https://api.github.com/users/0xProject/following{/other_user}","gists_url":"https://api.github.com/users/0xProject/gists{/gist_id}","starred_url":"https://api.github.com/users/0xProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xProject/subscriptions","organizations_url":"https://api.github.com/users/0xProject/orgs","repos_url":"https://api.github.com/users/0xProject/repos","events_url":"https://api.github.com/users/0xProject/events{/privacy}","received_events_url":"https://api.github.com/users/0xProject/received_events","type":"Organization","site_admin":false},"repo":{"id":92181371,"node_id":"MDEwOlJlcG9zaXRvcnk5MjE4MTM3MQ==","name":"0x-monorepo","full_name":"0xProject/0x-monorepo","owner":{"login":"0xProject","id":24832717,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0ODMyNzE3","avatar_url":"https://avatars2.githubusercontent.com/u/24832717?v=4","gravatar_id":"","url":"https://api.github.com/users/0xProject","html_url":"https://github.com/0xProject","followers_url":"https://api.github.com/users/0xProject/followers","following_url":"https://api.github.com/users/0xProject/following{/other_user}","gists_url":"https://api.github.com/users/0xProject/gists{/gist_id}","starred_url":"https://api.github.com/users/0xProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xProject/subscriptions","organizations_url":"https://api.github.com/users/0xProject/orgs","repos_url":"https://api.github.com/users/0xProject/repos","events_url":"https://api.github.com/users/0xProject/events{/privacy}","received_events_url":"https://api.github.com/users/0xProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/0xProject/0x-monorepo","description":"0x protocol monorepo - includes our smart contracts and many developer tools","fork":false,"url":"https://api.github.com/repos/0xProject/0x-monorepo","forks_url":"https://api.github.com/repos/0xProject/0x-monorepo/forks","keys_url":"https://api.github.com/repos/0xProject/0x-monorepo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/0xProject/0x-monorepo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/0xProject/0x-monorepo/teams","hooks_url":"https://api.github.com/repos/0xProject/0x-monorepo/hooks","issue_events_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/events{/number}","events_url":"https://api.github.com/repos/0xProject/0x-monorepo/events","assignees_url":"https://api.github.com/repos/0xProject/0x-monorepo/assignees{/user}","branches_url":"https://api.github.com/repos/0xProject/0x-monorepo/branches{/branch}","tags_url":"https://api.github.com/repos/0xProject/0x-monorepo/tags","blobs_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/refs{/sha}","trees_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/0xProject/0x-monorepo/statuses/{sha}","languages_url":"https://api.github.com/repos/0xProject/0x-monorepo/languages","stargazers_url":"https://api.github.com/repos/0xProject/0x-monorepo/stargazers","contributors_url":"https://api.github.com/repos/0xProject/0x-monorepo/contributors","subscribers_url":"https://api.github.com/repos/0xProject/0x-monorepo/subscribers","subscription_url":"https://api.github.com/repos/0xProject/0x-monorepo/subscription","commits_url":"https://api.github.com/repos/0xProject/0x-monorepo/commits{/sha}","git_commits_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/commits{/sha}","comments_url":"https://api.github.com/repos/0xProject/0x-monorepo/comments{/number}","issue_comment_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/comments{/number}","contents_url":"https://api.github.com/repos/0xProject/0x-monorepo/contents/{+path}","compare_url":"https://api.github.com/repos/0xProject/0x-monorepo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/0xProject/0x-monorepo/merges","archive_url":"https://api.github.com/repos/0xProject/0x-monorepo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/0xProject/0x-monorepo/downloads","issues_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues{/number}","pulls_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls{/number}","milestones_url":"https://api.github.com/repos/0xProject/0x-monorepo/milestones{/number}","notifications_url":"https://api.github.com/repos/0xProject/0x-monorepo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/0xProject/0x-monorepo/labels{/name}","releases_url":"https://api.github.com/repos/0xProject/0x-monorepo/releases{/id}","deployments_url":"https://api.github.com/repos/0xProject/0x-monorepo/deployments","created_at":"2017-05-23T14:17:33Z","updated_at":"2018-08-02T11:31:35Z","pushed_at":"2018-08-02T21:13:12Z","git_url":"git://github.com/0xProject/0x-monorepo.git","ssh_url":"git@github.com:0xProject/0x-monorepo.git","clone_url":"https://github.com/0xProject/0x-monorepo.git","svn_url":"https://github.com/0xProject/0x-monorepo","homepage":"","size":53846,"stargazers_count":763,"watchers_count":763,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":195,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":195,"open_issues":46,"watchers":763,"default_branch":"development"}},"base":{"label":"0xProject:development","ref":"development","sha":"9f7f61085c1a6989b79df575beb0b5d8f2b3652d","user":{"login":"0xProject","id":24832717,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0ODMyNzE3","avatar_url":"https://avatars2.githubusercontent.com/u/24832717?v=4","gravatar_id":"","url":"https://api.github.com/users/0xProject","html_url":"https://github.com/0xProject","followers_url":"https://api.github.com/users/0xProject/followers","following_url":"https://api.github.com/users/0xProject/following{/other_user}","gists_url":"https://api.github.com/users/0xProject/gists{/gist_id}","starred_url":"https://api.github.com/users/0xProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xProject/subscriptions","organizations_url":"https://api.github.com/users/0xProject/orgs","repos_url":"https://api.github.com/users/0xProject/repos","events_url":"https://api.github.com/users/0xProject/events{/privacy}","received_events_url":"https://api.github.com/users/0xProject/received_events","type":"Organization","site_admin":false},"repo":{"id":92181371,"node_id":"MDEwOlJlcG9zaXRvcnk5MjE4MTM3MQ==","name":"0x-monorepo","full_name":"0xProject/0x-monorepo","owner":{"login":"0xProject","id":24832717,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0ODMyNzE3","avatar_url":"https://avatars2.githubusercontent.com/u/24832717?v=4","gravatar_id":"","url":"https://api.github.com/users/0xProject","html_url":"https://github.com/0xProject","followers_url":"https://api.github.com/users/0xProject/followers","following_url":"https://api.github.com/users/0xProject/following{/other_user}","gists_url":"https://api.github.com/users/0xProject/gists{/gist_id}","starred_url":"https://api.github.com/users/0xProject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/0xProject/subscriptions","organizations_url":"https://api.github.com/users/0xProject/orgs","repos_url":"https://api.github.com/users/0xProject/repos","events_url":"https://api.github.com/users/0xProject/events{/privacy}","received_events_url":"https://api.github.com/users/0xProject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/0xProject/0x-monorepo","description":"0x protocol monorepo - includes our smart contracts and many developer tools","fork":false,"url":"https://api.github.com/repos/0xProject/0x-monorepo","forks_url":"https://api.github.com/repos/0xProject/0x-monorepo/forks","keys_url":"https://api.github.com/repos/0xProject/0x-monorepo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/0xProject/0x-monorepo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/0xProject/0x-monorepo/teams","hooks_url":"https://api.github.com/repos/0xProject/0x-monorepo/hooks","issue_events_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/events{/number}","events_url":"https://api.github.com/repos/0xProject/0x-monorepo/events","assignees_url":"https://api.github.com/repos/0xProject/0x-monorepo/assignees{/user}","branches_url":"https://api.github.com/repos/0xProject/0x-monorepo/branches{/branch}","tags_url":"https://api.github.com/repos/0xProject/0x-monorepo/tags","blobs_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/refs{/sha}","trees_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/0xProject/0x-monorepo/statuses/{sha}","languages_url":"https://api.github.com/repos/0xProject/0x-monorepo/languages","stargazers_url":"https://api.github.com/repos/0xProject/0x-monorepo/stargazers","contributors_url":"https://api.github.com/repos/0xProject/0x-monorepo/contributors","subscribers_url":"https://api.github.com/repos/0xProject/0x-monorepo/subscribers","subscription_url":"https://api.github.com/repos/0xProject/0x-monorepo/subscription","commits_url":"https://api.github.com/repos/0xProject/0x-monorepo/commits{/sha}","git_commits_url":"https://api.github.com/repos/0xProject/0x-monorepo/git/commits{/sha}","comments_url":"https://api.github.com/repos/0xProject/0x-monorepo/comments{/number}","issue_comment_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues/comments{/number}","contents_url":"https://api.github.com/repos/0xProject/0x-monorepo/contents/{+path}","compare_url":"https://api.github.com/repos/0xProject/0x-monorepo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/0xProject/0x-monorepo/merges","archive_url":"https://api.github.com/repos/0xProject/0x-monorepo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/0xProject/0x-monorepo/downloads","issues_url":"https://api.github.com/repos/0xProject/0x-monorepo/issues{/number}","pulls_url":"https://api.github.com/repos/0xProject/0x-monorepo/pulls{/number}","milestones_url":"https://api.github.com/repos/0xProject/0x-monorepo/milestones{/number}","notifications_url":"https://api.github.com/repos/0xProject/0x-monorepo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/0xProject/0x-monorepo/labels{/name}","releases_url":"https://api.github.com/repos/0xProject/0x-monorepo/releases{/id}","deployments_url":"https://api.github.com/repos/0xProject/0x-monorepo/deployments","created_at":"2017-05-23T14:17:33Z","updated_at":"2018-08-02T11:31:35Z","pushed_at":"2018-08-02T21:13:12Z","git_url":"git://github.com/0xProject/0x-monorepo.git","ssh_url":"git@github.com:0xProject/0x-monorepo.git","clone_url":"https://github.com/0xProject/0x-monorepo.git","svn_url":"https://github.com/0xProject/0x-monorepo","homepage":"","size":53846,"stargazers_count":763,"watchers_count":763,"language":"TypeScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":195,"mirror_url":null,"archived":false,"open_issues_count":46,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":195,"open_issues":46,"watchers":763,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/936"},"html":{"href":"https://github.com/0xProject/0x-monorepo/pull/936"},"issue":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/issues/936"},"comments":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/issues/936/comments"},"review_comments":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/936/comments"},"review_comment":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/pulls/936/commits"},"statuses":{"href":"https://api.github.com/repos/0xProject/0x-monorepo/statuses/6e74896620137b462b78a9493278a30efd016c44"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"abandeali1"}}