-
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
d54eb0b
commit cf17738
Showing
18 changed files
with
4,359 additions
and
44 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "ethernaut-wallet-ui", | ||
"version": "1.0.0", | ||
"description": "Ui expensions for the ethernaut-util package", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"build": "npm run install:test", | ||
"compile": "echo 'No compile step'", | ||
"install:test": "cd test/fixture-projects/basic-project && npm install", | ||
"test": "nyc mocha --exit --timeout 60000 --require 'test/setup.js' --recursive '../../**/*.test.js' --ignore '../../fixture-projects/**/*'" | ||
}, | ||
"author": "", | ||
"license": "ISC", | ||
"devDependencies": { | ||
"hardhat": "^2.20.0", | ||
"mocha": "^10.3.0", | ||
"nyc": "^15.1.0" | ||
}, | ||
"directories": { | ||
"test": "test" | ||
}, | ||
"keywords": [] | ||
} |
File renamed without changes.
7 changes: 7 additions & 0 deletions
7
packages/ethernaut-wallet-ui/src/autocomplete/tasks/activate.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = function setup(hre) { | ||
const activate = hre.scopes.network.tasks.activate | ||
|
||
activate.positionalParamDefinitions.find( | ||
(p) => p.name === 'alias', | ||
).autocomplete = require('../params/alias')('Select a wallet to activate') | ||
} |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module.exports = function setup(hre) { | ||
const info = hre.scopes.network.tasks.info | ||
|
||
info.positionalParamDefinitions.find((p) => p.name === 'alias').autocomplete = | ||
require('../params/alias')('Select a wallet') | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/ethernaut-wallet-ui/src/autocomplete/tasks/remove.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = function setup(hre) { | ||
const remove = hre.scopes.network.tasks.remove | ||
|
||
remove.positionalParamDefinitions.find( | ||
(p) => p.name === 'alias', | ||
).autocomplete = require('../params/alias')('Select a wallet to remove') | ||
} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
const { extendEnvironment } = require('hardhat/config') | ||
|
||
require('ethernaut-ui/src/index') | ||
require('ethernaut-wallet/src/index') | ||
|
||
extendEnvironment((hre) => { | ||
require('./autocomplete/tasks/activate')(hre) | ||
require('./autocomplete/tasks/info')(hre) | ||
require('./autocomplete/tasks/remove')(hre) | ||
}) |
13 changes: 13 additions & 0 deletions
13
packages/ethernaut-wallet-ui/test/fixture-projects/basic-project/hardhat.config.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
/** @type import('hardhat/config').HardhatUserConfig */ | ||
require('@nomicfoundation/hardhat-ethers') | ||
require('../../../src/index') | ||
|
||
module.exports = { | ||
solidity: '0.8.24', | ||
defaultNetwork: 'local', | ||
networks: { | ||
local: { | ||
url: 'http://localhost:8545', | ||
}, | ||
}, | ||
} |
Oops, something went wrong.