From 650efb95e224696fa60db641a21dd77237f30aa0 Mon Sep 17 00:00:00 2001 From: Amir Bandeali Date: Tue, 1 Oct 2019 22:18:09 -0700 Subject: [PATCH] Add more contract configs tests --- packages/contract-addresses/src/index.ts | 4 +- .../migrations/src/test_contract_configs.ts | 362 +++++++++++------- packages/migrations/src/testnet_migrations.ts | 6 +- 3 files changed, 235 insertions(+), 137 deletions(-) diff --git a/packages/contract-addresses/src/index.ts b/packages/contract-addresses/src/index.ts index cfc3af8bb9..d0bf29f7e0 100644 --- a/packages/contract-addresses/src/index.ts +++ b/packages/contract-addresses/src/index.ts @@ -97,7 +97,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = { devUtils: '0x2d4a9abda7b8b3605c8dbd34e3550a7467c78287', zrxVault: '0xa5bf6ac73bc40790fc6ffc9dbbbce76c9176e224', readOnlyProxy: '0xffd161026865ad8b4ab28a76840474935eec4dfa', - staking: '0x725bc2f8c85ed0289d3da79cde3125d33fc1d7e6', + staking: '0x8ec5a989a06432dace637c8d592727627a45a592', stakingProxy: '0xb2ca5824630e526f0f3181a4ea0447c795a84411', }, 42: { @@ -119,7 +119,7 @@ const networkToAddresses: { [networkId: number]: ContractAddresses } = { devUtils: '0xb1863ac46ae23ec55d6eeb8ecc8815655ee638a8', zrxVault: '0xf36eabdfe986b35b62c8fd5a98a7f2aebb79b291', readOnlyProxy: '0x25397d8aa7e6844dae70ee658fe072d45d6cf528', - staking: '0xa9290221e4632394e0209abe893a90f5445e1f23', + staking: '0xd67f2f346f6e85db70632d9f18f50e04192ab54d', stakingProxy: '0x9e7eef766702c3d9056a3de779e5d9d976bc3bdb', }, // NetworkId 50 represents our Ganache snapshot generated from migrations. diff --git a/packages/migrations/src/test_contract_configs.ts b/packages/migrations/src/test_contract_configs.ts index 08ad3cfe4e..ea145bc975 100644 --- a/packages/migrations/src/test_contract_configs.ts +++ b/packages/migrations/src/test_contract_configs.ts @@ -1,6 +1,8 @@ #!/usr/bin/env node import * as wrappers from '@0x/abi-gen-wrappers'; import { getContractAddressesForNetworkOrThrow } from '@0x/contract-addresses'; +import { ExchangeContract } from '@0x/contracts-exchange'; +import { StakingContract, StakingProxyContract, ZrxVaultContract } from '@0x/contracts-staking'; import { EmptyWalletSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0x/subproviders'; import { AssetProxyId } from '@0x/types'; import { logUtils, providerUtils } from '@0x/utils'; @@ -8,11 +10,13 @@ import { Web3Wrapper } from '@0x/web3-wrapper'; import { SupportedProvider } from 'ethereum-types'; // NOTE: add your own Infura Project ID to RPC urls before running +const INFURA_PROJECT_ID = ''; + const networkIdToRpcUrl = { - 1: 'https://mainnet.infura.io/v3/', - 3: 'https://ropsten.infura.io/v3/', - 4: 'https://rinkeby.infura.io/v3/', - 42: 'https://kovan.infura.io/v3/', + 1: `https://mainnet.infura.io/v3/${INFURA_PROJECT_ID}`, + 3: `https://ropsten.infura.io/v3/${INFURA_PROJECT_ID}`, + 4: `https://rinkeby.infura.io/v3/${INFURA_PROJECT_ID}`, + 42: `https://kovan.infura.io/v3/${INFURA_PROJECT_ID}`, }; async function testContractConfigsAsync(provider: SupportedProvider): Promise { @@ -26,140 +30,234 @@ async function testContractConfigsAsync(provider: SupportedProvider): Promise { + const exchangeOwner = await exchangeV2.owner.callAsync(); + warnIfMismatch(exchangeOwner, assetProxyOwner.address, 'Unexpected ExchangeV2 owner'); + + const registeredERC20Proxy = await exchangeV2.getAssetProxy.callAsync(AssetProxyId.ERC20); + warnIfMismatch(registeredERC20Proxy, erc20Proxy.address, 'Unexpected ERC20Proxy registered in ExchangeV2'); + + const registeredERC721Proxy = await exchangeV2.getAssetProxy.callAsync(AssetProxyId.ERC721); + warnIfMismatch(registeredERC721Proxy, erc721Proxy.address, 'Unexpected ERC721Proxy registered in ExchangeV2'); + + const registeredERC1155Proxy = await exchangeV2.getAssetProxy.callAsync(AssetProxyId.ERC1155); + warnIfMismatch( + registeredERC1155Proxy, + erc1155Proxy.address, + 'Unexpected ERC1155Proxy registered in ExchangeV2', + ); + + const registeredMultiAssetProxy = await exchangeV2.getAssetProxy.callAsync(AssetProxyId.MultiAsset); + warnIfMismatch( + registeredMultiAssetProxy, + multiAssetProxy.address, + 'Unexpected MultiAssetProxy registered in ExchangeV2', + ); + + const registeredStaticCallProxy = await exchangeV2.getAssetProxy.callAsync(AssetProxyId.StaticCall); + warnIfMismatch( + registeredStaticCallProxy, + addresses.staticCallProxy, + 'Unexpected StaticCallProxy registered in ExchangeV2', + ); + } + + async function verifyExchangeV3ConfigsAsync(): Promise { + const exchangeOwner = await exchange.owner.callAsync(); + warnIfMismatch(exchangeOwner, assetProxyOwner.address, 'Unexpected Exchange owner'); + + const registeredERC20Proxy = await exchange.getAssetProxy.callAsync(AssetProxyId.ERC20); + warnIfMismatch(registeredERC20Proxy, erc20Proxy.address, 'Unexpected ERC20Proxy registered in Exchange'); + + const registeredERC721Proxy = await exchange.getAssetProxy.callAsync(AssetProxyId.ERC721); + warnIfMismatch(registeredERC721Proxy, erc721Proxy.address, 'Unexpected ERC721Proxy registered in Exchange'); + + const registeredERC1155Proxy = await exchange.getAssetProxy.callAsync(AssetProxyId.ERC1155); + warnIfMismatch(registeredERC1155Proxy, erc1155Proxy.address, 'Unexpected ERC1155Proxy registered in Exchange'); + + const registeredMultiAssetProxy = await exchange.getAssetProxy.callAsync(AssetProxyId.MultiAsset); + warnIfMismatch( + registeredMultiAssetProxy, + multiAssetProxy.address, + 'Unexpected MultiAssetProxy registered in Exchange', + ); + + const registeredStaticCallProxy = await exchange.getAssetProxy.callAsync(AssetProxyId.StaticCall); + warnIfMismatch( + registeredStaticCallProxy, + addresses.staticCallProxy, + 'Unexpected StaticCallProxy registered in Exchange', + ); + + const protocolFeeCollector = await exchange.protocolFeeCollector.callAsync(); + warnIfMismatch(protocolFeeCollector, addresses.stakingProxy, 'Unexpected StakingProxy attached to Exchange'); + + const protocolFeeMultiplier = await exchange.protocolFeeMultiplier.callAsync(); + warnIfMismatch(protocolFeeMultiplier.toString(), '150000', 'Unexpected protocolFeeMultiplier in Exchange'); + } + + async function verifyAssetProxyConfigsAsync(): Promise { + // Verify ERC20Proxy configs + const erc20ProxyOwner = await erc20Proxy.owner.callAsync(); + warnIfMismatch(erc20ProxyOwner, assetProxyOwner.address, 'Unexpected ERC20Proxy owner'); + + const erc20AuthorizedAddresses = await erc20Proxy.getAuthorizedAddresses.callAsync(); + warnIfMismatch(erc20AuthorizedAddresses.length, 4, 'Unexpected number of authorized addresses in ERC20Proxy'); + + const isExchangeV2AuthorizedInERC20Proxy = await erc20Proxy.authorized.callAsync(exchangeV2.address); + warnIfMismatch(isExchangeV2AuthorizedInERC20Proxy, true, 'ExchangeV2 not authorized in ERC20Proxy'); + + const isExchangeAuthorizedInERC20Proxy = await erc20Proxy.authorized.callAsync(exchange.address); + warnIfMismatch(isExchangeAuthorizedInERC20Proxy, true, 'Exchange not authorized in ERC20Proxy'); + + const isMAPAuthorizedInER20Proxy = await erc20Proxy.authorized.callAsync(multiAssetProxy.address); + warnIfMismatch(isMAPAuthorizedInER20Proxy, true, 'MultiAssetProxy not authorized in ERC20Proxy'); + + const isZrxVaultAuthorizedInER20Proxy = await erc20Proxy.authorized.callAsync(zrxVault.address); + warnIfMismatch(isZrxVaultAuthorizedInER20Proxy, true, 'ZrxVault not authorized in ERC20Proxy'); + + // Verify ERC721Proxy configs + const erc721ProxyOwner = await erc721Proxy.owner.callAsync(); + warnIfMismatch(erc721ProxyOwner, assetProxyOwner.address, 'Unexpected ERC721Proxy owner'); + + const erc721AuthorizedAddresses = await erc721Proxy.getAuthorizedAddresses.callAsync(); + warnIfMismatch(erc721AuthorizedAddresses.length, 3, 'Unexpected number of authorized addresses in ERC721Proxy'); + + const isExchangeV2AuthorizedInERC721Proxy = await erc721Proxy.authorized.callAsync(exchangeV2.address); + warnIfMismatch(isExchangeV2AuthorizedInERC721Proxy, true, 'ExchangeV2 not authorized in ERC721Proxy'); + + const isExchangeAuthorizedInERC721Proxy = await erc721Proxy.authorized.callAsync(exchange.address); + warnIfMismatch(isExchangeAuthorizedInERC721Proxy, true, 'Exchange not authorized in ERC721Proxy'); + + const isMAPAuthorizedInER721Proxy = await erc721Proxy.authorized.callAsync(multiAssetProxy.address); + warnIfMismatch(isMAPAuthorizedInER721Proxy, true, 'MultiAssetProxy not authorized in ERC721Proxy'); + + // Verify ERC1155Proxy configs + const erc1155ProxyOwner = await erc1155Proxy.owner.callAsync(); + warnIfMismatch(erc1155ProxyOwner, assetProxyOwner.address, 'Unexpected ERC1155Proxy owner'); + + const erc1155AuthorizedAddresses = await erc1155Proxy.getAuthorizedAddresses.callAsync(); + warnIfMismatch( + erc1155AuthorizedAddresses.length, + 3, + 'Unexpected number of authorized addresses in ERC1155Proxy', + ); + + const isExchangeV2AuthorizedInERC1155Proxy = await erc1155Proxy.authorized.callAsync(exchangeV2.address); + warnIfMismatch(isExchangeV2AuthorizedInERC1155Proxy, true, 'ExchangeV2 not authorized in ERC1155Proxy'); + + const isExchangeAuthorizedInERC1155Proxy = await erc1155Proxy.authorized.callAsync(exchange.address); + warnIfMismatch(isExchangeAuthorizedInERC1155Proxy, true, 'Exchange not authorized in ERC1155Proxy'); + + const isMAPAuthorizedInER1155Proxy = await erc1155Proxy.authorized.callAsync(multiAssetProxy.address); + warnIfMismatch(isMAPAuthorizedInER1155Proxy, true, 'MultiAssetProxy not authorized in ERC1155Proxy'); + + // Verify MultiAssetProxy configs + const multiAssetProxyOwner = await multiAssetProxy.owner.callAsync(); + warnIfMismatch(multiAssetProxyOwner, assetProxyOwner.address, 'Unexpected MultiAssetProxy owner'); + + const multiAssetProxyAuthorizedAddresses = await multiAssetProxy.getAuthorizedAddresses.callAsync(); + warnIfMismatch( + multiAssetProxyAuthorizedAddresses.length, + 2, + 'Unexpected number of authorized addresses in MultiAssetProxy', + ); + + const isExchangeV2AuthorizedInMultiAssetProxy = await multiAssetProxy.authorized.callAsync(exchangeV2.address); + warnIfMismatch(isExchangeV2AuthorizedInMultiAssetProxy, true, 'ExchangeV2 not authorized in MultiAssetProxy'); + + const isExchangeAuthorizedInMultiAssetProxy = await multiAssetProxy.authorized.callAsync(exchange.address); + warnIfMismatch(isExchangeAuthorizedInMultiAssetProxy, true, 'Exchange not authorized in MultiAssetProxy'); + + const registeredERC20ProxyInMAP = await multiAssetProxy.getAssetProxy.callAsync(AssetProxyId.ERC20); + warnIfMismatch( + registeredERC20ProxyInMAP, + erc20Proxy.address, + 'Unexpected ERC20Proxy registered in MultiAssetProxy', + ); + + const registeredERC721ProxyInMAP = await multiAssetProxy.getAssetProxy.callAsync(AssetProxyId.ERC721); + warnIfMismatch( + registeredERC721ProxyInMAP, + erc721Proxy.address, + 'Unexpected ERC721Proxy registered in MultiAssetProxy', + ); + + const registeredERC1155ProxyInMAP = await multiAssetProxy.getAssetProxy.callAsync(AssetProxyId.ERC1155); + warnIfMismatch( + registeredERC1155ProxyInMAP, + erc1155Proxy.address, + 'Unexpected ERC1155Proxy registered in MultiAssetProxy', + ); + + const registeredStaticCallProxyInMAP = await multiAssetProxy.getAssetProxy.callAsync(AssetProxyId.StaticCall); + warnIfMismatch( + registeredStaticCallProxyInMAP, + addresses.staticCallProxy, + 'Unexpected StaticCallProxy registered in MultiAssetProxy', + ); + } + + async function verifyStakingConfigsAsync(): Promise { + const stakingLogicAddress = await stakingProxy.stakingContract.callAsync(); + warnIfMismatch(stakingLogicAddress, addresses.staking, 'Unexpected Staking contract attached to StakingProxy'); + + const readOnlyProxy = await stakingProxy.readOnlyProxy.callAsync(); + warnIfMismatch(readOnlyProxy, addresses.readOnlyProxy, 'Unexpected ReadOnlyProxy set in StakingProxy'); + + const readOnlyCallee = await stakingProxy.readOnlyProxyCallee.callAsync(); + warnIfMismatch(readOnlyCallee, addresses.staking, 'Unexpected readOnlyProxyCallee'); + + const zrxVaultAddress = await stakingContract.getZrxVault.callAsync(); + warnIfMismatch(zrxVaultAddress, addresses.zrxVault, 'Unexpected ZrxVault set in Staking contract'); + + const wethAddress = await stakingContract.getWethContract.callAsync(); + warnIfMismatch(wethAddress, addresses.etherToken, 'Unexpected WETH contract set in Staking contract'); + + const stakingProxyOwner = await stakingProxy.owner.callAsync(); + warnIfMismatch(stakingProxyOwner, addresses.assetProxyOwner, 'Unexpected StakingProxy owner'); + + const zrxVaultOwner = await zrxVault.owner.callAsync(); + warnIfMismatch(zrxVaultOwner, addresses.assetProxyOwner, 'Unexpected ZrxVault owner'); + + const stakingProxyAuthorizedAddresses = await stakingProxy.getAuthorizedAddresses.callAsync(); + warnIfMismatch( + stakingProxyAuthorizedAddresses.length, + 1, + 'Unexpected number of authorized addresses in StakingProxy', + ); + const isAssetProxyOwnerAuthorizedInStakingProxy = await stakingProxy.authorized.callAsync( + addresses.assetProxyOwner, + ); + warnIfMismatch( + isAssetProxyOwnerAuthorizedInStakingProxy, + true, + 'AssetProxyOwner not authorized in StakingProxy', + ); + + const zrxVaultAuthorizedAddresses = await zrxVault.getAuthorizedAddresses.callAsync(); + warnIfMismatch(zrxVaultAuthorizedAddresses.length, 1, 'Unexpected number of authorized addresses in ZrxVault'); + const isAssetProxyOwnerAuthorizedInZrxVault = await zrxVault.authorized.callAsync(addresses.assetProxyOwner); + warnIfMismatch(isAssetProxyOwnerAuthorizedInZrxVault, true, 'AssetProxyOwner not authorized in ZrxVault'); + } + + async function verifyAssetProxyOwnerConfigsAsync(): Promise {} - // Verify Exchange configs - const exchangeOwner = await exchange.owner.callAsync(); - warnIfMismatch(exchangeOwner, assetProxyOwner.address, 'Unexpected Exchange owner'); - - const registeredERC20Proxy = await exchange.getAssetProxy.callAsync(AssetProxyId.ERC20); - warnIfMismatch(registeredERC20Proxy, erc20Proxy.address, 'Unexpected ERC20Proxy registered in Exchange'); - - const registeredERC721Proxy = await exchange.getAssetProxy.callAsync(AssetProxyId.ERC721); - warnIfMismatch(registeredERC721Proxy, erc721Proxy.address, 'Unexpected ERC721Proxy registered in Exchange'); - - const registeredERC1155Proxy = await exchange.getAssetProxy.callAsync(AssetProxyId.ERC1155); - warnIfMismatch(registeredERC1155Proxy, erc1155Proxy.address, 'Unexpected ERC1155Proxy registered in Exchange'); - - const registeredMultiAssetProxy = await exchange.getAssetProxy.callAsync(AssetProxyId.MultiAsset); - warnIfMismatch( - registeredMultiAssetProxy, - multiAssetProxy.address, - 'Unexpected MultiAssetProxy registered in Exchange', - ); - - const registeredStaticCallProxy = await exchange.getAssetProxy.callAsync(AssetProxyId.StaticCall); - warnIfMismatch( - registeredStaticCallProxy, - addresses.staticCallProxy, - 'Unexpected StaticCallProxy registered in Exchange', - ); - - // Verify ERC20Proxy configs - const erc20ProxyOwner = await erc20Proxy.owner.callAsync(); - warnIfMismatch(erc20ProxyOwner, assetProxyOwner.address, 'Unexpected ERC20Proxy owner'); - - const erc20AuthorizedAddresses = await erc20Proxy.getAuthorizedAddresses.callAsync(); - warnIfMismatch(erc20AuthorizedAddresses.length, 2, 'Unexpected number of authorized addresses in ERC20Proxy'); - - const isExchangeAuthorizedInERC20Proxy = await erc20Proxy.authorized.callAsync(exchange.address); - warnIfMismatch(isExchangeAuthorizedInERC20Proxy, true, 'Exchange not authorized in ERC20Proxy'); - - const isMAPAuthorizedInER20Proxy = await erc20Proxy.authorized.callAsync(multiAssetProxy.address); - warnIfMismatch(isMAPAuthorizedInER20Proxy, true, 'MultiAssetProxy not authorized in ERC20Proxy'); - - // Verify ERC721Proxy configs - const erc721ProxyOwner = await erc721Proxy.owner.callAsync(); - warnIfMismatch(erc721ProxyOwner, assetProxyOwner.address, 'Unexpected ERC721Proxy owner'); - - const erc721AuthorizedAddresses = await erc721Proxy.getAuthorizedAddresses.callAsync(); - warnIfMismatch(erc721AuthorizedAddresses.length, 2, 'Unexpected number of authorized addresses in ERC721Proxy'); - - const isExchangeAuthorizedInERC721Proxy = await erc721Proxy.authorized.callAsync(exchange.address); - warnIfMismatch(isExchangeAuthorizedInERC721Proxy, true, 'Exchange not authorized in ERC721Proxy'); - - const isMAPAuthorizedInER721Proxy = await erc721Proxy.authorized.callAsync(multiAssetProxy.address); - warnIfMismatch(isMAPAuthorizedInER721Proxy, true, 'MultiAssetProxy not authorized in ERC721Proxy'); - - // Verify ERC1155Proxy configs - const erc1155ProxyOwner = await erc1155Proxy.owner.callAsync(); - warnIfMismatch(erc1155ProxyOwner, assetProxyOwner.address, 'Unexpected ERC1155Proxy owner'); - - const erc1155AuthorizedAddresses = await erc1155Proxy.getAuthorizedAddresses.callAsync(); - warnIfMismatch(erc1155AuthorizedAddresses.length, 2, 'Unexpected number of authorized addresses in ERC1155Proxy'); - - const isExchangeAuthorizedInERC1155Proxy = await erc1155Proxy.authorized.callAsync(exchange.address); - warnIfMismatch(isExchangeAuthorizedInERC1155Proxy, true, 'Exchange not authorized in ERC1155Proxy'); - - const isMAPAuthorizedInER1155Proxy = await erc1155Proxy.authorized.callAsync(multiAssetProxy.address); - warnIfMismatch(isMAPAuthorizedInER1155Proxy, true, 'MultiAssetProxy not authorized in ERC1155Proxy'); - - // Verify MultiAssetProxy configs - const multiAssetProxyOwner = await multiAssetProxy.owner.callAsync(); - 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); - warnIfMismatch(isExchangeAuthorizedInMultiAssetProxy, true, 'Exchange not authorized in MultiAssetProxy'); - - const registeredERC20ProxyInMAP = await exchange.getAssetProxy.callAsync(AssetProxyId.ERC20); - warnIfMismatch( - registeredERC20ProxyInMAP, - erc20Proxy.address, - 'Unexpected ERC20Proxy registered in MultiAssetProxy', - ); - - const registeredERC721ProxyInMAP = await exchange.getAssetProxy.callAsync(AssetProxyId.ERC721); - warnIfMismatch( - registeredERC721ProxyInMAP, - erc721Proxy.address, - 'Unexpected ERC721Proxy registered in MultiAssetProxy', - ); - - const registeredERC1155ProxyInMAP = await exchange.getAssetProxy.callAsync(AssetProxyId.ERC1155); - warnIfMismatch( - registeredERC1155ProxyInMAP, - erc1155Proxy.address, - 'Unexpected ERC1155Proxy registered in MultiAssetProxy', - ); - - const registeredStaticCallProxyInMAP = await exchange.getAssetProxy.callAsync(AssetProxyId.StaticCall); - warnIfMismatch( - registeredStaticCallProxyInMAP, - addresses.staticCallProxy, - 'Unexpected StaticCallProxy registered in MultiAssetProxy', - ); - - // Verify AssetProxyOwner configs - // TODO (xianny): re-enable when AssetProxyOwner contract is finalised - // const isERC20ProxyRegisteredInAPOwner = await assetProxyOwner.getAssetProxy.callAsync(erc20Proxy.address); - // warnIfMismatch(isERC20ProxyRegisteredInAPOwner, true, 'ERC20Proxy not registered in AssetProxyOwner'); - - // const isERC721ProxyRegisteredInAPOwner = await assetProxyOwner.getAssetProxy.callAsync( - // erc721Proxy.address, - // ); - // warnIfMismatch(isERC721ProxyRegisteredInAPOwner, true, 'ERC721Proxy not registered in AssetProxyOwner'); - - // const isERC1155ProxyRegisteredInAPOwner = await assetProxyOwner.getAssetProxy.callAsync( - // erc1155Proxy.address, - // ); - // warnIfMismatch(isERC1155ProxyRegisteredInAPOwner, true, 'ERC1155Proxy not registered in AssetProxyOwner'); - - // const isMultiAssetProxyRegisteredInAPOwner = await assetProxyOwner.getAssetProxy.callAsync( - // multiAssetProxy.address, - // ); - // warnIfMismatch(isMultiAssetProxyRegisteredInAPOwner, true, 'MultiAssetProxy not registered in AssetProxyOwner'); + await verifyExchangeV2ConfigsAsync(); + await verifyExchangeV3ConfigsAsync(); + await verifyAssetProxyConfigsAsync(); + await verifyStakingConfigsAsync(); } (async () => { diff --git a/packages/migrations/src/testnet_migrations.ts b/packages/migrations/src/testnet_migrations.ts index 7d185953fe..49c086a2d9 100644 --- a/packages/migrations/src/testnet_migrations.ts +++ b/packages/migrations/src/testnet_migrations.ts @@ -249,10 +249,10 @@ export async function runMigrationsAsync(supportedProvider: SupportedProvider, t } (async () => { - const networkId = 3; - const rpcUrl = 'https://ropsten.infura.io/v3/'; + const networkId = 4; + const rpcUrl = 'https://rinkeby.infura.io/v3/'; const provider = await providerFactory.getLedgerProviderAsync(networkId, rpcUrl); - await runMigrationsAsync(provider, { from: constants.ASSET_PROXY_OWNER_OWNERS[0], gasPrice: 40000000000 }); + await runMigrationsAsync(provider, { from: constants.ASSET_PROXY_OWNER_OWNERS[0], gasPrice: 60000000000 }); })().catch(err => { logUtils.log(err); process.exit(1);