From 0ba548945f0f9cc639d8a5ae6439b05b87252a9a Mon Sep 17 00:00:00 2001 From: Nikola Date: Mon, 6 Jan 2025 23:44:55 +0200 Subject: [PATCH] hardhatupdate --- hardhat/contracts/Token.sol | 10 ++++++++++ hardhat/package-lock.json | 8 ++++++++ hardhat/package.json | 3 +++ 3 files changed, 21 insertions(+) create mode 100644 hardhat/contracts/Token.sol diff --git a/hardhat/contracts/Token.sol b/hardhat/contracts/Token.sol new file mode 100644 index 0000000000..c6c940efa4 --- /dev/null +++ b/hardhat/contracts/Token.sol @@ -0,0 +1,10 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.28; + +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; + +contract Token is ERC20 { + constructor() ERC20("MyToken", "MTK") { + _mint(msg.sender, 1000 * 10 ** decimals()); + } +} \ No newline at end of file diff --git a/hardhat/package-lock.json b/hardhat/package-lock.json index 73b8647d8a..e26bd6ea51 100644 --- a/hardhat/package-lock.json +++ b/hardhat/package-lock.json @@ -8,6 +8,9 @@ "name": "go-ethereum", "version": "1.0.0", "license": "ISC", + "dependencies": { + "@openzeppelin/contracts": "^5.1.0" + }, "devDependencies": { "@nomicfoundation/hardhat-toolbox": "^5.0.0", "hardhat": "^2.22.17" @@ -1599,6 +1602,11 @@ "node": ">= 12" } }, + "node_modules/@openzeppelin/contracts": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@openzeppelin/contracts/-/contracts-5.1.0.tgz", + "integrity": "sha512-p1ULhl7BXzjjbha5aqst+QMLY+4/LCWADXOCsmLHRM77AqiPjnd9vvUN9sosUfhL9JGKpZ0TjEGxgvnizmWGSA==" + }, "node_modules/@scure/base": { "version": "1.1.9", "resolved": "https://registry.npmjs.org/@scure/base/-/base-1.1.9.tgz", diff --git a/hardhat/package.json b/hardhat/package.json index 927b7ce563..20f1d33cbb 100644 --- a/hardhat/package.json +++ b/hardhat/package.json @@ -16,5 +16,8 @@ "devDependencies": { "@nomicfoundation/hardhat-toolbox": "^5.0.0", "hardhat": "^2.22.17" + }, + "dependencies": { + "@openzeppelin/contracts": "^5.1.0" } }