Skip to content
This repository has been archived by the owner on Jul 9, 2021. It is now read-only.

Decode log arguments in awaitTransactionSuccessAsync #1995

Merged
merged 15 commits into from
Jul 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions contracts/asset-proxy/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "2.2.4",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
]
},
{
"timestamp": 1563957393,
"version": "2.2.3",
Expand Down
1 change: 1 addition & 0 deletions contracts/asset-proxy/test/authorizable.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('Authorizable', () => {
artifacts.MixinAuthorizable,
provider,
txDefaults,
artifacts,
);
});
beforeEach(async () => {
Expand Down
3 changes: 2 additions & 1 deletion contracts/asset-proxy/test/erc1155_proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import { LogWithDecodedArgs } from 'ethereum-types';
import * as ethUtil from 'ethereumjs-util';
import * as _ from 'lodash';

import { ERC1155ProxyContract, ERC1155ProxyWrapper } from '../src';
import { artifacts, ERC1155ProxyContract, ERC1155ProxyWrapper } from '../src';

chaiSetup.configure();
const expect = chai.expect;
Expand Down Expand Up @@ -89,6 +89,7 @@ describe('ERC1155Proxy', () => {
erc1155Artifacts.DummyERC1155Receiver,
provider,
txDefaults,
artifacts,
);
receiverContract = erc1155Receiver.address;
await erc1155ProxyWrapper.setBalancesAndAllowancesAsync();
Expand Down
4 changes: 4 additions & 0 deletions contracts/asset-proxy/test/proxies.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ describe('Asset Transfer Proxies', () => {
artifacts.MultiAssetProxy,
provider,
txDefaults,
artifacts,
);

// Configure ERC20Proxy
Expand Down Expand Up @@ -173,6 +174,7 @@ describe('Asset Transfer Proxies', () => {
erc20Artifacts.DummyNoReturnERC20Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
constants.DUMMY_TOKEN_DECIMALS,
Expand All @@ -182,6 +184,7 @@ describe('Asset Transfer Proxies', () => {
erc20Artifacts.DummyMultipleReturnERC20Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
constants.DUMMY_TOKEN_DECIMALS,
Expand Down Expand Up @@ -224,6 +227,7 @@ describe('Asset Transfer Proxies', () => {
erc721Artifacts.DummyERC721Receiver,
provider,
txDefaults,
artifacts,
);

await erc721Wrapper.setBalancesAndAllowancesAsync();
Expand Down
2 changes: 2 additions & 0 deletions contracts/asset-proxy/test/static_call_proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ describe('StaticCallProxy', () => {
artifacts.StaticCallProxy,
provider,
txDefaults,
artifacts,
);
staticCallProxy = new IAssetProxyContract(staticCallProxyWithoutTransferFrom.address, provider, txDefaults);
staticCallTarget = await TestStaticCallTargetContract.deployFrom0xArtifactAsync(
artifacts.TestStaticCallTarget,
provider,
txDefaults,
artifacts,
);
});
beforeEach(async () => {
Expand Down
2 changes: 2 additions & 0 deletions contracts/asset-proxy/test/utils/erc1155_proxy_wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ export class ERC1155ProxyWrapper {
erc1155Artifacts.ERC1155Mintable,
this._provider,
txDefaults,
artifacts,
);
const erc1155Wrapper = new Erc1155Wrapper(erc1155Contract, this._provider, this._contractOwnerAddress);
this._dummyTokenWrappers.push(erc1155Wrapper);
Expand All @@ -69,6 +70,7 @@ export class ERC1155ProxyWrapper {
artifacts.ERC1155Proxy,
this._provider,
txDefaults,
artifacts,
);
this._proxyIdIfExists = await this._proxyContract.getProxyId.callAsync();
return this._proxyContract;
Expand Down
2 changes: 2 additions & 0 deletions contracts/asset-proxy/test/utils/erc20_wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export class ERC20Wrapper {
erc20Artifacts.DummyERC20Token,
this._provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
decimals,
Expand All @@ -51,6 +52,7 @@ export class ERC20Wrapper {
artifacts.ERC20Proxy,
this._provider,
txDefaults,
artifacts,
);
this._proxyIdIfExists = await this._proxyContract.getProxyId.callAsync();
return this._proxyContract;
Expand Down
2 changes: 2 additions & 0 deletions contracts/asset-proxy/test/utils/erc721_wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class ERC721Wrapper {
erc721Artifacts.DummyERC721Token,
this._provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
),
Expand All @@ -41,6 +42,7 @@ export class ERC721Wrapper {
artifacts.ERC721Proxy,
this._provider,
txDefaults,
artifacts,
);
this._proxyIdIfExists = await this._proxyContract.getProxyId.callAsync();
return this._proxyContract;
Expand Down
9 changes: 9 additions & 0 deletions contracts/coordinator/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "2.0.9",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
]
},
{
"timestamp": 1563957393,
"version": "2.0.8",
Expand Down
2 changes: 2 additions & 0 deletions contracts/coordinator/test/coordinator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ describe('Coordinator tests', () => {
exchangeArtifacts.Exchange,
provider,
txDefaults,
artifacts,
assetDataUtils.encodeERC20AssetData(zrxToken.address),
);

Expand All @@ -91,6 +92,7 @@ describe('Coordinator tests', () => {
artifacts.Coordinator,
provider,
txDefaults,
artifacts,
exchange.address,
);

Expand Down
1 change: 1 addition & 0 deletions contracts/coordinator/test/libs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ describe('Libs tests', () => {
artifacts.Coordinator,
provider,
txDefaults,
artifacts,
exchangeAddress,
);
});
Expand Down
1 change: 1 addition & 0 deletions contracts/coordinator/test/mixins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ describe('Mixins tests', () => {
artifacts.Coordinator,
provider,
txDefaults,
artifacts,
exchangeAddress,
);
const accounts = await web3Wrapper.getAvailableAddressesAsync();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export class CoordinatorRegistryWrapper {
artifacts.CoordinatorRegistry,
this._provider,
txDefaults,
artifacts,
);
if (this._coordinatorRegistryContract === undefined) {
throw new Error(`Failed to deploy Coordinator Registry contract.`);
Expand Down
9 changes: 9 additions & 0 deletions contracts/dev-utils/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "0.0.6",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
]
},
{
"timestamp": 1563957393,
"version": "0.0.5",
Expand Down
11 changes: 11 additions & 0 deletions contracts/dev-utils/test/lib_asset_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,33 +92,39 @@ describe('LibAssetData', () => {
exchangeArtifacts.Exchange,
provider,
txDefaults,
artifacts,
constants.NULL_BYTES,
);

erc20Proxy = await ERC20ProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.ERC20Proxy,
provider,
txDefaults,
artifacts,
);
erc721Proxy = await ERC721ProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.ERC721Proxy,
provider,
txDefaults,
artifacts,
);
erc1155Proxy = await ERC1155ProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.ERC1155Proxy,
provider,
txDefaults,
artifacts,
);
multiAssetProxy = await MultiAssetProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.MultiAssetProxy,
provider,
txDefaults,
artifacts,
);
staticCallProxy = await StaticCallProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.StaticCallProxy,
provider,
txDefaults,
artifacts,
);

await exchange.registerAssetProxy.awaitTransactionSuccessAsync(erc20Proxy.address);
Expand All @@ -131,13 +137,15 @@ describe('LibAssetData', () => {
artifacts.LibAssetData,
provider,
txDefaults,
artifacts,
exchange.address,
);

staticCallTarget = await TestStaticCallTargetContract.deployFrom0xArtifactAsync(
proxyArtifacts.TestStaticCallTarget,
provider,
txDefaults,
artifacts,
);

[tokenOwnerAddress] = await web3Wrapper.getAvailableAddressesAsync();
Expand All @@ -146,6 +154,7 @@ describe('LibAssetData', () => {
erc20Artifacts.DummyERC20Token,
provider,
txDefaults,
artifacts,
'Dummy',
'DUM',
new BigNumber(1),
Expand All @@ -156,6 +165,7 @@ describe('LibAssetData', () => {
erc721Artifacts.DummyERC721Token,
provider,
txDefaults,
artifacts,
'Dummy',
'DUM',
);
Expand All @@ -172,6 +182,7 @@ describe('LibAssetData', () => {
erc1155Artifacts.ERC1155Mintable,
provider,
txDefaults,
artifacts,
);

const logDecoder = new LogDecoder(web3Wrapper, erc1155Artifacts);
Expand Down
1 change: 1 addition & 0 deletions contracts/dev-utils/test/lib_transaction_decoder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('LibTransactionDecoder', () => {
artifacts.LibTransactionDecoder,
provider,
txDefaults,
artifacts,
);
});
after(async () => {
Expand Down
3 changes: 3 additions & 0 deletions contracts/dev-utils/test/order_validation_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,15 @@ describe('OrderValidationUtils', () => {
exchangeArtifacts.Exchange,
provider,
txDefaults,
artifacts,
zrxAssetData,
);

multiAssetProxy = await MultiAssetProxyContract.deployFrom0xArtifactAsync(
proxyArtifacts.MultiAssetProxy,
provider,
txDefaults,
artifacts,
);
const exchangeWrapper = new ExchangeWrapper(exchange, provider);
await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
Expand All @@ -102,6 +104,7 @@ describe('OrderValidationUtils', () => {
artifacts.DevUtils,
provider,
txDefaults,
artifacts,
exchange.address,
zrxAssetData,
);
Expand Down
9 changes: 9 additions & 0 deletions contracts/erc1155/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "1.1.11",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
]
},
{
"timestamp": 1563957393,
"version": "1.1.10",
Expand Down
2 changes: 2 additions & 0 deletions contracts/erc1155/test/erc1155_token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,13 @@ describe('ERC1155Token', () => {
artifacts.ERC1155Mintable,
provider,
txDefaults,
artifacts,
);
erc1155Receiver = await DummyERC1155ReceiverContract.deployFrom0xArtifactAsync(
artifacts.DummyERC1155Receiver,
provider,
txDefaults,
artifacts,
);
receiver = erc1155Receiver.address;
// create wrapper & mint erc1155 tokens
Expand Down
9 changes: 9 additions & 0 deletions contracts/erc20/CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
[
{
"version": "2.2.10",
"changes": [
{
"note": "Updated calls to <contract wrapper>.deployFrom0xArtifactAsync to include artifact dependencies.",
"pr": 1995
}
]
},
{
"timestamp": 1563957393,
"version": "2.2.9",
Expand Down
1 change: 1 addition & 0 deletions contracts/erc20/test/unlimited_allowance_token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ describe('UnlimitedAllowanceToken', () => {
artifacts.DummyERC20Token,
provider,
txDefaults,
artifacts,
constants.DUMMY_TOKEN_NAME,
constants.DUMMY_TOKEN_SYMBOL,
constants.DUMMY_TOKEN_DECIMALS,
Expand Down
13 changes: 9 additions & 4 deletions contracts/erc20/test/weth9.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,15 @@ describe('EtherToken', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
account = accounts[0];

etherToken = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.WETH9, provider, {
gasPrice,
...txDefaults,
});
etherToken = await WETH9Contract.deployFrom0xArtifactAsync(
artifacts.WETH9,
provider,
{
gasPrice,
...txDefaults,
},
artifacts,
);
});
beforeEach(async () => {
await blockchainLifecycle.startAsync();
Expand Down
7 changes: 6 additions & 1 deletion contracts/erc20/test/zrx_token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ describe('ZRXToken', () => {
const accounts = await web3Wrapper.getAvailableAddressesAsync();
owner = accounts[0];
spender = accounts[1];
zrxToken = await ZRXTokenContract.deployFrom0xArtifactAsync(artifacts.ZRXToken, provider, txDefaults);
zrxToken = await ZRXTokenContract.deployFrom0xArtifactAsync(
artifacts.ZRXToken,
provider,
txDefaults,
artifacts,
);
MAX_UINT = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
});
beforeEach(async () => {
Expand Down
Loading