diff options
author | Jacob Evans <jacob@dekz.net> | 2018-06-18 18:59:23 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-06-18 19:46:05 +0800 |
commit | d4ee0e862297c16f8ee62efccd31f1193052c64e (patch) | |
tree | 4b3f8a4a75dfb9ed73bccc850a01ac789363c830 /packages/order-utils/src/order_hash.ts | |
parent | a8d328bfc926a62d61830334fadc43fc5d013e0e (diff) | |
download | dexon-0x-contracts-d4ee0e862297c16f8ee62efccd31f1193052c64e.tar.gz dexon-0x-contracts-d4ee0e862297c16f8ee62efccd31f1193052c64e.tar.zst dexon-0x-contracts-d4ee0e862297c16f8ee62efccd31f1193052c64e.zip |
Rebase and update feedback
Cache the domain separator data with address this
Use the EIP712Types enum for types everywhere
Rename EIP712 struct ExecuteTransaction to ZeroExTransaction
Diffstat (limited to 'packages/order-utils/src/order_hash.ts')
-rw-r--r-- | packages/order-utils/src/order_hash.ts | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/packages/order-utils/src/order_hash.ts b/packages/order-utils/src/order_hash.ts index 46cce4b3b..61f6c978f 100644 --- a/packages/order-utils/src/order_hash.ts +++ b/packages/order-utils/src/order_hash.ts @@ -10,25 +10,25 @@ import * as _ from 'lodash'; import { assert } from './assert'; import { crypto } from './crypto'; import { EIP712Utils } from './eip712_utils'; -import { EIP712Schema } from './types'; +import { EIP712Schema, EIP712Types } from './types'; const INVALID_TAKER_FORMAT = 'instance.takerAddress is not of a type(s) string'; const EIP712_ORDER_SCHEMA: EIP712Schema = { name: 'Order', parameters: [ - { name: 'makerAddress', type: 'address' }, - { name: 'takerAddress', type: 'address' }, - { name: 'feeRecipientAddress', type: 'address' }, - { name: 'senderAddress', type: 'address' }, - { name: 'makerAssetAmount', type: 'uint256' }, - { name: 'takerAssetAmount', type: 'uint256' }, - { name: 'makerFee', type: 'uint256' }, - { name: 'takerFee', type: 'uint256' }, - { name: 'expirationTimeSeconds', type: 'uint256' }, - { name: 'salt', type: 'uint256' }, - { name: 'makerAssetData', type: 'bytes' }, - { name: 'takerAssetData', type: 'bytes' }, + { name: 'makerAddress', type: EIP712Types.Address }, + { name: 'takerAddress', type: EIP712Types.Address }, + { name: 'feeRecipientAddress', type: EIP712Types.Address }, + { name: 'senderAddress', type: EIP712Types.Address }, + { name: 'makerAssetAmount', type: EIP712Types.Uint256 }, + { name: 'takerAssetAmount', type: EIP712Types.Uint256 }, + { name: 'makerFee', type: EIP712Types.Uint256 }, + { name: 'takerFee', type: EIP712Types.Uint256 }, + { name: 'expirationTimeSeconds', type: EIP712Types.Uint256 }, + { name: 'salt', type: EIP712Types.Uint256 }, + { name: 'makerAssetData', type: EIP712Types.Bytes }, + { name: 'takerAssetData', type: EIP712Types.Bytes }, ], }; |