[FAQ] Smart Contract: xxx has not been deployed to detected network (network/artifact mismatch)
在前端用 web3 与 contract 交互时,需要获取到已部署的 contract 实例进行操作,如果没有获取到就会报此错。
比如如下的 .deployed() 阶段:
/* 伪代码 */ const contractJson = contract(pokerJson) contractJson.setProvider(this.$web3Provider) // 获取合约实例
this.contractInstance = await contractJson.deployed()
这种情况首选需要做的就是把合约部署到本地开发环境上。
如果使用 truffle 就比较简单了,就是运行 `truffle migrate` 部署一下。
如果是在测试阶段报此类错,那么有可能是写错合约名等原因,导致没有部署成功。
Refer:智能合约网络错误
Link:https://www.cnblogs.com/farwish/p/12380193.html
[FAQ] Smart Contract: xxx has not been deployed to detected network (network/artifact mismatch)的更多相关文章
- Using APIs in Your Ethereum Smart Contract with Oraclize
Homepage Coinmonks HOMEFILTER ▼BLOCKCHAIN TUTORIALSCRYPTO ECONOMYTOP READSCONTRIBUTEFORUM & JOBS ...
- Smart Contract - Hello World
[编写Smart Contract] 1.包含头文件. #include <eosiolib/eosio.hpp> #include <eosiolib/print.hpp> ...
- ethereum/EIPs-1271 smart contract
https://github.com/PhABC/EIPs/blob/is-valid-signature/EIPS/eip-1271.md Standard Signature Validation ...
- Truffle Smart Contract Error: Invalid number of parameter
I followed the tutorial of quorum with truffle: https://truffleframework.com/tutorials/building-da ...
- 区块链学习5:智能合约Smart contract原理及发展历程科普知识
☞ ░ 前往老猿Python博文目录 ░ 一.智能合约的定义 通俗来说,智能合约就是一种在计算机系统上,当一定条件满足的情况下可被自动执行的合约,智能合约体现为一段代码及其运行环境.例如银行信用卡的自 ...
- 【翻译】A Next-Generation Smart Contract and Decentralized Application Platform
原文链接:https://github.com/ethereum/wiki/wiki/White-Paper 当中本聪在2009年1月启动比特币区块链时,他同时向世界引入了两种未经测试的革命性的新概念 ...
- smart contract 知识点
知识点 memory vs storage vs stack storage , where all the contract state variables reside. Every contra ...
- 【阿菜Writeup】Security Innovation Smart Contract CTF
赛题地址:https://blockchain-ctf.securityinnovation.com/#/dashboard Donation 源码解析 我们只需要用外部账户调用 withdrawDo ...
- BlendCAC: A Smart Contract Enabled Decentralized Capability-Based Access Control Mechanism for the IoT
摘要 BlendCAC,它是一种分散的.基于联合能力的 AC 机制,可有效保护大规模物联网系统中的设备.服务和信息.引入了基于联合能力的委托模型 (FCDM) 以支持分层和多跳委托.探索了委托授权和撤 ...
- the security of smart contract- 1
https://blog.zeppelin.solutions/the-hitchhikers-guide-to-smart-contracts-in-ethereum-848f08001f05 这个 ...
随机推荐
- C# 12 拦截器 Interceptors
拦截器Interceptors是一种可以在编译时以声明方式替换原有应用的方法. 这种替换是通过让Interceptors声明它拦截的调用的源位置来实现的. 您可以使用拦截器作为源生成器的一部分进行修改 ...
- 工作记录:TypeScript从入门到项目实战(项目篇)
Vue项目中使用 前面两篇介绍过TypeScript基础和较深入的东西,本章介绍如何在Vue项目中使用. 项目创建 创建项目直接使用Vue-cli创建 下面是步骤: 1.运行vuecli, 2.选择合 ...
- Android 接收微信、QQ其他应用打开,第三方分享
这里给大家分享我在网上总结出来的一些知识,希望对大家有所帮助 在AndroidManifest.xml注册ACTION事件 <activity android:name="com.te ...
- ElasticSearch中_source、store_fields、doc_values性能比较【转载】
原文地址请点击 在这篇文章中,我想从性能的角度探讨ElasticSearch 为我们存储了哪些字段,以及在查询检索时这些字段如何工作.实际上,ElasticSearch和Solr的底层库Lucene提 ...
- 《Spring6核心源码解析》已完结,涵盖IOC容器、AOP切面、AOT预编译、SpringMVC,面试杠杠的!
作者:冰河 博客:https://binghe.gitcode.host 文章汇总:https://binghe.gitcode.host/md/all/all.html 源码地址:https://g ...
- #网络流,最小割#洛谷 1344 [USACO4.4]追查坏牛奶Pollutant Control
题目 分析 考虑答案求的是最小割,但是最小割的最小边数有点难求, 考虑建立双关键字,其实就是将边权赋值为原边权\(*mx+1\), 其中\(mx\)是一个比较大的数,不需要太大, 这样用网络流做之后对 ...
- OpenHarmony 3.2 Release新特性解读之驱动HCS
OpenAtom OpenHarmony(以下简称"OpenHarmony")开源社区,在今年4月正式发布了OpenHarmony 3.2 Release版本,标准系统能力进一 ...
- Docker 14 Docker Compose
概述 使用 Docker 的时候,定义 Dockerfile 文件,然后使用 docker build.docker run 等命令操作容器. 然而微服务架构的应用系统一般包含若干个微服务,每个微服务 ...
- java excel关联导入数据格式为一对多
java excel关联导入数据格式为一对多 java 表格读取时一行一行的读取 将每行数据放入list 根据 list.stream().filter(m->m.getCode().equa ...
- Leetcode-栈的压入弹出序列
/* 输入:pushed = [1,2,3,4,5], popped = [4,5,3,2,1] 输出:true 解释:我们可以按以下顺序执行: push(1), push(2), push(3), ...