• Georgios Konstantopoulos's avatar
    Import contracts (#18) · 2ff18bb4
    Georgios Konstantopoulos authored
    * feat: add contracts
    
    * fix: configure tsconfig and replace build => dist
    
    * chore: remove CI files
    
    * chore: use monorepo tslint / prettier
    2ff18bb4
address-manager.ts 579 Bytes
/* External Imports */
import { ethers } from 'hardhat'
import { Contract } from 'ethers'

export const setProxyTarget = async (
  AddressManager: Contract,
  name: string,
  target: Contract
): Promise<void> => {
  const SimpleProxy: Contract = await (
    await ethers.getContractFactory('Helper_SimpleProxy')
  ).deploy()

  await SimpleProxy.setTarget(target.address)
  await AddressManager.setAddress(name, SimpleProxy.address)
}

export const makeAddressManager = async (): Promise<Contract> => {
  return (await ethers.getContractFactory('Lib_AddressManager')).deploy()
}