diff --git a/basic/17-etherjs-wallet-develop/README-CN.md b/basic/17-etherjs-wallet-develop/README-CN.md index ab40086b8..de9b02e87 100644 --- a/basic/17-etherjs-wallet-develop/README-CN.md +++ b/basic/17-etherjs-wallet-develop/README-CN.md @@ -35,6 +35,10 @@ wallet.provider = provider; 如果用普通的 JS number 对象来存储操作的话,可能会因为数据溢出而导致结果异常。 +执行测试用例 +```js +hardhat test +``` ## 参考链接 - https://learnblockchain.cn/2019/04/11/wallet-dev-guide/#ethers.js diff --git a/basic/17-etherjs-wallet-develop/README.md b/basic/17-etherjs-wallet-develop/README.md index 7088c8eb7..fdde83dbd 100644 --- a/basic/17-etherjs-wallet-develop/README.md +++ b/basic/17-etherjs-wallet-develop/README.md @@ -38,6 +38,11 @@ wallet.provider = provider; If you use a normal JS number object to store the operation, it may cause abnormal results due to data overflow. +Execute test case +```js +hardhat test +``` + ## Reference link - diff --git a/basic/17-etherjs-wallet-develop/package.json b/basic/17-etherjs-wallet-develop/package.json index 9dfd468cb..a81b150a6 100644 --- a/basic/17-etherjs-wallet-develop/package.json +++ b/basic/17-etherjs-wallet-develop/package.json @@ -1,12 +1,15 @@ { - "name": "hardhat-project", - "devDependencies": { - "@nomiclabs/hardhat-ethers": "^2.0.2", - "@nomiclabs/hardhat-waffle": "^2.0.1", - "chai": "^4.3.4", - "ethereum-waffle": "^3.3.0", - "ethers": "^5.1.4", - "hardhat": "^2.2.1", - "sol-merger": "^3.1.0" + "name": "17-etherjs-wallet-develop", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "@nomiclabs/hardhat-waffle": "^2.0.6", + "chai": "^5.1.0", + "hardhat": "^2.22.2", + "mocha": "^10.4.0" } } diff --git a/basic/17-etherjs-wallet-develop/test/wallet-test.js b/basic/17-etherjs-wallet-develop/test/wallet-test.js index 0bf053faf..ee78ce278 100644 --- a/basic/17-etherjs-wallet-develop/test/wallet-test.js +++ b/basic/17-etherjs-wallet-develop/test/wallet-test.js @@ -1,4 +1,7 @@ -const { expect } = require("chai"); + +const {ethers} = require("hardhat"); +const { expect } = import("chai"); + describe("Token contract", function() { it("create wallet", async function() { diff --git a/basic/18-web3py/README-CN.md b/basic/18-web3py/README-CN.md index 9301d05fc..eddc9bed0 100644 --- a/basic/18-web3py/README-CN.md +++ b/basic/18-web3py/README-CN.md @@ -31,9 +31,11 @@ ganache-cli - 执行脚本 ``` +如果安装完python 3 以上版本,以下命令执不通时,使用 “python3" 代替 "python" ## 演示合约构造及部署 python scripts/1_deploy_using_web3.py + ## 根据已存在的合约地址构造合约实例 python scripts/2_play_around_on_existing_contract.py diff --git a/basic/18-web3py/README.md b/basic/18-web3py/README.md index 5ccae48c3..6a68d1c77 100644 --- a/basic/18-web3py/README.md +++ b/basic/18-web3py/README.md @@ -31,6 +31,7 @@ ganache-cli - execute script ``` +If the following command cannot be executed after installing Python 3 or above, use "python3" instead of "python"“ ## Demonstrate contract construction and deployment python scripts/1_deploy_using_web3.py