Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export async function getTimelockRegistrationsAsync(provider: SupportedProvider): Promise {
const web3Wrapper = new Web3Wrapper(provider);
const chainId = await web3Wrapper.getChainIdAsync();
const deployedAddresses = getContractAddressesForChainOrThrow(chainId);
const authorizableInterface = new IAuthorizableContract(constants.NULL_ADDRESS, provider);
const ownableInterface = new IOwnableContract(constants.NULL_ADDRESS, provider);
const zrxVault = new ZrxVaultContract(constants.NULL_ADDRESS, provider);
const stakingProxy = new StakingProxyContract(constants.NULL_ADDRESS, provider);
const exchange = new ExchangeContract(constants.NULL_ADDRESS, provider);
const stakingLogic = new StakingContract(constants.NULL_ADDRESS, provider);
const noTimelockRegistrations = [
// AssetProxy timelocks
{
destination: deployedAddresses.erc20Proxy,
functionSelector: authorizableInterface.getSelector('removeAuthorizedAddress'),
secondsTimeLocked: constants.ZERO_AMOUNT,
},
{
destination: deployedAddresses.erc20Proxy,
functionSelector: authorizableInterface.getSelector('removeAuthorizedAddressAtIndex'),
await UniswapBridgeContract.deployFrom0xArtifactAsync(
assetProxyArtifacts.UniswapBridge,
provider,
txDefaults,
assetProxyArtifacts,
);
await Eth2DaiBridgeContract.deployFrom0xArtifactAsync(
assetProxyArtifacts.Eth2DaiBridge,
provider,
txDefaults,
assetProxyArtifacts,
);
const authorizableInterface = new IAuthorizableContract(constants.NULL_ADDRESS, provider, txDefaults);
const ownableInterface = new IOwnableContract(constants.NULL_ADDRESS, provider, txDefaults);
const customTimeLocks = getTimelockRegistrationsByChainId(chainId.toNumber());
const governor = await ZeroExGovernorContract.deployFrom0xArtifactAsync(
multisigArtifacts.ZeroExGovernor,
provider,
txDefaults,
multisigArtifacts,
customTimeLocks.map(timeLockInfo => timeLockInfo.functionSelector),
customTimeLocks.map(timeLockInfo => timeLockInfo.destination),
customTimeLocks.map(timeLockInfo => timeLockInfo.secondsTimeLocked),
configs.zeroExGovernor.owners,
configs.zeroExGovernor.required,
configs.zeroExGovernor.secondsTimeLocked,
);