解决webpack5不支持web3 解决方式1遗弃webpack5,将其改为和config-overrides.js2、下载相关依赖package.json3、修改启动方式方式2如果遇到错误,可删除package-lock.json和node_modules重试参考地址How to Polyfill node core modules in webpack 5https://stackoverflow.com/questions/64557638/how-to-polyfill-node-core-modules-in-w
react Could not freeze 问题运行项目的时候,经常会有一大片错误 Could not freeze ./src/web3/address.js: Cannot read property 'hash' of undefinedHardSourceWebpackPlugin是webpack的插件,为模块提供中间缓存步骤,但是它报错了…临时解决方案删除 ./node_modules/.cache 后,再npm start重启项目确实,这行得通,但是后面还会继续蹦出来,难道每次都要去手动删除再重新启动吗?根本解决方案
react process is not defined,全屏iframe覆盖问题 问题在运行时,浏览器控制台报错:process is not defined,并且会在页面创建个全屏iframe,阻止页面交互,头痛…解决固化react-error-overlay版本,下载包npm i --save-exact react-scripts@4.0.3npm i --save-dev react-error-overlay@6.0.9package.json添加以下代码 "resolutions": { "react-error-overlay": "6.0.9"
solidity代理合约 如何实现代理合约代码pragma solidity ^0.8;import "@openzeppelin/contracts/utils/math/SafeMath.sol";contract B{ uint public num; uint public value; function donate(uint _num) payable public{ num = _num; value = SafeMath.add(value, msg.
solidity合约创建合约 参考uniswap的Factory合约创建交易对pragma solidity ^0.8.1;contract Pair{ address public factory; address public token0; address public token1; constructor(address _token0, address _token1) payable{ token0 = _token0; token1 = _token1