-
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
7ac0544
commit aa2eee9
Showing
11 changed files
with
108 additions
and
0 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,18 @@ | ||
{ | ||
"name": "ethernaut-signer", | ||
"version": "1.0.0", | ||
"description": "Ethernaut CLI signer utility", | ||
"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": { | ||
"nyc": "^15.1.0", | ||
"@nomicfoundation/hardhat-ethers": "^3.0.5" | ||
} | ||
} |
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,15 @@ | ||
const { extendEnvironment } = require('hardhat/config') | ||
const requireAll = require('common/src/require-all') | ||
const spinner = require('common/src/spinner') | ||
// const storage = require('./internal/storage') | ||
// const { setActiveNetwork } = require('./internal/set-network') | ||
|
||
requireAll(__dirname, 'tasks') | ||
|
||
extendEnvironment((hre) => { | ||
spinner.enable(!hre.hardhatArguments.verbose) | ||
|
||
// storage.init() | ||
|
||
// setActiveNetwork(hre) | ||
}) |
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,4 @@ | ||
const { scope } = require('hardhat/config') | ||
const { description } = require('../../package.json') | ||
|
||
module.exports = scope('sig', description) |
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,16 @@ | ||
// const { types } = require('hardhat/config') | ||
const output = require('common/src/output') | ||
// const autocompleteUrl = require('./autocomplete/url') | ||
// const storage = require('../internal/storage') | ||
|
||
require('../scopes/sig') | ||
.task('add', 'Adds a signer') | ||
.setAction(async () => { | ||
try { | ||
console.log('add signer') | ||
} catch (err) { | ||
return output.errorBox(err) | ||
} | ||
}) | ||
|
||
// add.paramDefinitions.url.autocomplete = autocompleteUrl |
9 changes: 9 additions & 0 deletions
9
packages/ethernaut-signer/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,9 @@ | ||
/** @type import('hardhat/config').HardhatUserConfig */ | ||
require('@nomicfoundation/hardhat-ethers') | ||
require('../../../src/index') | ||
require('../../../../ethernaut-ui/src/index') | ||
|
||
module.exports = { | ||
solidity: '0.8.24', | ||
defaultNetwork: 'localhost', | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/ethernaut-signer/test/fixture-projects/basic-project/package.json
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 @@ | ||
{ | ||
"name": "basic-project", | ||
"devDependencies": { | ||
"@nomicfoundation/hardhat-ethers": "^3.0.5", | ||
"ethers": "^6.11.1" | ||
} | ||
} |
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 @@ | ||
const assert = require('assert') | ||
|
||
describe('sig', function () { | ||
it('has an "sig" scope', async function () { | ||
assert.notEqual(hre.scopes['sig'], undefined) | ||
}) | ||
}) |
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,4 @@ | ||
const { loadProject, muteOutput } = require('common/src/setup-tests') | ||
|
||
muteOutput() | ||
loadProject('test/fixture-projects/basic-project') |