Skip to content

Create "barrel" index file for hardhat tasks #2273

@smartcontracts

Description

@smartcontracts

We have lots of hardhat tasks in the contracts package. As a result, our hardhat.config.ts includes lots of imports:

import './tasks/deploy'
import './tasks/l2-gasprice'
import './tasks/set-owner'
import './tasks/validate-address-dictator'
import './tasks/validate-chugsplash-dictator'
import './tasks/whitelist'
import './tasks/withdraw-fees'
import './tasks/fetch-batches'

We can reduce the size of our hardhat.config.ts file by creating an index.ts file inside of the tasks folder which re-exports each task. See here for an example:

export * from './contract-defs'
export * from './predeploys'

Goal of this issue is to create an index.ts file in the tasks folder which re-exports each of the tasks. Then we want to change all of the imports in hardhat.config.ts to instead simply:

import './tasks'

As always, feel free to leave a comment here if you'd like to tackle this issue or if you're confused about anything!

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-choreCategory: Code, docs or tooling maintenance

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions