Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mtx tooling to @0x/protocol-utils #90

Merged
merged 5 commits into from
Dec 16, 2020

Conversation

dorothy-zbornak
Copy link
Contributor

@dorothy-zbornak dorothy-zbornak commented Dec 16, 2020

Description

+ some refactors to reduce code dupe.

TODO

  • tests

Testing instructions

Types of changes

Checklist:

  • Prefix PR title with [WIP] if necessary.
  • Add tests to cover changes as needed.
  • Update documentation as needed.
  • Add new entries to the relevant CHANGELOG.jsons.

@@ -61,6 +61,7 @@
"@0x/contracts-gen": "^2.0.24",
"@0x/contracts-test-utils": "^5.3.15",
"@0x/dev-utils": "^4.1.3",
"@0x/order-utils": "^10.4.10",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are so close to losing this dep. 🤞

@dorothy-zbornak dorothy-zbornak marked this pull request as ready for review December 16, 2020 18:42
Copy link
Contributor

@hysz hysz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@moodlezoup moodlezoup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nittiest of nits: rename mtx.ts to metaTransactions.ts

it('can get the EIP712 hash', () => {
const actual = mtx.getHash();
const expected = '0x068f2f98836e489070608461768bfd3331128787d09278d38869c2b56bfc34a4';
expect(actual).to.deep.eq(expected);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
expect(actual).to.deep.eq(expected);
expect(actual).to.eq(expected);

feeToken: NULL_ADDRESS,
feeAmount: ZERO,
chainId: 1,
verifyingContract: '0xdef1c0ded9bec7f1a1670819833240f027b25eff',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: pull this from contract-addresses?

@dorothy-zbornak
Copy link
Contributor Author

nittiest of nits: rename mtx.ts to metaTransactions.ts

meeting you halfway and going with meta_transactions.ts

@dorothy-zbornak dorothy-zbornak merged commit 682c07c into development Dec 16, 2020
@dorothy-zbornak dorothy-zbornak deleted the feat/protocol-utils-mtx-utils branch December 16, 2020 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants