aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/asset_proxy_dispatcher
diff options
context:
space:
mode:
authorAmir Bandeali <abandeali1@gmail.com>2018-04-23 09:53:13 +0800
committerAmir Bandeali <abandeali1@gmail.com>2018-04-23 09:53:13 +0800
commit7d26b96d42f2594ba88954f9c56a791a77b7f31d (patch)
tree5a839a524cd04c141ae4948a351fa0d0dfce0117 /packages/contracts/test/asset_proxy_dispatcher
parent08208acf5337c39ba7a864ad11655e24c1c1728c (diff)
downloaddexon-sol-tools-7d26b96d42f2594ba88954f9c56a791a77b7f31d.tar.gz
dexon-sol-tools-7d26b96d42f2594ba88954f9c56a791a77b7f31d.tar.zst
dexon-sol-tools-7d26b96d42f2594ba88954f9c56a791a77b7f31d.zip
Rename proxyUtils => assetProxyUtils
Diffstat (limited to 'packages/contracts/test/asset_proxy_dispatcher')
-rw-r--r--packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts8
-rw-r--r--packages/contracts/test/asset_proxy_dispatcher/proxies.ts20
2 files changed, 14 insertions, 14 deletions
diff --git a/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts b/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts
index a69a4238c..5cbe11e53 100644
--- a/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts
+++ b/packages/contracts/test/asset_proxy_dispatcher/dispatcher.ts
@@ -10,7 +10,7 @@ import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/d
import { DummyERC721TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c721_token';
import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy';
import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy';
-import { proxyUtils } from '../../src/utils/asset_proxy_utils';
+import { assetProxyUtils } from '../../src/utils/asset_proxy_utils';
import { Balances } from '../../src/utils/balances';
import { constants } from '../../src/utils/constants';
import { AssetProxyId, ContractName } from '../../src/utils/types';
@@ -242,7 +242,7 @@ describe('AssetProxyDispatcher', () => {
{ from: owner },
);
// Construct metadata for ERC20 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC20ProxyData(zrx.address);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC20ProxyData(zrx.address);
// Perform a transfer from makerAddress to takerAddress
const balances = await dmyBalances.getAsync();
const amount = new BigNumber(10);
@@ -265,7 +265,7 @@ describe('AssetProxyDispatcher', () => {
it('should throw if dispatching to unregistered proxy', async () => {
// Construct metadata for ERC20 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC20ProxyData(zrx.address);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC20ProxyData(zrx.address);
// Perform a transfer from makerAddress to takerAddress
const balances = await dmyBalances.getAsync();
const amount = new BigNumber(10);
@@ -290,7 +290,7 @@ describe('AssetProxyDispatcher', () => {
{ from: owner },
);
// Construct metadata for ERC20 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC20ProxyData(zrx.address);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC20ProxyData(zrx.address);
// Perform a transfer from makerAddress to takerAddress
const balances = await dmyBalances.getAsync();
const amount = new BigNumber(10);
diff --git a/packages/contracts/test/asset_proxy_dispatcher/proxies.ts b/packages/contracts/test/asset_proxy_dispatcher/proxies.ts
index 5148929aa..9437fcbf0 100644
--- a/packages/contracts/test/asset_proxy_dispatcher/proxies.ts
+++ b/packages/contracts/test/asset_proxy_dispatcher/proxies.ts
@@ -10,7 +10,7 @@ import { DummyERC20TokenContract } from '../../src/contract_wrappers/generated/d
import { DummyERC721TokenContract } from '../../src/contract_wrappers/generated/dummy_e_r_c721_token';
import { ERC20ProxyContract } from '../../src/contract_wrappers/generated/e_r_c20_proxy';
import { ERC721ProxyContract } from '../../src/contract_wrappers/generated/e_r_c721_proxy';
-import { proxyUtils } from '../../src/utils/asset_proxy_utils';
+import { assetProxyUtils } from '../../src/utils/asset_proxy_utils';
import { Balances } from '../../src/utils/balances';
import { constants } from '../../src/utils/constants';
import { AssetProxyId, ContractName } from '../../src/utils/types';
@@ -93,7 +93,7 @@ describe('Asset Transfer Proxies', () => {
describe('Transfer Proxy - ERC20', () => {
it('should successfully transfer tokens', async () => {
// Construct metadata for ERC20 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC20ProxyData(zrx.address);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC20ProxyData(zrx.address);
// Perform a transfer from makerAddress to takerAddress
const balances = await dmyBalances.getAsync();
const amount = new BigNumber(10);
@@ -116,7 +116,7 @@ describe('Asset Transfer Proxies', () => {
it('should do nothing if transferring 0 amount of a token', async () => {
// Construct metadata for ERC20 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC20ProxyData(zrx.address);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC20ProxyData(zrx.address);
// Perform a transfer from makerAddress to takerAddress
const balances = await dmyBalances.getAsync();
const amount = new BigNumber(0);
@@ -135,7 +135,7 @@ describe('Asset Transfer Proxies', () => {
it('should throw if allowances are too low', async () => {
// Construct metadata for ERC20 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC20ProxyData(zrx.address);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC20ProxyData(zrx.address);
// Create allowance less than transfer amount. Set allowance on proxy.
const allowance = new BigNumber(0);
const transferAmount = new BigNumber(10);
@@ -156,7 +156,7 @@ describe('Asset Transfer Proxies', () => {
it('should throw if requesting address is not authorized', async () => {
// Construct metadata for ERC20 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC20ProxyData(zrx.address);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC20ProxyData(zrx.address);
// Perform a transfer from makerAddress to takerAddress
const amount = new BigNumber(10);
return expect(
@@ -170,7 +170,7 @@ describe('Asset Transfer Proxies', () => {
describe('Transfer Proxy - ERC721', () => {
it('should successfully transfer tokens', async () => {
// Construct metadata for ERC721 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC721ProxyData(erc721Token.address, makerAssetId);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC721ProxyData(erc721Token.address, makerAssetId);
// Verify pre-condition
const ownerMakerAsset = await erc721Token.ownerOf.callAsync(makerAssetId);
expect(ownerMakerAsset).to.be.bignumber.equal(makerAddress);
@@ -191,7 +191,7 @@ describe('Asset Transfer Proxies', () => {
it('should throw if transferring 0 amount of a token', async () => {
// Construct metadata for ERC721 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC721ProxyData(erc721Token.address, makerAssetId);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC721ProxyData(erc721Token.address, makerAssetId);
// Verify pre-condition
const ownerMakerAsset = await erc721Token.ownerOf.callAsync(makerAssetId);
expect(ownerMakerAsset).to.be.bignumber.equal(makerAddress);
@@ -211,7 +211,7 @@ describe('Asset Transfer Proxies', () => {
it('should throw if transferring > 1 amount of a token', async () => {
// Construct metadata for ERC721 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC721ProxyData(erc721Token.address, makerAssetId);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC721ProxyData(erc721Token.address, makerAssetId);
// Verify pre-condition
const ownerMakerAsset = await erc721Token.ownerOf.callAsync(makerAssetId);
expect(ownerMakerAsset).to.be.bignumber.equal(makerAddress);
@@ -231,7 +231,7 @@ describe('Asset Transfer Proxies', () => {
it('should throw if allowances are too low', async () => {
// Construct metadata for ERC721 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC721ProxyData(erc721Token.address, makerAssetId);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC721ProxyData(erc721Token.address, makerAssetId);
// Remove transfer approval for makerAddress.
await erc721Token.setApprovalForAll.sendTransactionAsync(erc721Proxy.address, false, {
from: makerAddress,
@@ -247,7 +247,7 @@ describe('Asset Transfer Proxies', () => {
it('should throw if requesting address is not authorized', async () => {
// Construct metadata for ERC721 proxy
- const encodedProxyMetadata = proxyUtils.encodeERC721ProxyData(erc721Token.address, makerAssetId);
+ const encodedProxyMetadata = assetProxyUtils.encodeERC721ProxyData(erc721Token.address, makerAssetId);
// Perform a transfer from makerAddress to takerAddress
const amount = new BigNumber(1);
return expect(