aboutsummaryrefslogtreecommitdiffstats
path: root/packages/asset-buyer/src/utils/asset_data_utils.ts
blob: f54462a230fc4821e425096cb8ad1e0d21274f69 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
import { ContractWrappers } from '@0xproject/contract-wrappers';
import { assetDataUtils as sharedAssetDataUtils } from '@0xproject/order-utils';
import * as _ from 'lodash';

export const assetDataUtils = {
    ...sharedAssetDataUtils,
    getEtherTokenAssetData(contractWrappers: ContractWrappers): string {
        const etherTokenAddress = contractWrappers.forwarder.etherTokenAddress;
        const etherTokenAssetData = sharedAssetDataUtils.encodeERC20AssetData(etherTokenAddress);
        return etherTokenAssetData;
    },
};