Add authorizedAddresses length check to MAP config tests
This commit is contained in:
parent
5d7803323c
commit
06bec227ad
@ -7,6 +7,7 @@ import { logUtils, providerUtils } from '@0x/utils';
|
|||||||
import { Web3Wrapper } from '@0x/web3-wrapper';
|
import { Web3Wrapper } from '@0x/web3-wrapper';
|
||||||
import { SupportedProvider } from 'ethereum-types';
|
import { SupportedProvider } from 'ethereum-types';
|
||||||
|
|
||||||
|
// NOTE: add your own Infura Project ID to RPC urls before running
|
||||||
const networkIdToRpcUrl = {
|
const networkIdToRpcUrl = {
|
||||||
1: 'https://mainnet.infura.io/v3/',
|
1: 'https://mainnet.infura.io/v3/',
|
||||||
3: 'https://ropsten.infura.io/v3/',
|
3: 'https://ropsten.infura.io/v3/',
|
||||||
@ -102,6 +103,13 @@ async function testContractConfigsAsync(provider: SupportedProvider): Promise<vo
|
|||||||
const multiAssetProxyOwner = await multiAssetProxy.owner.callAsync();
|
const multiAssetProxyOwner = await multiAssetProxy.owner.callAsync();
|
||||||
warnIfMismatch(multiAssetProxyOwner, assetProxyOwner.address, 'Unexpected MultiAssetProxy owner');
|
warnIfMismatch(multiAssetProxyOwner, assetProxyOwner.address, 'Unexpected MultiAssetProxy owner');
|
||||||
|
|
||||||
|
const multiAssetProxyAuthorizedAddresses = await multiAssetProxy.getAuthorizedAddresses.callAsync();
|
||||||
|
warnIfMismatch(
|
||||||
|
multiAssetProxyAuthorizedAddresses.length,
|
||||||
|
1,
|
||||||
|
'Unexpected number of authorized addresses in MultiAssetProxy',
|
||||||
|
);
|
||||||
|
|
||||||
const isExchangeAuthorizedInMultiAssetProxy = await multiAssetProxy.authorized.callAsync(exchange.address);
|
const isExchangeAuthorizedInMultiAssetProxy = await multiAssetProxy.authorized.callAsync(exchange.address);
|
||||||
warnIfMismatch(isExchangeAuthorizedInMultiAssetProxy, true, 'Exchange not authorized in MultiAssetProxy');
|
warnIfMismatch(isExchangeAuthorizedInMultiAssetProxy, true, 'Exchange not authorized in MultiAssetProxy');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user