How to use the hardhat.ethers.BigNumber function in hardhat

To help you get started, we’ve selected a few hardhat examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OffchainLabs / arbitrum / packages / arb-bridge-peripherals / scripts / deploy_token_bridge_l2.ts View on Github external
await standardArbERC20Proxy.deployed()
  console.log(`erc20 proxy at ${standardArbERC20Proxy.address}`)

  const standardArbERC777Proxy = await UpgradeableBeacon.deploy(
    standardArbERC777Logic.address
  )
  await standardArbERC777Proxy.deployed()
  console.log(`erc777 proxy at ${standardArbERC777Proxy.address}`)

  const contracts = JSON.stringify({
    ...deployments,
    // standardArbERC20: standardArbERC20Logic.address,
    // standardArbERC777: standardArbERC777Logic.address,
    standardArbERC20: standardArbERC20Proxy.address,
    standardArbERC777: standardArbERC777Proxy.address,
    l2ChainId: ethers.BigNumber.from(
      ethers.provider.network.chainId
    ).toHexString(),
  })

  const path = './deployment.json'
  console.log(`Writing to JSON at ${path}`)

  // TODO: should append/check if previous entries
  writeFileSync(path, contracts)

  console.log('Almost done')
  await deploy1820Registry(accounts[0])
  console.log('Done')
}