diff options
author | Amir Bandeali <abandeali1@gmail.com> | 2018-04-23 09:53:13 +0800 |
---|---|---|
committer | Amir Bandeali <abandeali1@gmail.com> | 2018-04-23 09:53:13 +0800 |
commit | 7d26b96d42f2594ba88954f9c56a791a77b7f31d (patch) | |
tree | 5a839a524cd04c141ae4948a351fa0d0dfce0117 /packages/contracts/src | |
parent | 08208acf5337c39ba7a864ad11655e24c1c1728c (diff) | |
download | dexon-sol-tools-7d26b96d42f2594ba88954f9c56a791a77b7f31d.tar dexon-sol-tools-7d26b96d42f2594ba88954f9c56a791a77b7f31d.tar.gz dexon-sol-tools-7d26b96d42f2594ba88954f9c56a791a77b7f31d.tar.bz2 dexon-sol-tools-7d26b96d42f2594ba88954f9c56a791a77b7f31d.tar.lz dexon-sol-tools-7d26b96d42f2594ba88954f9c56a791a77b7f31d.tar.xz dexon-sol-tools-7d26b96d42f2594ba88954f9c56a791a77b7f31d.tar.zst dexon-sol-tools-7d26b96d42f2594ba88954f9c56a791a77b7f31d.zip |
Rename proxyUtils => assetProxyUtils
Diffstat (limited to 'packages/contracts/src')
-rw-r--r-- | packages/contracts/src/utils/asset_proxy_utils.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/contracts/src/utils/asset_proxy_utils.ts b/packages/contracts/src/utils/asset_proxy_utils.ts index 29e50a860..1a7a312dd 100644 --- a/packages/contracts/src/utils/asset_proxy_utils.ts +++ b/packages/contracts/src/utils/asset_proxy_utils.ts @@ -4,7 +4,7 @@ import ethUtil = require('ethereumjs-util'); import { AssetProxyId } from './types'; -export const proxyUtils = { +export const assetProxyUtils = { encodeAssetProxyId(assetProxyId: AssetProxyId): Buffer { return ethUtil.toBuffer(assetProxyId); }, @@ -21,16 +21,16 @@ export const proxyUtils = { return encodedValue; }, encodeERC20ProxyData(tokenAddress: string): string { - const encodedAssetProxyId = proxyUtils.encodeAssetProxyId(AssetProxyId.ERC20); - const encodedAddress = proxyUtils.encodeAddress(tokenAddress); + const encodedAssetProxyId = assetProxyUtils.encodeAssetProxyId(AssetProxyId.ERC20); + const encodedAddress = assetProxyUtils.encodeAddress(tokenAddress); const encodedMetadata = Buffer.concat([encodedAssetProxyId, encodedAddress]); const encodedMetadataHex = ethUtil.bufferToHex(encodedMetadata); return encodedMetadataHex; }, encodeERC721ProxyData(tokenAddress: string, tokenId: BigNumber): string { - const encodedAssetProxyId = proxyUtils.encodeAssetProxyId(AssetProxyId.ERC721); - const encodedAddress = proxyUtils.encodeAddress(tokenAddress); - const encodedTokenId = proxyUtils.encodeUint256(tokenId); + const encodedAssetProxyId = assetProxyUtils.encodeAssetProxyId(AssetProxyId.ERC721); + const encodedAddress = assetProxyUtils.encodeAddress(tokenAddress); + const encodedTokenId = assetProxyUtils.encodeUint256(tokenId); const encodedMetadata = Buffer.concat([encodedAssetProxyId, encodedAddress, encodedTokenId]); const encodedMetadataHex = ethUtil.bufferToHex(encodedMetadata); return encodedMetadataHex; |