区块链使用记录

区块链使用记录

  • 参考资料
  • FAQ
    • [部署智能合约遇到Network up to date.错误](#部署智能合约遇到Network up to date.错误)
    • [hit an invalid opcode while deploying. Try:](#hit an invalid opcode while deploying. Try:)

参考资料

FAQ

部署智能合约遇到Network up to date.错误

参考 部署智能合约遇到Network up to date.错误 truffle migrate 查找是以数字开头的 js 文件

通过命令方式创建

sh 复制代码
truffle create migration deploy_demo

hit an invalid opcode while deploying. Try:

sh 复制代码
"Ballot" hit an invalid opcode while deploying. Try:
   * Verifying that your constructor params satisfy all assert conditions.
   * Verifying your constructor code doesn't access an array out of bounds.
   * Adding reason strings to your assert statements.


Exiting: Review successful transactions manually by checking the transaction hashes above on Etherscan.


Error:  *** Deployment Failed ***

"Ballot" hit an invalid opcode while deploying. Try:
   * Verifying that your constructor params satisfy all assert conditions.
   * Verifying your constructor code doesn't access an array out of bounds.
   * Adding reason strings to your assert statements.

参考truffle初始化的项目在部署(migrate)的时候出现invalid opcode的异常

truffle-config.js 使用下面这个

js 复制代码
  compilers: {
    solc: {
      version: "0.8.21",      // Fetch exact version from solc-bin (default: truffle's version)
      docker: false,        // Use "0.5.1" you've installed locally with docker (default: false)
      settings: {          // See the solidity docs for advice about optimization and evmVersion
       optimizer: {
         enabled: false,
         runs: 200
       },
       evmVersion: "byzantium"
      }
    }
  },
相关推荐
磐链科技2 小时前
异构链的“翻译官”:区块链开发中跨链消息传递协议(IBC)的代码实现拆解
区块链
ZDGJ609912 小时前
如何选择适合自己的恒指期货产品
区块链
水母量化16 小时前
自动化开盘卖出如何适应价格笼子规则
运维·自动化·区块链·量化交易
IvorySQL16 小时前
PostgreSQL 日报 |SUM-AVG 溢出检测不足(9 月 5 日)
数据库·postgresql·区块链
Richown1 天前
React 高级模式:并发渲染下的状态机驱动架构——从 Finite State Machine 到生产级实现
区块链·react
ChannelLab1 天前
BONK FAQ:关于生态、产品、社区与金融化的 24 个核心问题
金融·区块链
超级架构师2 天前
【区块链技术】区块链101:比特币是什么?
人工智能·区块链·比特币
维克兜率天2 天前
4.3.2.1 日常监控:上线只是开始
服务器·数据库·python·区块链·php·量化
磐链科技3 天前
交易所开发核心:钱包提现引擎的设计——从风控拦截、多级审批到自动广播上链
web3·区块链
2601_962077983 天前
阿里二面,前端开发在web3.0中该如何应用,记录面经
区块链·前端开发·web3.0·技术趋势·学习准备