Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
await erc20BridgeProxy.addAuthorizedAddress(multiAssetProxy.address).awaitTransactionSuccessAsync(txDefaults);
await multiAssetProxy.registerAssetProxy(erc20BridgeProxy.address).awaitTransactionSuccessAsync(txDefaults);
const zrxProxy = erc20Proxy.address;
const zrxVault = await ZrxVaultContract.deployFrom0xArtifactAsync(
artifacts.ZrxVault,
provider,
txDefaults,
{},
zrxProxy,
zrxToken.address,
);
// Note we use TestStakingContract as the deployed bytecode of a StakingContract
// has the tokens hardcoded
const stakingLogic = await TestStakingContract.deployFrom0xArtifactAsync(
artifacts.Staking,
provider,
txDefaults,
{},
etherToken.address,
zrxVault.address,
);
const stakingProxy = await StakingProxyContract.deployFrom0xArtifactAsync(
artifacts.StakingProxy,
provider,
txDefaults,
{},
stakingLogic.address,
);
): Promise {
const zrxVault = await ZrxVaultContract.deployFrom0xArtifactAsync(
stakingArtifacts.ZrxVault,
environment.provider,
txDefaults,
stakingArtifacts,
assetProxies.erc20Proxy.address,
tokens.zrx.address,
);
const readOnlyProxy = await ReadOnlyProxyContract.deployFrom0xArtifactAsync(
stakingArtifacts.ReadOnlyProxy,
environment.provider,
txDefaults,
stakingArtifacts,
);
const stakingLogic = await TestStakingContract.deployFrom0xArtifactAsync(
stakingArtifacts.TestStaking,
environment.provider,
txDefaults,
stakingArtifacts,
tokens.weth.address,
tokens.zrx.address,
);
const stakingProxy = await StakingProxyContract.deployFrom0xArtifactAsync(
stakingArtifacts.StakingProxy,
environment.provider,
txDefaults,
stakingArtifacts,
stakingLogic.address,
readOnlyProxy.address,
);
const stakingWrapper = new TestStakingContract(stakingProxy.address, environment.provider);