-
Notifications
You must be signed in to change notification settings - Fork 197
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
Conversation
@@ -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", |
There was a problem hiding this comment.
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. 🤞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expect(actual).to.deep.eq(expected); | |
expect(actual).to.eq(expected); |
packages/protocol-utils/src/mtx.ts
Outdated
feeToken: NULL_ADDRESS, | ||
feeAmount: ZERO, | ||
chainId: 1, | ||
verifyingContract: '0xdef1c0ded9bec7f1a1670819833240f027b25eff', |
There was a problem hiding this comment.
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?
4860a73
to
b27e122
Compare
meeting you halfway and going with |
…isc review feedback
b27e122
to
fc43984
Compare
Description
+ some refactors to reduce code dupe.
TODO
Testing instructions
Types of changes
Checklist:
[WIP]
if necessary.