aboutsummaryrefslogtreecommitdiffstats
path: root/contracts
diff options
context:
space:
mode:
authorGreg Hysen <greg.hysen@gmail.com>2018-12-19 14:01:48 +0800
committerGreg Hysen <greg.hysen@gmail.com>2019-01-15 02:49:44 +0800
commite4551c8f6037302124cae4cda51b8f7624ade687 (patch)
tree7878caf2441e72bd5e8147db44bc0d3426407e34 /contracts
parent2f1454e90e5fd7d85c4deb3a8c674043e8a14564 (diff)
downloaddexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.gz
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.bz2
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.lz
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.xz
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.tar.zst
dexon-sol-tools-e4551c8f6037302124cae4cda51b8f7624ade687.zip
Works for almost all tests
Diffstat (limited to 'contracts')
-rw-r--r--contracts/protocol/test/asset_proxy/proxies.ts17
-rw-r--r--contracts/protocol/test/exchange/internal.ts1
-rw-r--r--contracts/protocol/test/utils/erc721_wrapper.ts4
3 files changed, 0 insertions, 22 deletions
diff --git a/contracts/protocol/test/asset_proxy/proxies.ts b/contracts/protocol/test/asset_proxy/proxies.ts
index b2e7f5afb..650594c12 100644
--- a/contracts/protocol/test/asset_proxy/proxies.ts
+++ b/contracts/protocol/test/asset_proxy/proxies.ts
@@ -78,7 +78,6 @@ describe('Asset Transfer Proxies', () => {
await blockchainLifecycle.revertAsync();
});
before(async () => {
- console.log('1');
const accounts = await web3Wrapper.getAvailableAddressesAsync();
const usedAddresses = ([owner, notAuthorized, authorized, fromAddress, toAddress] = _.slice(accounts, 0, 5));
@@ -94,7 +93,6 @@ describe('Asset Transfer Proxies', () => {
txDefaults,
);
- console.log('2');
// Configure ERC20Proxy
await web3Wrapper.awaitTransactionSuccessAsync(
await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(authorized, {
@@ -102,7 +100,6 @@ describe('Asset Transfer Proxies', () => {
}),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('3');
await web3Wrapper.awaitTransactionSuccessAsync(
await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
from: owner,
@@ -110,7 +107,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('4');
// Configure ERC721Proxy
await web3Wrapper.awaitTransactionSuccessAsync(
@@ -120,7 +116,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('5');
await web3Wrapper.awaitTransactionSuccessAsync(
await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
from: owner,
@@ -128,7 +123,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('6');
// Configure MultiAssetProxy
await web3Wrapper.awaitTransactionSuccessAsync(
@@ -138,7 +132,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('7');
await web3Wrapper.awaitTransactionSuccessAsync(
await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, {
from: owner,
@@ -146,7 +139,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('8');
await web3Wrapper.awaitTransactionSuccessAsync(
await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc721Proxy.address, {
from: owner,
@@ -154,7 +146,6 @@ describe('Asset Transfer Proxies', () => {
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('9');
// Deploy and configure ERC20 tokens
const numDummyErc20ToDeploy = 2;
@@ -181,14 +172,12 @@ describe('Asset Transfer Proxies', () => {
constants.DUMMY_TOKEN_TOTAL_SUPPLY,
);
- console.log('10');
await erc20Wrapper.setBalancesAndAllowancesAsync();
await web3Wrapper.awaitTransactionSuccessAsync(
await noReturnErc20Token.setBalance.sendTransactionAsync(fromAddress, constants.INITIAL_ERC20_BALANCE),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('11');
await web3Wrapper.awaitTransactionSuccessAsync(
await noReturnErc20Token.approve.sendTransactionAsync(
erc20Proxy.address,
@@ -197,7 +186,6 @@ describe('Asset Transfer Proxies', () => {
),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('12');
await web3Wrapper.awaitTransactionSuccessAsync(
await multipleReturnErc20Token.setBalance.sendTransactionAsync(
fromAddress,
@@ -205,7 +193,6 @@ describe('Asset Transfer Proxies', () => {
),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('13');
await web3Wrapper.awaitTransactionSuccessAsync(
await multipleReturnErc20Token.approve.sendTransactionAsync(
erc20Proxy.address,
@@ -214,7 +201,6 @@ describe('Asset Transfer Proxies', () => {
),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('14');
// Deploy and configure ERC721 tokens and receiver
[erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
@@ -223,12 +209,9 @@ describe('Asset Transfer Proxies', () => {
provider,
txDefaults,
);
- console.log('15');
await erc721Wrapper.setBalancesAndAllowancesAsync();
- console.log('16');
const erc721Balances = await erc721Wrapper.getBalancesAsync();
- console.log('17');
erc721AFromTokenId = erc721Balances[fromAddress][erc721TokenA.address][0];
erc721BFromTokenId = erc721Balances[fromAddress][erc721TokenB.address][0];
});
diff --git a/contracts/protocol/test/exchange/internal.ts b/contracts/protocol/test/exchange/internal.ts
index 225890f02..ffe1f8a55 100644
--- a/contracts/protocol/test/exchange/internal.ts
+++ b/contracts/protocol/test/exchange/internal.ts
@@ -451,7 +451,6 @@ describe.skip('Exchange core internal functions', () => {
makerFeePaid: new BigNumber(0),
takerFeePaid: new BigNumber(0),
};
- //console.log(`EMPTY ORDER:\n ${JSON.stringify(emptySignedOrder, null ,4)}`);
await web3Wrapper.awaitTransactionSuccessAsync(
await testExchange.publicUpdateFilledState.sendTransactionAsync(
orderUtils.getOrderWithoutExchangeAddress(emptySignedOrder),
diff --git a/contracts/protocol/test/utils/erc721_wrapper.ts b/contracts/protocol/test/utils/erc721_wrapper.ts
index 138fccf6f..1f658ce86 100644
--- a/contracts/protocol/test/utils/erc721_wrapper.ts
+++ b/contracts/protocol/test/utils/erc721_wrapper.ts
@@ -102,15 +102,12 @@ export class ERC721Wrapper {
public async approveAsync(to: string, tokenAddress: string, tokenId: BigNumber): Promise<void> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const tokenOwner = await this.ownerOfAsync(tokenAddress, tokenId);
- console.log('a');
- console.log(to, ':', tokenId, ':', tokenOwner);
await this._web3Wrapper.awaitTransactionSuccessAsync(
await tokenContract.approve.sendTransactionAsync(to, tokenId, {
from: tokenOwner,
}),
constants.AWAIT_TRANSACTION_MINED_MS,
);
- console.log('b');
}
public async transferFromAsync(
tokenAddress: string,
@@ -147,7 +144,6 @@ export class ERC721Wrapper {
public async ownerOfAsync(tokenAddress: string, tokenId: BigNumber): Promise<string> {
const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
const owner = await tokenContract.ownerOf.callAsync(tokenId);
- console.log(`OWNER OF = ${owner}`);
return owner;
}
public async isOwnerAsync(userAddress: string, tokenAddress: string, tokenId: BigNumber): Promise<boolean> {