Make wethAssetProxy and zrxVault deployment constants
This commit is contained in:
@@ -117,8 +117,6 @@ export class StakingApiWrapper {
|
||||
new BigNumber(_params.maximumMakersInPool),
|
||||
new BigNumber(_params.cobbDouglasAlphaNumerator),
|
||||
new BigNumber(_params.cobbDouglasAlphaDenominator),
|
||||
_params.wethProxyAddress,
|
||||
_params.zrxVaultAddress,
|
||||
);
|
||||
},
|
||||
|
||||
@@ -228,22 +226,6 @@ export async function deployAndConfigureContractsAsync(
|
||||
artifacts,
|
||||
);
|
||||
|
||||
// deploy staking contract
|
||||
const stakingContract = await TestStakingContract.deployFrom0xArtifactAsync(
|
||||
customStakingArtifact !== undefined ? customStakingArtifact : artifacts.TestStaking,
|
||||
env.provider,
|
||||
env.txDefaults,
|
||||
artifacts,
|
||||
wethContract.address,
|
||||
);
|
||||
|
||||
// deploy read-only proxy
|
||||
const readOnlyProxyContract = await ReadOnlyProxyContract.deployFrom0xArtifactAsync(
|
||||
artifacts.ReadOnlyProxy,
|
||||
env.provider,
|
||||
env.txDefaults,
|
||||
artifacts,
|
||||
);
|
||||
// deploy zrx vault
|
||||
const zrxVaultContract = await ZrxVaultContract.deployFrom0xArtifactAsync(
|
||||
artifacts.ZrxVault,
|
||||
@@ -253,6 +235,26 @@ export async function deployAndConfigureContractsAsync(
|
||||
erc20ProxyContract.address,
|
||||
zrxTokenContract.address,
|
||||
);
|
||||
|
||||
// deploy staking contract
|
||||
const stakingContract = await TestStakingContract.deployFrom0xArtifactAsync(
|
||||
customStakingArtifact !== undefined ? customStakingArtifact : artifacts.TestStaking,
|
||||
env.provider,
|
||||
env.txDefaults,
|
||||
artifacts,
|
||||
wethContract.address,
|
||||
erc20ProxyContract.address,
|
||||
zrxVaultContract.address,
|
||||
);
|
||||
|
||||
// deploy read-only proxy
|
||||
const readOnlyProxyContract = await ReadOnlyProxyContract.deployFrom0xArtifactAsync(
|
||||
artifacts.ReadOnlyProxy,
|
||||
env.provider,
|
||||
env.txDefaults,
|
||||
artifacts,
|
||||
);
|
||||
|
||||
// deploy staking proxy
|
||||
const stakingProxyContract = await StakingProxyContract.deployFrom0xArtifactAsync(
|
||||
artifacts.StakingProxy,
|
||||
@@ -261,8 +263,6 @@ export async function deployAndConfigureContractsAsync(
|
||||
artifacts,
|
||||
stakingContract.address,
|
||||
readOnlyProxyContract.address,
|
||||
erc20ProxyContract.address,
|
||||
zrxVaultContract.address,
|
||||
);
|
||||
// deploy cobb douglas contract
|
||||
const cobbDouglasContract = await TestCobbDouglasContract.deployFrom0xArtifactAsync(
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { constants as testConstants, randomAddress } from '@0x/contracts-test-utils';
|
||||
import { constants as testConstants } from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
|
||||
const TEN_DAYS = 10 * 24 * 60 * 60;
|
||||
@@ -17,8 +17,6 @@ export const constants = {
|
||||
maximumMakersInPool: new BigNumber(10),
|
||||
cobbDouglasAlphaNumerator: new BigNumber(1),
|
||||
cobbDouglasAlphaDenominator: new BigNumber(2),
|
||||
wethProxyAddress: randomAddress(),
|
||||
zrxVaultAddress: randomAddress(),
|
||||
},
|
||||
PPM,
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { BlockchainTestsEnvironment, constants, expect, txDefaults } from '@0x/contracts-test-utils';
|
||||
import { BlockchainTestsEnvironment, expect, txDefaults } from '@0x/contracts-test-utils';
|
||||
import { BigNumber } from '@0x/utils';
|
||||
import { DecodedLogEntry, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
import * as _ from 'lodash';
|
||||
@@ -86,6 +86,7 @@ export class CumulativeRewardTrackingSimulation {
|
||||
txDefaults,
|
||||
artifacts,
|
||||
this._stakingApiWrapper.wethContract.address,
|
||||
this._stakingApiWrapper.zrxVaultContract.address,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -104,8 +105,6 @@ export class CumulativeRewardTrackingSimulation {
|
||||
await this._executeActionsAsync(initActions);
|
||||
await this._stakingApiWrapper.stakingProxyContract.attachStakingContract.awaitTransactionSuccessAsync(
|
||||
this.getTestCumulativeRewardTrackingContract().address,
|
||||
constants.NULL_ADDRESS,
|
||||
constants.NULL_ADDRESS,
|
||||
);
|
||||
const testLogs = await this._executeActionsAsync(testActions);
|
||||
CumulativeRewardTrackingSimulation._assertTestLogs(expectedTestLogs, testLogs);
|
||||
|
||||
@@ -11,8 +11,6 @@ export interface StakingParams {
|
||||
maximumMakersInPool: Numberish;
|
||||
cobbDouglasAlphaNumerator: Numberish;
|
||||
cobbDouglasAlphaDenominator: Numberish;
|
||||
wethProxyAddress: string;
|
||||
zrxVaultAddress: string;
|
||||
}
|
||||
|
||||
export interface StakerBalances {
|
||||
|
||||
Reference in New Issue
Block a user