-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1f11cb7
commit 5e6a558
Showing
24 changed files
with
54 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,32 @@ | ||
const { extendEnvironment } = require('hardhat/config') | ||
|
||
const promptUrl = require('./prompts/url') | ||
const promptAlias = require('./prompts/alias') | ||
const promptFork = require('./prompts/fork') | ||
|
||
require('ethernaut-ui/src/index') | ||
require('ethernaut-network/src/index') | ||
|
||
extendEnvironment((hre) => { | ||
require('./prompts/tasks/activate')(hre) | ||
require('./prompts/tasks/add')(hre) | ||
require('./prompts/tasks/edit')(hre) | ||
require('./prompts/tasks/info')(hre) | ||
require('./prompts/tasks/node')(hre) | ||
require('./prompts/tasks/remove')(hre) | ||
const add = hre.scopes.network.tasks.add | ||
add.paramDefinitions.url.prompt = promptUrl | ||
|
||
const activate = hre.scopes.network.tasks.activate | ||
activate.positionalParamDefinitions.find((p) => p.name === 'alias').prompt = | ||
promptAlias('Select a network to activate') | ||
|
||
const edit = hre.scopes.network.tasks.edit | ||
edit.positionalParamDefinitions.find((p) => p.name === 'alias').prompt = | ||
promptAlias('Select a network to edit') | ||
|
||
const remove = hre.scopes.network.tasks.remove | ||
remove.positionalParamDefinitions.find((p) => p.name === 'alias').prompt = | ||
promptAlias('Select a network') | ||
|
||
const node = hre.scopes.network.tasks.node | ||
node.paramDefinitions.fork.prompt = promptFork | ||
|
||
const info = hre.scopes.network.tasks.info | ||
info.positionalParamDefinitions.find((p) => p.name === 'alias').prompt = | ||
promptAlias('Select a network') | ||
}) |
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
const { extendEnvironment } = require('hardhat/config') | ||
const promptUnit = require('./prompts/unit') | ||
|
||
require('ethernaut-ui/src/index') | ||
require('ethernaut-util/src/index') | ||
|
||
extendEnvironment((hre) => { | ||
require('./prompts/tasks/unit')(hre) | ||
const unit = hre.scopes.util.tasks.unit | ||
unit.paramDefinitions['from'].prompt = promptUnit | ||
unit.paramDefinitions['to'].prompt = promptUnit | ||
}) |
15 changes: 7 additions & 8 deletions
15
...hernaut-util-ui/src/prompts/tasks/unit.js → ...ges/ethernaut-util-ui/src/prompts/unit.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,19 @@ | ||
const { extendEnvironment } = require('hardhat/config') | ||
const promptAlias = require('./prompts/alias') | ||
|
||
require('ethernaut-ui/src/index') | ||
require('ethernaut-wallet/src/index') | ||
|
||
extendEnvironment((hre) => { | ||
require('./prompts/tasks/activate')(hre) | ||
require('./prompts/tasks/info')(hre) | ||
require('./prompts/tasks/remove')(hre) | ||
const activate = hre.scopes.wallet.tasks.activate | ||
activate.positionalParamDefinitions.find((p) => p.name === 'alias').prompt = | ||
promptAlias('Select a wallet to activate') | ||
|
||
const info = hre.scopes.wallet.tasks.info | ||
info.positionalParamDefinitions.find((p) => p.name === 'alias').prompt = | ||
promptAlias('Select a wallet') | ||
|
||
const remove = hre.scopes.wallet.tasks.remove | ||
remove.positionalParamDefinitions.find((p) => p.name === 'alias').prompt = | ||
promptAlias('Select a wallet to remove') | ||
}) |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.