Kaynağa Gözat

测试可以用了。

龚成明 3 yıl önce
ebeveyn
işleme
1dcb1b7fa0
5 değiştirilmiş dosya ile 30 ekleme ve 7 silme
  1. 2 0
      .gitignore
  2. 4 0
      README.md
  3. 7 1
      package.json
  4. 5 1
      test/Univ3Test.ts
  5. 12 5
      tsconfig.json

+ 2 - 0
.gitignore

@@ -13,4 +13,6 @@ typechain-types
 cache
 artifacts
 
+.idea
+
 

+ 4 - 0
README.md

@@ -4,6 +4,10 @@ This project demonstrates a basic Hardhat use case. It comes with a sample contr
 
 Try running some of the following tasks:
 
+```
+cp .secret.ts.sample .secret.ts
+```
+
 ```shell
 npx hardhat help
 npx hardhat test

+ 7 - 1
package.json

@@ -1,6 +1,12 @@
 {
   "devDependencies": {
     "@nomicfoundation/hardhat-toolbox": "^2.0.0",
-    "hardhat": "^2.11.2"
+    "hardhat": "^2.11.2",
+    "mocha": "^10.0.0",
+    "request": "^2.88.2",
+    "ts-generator": "^0.1.1",
+    "ts-node": "^10.9.1",
+    "typechain": "^8.1.0",
+    "typescript": "^4.8.4"
   }
 }

+ 5 - 1
test/Univ3Test.ts

@@ -1,3 +1,7 @@
-describe('Univ3 Test', () => {
+import {ethers} from "hardhat";
 
+describe('Univ3 Test', () => {
+  it('parseEther test', async () => {
+    console.log(ethers.utils.parseEther('2.123456789'))
+  })
 })

+ 12 - 5
tsconfig.json

@@ -1,10 +1,17 @@
 {
   "compilerOptions": {
-    "target": "es2020",
+    "target": "es2018",
     "module": "commonjs",
-    "esModuleInterop": true,
-    "forceConsistentCasingInFileNames": true,
     "strict": true,
-    "skipLibCheck": true
-  }
+    "esModuleInterop": true,
+    "outDir": "dist"
+  },
+  "include": [
+    "./scripts",
+    "./bot",
+    "./test"
+  ],
+  "files": [
+    "./hardhat.config.ts"
+  ]
 }