mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-25 06:06:44 +00:00
fixing hardhat project
This commit is contained in:
parent
f3e17aa09a
commit
9eaebea023
4 changed files with 1081 additions and 963 deletions
36
hardhat/.gitignore
vendored
36
hardhat/.gitignore
vendored
|
|
@ -15,3 +15,39 @@ node_modules
|
|||
|
||||
# Hardhat Ignition default folder for deployments against a local node
|
||||
ignition/deployments/chain-31337
|
||||
|
||||
node_modules
|
||||
.env
|
||||
|
||||
# Hardhat files
|
||||
/cache
|
||||
/artifacts
|
||||
|
||||
# TypeChain files
|
||||
/typechain
|
||||
/typechain-types
|
||||
|
||||
# solidity-coverage files
|
||||
/coverage
|
||||
/coverage.json
|
||||
|
||||
# Hardhat Ignition default folder for deployments against a local node
|
||||
ignition/deployments/chain-31337
|
||||
|
||||
node_modules
|
||||
.env
|
||||
|
||||
# Hardhat files
|
||||
/cache
|
||||
/artifacts
|
||||
|
||||
# TypeChain files
|
||||
/typechain
|
||||
/typechain-types
|
||||
|
||||
# solidity-coverage files
|
||||
/coverage
|
||||
/coverage.json
|
||||
|
||||
# Hardhat Ignition default folder for deployments against a local node
|
||||
ignition/deployments/chain-31337
|
||||
|
|
|
|||
1629
hardhat/package-lock.json
generated
1629
hardhat/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "hardhat",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"description": "This project demonstrates a basic Hardhat use case. It comes with a sample contract, a test for that contract, and a Hardhat Ignition module that deploys that contract.",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
|
|
@ -12,6 +12,362 @@
|
|||
"type": "commonjs",
|
||||
"devDependencies": {
|
||||
"@nomicfoundation/hardhat-toolbox": "^5.0.0",
|
||||
"hardhat": "^2.24.3"
|
||||
"hardhat": "^2.25.0"
|
||||
},
|
||||
"directories": {
|
||||
"test": "test"
|
||||
},
|
||||
"dependencies": {
|
||||
"abbrev": "^1.0.9",
|
||||
"acorn": "^8.15.0",
|
||||
"acorn-walk": "^8.3.4",
|
||||
"adm-zip": "^0.4.16",
|
||||
"aes-js": "^4.0.0-beta.5",
|
||||
"agent-base": "^6.0.2",
|
||||
"aggregate-error": "^3.1.0",
|
||||
"ajv": "^8.17.1",
|
||||
"amdefine": "^1.0.1",
|
||||
"ansi-align": "^3.0.1",
|
||||
"ansi-colors": "^4.1.3",
|
||||
"ansi-escapes": "^4.3.2",
|
||||
"ansi-regex": "^5.0.1",
|
||||
"ansi-styles": "^4.3.0",
|
||||
"antlr4ts": "^0.5.0-alpha.4",
|
||||
"anymatch": "^3.1.3",
|
||||
"arg": "^4.1.3",
|
||||
"argparse": "^2.0.1",
|
||||
"array-back": "^3.1.0",
|
||||
"array-union": "^2.1.0",
|
||||
"array-uniq": "^1.0.3",
|
||||
"asap": "^2.0.6",
|
||||
"assertion-error": "^1.1.0",
|
||||
"astral-regex": "^2.0.0",
|
||||
"async": "^1.5.2",
|
||||
"asynckit": "^0.4.0",
|
||||
"at-least-node": "^1.0.0",
|
||||
"axios": "^1.9.0",
|
||||
"balanced-match": "^1.0.2",
|
||||
"base-x": "^3.0.11",
|
||||
"bech32": "^1.1.4",
|
||||
"binary-extensions": "^2.3.0",
|
||||
"blakejs": "^1.2.1",
|
||||
"bn.js": "^5.2.2",
|
||||
"boxen": "^5.1.2",
|
||||
"brace-expansion": "^2.0.2",
|
||||
"braces": "^3.0.3",
|
||||
"brorand": "^1.1.0",
|
||||
"browser-stdout": "^1.3.1",
|
||||
"browserify-aes": "^1.2.0",
|
||||
"bs58": "^4.0.1",
|
||||
"bs58check": "^2.1.2",
|
||||
"buffer-from": "^1.1.2",
|
||||
"buffer-xor": "^1.0.3",
|
||||
"bytes": "^3.1.2",
|
||||
"call-bind-apply-helpers": "^1.0.2",
|
||||
"call-bound": "^1.0.4",
|
||||
"camelcase": "^6.3.0",
|
||||
"caseless": "^0.12.0",
|
||||
"cbor": "^8.1.0",
|
||||
"chai": "^4.5.0",
|
||||
"chai-as-promised": "^7.1.2",
|
||||
"chalk": "^4.1.2",
|
||||
"charenc": "^0.0.2",
|
||||
"check-error": "^1.0.3",
|
||||
"chokidar": "^4.0.3",
|
||||
"ci-info": "^2.0.0",
|
||||
"cipher-base": "^1.0.6",
|
||||
"clean-stack": "^2.2.0",
|
||||
"cli-boxes": "^2.2.1",
|
||||
"cli-table3": "^0.5.1",
|
||||
"cliui": "^7.0.4",
|
||||
"color-convert": "^2.0.1",
|
||||
"color-name": "^1.1.4",
|
||||
"colors": "^1.4.0",
|
||||
"combined-stream": "^1.0.8",
|
||||
"command-exists": "^1.2.9",
|
||||
"command-line-args": "^5.2.1",
|
||||
"command-line-usage": "^6.1.3",
|
||||
"commander": "^8.3.0",
|
||||
"concat-map": "^0.0.1",
|
||||
"concat-stream": "^1.6.2",
|
||||
"cookie": "^0.4.2",
|
||||
"core-util-is": "^1.0.3",
|
||||
"create-hash": "^1.2.0",
|
||||
"create-hmac": "^1.1.7",
|
||||
"create-require": "^1.1.1",
|
||||
"crypt": "^0.0.2",
|
||||
"death": "^1.1.0",
|
||||
"debug": "^4.4.1",
|
||||
"decamelize": "^4.0.0",
|
||||
"deep-eql": "^4.1.4",
|
||||
"deep-extend": "^0.6.0",
|
||||
"deep-is": "^0.1.4",
|
||||
"delayed-stream": "^1.0.0",
|
||||
"depd": "^2.0.0",
|
||||
"diff": "^5.2.0",
|
||||
"difflib": "^0.2.4",
|
||||
"dir-glob": "^3.0.1",
|
||||
"dunder-proto": "^1.0.1",
|
||||
"elliptic": "^6.6.1",
|
||||
"emoji-regex": "^8.0.0",
|
||||
"enquirer": "^2.4.1",
|
||||
"env-paths": "^2.2.1",
|
||||
"es-define-property": "^1.0.1",
|
||||
"es-errors": "^1.3.0",
|
||||
"es-object-atoms": "^1.1.1",
|
||||
"es-set-tostringtag": "^2.1.0",
|
||||
"escalade": "^3.2.0",
|
||||
"escape-string-regexp": "^4.0.0",
|
||||
"escodegen": "^1.8.1",
|
||||
"esprima": "^2.7.3",
|
||||
"estraverse": "^1.9.3",
|
||||
"esutils": "^2.0.3",
|
||||
"eth-gas-reporter": "^0.2.27",
|
||||
"ethereum-bloom-filters": "^1.2.0",
|
||||
"ethereum-cryptography": "^1.2.0",
|
||||
"ethereumjs-util": "^7.1.5",
|
||||
"ethers": "^6.14.3",
|
||||
"ethjs-unit": "^0.1.6",
|
||||
"evp_bytestokey": "^1.0.3",
|
||||
"fast-deep-equal": "^3.1.3",
|
||||
"fast-glob": "^3.3.3",
|
||||
"fast-levenshtein": "^2.0.6",
|
||||
"fast-uri": "^3.0.6",
|
||||
"fastq": "^1.19.1",
|
||||
"fdir": "^6.4.6",
|
||||
"fill-range": "^7.1.1",
|
||||
"find-replace": "^3.0.0",
|
||||
"find-up": "^5.0.0",
|
||||
"flat": "^5.0.2",
|
||||
"follow-redirects": "^1.15.9",
|
||||
"form-data": "^4.0.3",
|
||||
"fp-ts": "^1.19.3",
|
||||
"fs-extra": "^7.0.1",
|
||||
"fs-readdir-recursive": "^1.1.0",
|
||||
"fs.realpath": "^1.0.0",
|
||||
"function-bind": "^1.1.2",
|
||||
"get-caller-file": "^2.0.5",
|
||||
"get-func-name": "^2.0.2",
|
||||
"get-intrinsic": "^1.3.0",
|
||||
"get-port": "^3.2.0",
|
||||
"get-proto": "^1.0.1",
|
||||
"ghost-testrpc": "^0.0.2",
|
||||
"glob": "^8.1.0",
|
||||
"glob-parent": "^5.1.2",
|
||||
"global-modules": "^2.0.0",
|
||||
"global-prefix": "^3.0.0",
|
||||
"globby": "^10.0.2",
|
||||
"gopd": "^1.2.0",
|
||||
"graceful-fs": "^4.2.11",
|
||||
"handlebars": "^4.7.8",
|
||||
"hardhat-gas-reporter": "^1.0.10",
|
||||
"has-flag": "^4.0.0",
|
||||
"has-symbols": "^1.1.0",
|
||||
"has-tostringtag": "^1.0.2",
|
||||
"hash-base": "^3.1.0",
|
||||
"hash.js": "^1.1.7",
|
||||
"hasown": "^2.0.2",
|
||||
"he": "^1.2.0",
|
||||
"heap": "^0.2.7",
|
||||
"hmac-drbg": "^1.0.1",
|
||||
"http-basic": "^8.1.3",
|
||||
"http-errors": "^2.0.0",
|
||||
"http-response-object": "^3.0.2",
|
||||
"https-proxy-agent": "^5.0.1",
|
||||
"iconv-lite": "^0.4.24",
|
||||
"ignore": "^5.3.2",
|
||||
"immer": "^10.0.2",
|
||||
"immutable": "^4.3.7",
|
||||
"indent-string": "^4.0.0",
|
||||
"inflight": "^1.0.6",
|
||||
"inherits": "^2.0.4",
|
||||
"ini": "^1.3.8",
|
||||
"interpret": "^1.4.0",
|
||||
"io-ts": "^1.10.4",
|
||||
"is-binary-path": "^2.1.0",
|
||||
"is-extglob": "^2.1.1",
|
||||
"is-fullwidth-code-point": "^3.0.0",
|
||||
"is-glob": "^4.0.3",
|
||||
"is-hex-prefixed": "^1.0.0",
|
||||
"is-number": "^7.0.0",
|
||||
"is-plain-obj": "^2.1.0",
|
||||
"is-unicode-supported": "^0.1.0",
|
||||
"isarray": "^1.0.0",
|
||||
"isexe": "^2.0.0",
|
||||
"js-sha3": "^0.8.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"json-schema-traverse": "^1.0.0",
|
||||
"json-stream-stringify": "^3.1.6",
|
||||
"json-stringify-safe": "^5.0.1",
|
||||
"json5": "^2.2.3",
|
||||
"jsonfile": "^4.0.0",
|
||||
"jsonschema": "^1.5.0",
|
||||
"keccak": "^3.0.4",
|
||||
"kind-of": "^6.0.3",
|
||||
"kleur": "^3.0.3",
|
||||
"levn": "^0.3.0",
|
||||
"locate-path": "^6.0.0",
|
||||
"lodash": "^4.17.21",
|
||||
"lodash.camelcase": "^4.3.0",
|
||||
"lodash.clonedeep": "^4.5.0",
|
||||
"lodash.isequal": "^4.5.0",
|
||||
"lodash.truncate": "^4.4.2",
|
||||
"log-symbols": "^4.1.0",
|
||||
"loupe": "^2.3.7",
|
||||
"lru_map": "^0.3.3",
|
||||
"make-error": "^1.3.6",
|
||||
"markdown-table": "^1.1.3",
|
||||
"math-intrinsics": "^1.1.0",
|
||||
"md5.js": "^1.3.5",
|
||||
"memorystream": "^0.3.1",
|
||||
"merge2": "^1.4.1",
|
||||
"micro-eth-signer": "^0.14.0",
|
||||
"micro-ftch": "^0.3.1",
|
||||
"micro-packed": "^0.7.3",
|
||||
"micromatch": "^4.0.8",
|
||||
"mime-db": "^1.52.0",
|
||||
"mime-types": "^2.1.35",
|
||||
"minimalistic-assert": "^1.0.1",
|
||||
"minimalistic-crypto-utils": "^1.0.1",
|
||||
"minimatch": "^5.1.6",
|
||||
"minimist": "^1.2.8",
|
||||
"mkdirp": "^0.5.6",
|
||||
"mnemonist": "^0.38.5",
|
||||
"ms": "^2.1.3",
|
||||
"ndjson": "^2.0.0",
|
||||
"neo-async": "^2.6.2",
|
||||
"node-addon-api": "^2.0.2",
|
||||
"node-emoji": "^1.11.0",
|
||||
"node-gyp-build": "^4.8.4",
|
||||
"nofilter": "^3.1.0",
|
||||
"nopt": "^3.0.6",
|
||||
"normalize-path": "^3.0.0",
|
||||
"number-to-bn": "^1.7.0",
|
||||
"object-assign": "^4.1.1",
|
||||
"object-inspect": "^1.13.4",
|
||||
"obliterator": "^2.0.5",
|
||||
"once": "^1.4.0",
|
||||
"optionator": "^0.8.3",
|
||||
"ordinal": "^1.0.3",
|
||||
"os-tmpdir": "^1.0.2",
|
||||
"p-limit": "^3.1.0",
|
||||
"p-locate": "^5.0.0",
|
||||
"p-map": "^4.0.0",
|
||||
"parse-cache-control": "^1.0.1",
|
||||
"path-exists": "^4.0.0",
|
||||
"path-is-absolute": "^1.0.1",
|
||||
"path-parse": "^1.0.7",
|
||||
"path-type": "^4.0.0",
|
||||
"pathval": "^1.1.1",
|
||||
"pbkdf2": "^3.1.2",
|
||||
"picocolors": "^1.1.1",
|
||||
"picomatch": "^4.0.2",
|
||||
"pify": "^4.0.1",
|
||||
"prelude-ls": "^1.1.2",
|
||||
"prettier": "^2.8.8",
|
||||
"process-nextick-args": "^2.0.1",
|
||||
"promise": "^8.3.0",
|
||||
"prompts": "^2.4.2",
|
||||
"proxy-from-env": "^1.1.0",
|
||||
"qs": "^6.14.0",
|
||||
"queue-microtask": "^1.2.3",
|
||||
"randombytes": "^2.1.0",
|
||||
"raw-body": "^2.5.2",
|
||||
"readable-stream": "^3.6.2",
|
||||
"readdirp": "^4.1.2",
|
||||
"rechoir": "^0.6.2",
|
||||
"recursive-readdir": "^2.2.3",
|
||||
"reduce-flatten": "^2.0.0",
|
||||
"req-cwd": "^2.0.0",
|
||||
"req-from": "^2.0.0",
|
||||
"require-directory": "^2.1.1",
|
||||
"require-from-string": "^2.0.2",
|
||||
"resolve": "^1.17.0",
|
||||
"resolve-from": "^3.0.0",
|
||||
"reusify": "^1.1.0",
|
||||
"ripemd160": "^2.0.2",
|
||||
"rlp": "^2.2.7",
|
||||
"run-parallel": "^1.2.0",
|
||||
"safe-buffer": "^5.2.1",
|
||||
"safer-buffer": "^2.1.2",
|
||||
"sc-istanbul": "^0.4.6",
|
||||
"scrypt-js": "^3.0.1",
|
||||
"secp256k1": "^4.0.4",
|
||||
"semver": "^6.3.1",
|
||||
"serialize-javascript": "^6.0.2",
|
||||
"setimmediate": "^1.0.5",
|
||||
"setprototypeof": "^1.2.0",
|
||||
"sha.js": "^2.4.11",
|
||||
"sha1": "^1.1.1",
|
||||
"shelljs": "^0.8.5",
|
||||
"side-channel": "^1.1.0",
|
||||
"side-channel-list": "^1.0.0",
|
||||
"side-channel-map": "^1.0.1",
|
||||
"side-channel-weakmap": "^1.0.2",
|
||||
"sisteransi": "^1.0.5",
|
||||
"slash": "^3.0.0",
|
||||
"slice-ansi": "^4.0.0",
|
||||
"solc": "^0.8.26",
|
||||
"solidity-coverage": "^0.8.16",
|
||||
"source-map": "^0.6.1",
|
||||
"source-map-support": "^0.5.21",
|
||||
"split2": "^3.2.2",
|
||||
"sprintf-js": "^1.0.3",
|
||||
"stacktrace-parser": "^0.1.11",
|
||||
"statuses": "^2.0.1",
|
||||
"string_decoder": "^1.3.0",
|
||||
"string-format": "^2.0.0",
|
||||
"string-width": "^4.2.3",
|
||||
"strip-ansi": "^6.0.1",
|
||||
"strip-hex-prefix": "^1.0.0",
|
||||
"strip-json-comments": "^3.1.1",
|
||||
"supports-color": "^7.2.0",
|
||||
"sync-request": "^6.1.0",
|
||||
"sync-rpc": "^1.3.6",
|
||||
"table": "^6.9.0",
|
||||
"table-layout": "^1.0.2",
|
||||
"then-request": "^6.0.2",
|
||||
"through2": "^4.0.2",
|
||||
"tinyglobby": "^0.2.14",
|
||||
"tmp": "^0.0.33",
|
||||
"to-regex-range": "^5.0.1",
|
||||
"toidentifier": "^1.0.1",
|
||||
"ts-command-line-args": "^2.5.1",
|
||||
"ts-essentials": "^7.0.3",
|
||||
"ts-node": "^10.9.2",
|
||||
"tslib": "^1.14.1",
|
||||
"tsort": "^0.0.1",
|
||||
"type-check": "^0.3.2",
|
||||
"type-detect": "^4.1.0",
|
||||
"type-fest": "^0.21.3",
|
||||
"typechain": "^8.3.2",
|
||||
"typedarray": "^0.0.6",
|
||||
"typescript": "^5.8.3",
|
||||
"typical": "^4.0.0",
|
||||
"uglify-js": "^3.19.3",
|
||||
"undici": "^5.29.0",
|
||||
"undici-types": "^7.8.0",
|
||||
"universalify": "^0.1.2",
|
||||
"unpipe": "^1.0.0",
|
||||
"utf8": "^3.0.0",
|
||||
"util-deprecate": "^1.0.2",
|
||||
"uuid": "^8.3.2",
|
||||
"v8-compile-cache-lib": "^3.0.1",
|
||||
"web3-utils": "^1.10.4",
|
||||
"which": "^1.3.1",
|
||||
"widest-line": "^3.1.0",
|
||||
"word-wrap": "^1.2.5",
|
||||
"wordwrap": "^1.0.0",
|
||||
"wordwrapjs": "^4.0.1",
|
||||
"workerpool": "^6.5.1",
|
||||
"wrap-ansi": "^7.0.0",
|
||||
"wrappy": "^1.0.2",
|
||||
"ws": "^7.5.10",
|
||||
"y18n": "^5.0.8",
|
||||
"yargs": "^16.2.0",
|
||||
"yargs-parser": "^20.2.9",
|
||||
"yargs-unparser": "^2.0.0",
|
||||
"yn": "^3.1.1",
|
||||
"yocto-queue": "^0.1.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
19
hardhat/scripts/deploy.js
Normal file
19
hardhat/scripts/deploy.js
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
async function main() {
|
||||
const [deployer] = await ethers.getSigners();
|
||||
|
||||
console.log("Deploying contracts with the account:", deployer.address);
|
||||
|
||||
const Lock = await ethers.getContractFactory("Lock");
|
||||
const lock = await Lock.deploy();
|
||||
|
||||
await lock.deployed();
|
||||
|
||||
console.log("Lock deployed to:", lock.address);
|
||||
}
|
||||
|
||||
main()
|
||||
.then(() => process.exit(0))
|
||||
.catch(error => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
Loading…
Reference in a new issue