区块链使用记录

区块链使用记录

  • 参考资料
  • 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"
      }
    }
  },
相关推荐
Richown21 小时前
AI + Web3 融合架构:大模型驱动的智能合约自动生成与审计
区块链·react
磐链科技1 天前
交易所开发新范式:从社交钱包隐私保护中汲取的五大架构启示
架构·区块链
MartinYeung52 天前
当“捕食者”沦为“猎物”:Jaredfromsubway MEV机器人被黑750万美元的技术拆解与代码修复方案
机器人·区块链
MartinYeung52 天前
Aztec Connect 黑客攻击深度剖析:结算边界绕过漏洞
安全·区块链
ZDGJ60992 天前
恒指期货交易策略适合新手吗
区块链
baopixiaoz3 天前
AI量化策略师|Web3 量化交易研究员
大数据·人工智能·python·区块链
Jiamiren4 天前
WEEX:长鑫科技上市大涨,宇树科技合约同步走高,传统资产交易迎来新路径
人工智能·科技·区块链
黄焖鸡能干四碗4 天前
信息安全保障方案(Word文件)
大数据·网络·人工智能·架构·区块链
Web3李李5 天前
链游想要获得市场认可,核心从来不是极致去中心化
web3·去中心化·区块链·软件开发·链游开发
mykj15515 天前
稳定的DOO算力质押系统DAPP合约底层逻辑
web3·区块链·dapp·rwa·质押挖矿