• Mark Tyneway's avatar
    sdk: allow `deposit-eth` task to work with artifacts · ae8e046f
    Mark Tyneway authored
    This allows the script to be able to be used with
    test networks more easily.
    
    Usage:
    
    ```bash
    export L1_RPC=...
    export PRIVATE_KEY_DEPLOYER=0x...
    
    npx hardhat deposit-eth \
        --l2-provider-url ... \
        --to 0x9C822C992b56A3bd35d16A089d99AEc870eF8d37 \
        --amount 0.0001 \
        --network final-migration-rehearsal
    ```
    
    The following transactions were created using this commit
    on the `final-migration-rehearsal` network:
    
    L1 Deposit Transaction hash: 0x23f42a9d18b41bd32d90026b2324dbab64a45e942fe3897dd67a56989b940e11
    
    L2 Withdrawing Transaction hash: 0x5b1108b61b7ec97f99c3c5c312913d465e87feaec2ab805087be55d342d5e17d
    
    L1 Proving Withdrawal Transaction hash: 0xfe8c8beae69bdca1af35f04cfa635ea7d959abf0270f082a4ab41d680d7fe35b
    
    L1 Finalizing Withdrawal Transaction hash: 0xcab6550b4a388e0c6fbb4b3e1604b42e2ca228aed8c5a1a8601e596f4a939e56
    ae8e046f
hardhat.config.ts 1.56 KB
import { HardhatUserConfig } from 'hardhat/types'
import { ethers } from 'ethers'

import '@nomiclabs/hardhat-ethers'
import '@nomiclabs/hardhat-waffle'
import 'hardhat-deploy'

import './tasks'

const config: HardhatUserConfig = {
  solidity: {
    version: '0.8.9',
  },
  paths: {
    sources: './test/contracts',
  },
  networks: {
    devnetL1: {
      url: 'http://localhost:8545',
      accounts: [
        'ac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80',
      ],
    },
    hivenet: {
      url: process.env.L1_RPC || '',
      accounts: [process.env.PRIVATE_KEY_DEPLOYER || ethers.constants.HashZero],
    },
    goerli: {
      url: process.env.L1_RPC || '',
      accounts: [process.env.PRIVATE_KEY_DEPLOYER || ethers.constants.HashZero],
    },
    'final-migration-rehearsal': {
      chainId: 5,
      url: process.env.L1_RPC || '',
      accounts: [process.env.PRIVATE_KEY_DEPLOYER || ethers.constants.HashZero],
      live: true,
    },
  },
  external: {
    contracts: [
      {
        artifacts: '../contracts-bedrock/artifacts',
      },
    ],
    deployments: {
      hivenet: ['../contracts-bedrock/deployments/hivenet'],
      devnetL1: ['../contracts-bedrock/deployments/devnetL1'],
      goerli: [
        '../contracts-bedrock/deployments/goerli',
        '../contracts/deployments/goerli',
      ],
      'final-migration-rehearsal': [
        '../contracts-bedrock/deployments/final-migration-rehearsal',
        '../contracts/deployments/goerli',
        '../contracts-periphery/deployments/goerli',
      ],
    },
  },
}

export default config