Commit e92dbae6 authored by cyborgdennett's avatar cyborgdennett Committed by GitHub

Contracts-bedrock: put hardhat tasks in /tasks folder (#3786)

* add account task

* add solidity and change hardhat config and index

Co-authored-by: Casper Belier <casper@blocklab.nl;casperbelier@hotmail.com>
Co-authored-by: default avatarMaurelian <maurelian@protonmail.ch>
Co-authored-by: default avatarmergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
parent 1e6bd9e0
import { ethers } from 'ethers' import { ethers } from 'ethers'
import { HardhatUserConfig, task, subtask } from 'hardhat/config' import { HardhatUserConfig } from 'hardhat/config'
import { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } from 'hardhat/builtin-tasks/task-names'
// Hardhat plugins // Hardhat plugins
import '@eth-optimism/hardhat-deploy-config' import '@eth-optimism/hardhat-deploy-config'
...@@ -11,22 +10,6 @@ import 'hardhat-deploy' ...@@ -11,22 +10,6 @@ import 'hardhat-deploy'
// Hardhat tasks // Hardhat tasks
import './tasks' import './tasks'
subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(
async (_, __, runSuper) => {
const paths = await runSuper()
return paths.filter((p: string) => !p.endsWith('.t.sol'))
}
)
task('accounts', 'Prints the list of accounts', async (_, hre) => {
const accounts = await hre.ethers.getSigners()
for (const account of accounts) {
console.log(account.address)
}
})
const config: HardhatUserConfig = { const config: HardhatUserConfig = {
networks: { networks: {
devnetL1: { devnetL1: {
......
import { task } from 'hardhat/config'
import '@nomiclabs/hardhat-ethers'
task('accounts', 'Prints the list of accounts', async (_, hre) => {
const accounts = await hre.ethers.getSigners()
for (const account of accounts) {
console.log(account.address)
}
})
...@@ -6,3 +6,5 @@ import './check-l2-config' ...@@ -6,3 +6,5 @@ import './check-l2-config'
import './watch' import './watch'
import './forge-verify' import './forge-verify'
import './validate-spacers' import './validate-spacers'
import './solidity'
import './accounts'
import { subtask } from 'hardhat/config'
import { TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS } from 'hardhat/builtin-tasks/task-names'
subtask(TASK_COMPILE_SOLIDITY_GET_SOURCE_PATHS).setAction(
async (_, __, runSuper) => {
const paths = await runSuper()
return paths.filter((p: string) => !p.endsWith('.t.sol'))
}
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment