版权声明:忠于祖国,忠于人民 https://blog.csdn.net/boss2967/article/details/85715469
工作日志
技术部- 2019-01-03
今日工作计划
- token_demo整理(进行中)
- truffle box 整理(进行中)
- 手动部署智能合约(进行中)
- 其他问题处理
问题记录列表
- AssertionError [ERR_ASSERTION]: Invalid callback specified.@解决:(1)Solc前几天发布了一个破解版本,这个错误与此有关。
(2)npm uninstall solc
(3)npm install [email protected] - node deploy.js 报错 Error: Cannot find module ‘web3’@解决: (1)首先输入npm init初始化(执行过程中全部回车就好了,全部默认)
(2)然后输入npm install ethereum/web3.js --save
(3)重复 - .node compile.js 报错 :2:1: ParserError: Source “openzeppelin-solidity/contracts/token/ERC20/ERC20.sol” not found: File not supplied initially.\nimport “openzeppelin-solidity/contracts/token/ERC20/ERC20.sol”;\r\n^------
-------------------------------------------------------^\n’ ],@解决:版本问题 - truffle 卸载 npm uninstall truffle
- web3版本问题 请检查你的web3.js版本@解决:如果version<1.0.0,使用:
web3.eth.contract(studentFactoryArtifact,address);// 注意区分contract大小写
1
如果version>1.0.0,使用:
new web3.eth.Contract(studentFactoryArtifact,address); // 注意区分Contract大小写 - 问题出现,TypeError: web3.eth.Contract is not a constructor@解决:如果部署中出现 问题:TypeError: web3.eth.contract is not a function则需要安装 0.19版本的 web3,命令如下:npm install web3@^0.19.0 --save安装完成后,问题修复。
- TypeError: web3.eth.Contract is not a function 依然存在@解决:问题依然存在
- 以上问题均在手动部署流程出现
明日工作计划
- DRCToken js代码整理
- Dapp js代码整理
- koa框架demo开发
- 其它需要代码编写和整理
备注
开发智能合约空投demo部署测试,手动demo的部署出现很多问题正在处理,明天准备整理 node的koa框架和 web3js端代码的开发,个人应该及时和领导沟通,多沟通才能正确理解意图,要不然会浪费很多时间.