Removed unnecessary assetProxyManagerAddress
This commit is contained in:
committed by
Amir Bandeali
parent
772bb65237
commit
adad76eca6
@@ -31,7 +31,7 @@ const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
describe('AssetProxyDispatcher', () => {
|
||||
let owner: string;
|
||||
let notOwner: string;
|
||||
let assetProxyManagerAddress: string;
|
||||
let exchangeAddress: string;
|
||||
let tokenOwner: string;
|
||||
let makerAddress: string;
|
||||
let takerAddress: string;
|
||||
@@ -49,7 +49,7 @@ describe('AssetProxyDispatcher', () => {
|
||||
const accounts = await web3Wrapper.getAvailableAddressesAsync();
|
||||
owner = tokenOwner = accounts[0];
|
||||
notOwner = accounts[1];
|
||||
assetProxyManagerAddress = accounts[2];
|
||||
exchangeAddress = accounts[2];
|
||||
makerAddress = accounts[3];
|
||||
takerAddress = accounts[4];
|
||||
const tokenTransferProxyInstance = await deployer.deployAsync(ContractName.TokenTransferProxy);
|
||||
@@ -101,7 +101,7 @@ describe('AssetProxyDispatcher', () => {
|
||||
from: makerAddress,
|
||||
});
|
||||
|
||||
await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(assetProxyManagerAddress, {
|
||||
await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(exchangeAddress, {
|
||||
from: accounts[0],
|
||||
});
|
||||
await erc20TransferProxyV1.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, {
|
||||
@@ -259,7 +259,7 @@ describe('AssetProxyDispatcher', () => {
|
||||
});
|
||||
|
||||
describe('transferFrom', () => {
|
||||
it('should dispatch transfer to registered proxy', async () => {
|
||||
it('should dispatch transfer to registered proxy', async () => {
|
||||
// Register ERC20 proxy
|
||||
await assetProxyDispatcher.addAssetProxy.sendTransactionAsync(
|
||||
AssetProxyId.ERC20,
|
||||
@@ -279,7 +279,7 @@ describe('AssetProxyDispatcher', () => {
|
||||
makerAddress,
|
||||
takerAddress,
|
||||
amount,
|
||||
{ from: assetProxyManagerAddress },
|
||||
{ from: exchangeAddress },
|
||||
);
|
||||
|
||||
// Verify transfer was successful
|
||||
|
||||
@@ -31,7 +31,7 @@ const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
describe('Asset Transfer Proxies', () => {
|
||||
let owner: string;
|
||||
let notOwner: string;
|
||||
let assetProxyManagerAddress: string;
|
||||
let exchangeAddress: string;
|
||||
let tokenOwner: string;
|
||||
let makerAddress: string;
|
||||
let takerAddress: string;
|
||||
@@ -51,7 +51,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
const accounts = await web3Wrapper.getAvailableAddressesAsync();
|
||||
owner = tokenOwner = accounts[0];
|
||||
notOwner = accounts[1];
|
||||
assetProxyManagerAddress = accounts[2];
|
||||
exchangeAddress = accounts[2];
|
||||
makerAddress = accounts[3];
|
||||
takerAddress = accounts[4];
|
||||
const tokenTransferProxyInstance = await deployer.deployAsync(ContractName.TokenTransferProxy);
|
||||
@@ -114,16 +114,16 @@ describe('Asset Transfer Proxies', () => {
|
||||
await ck.setApprovalForAll.sendTransactionAsync(erc721TransferProxy.address, true, { from: makerAddress });
|
||||
await ck.setApprovalForAll.sendTransactionAsync(erc721TransferProxy.address, true, { from: takerAddress });
|
||||
await ck.mint.sendTransactionAsync(makerAddress, makerTokenId, { from: tokenOwner });
|
||||
await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(assetProxyManagerAddress, {
|
||||
await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(exchangeAddress, {
|
||||
from: accounts[0],
|
||||
});
|
||||
await erc20TransferProxyV1.addAuthorizedAddress.sendTransactionAsync(assetProxyManagerAddress, {
|
||||
await erc20TransferProxyV1.addAuthorizedAddress.sendTransactionAsync(exchangeAddress, {
|
||||
from: accounts[0],
|
||||
});
|
||||
await erc20TransferProxy.addAuthorizedAddress.sendTransactionAsync(assetProxyManagerAddress, {
|
||||
await erc20TransferProxy.addAuthorizedAddress.sendTransactionAsync(exchangeAddress, {
|
||||
from: accounts[0],
|
||||
});
|
||||
await erc721TransferProxy.addAuthorizedAddress.sendTransactionAsync(assetProxyManagerAddress, {
|
||||
await erc721TransferProxy.addAuthorizedAddress.sendTransactionAsync(exchangeAddress, {
|
||||
from: accounts[0],
|
||||
});
|
||||
await tokenTransferProxy.addAuthorizedAddress.sendTransactionAsync(erc20TransferProxyV1.address, {
|
||||
@@ -176,7 +176,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
makerAddress,
|
||||
takerAddress,
|
||||
amount,
|
||||
{ from: assetProxyManagerAddress },
|
||||
{ from: exchangeAddress },
|
||||
);
|
||||
|
||||
// Verify transfer was successful
|
||||
@@ -247,7 +247,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
makerAddress,
|
||||
takerAddress,
|
||||
amount,
|
||||
{ from: assetProxyManagerAddress },
|
||||
{ from: exchangeAddress },
|
||||
);
|
||||
|
||||
// Verify transfer was successful
|
||||
@@ -334,7 +334,7 @@ describe('Asset Transfer Proxies', () => {
|
||||
makerAddress,
|
||||
takerAddress,
|
||||
amount,
|
||||
{ from: assetProxyManagerAddress },
|
||||
{ from: exchangeAddress },
|
||||
);
|
||||
|
||||
// Verify transfer was successful
|
||||
|
||||
@@ -52,7 +52,6 @@ describe('Exchange', () => {
|
||||
let tokenOwner: string;
|
||||
let takerAddress: string;
|
||||
let feeRecipientAddress: string;
|
||||
let assetProxyManagerAddress: string;
|
||||
const INITIAL_BALANCE = ZeroEx.toBaseUnitAmount(new BigNumber(10000), 18);
|
||||
const INITIAL_ALLOWANCE = ZeroEx.toBaseUnitAmount(new BigNumber(10000), 18);
|
||||
|
||||
@@ -81,7 +80,7 @@ describe('Exchange', () => {
|
||||
before(async () => {
|
||||
const accounts = await web3Wrapper.getAvailableAddressesAsync();
|
||||
makerAddress = accounts[0];
|
||||
[tokenOwner, takerAddress, feeRecipientAddress, assetProxyManagerAddress] = accounts;
|
||||
[tokenOwner, takerAddress, feeRecipientAddress] = accounts;
|
||||
const [repInstance, dgdInstance, zrxInstance, ckInstance, etInstance] = await Promise.all([
|
||||
deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
|
||||
deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
|
||||
@@ -137,9 +136,6 @@ describe('Exchange', () => {
|
||||
assetProxyDispatcher.address,
|
||||
]);
|
||||
exchange = new ExchangeContract(exchangeInstance.abi, exchangeInstance.address, provider);
|
||||
await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(assetProxyManagerAddress, {
|
||||
from: accounts[0],
|
||||
});
|
||||
await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: accounts[0] });
|
||||
await erc20TransferProxyV1.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, {
|
||||
from: accounts[0],
|
||||
|
||||
@@ -28,7 +28,6 @@ const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
|
||||
describe('Exchange', () => {
|
||||
let makerAddress: string;
|
||||
let feeRecipientAddress: string;
|
||||
let assetProxyManagerAddress: string;
|
||||
|
||||
let signedOrder: SignedOrder;
|
||||
let exchangeWrapper: ExchangeWrapper;
|
||||
@@ -36,7 +35,7 @@ describe('Exchange', () => {
|
||||
|
||||
before(async () => {
|
||||
const accounts = await web3Wrapper.getAvailableAddressesAsync();
|
||||
[makerAddress, feeRecipientAddress, assetProxyManagerAddress] = accounts;
|
||||
[makerAddress, feeRecipientAddress] = accounts;
|
||||
const tokenRegistry = await deployer.deployAsync(ContractName.TokenRegistry);
|
||||
const tokenTransferProxy = await deployer.deployAsync(ContractName.TokenTransferProxy);
|
||||
const assetProxyDispatcher = await deployer.deployAsync(ContractName.AssetProxyDispatcher);
|
||||
@@ -55,9 +54,6 @@ describe('Exchange', () => {
|
||||
assetProxyDispatcher.address,
|
||||
]);
|
||||
const exchange = new ExchangeContract(exchangeInstance.abi, exchangeInstance.address, provider);
|
||||
await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(assetProxyManagerAddress, {
|
||||
from: accounts[0],
|
||||
});
|
||||
await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: accounts[0] });
|
||||
await erc20TransferProxyV1.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, {
|
||||
from: accounts[0],
|
||||
|
||||
@@ -38,7 +38,6 @@ describe('Exchange', () => {
|
||||
let tokenOwner: string;
|
||||
let takerAddress: string;
|
||||
let feeRecipientAddress: string;
|
||||
let assetProxyManagerAddress: string;
|
||||
|
||||
const INITIAL_BALANCE = ZeroEx.toBaseUnitAmount(new BigNumber(10000), 18);
|
||||
const INITIAL_ALLOWANCE = ZeroEx.toBaseUnitAmount(new BigNumber(10000), 18);
|
||||
@@ -62,7 +61,7 @@ describe('Exchange', () => {
|
||||
before(async () => {
|
||||
const accounts = await web3Wrapper.getAvailableAddressesAsync();
|
||||
tokenOwner = accounts[0];
|
||||
[makerAddress, takerAddress, feeRecipientAddress, assetProxyManagerAddress] = accounts;
|
||||
[makerAddress, takerAddress, feeRecipientAddress] = accounts;
|
||||
const [repInstance, dgdInstance, zrxInstance] = await Promise.all([
|
||||
deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
|
||||
deployer.deployAsync(ContractName.DummyToken, constants.DUMMY_TOKEN_ARGS),
|
||||
@@ -105,9 +104,6 @@ describe('Exchange', () => {
|
||||
assetProxyDispatcher.address,
|
||||
]);
|
||||
exchange = new ExchangeContract(exchangeInstance.abi, exchangeInstance.address, provider);
|
||||
await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(assetProxyManagerAddress, {
|
||||
from: accounts[0],
|
||||
});
|
||||
await assetProxyDispatcher.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: accounts[0] });
|
||||
await erc20TransferProxyV1.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, {
|
||||
from: accounts[0],
|
||||
|
||||
Reference in New Issue
Block a user