Skip to content

Commit

Permalink
Rename network activate to set
Browse files Browse the repository at this point in the history
  • Loading branch information
eternauta1337 committed Mar 16, 2024
1 parent 0a7379e commit 50f2be6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/ethernaut-network-ui/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ extendEnvironment((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 =
const set = hre.scopes.network.tasks.set
set.positionalParamDefinitions.find((p) => p.name === 'alias').prompt =
promptAlias('Select a network to activate')

const edit = hre.scopes.network.tasks.edit
Expand Down
2 changes: 1 addition & 1 deletion packages/ethernaut-network/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This plugin doesn't depend on any other plugins.

This plugins adds the following tasks to hardhat:

- activate Activates a network
- set Sets the active network
- add Adds a network to the cli
- current Prints the active network
- edit Edits a network
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const storage = require('../internal/storage')
const { setNetwork } = require('../internal/set-network')

require('../scopes/network')
.task('activate', 'Activates a network')
.task('set', 'Sets the active network')
.addPositionalParam(
'alias',
'The name of the network',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const assert = require('assert')
const { Terminal } = require('ethernaut-common/src/test/terminal')
const storage = require('../../src/internal/storage')

describe('activate', function () {
describe('set', function () {
const terminal = new Terminal()
let activeNetwork

Expand Down Expand Up @@ -30,7 +30,7 @@ describe('activate', function () {

describe('when calling set', function () {
before('call set', async function () {
await terminal.run('npx hardhat network activate test__1', 2000)
await terminal.run('npx hardhat network set test__1', 2000)
})

it('sets the active network', async function () {
Expand Down

0 comments on commit 50f2be6

Please sign in to comment.