关于cannot estimate gas; transaction may fail or may require manual gas limit错误的排查

调用智能合约报错分析小技巧 Error: execution reverted 前端在调试调用合约的时候经常会遇到合约revert的情况,大部分区块浏览器只会显示 execution reverted,并不会把具体原因告诉我们。这个时候一般会去找合约大哥帮忙分析错误,但是合约大哥是怎么分析报错的呢?这篇文章给你一个解题方法。 阅读详情

今天在hardhat环境中使用etherjs调用智能合约出现了cannot estimate gas; transaction may fail or may require manual gas limit这样的错误排查了一天,这里记录一下排查的步骤。

网络环境是georli测试网

方法调用和报错如下:

let tx2 = await gravatarWithSigner.createGravatar('Lucas2', 'https://thegraph.com/img/team/bw_Lucas.jpg');


Uncaught:
<ref *1> Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (error={"reason":"execution reverted","code":"UNPREDICTABLE_GAS_LIMIT","method":"estimateGas","transaction":{"from":"0xBA8B604410ca76AF86BDA9B00Eb53B65AC4c41AC","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x59682f00"},"maxFeePerGas":{"type":"BigNumber","hex":"0x5968464a"},"to":"0x964F658FC863BAceFC719b85e8730fbc11c86ce4","data":"0xcdb3344a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000064c75636173320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a68747470733a2f2f74686567726170682e636f6d2f696d672f7465616d2f62775f4c756361732e6a706700000000000000000000000000000000000000000000","type":2,"accessList":null},"error":{"name":"ProviderError","_stack":"ProviderError: HttpProviderError\n    at HttpProvider.request (D:\\workspace\\gambo\\subgraph-example\\node_modules\\hardhat\\src\\internal\\core\\providers\\http.ts:78:19)\n    at LocalAccountsProvider.request (D:\\workspace\\gambo\\subgraph-example\\node_modules\\hardhat\\src\\internal\\core\\providers\\accounts.ts:187:34)\n    at processTicksAndRejections (internal/process/task_queues.js:95:5)\n    at async EthersProviderWrapper.send (D:\\workspace\\gambo\\subgraph-example\\node_modules\\@nomiclabs\\hardhat-ethers\\src\\internal\\ethers-provider-wrapper.ts:13:20)","code":-32000,"_isProviderError":true}}, tx={"data":"0xcdb3344a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000064c75636173320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a68747470733a2f2f74686567726170682e636f6d2f696d672f7465616d2f62775f4c756361732e6a706700000000000000000000000000000000000000000000","to":{},"from":"0xBA8B604410ca76AF86BDA9B00Eb53B65AC4c41AC","type":2,"maxFeePerGas":{"type":"BigNumber","hex":"0x5968464a"},"maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x59682f00"},"nonce":{},"gasLimit":{},"chainId":{}}, code=UNPREDICTABLE_GAS_LIMIT, version=abstract-signer/5.7.0)
    at Logger.throwError (D:\workspace\gambo\subgraph-example\node_modules\@ethersproject\logger\src.ts\index.ts:281:20)
    at Logger.makeError (D:\workspace\gambo\subgraph-example\node_modules\@ethersproject\logger\src.ts\index.ts:269:28) {
  reason: 'cannot estimate gas; transaction may fail or may require manual gas limit',
  code: 'UNPREDICTABLE_GAS_LIMIT',
  error: Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (reason="execution reverted", method="estimateGas", transaction={"from":"0xBA8B604410ca76AF86BDA9B00Eb53B65AC4c41AC","maxPriorityFeePerGas":{"type":"BigNumber","hex":"0x59682f00"},"maxFeePerGas":{"type":"BigNumber","hex":"0x5968464a"},"to":"0x964F658FC863BAceFC719b85e8730fbc11c86ce4","data":"0xcdb3344a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000064c75636173320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a68747470733a2f2f74686567726170682e636f6d2f696d672f7465616d2f62775f4c756361732e6a706700000000000000000000000000000000000000000000","type":2,"accessList":null}, error={"name":"ProviderError","_stack":"ProviderError: HttpProviderError\n    at HttpProvider.request (D:\\workspace\\gambo\\subgraph-example\\node_modules\\hardhat\\src\\internal\\core\\providers\\http.ts:78:19)\n    at LocalAccountsProvider.request (D:\\workspace\\gambo\\subgraph-example\\node_modules\\hardhat\\src\\internal\\core\\providers\\accounts.ts:187:34)\n    at processTicksAndRejections (internal/process/task_queues.js:95:5)\n    at async EthersProviderWrapper.send (D:\\workspace\\gambo\\subgraph-example\\node_modules\\@nomiclabs\\hardhat-ethers\\src\\internal\\ethers-provider-wrapper.ts:13:20)","code":-32000,"_isProviderError":true}, code=UNPREDICTABLE_GAS_LIMIT, version=providers/5.7.2)
      at Logger.makeError (D:\workspace\gambo\subgraph-example\node_modules\@ethersproject\logger\src.ts\index.ts:269:28)
      at Logger.throwError (D:\workspace\gambo\subgraph-example\node_modules\@ethersproject\logger\src.ts\index.ts:281:20)
      at checkError (D:\workspace\gambo\subgraph-example\node_modules\@ethersproject\providers\src.ts\json-rpc-provider.ts:78:20)
      at EthersProviderWrapper.<anonymous> (D:\workspace\gambo\subgraph-example\node_modules\@ethersproject\providers\src.ts\json-rpc-provider.ts:642:20)
      at step (D:\workspace\gambo\subgraph-example\node_modules\@ethersproject\providers\lib\json-rpc-provider.js:48:23)
      at Object.throw (D:\workspace\gambo\subgraph-example\node_modules\@ethersproject\providers\lib\json-rpc-provider.js:29:53)
      at rejected (D:\workspace\gambo\subgraph-example\node_modules\@ethersproject\providers\lib\json-rpc-provider.js:21:65)
      at processTicksAndRejections (internal/process/task_queues.js:95:5) {
    reason: 'execution reverted',
    code: 'UNPREDICTABLE_GAS_LIMIT',
    method: 'estimateGas',
    transaction: {
      from: '0xBA8B604410ca76AF86BDA9B00Eb53B65AC4c41AC',
      maxPriorityFeePerGas: BigNumber { value: "1500000000" },
      maxFeePerGas: BigNumber { value: "1500005962" },
      to: '0x964F658FC863BAceFC719b85e8730fbc11c86ce4',
      data: '0xcdb3344a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000064c75636173320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a68747470733a2f2f74686567726170682e636f6d2f696d672f7465616d2f62775f4c756361732e6a706700000000000000000000000000000000000000000000',
      type: 2,
      accessList: null
    },
    error: ProviderError: HttpProviderError
        at HttpProvider.request (D:\workspace\gambo\subgraph-example\node_modules\hardhat\src\internal\core\providers\http.ts:78:19)
        at LocalAccountsProvider.request (D:\workspace\gambo\subgraph-example\node_modules\hardhat\src\internal\core\providers\accounts.ts:187:34)
        at processTicksAndRejections (internal/process/task_queues.js:95:5)
        at async EthersProviderWrapper.send (D:\workspace\gambo\subgraph-example\node_modules\@nomiclabs\hardhat-ethers\src\internal\ethers-provider-wrapper.ts:13:20)
  },
  tx: {
    data: '0xcdb3344a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000064c75636173320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a68747470733a2f2f74686567726170682e636f6d2f696d672f7465616d2f62775f4c756361732e6a706700000000000000000000000000000000000000000000',
    to: Promise {
      '0x964F658FC863Bxxxxxxxxx85e8730fbc11c86ce4',
      [Symbol(async_id_symbol)]: 1302,
      [Symbol(trigger_async_id_symbol)]: 1301,
      [Symbol(destroyed)]: [Object]
    },
    from: '0xBA8B6044xxxxxxxxDA9B00Eb53B65AC4c41AC',
    type: 2,
    maxFeePerGas: BigNumber { value: "1500005962" },
    maxPriorityFeePerGas: BigNumber { value: "1500000000" },
    nonce: Promise {
      19,
      [Symbol(async_id_symbol)]: 1517,
      [Symbol(trigger_async_id_symbol)]: 1326,
      [Symbol(destroyed)]: [Object]
    },
    gasLimit: Promise {
      <rejected> [Circular *1],
      [Symbol(async_id_symbol)]: 1554,
      [Symbol(trigger_async_id_symbol)]: 1525,
      [Symbol(destroyed)]: [Object]
    },
    chainId: Promise {
      5,
      [Symbol(async_id_symbol)]: 1555,
      [Symbol(trigger_async_id_symbol)]: 1326,
      [Symbol(destroyed)]: [Object]
    }
  }
}

在网上搜索关键字很多人说是手续费的设置问题。于是增加了gasLimit和gasPrices的配置。

await gravatarWithSigner.createGravatar('Lucas2', 'https://thegraph.com/img/team/bw_Lucas.jpg', {gasLimit: 2400000,gasPrice: ethers.utils.parseUnits('9.0', 'gwei')});
{
  type: 2,
  chainId: 5,
  nonce: 19,
  maxPriorityFeePerGas: BigNumber { value: "9000000000" },
  maxFeePerGas: BigNumber { value: "9000000000" },
  gasPrice: null,
  gasLimit: BigNumber { value: "2400000" },
  to: '0x9xxxxxxxxxxxxx9b85e8730fbc11c86ce4',
  value: BigNumber { value: "0" },
  data: '0xcdb3344a0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000064c75636173320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002a68747470733a2f2f74686567726170682e636f6d2f696d672f7465616d2f62775f4c756361732e6a706700000000000000000000000000000000000000000000',
  accessList: [],
  hash: '0x212337d352d0b914e7940xxxxxxxxxxxxxx8e1f770c3a93de14fe076991eb3',
  v: 0,
  r: '0x0cacfxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxeb0687abbdb0f7c32322',
  s: '0x73c66e3xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb6b42020c16535d6e5977b94',
  from: '0xxxxxxxxxxxxxxxxxxx',
  confirmations: 0,
  wait: [Function (anonymous)]
}

没有报错,看似问题是解决了!但是通过返回的交易hash,在etherscan上找不到这笔交易!好像这笔交易丢失了一样!再仔细观察一下上面的报错cannot estimate gas; transaction may fail or may require manual gas limit,“交易可能失败或需要手动设置gas”,有没有可能是我们调用智能合约的时候出错了呢!

function createGravatar(string calldata _displayName, string calldata _imageUrl) public {
    require(ownerToGravatar[msg.sender] == 0);
    gravatars.push(Gravatar(msg.sender, _displayName, _imageUrl));
    uint id = gravatars.length - 1;

    gravatarToOwner[id] = msg.sender;
    ownerToGravatar[msg.sender] = id;

    emit NewGravatar(id, msg.sender, _displayName, _imageUrl);
  }

以上是我们调用的智能合约方法,通过分析代码我们发现每一个智能合约只能调用一次,于是我又调用了合约另外一个方法。此方法并不会出现交易失败的问题!然而返回的hash值依旧查询不到!

现在怀疑是账号的问题,所以尝试换个账号调用智能合约!

先通过matemask给第二个账号转一定的georli eth防止没有手续费!但是又出现了奇怪的问题!

[ethjs-query] while formatting outputs from RPC ‘{“value”:{“code”:-32000,”message”:”replacement transaction underpriced”}}’

连转账都转不出去,这就很可能是这个账号的问题了!

网上有很多人遇到过这个问题,大部分都说要增加手续费,然而我这边尝试过以后问题依旧!

最后看到这篇文章

解决replacement transaction underpriced以太坊交易异常

这里面除了手续费的问题还提到了nonce值

大体的原因就是由于这个账号前期有某一笔交易一直处于pending状态,如果这笔交易不被覆盖掉,那么后续所有的交易都无法成功。覆盖的方法就是修改交易的nonce值!

通过修改mateMask的nonce值修复replacement transaction underpriced的问题

通过修改nonce值使得交易成功后,再换第二个账号调用合约的createGravatar方法,成功调用!

再用第一个账号调用合约的其他方法,同样是成功调用!

总结一下出现cannot estimate gas或者是交易丢失的问题所在!

  1. 交易费设置的问题(并没有在本次出现的问题中的得到印证)!

  1. 排查是否是合约调用本身出现了问题。

  1. 由于当前帐号一直有交易处于pending状态需要在matemask中进行更高nonce值的交易以覆盖之前的交易。

estimateGas gas required exceeds allowance (6989519) or always failing transaction 在使用estimateGas计算gas的时候报错, Node error: {"code":-32000,"message":"gas required exceeds allowance (6989519) or always failing transaction"} 开始都是参考官网的例子 var result = web3.eth.estimateGas({ to: "0x... 阅读详情

相关推荐

智能合约报错排查实战:如何从execution reverted中提取关键信息

本文针对智能合约开发中常见的‘execution reverted’错误,提供了从基础到进阶的实战排查指南。详细介绍了如何利用eth_call模拟交易提取标准错误信息,并深入解析了自定义错误的解码方法。同时,文章还推荐了Etherscan、Tenderly等实用工具,帮助开发者高效定位和解决合约调用失败问题。

weixin_29012677的博客 246

ethers.js调用MetaMask提示cannot estimate gas;transaction may fail or may require manual gas limit错误

因为metamask钱包在支付代币前并不会检测余额是否充足,所以会支付失败,出现此提示。在调用abi时,参数最后增加gas限制 { gasLimit: 300000 }1、检查metamask钱包余额。2、增加gas 限制。

weixin_40159002的博客 1850

以太坊机制详解:Gas与Gas Prices深度解析

在以太坊柏林London升级后,以太坊启用了EIP1559进行gas计算。由于EIP1559引入的新的gas机制较为复杂,所以我写了此文介绍了以太坊的gas机制。主要涉及`EIP1559`引入的新的`gas price`设置方式和交易花费的具体计算方式。.........

WongSSH的博客 6261

区块链 之 以太坊的那些坑

作者:邹祁峰 邮箱:Qifeng.zou.job@hotmail.com 博客:http://blog.youkuaiyun.com/qifengzou 日期:2018.04.04 转载请注明来自"祁峰"的优快云博客 使用以太坊的过程中遇到不少坑,团队成员花了不少时间去研究才找到其中的真正原因.希望此篇能为各位在学习以太坊的过程中少走一些弯路. 主题 描述 ...

做事先做人! 1万+

2026年4月AI爆发周:阿里连推三款模型、字节全双工语音上线,国内大模型进入“落地竞速“新阶段

**摘要:**2026年4月初,国内AI大模型迎来密集发布,阿里、字节、腾讯分别推出新产品。阿里一周发布三款模型,覆盖通用推理、多模态轻量化和长文档处理,API价格大幅下降;字节推出全双工语音模型,实现实时交互,技术难度高;腾讯混元3.0强调工程化和生态整合,面向企业私有化部署。趋势显示,行业从性能竞赛转向落地竞赛,多模态成为主战场,API成本降低,开发者选择更丰富。国内大模型竞争重点转向实际应用和生态整合。

weixin_45526015的博客 1万+

LaTeX小白必看:5分钟搞定GB/T 7714-2005参考文献格式(Texmaker+BibTeX实战)

本文为LaTeX初学者提供了使用Texmaker编辑器和BibTeX工具链,快速实现GB/T 7714-2005参考文献格式的实战指南。文章详细解析了从获取gbt7714-2005.bst样式文件、编写.bib数据库到四步编译流程的核心步骤,并附有常见问题解决方案,帮助用户高效、准确地完成学术论文的参考文献排版。

weixin_29295541的博客 338

Internal JSON-RPC error. { “code“: -32000, “message“: “execution reverted“ } 报错解决

1,原因 最近在部署safemoon合约的时候,直接把bsc浏览器上面的合约代码复制,报了上面哪个错误 2,解决 这个原因主要是路由地址写错了 源代码中的地址是这个:0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F 由于我是在测试网进行合约部署的,所以需要改成下面那个地址 testnet : 0xD99D1c33F9fC3444f8101754aBC46c52416550D1 mainnet : 0x10ED43C718714eb63d5aA57B78B54704E25

qq_38641816的博客 1万+

从零构建eSIM RSP服务:云原生架构与GSMA合规实践

本文详细阐述了从零开始构建一个符合GSMA SAS-SM安全标准的云原生eSIM RSP服务的完整路径。内容涵盖云原生基础设施选型、容器化部署、GSMA标准接口集成,并重点分享了通过SAS-SM安全审计的实战经验与避坑指南,为物联网及智能设备企业自建可控的远程SIM配置服务提供了系统性的解决方案。

weixin_29322553的博客 459

区块链 xuperchain io.grpc.StatusRuntimeException: UNKNOWN: error execution reverted: execution reverted

1. 合约代码是否写错了 可以使用命令行部署、调用,测试一下 2.

软件工程小施同学 的专栏 5197

晶振匹配电容容值计算方法

在使用晶振时,应仔细参考晶振规格书,以确保正确选择匹配电容,从而获得稳定和精准的时钟源。

aidi1111的博客 4653

海康威视摄像头CVE-2017-7921漏洞复现:从零到一的实战指南(含解密工具下载)

本文详细解析了海康威视摄像头CVE-2017-7921漏洞的技术原理与复现方法,提供从环境搭建到实战利用的完整指南。通过认证绕过漏洞,攻击者可获取敏感信息并执行高权限操作,文章还包含解密工具下载与防御建议,助力安全研究人员深入理解物联网设备安全风险。

weixin_29325515的博客 814

web3j 操作

获取账户的Nonce public static BigInteger getNonce(Web3j web3j, String addr) { try { EthGetTransactionCount getNonce = web3j.ethGetTransactionCount(addr, DefaultBlockParameterName.PEN...

fangdengfu123的博客 4938

从开通VPS到搭建宝塔面板全教程

你在输入域名(此时我们可能没有类似aaa.com这样的域名,所以要输入VPS的IP地址)的时候,下面的根目录也会跟着变动,等输入完成后,你可以把根目录再改回成/www/wwwroot/dq。这时,在你的浏览器中,输入外网面板地址的URL,输入username和password,即可登陆宝塔面板。第一次登陆,需要绑定你的宝塔账号,你可以到宝塔的注册界面,用手机注册一个,然后绑定,首先看一下你的VPS操作系统是什么类型的(其实你在选择VPS的时候,就已经选定了,我选择的事Centos系统)。

kxltsuperr的专栏 3734

ganache gas 错误

用小狐狸链接gannche 一直交易失败,提示gas 不足,找了半天问题,终于找到问题所在,按图的步骤来就好了。 turn to on "Advanced gas control " 以后在每次交易的时候弹出的对话框就会和原来不一样: 多了一项设置 gas 的选项,如下图: ...

qq_41424626的博客 2164

YOLOv13涨点改进 | 独家创新、Neck特征融合改进篇 | TGRS 2024 | 引入 EFC增强跨层特征相关创新点,含MSEF(多尺度有效融合模块)二次创新模块,助力遥感目标检测涨点

本文提出EFC(增强跨层特征相关)模块改进YOLOv13模型,显著提升小目标检测性能。EFC通过分组特征聚焦(GFF)和多层特征重建(MFR)增强特征融合效率,在小目标检测任务中平均精度(mAP)提升1.7%,同时减少模型计算量。实验验证EFC在VisDrone等数据集上的有效性,改进后的模型能更好地保留小目标细节信息。还提出二次创新模块MSEF,集成通道和位置注意力机制,进一步优化特征表达。文章详细介绍了模块配置方法和yaml文件修改步骤,为小目标检测任务提供了实用的改进方案。

Ai缝合怪、助力小伙伴高效发论文 325

基于情感分析+聚类分析+LDA主题分析对服装产品类的消费者评论分析

本研究旨在通过对服装产品类的消费者评论进行综合分析,为企业提供更全面、更深入的市场洞察和决策支持。同时,本研究的方法和结果也可以为其他领域的消费者评论分析提供借鉴和参考。

m0_64336780的博客 2万+

Warning! Error encountered during contract execution [execution reverted]

参数的hex()值正确的情况下 修改兑换的币种金额 保留后4位小数(不要四舍五入,只要后4位)

Lovehanxiaoyan的博客 5966

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

JZ2440 移植lib库过程和出错 arm-linux-ranlib, command not found

xxxxx: arm-linux-ranlib command not found 在终端检查,发现arm-linux-ranlib可以在系统的PATH中找到,因为我已经把/work/tools/gcc-3.4.5-glibc-2.3.6/bin添加到了/etc/environment中。 那为什么还提示说找不到arm-linux-ranlib呢? 原因如下:     1.我添加arm交叉编...

Turf96的博客 826

锂电池充电器电路设计 里面有电路

锂电池充电器电路设计 里面有电路 3.7V升压到5V电路设计。

LinePhone3.2.7(android端最新版本) sip客户端

SIP客户端For android:LinePhone3.2.7(最新版本),官网地址:http://www.linphone.org/

Internal JSON-RPC error. { “code“ -32000, “message“ “execution reverted“ } 报错解决

1,原因 最近在部署safemoon合约的时候,直接把bsc浏览器上面的合约代码复制,报了上面哪个错误 2,解决 这个原因主要是路由地址写错了 源代码中的地址是这个:0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F 由于我是在测试网进行合约部署的,所以需要改成下面那个地址 testnet : 0xD99D1c33F9fC3444f8101754aBC46c52416550D1 mainnet : 0x10ED43C718714eb63d5aA57B78B54704E25

4764

Outlook Express 6 (OE6) for Win7/Win8/Win10

英文版 Outlook Express6.0, 兼容Win7/Win10/WinXP,解压就可用。

ClickHouse实战案例-----终

步骤一:准备日志数据 数据是一个标准的JSONROW数据 加载数据 步骤二:将日志数据文件导入到Hive的ODS层 ①:建表并导入数据 create table tb_log( log string ) partitioned by(dt string) ; load data local inpath "/opt/data/log.log" into table tb_log partition(dt='20201007'); ②:json解析数据在hive中建ODS表 cre

weixin_46011754的博客 2001

TheProjet"XXXXX"needstobedeployedbeforeitanbestarted

我们知道,动态图章,因图章中的时间、日期可以动态的生成,因而具有较强的时效性。在本篇文章中将介绍通过C#编程在PDF中绘制动态图章的方法,该方法可自动获取当前系统登录用户名、日期及时间信息并生成图章。 使用工具 Spire.PDF for .NET 注:下载安装后,注意在程序中添加引用Spire.P http://baobao.baidu.com/article/81906b6c1716fe1fe...

yna1052的博客 4万+

str045漏洞提权linux,SUDO漏洞提权实战(CVE-2021-3156 POC)

引言最近刷公众号看到了一个sudo的漏洞,看漏洞介绍是个堆缓冲区溢出的漏洞,出于手痒想跟进一下这个漏洞。经过一番折腾,发现这个漏洞还挺典型的,于是总结了一些想法。接下来我会在漏洞分析、提权原理、利用方案、实战分析等方面表达一些自己的观点。漏洞分析这几天网上对这个漏洞分析已经挺多的了,这里我再简略分析一下,详情可以参考一下Qualys团队的研究记录。Qualys团队统计的漏洞影响范围是1.8.2 –...

weixin_30539317的博客 928

Bugku-CTF之login2(SKCTF)(hint:union,命令执行)

Day40 login2(SKCTF) http://123.206.31.85:49165/ SKCTF{xxxxxxxxxxxxxxxxxxxxx} hint:union,命令执行 本题要点:union绕过、命令执行、脚本编写、base64编码 打开页面如下: 用bp尝试抓包,打开代理 ...

weixin_30593443的博客 1477

智能合约报错不再抓瞎:5分钟学会用provider.call揪出execution reverted的元凶

本文针对智能合约开发中常见的execution reverted报错,提供了一套高效的前端调试方案。通过详细解析provider.call方法,指导开发者如何模拟交易执行并解码回滚原因,从而快速定位智能合约中的逻辑错误,显著提升DApp开发与调试效率。

python9snake的博客 353

ethers.js错误处理全解:解决区块链开发常见问题

在区块链开发过程中,错误处理是确保应用健壮性的关键环节。ethers.js作为功能全面的区块链JavaScript库,提供了多种错误处理机制,但开发者常常在处理交易异常、ABI解析错误和网络问题时遇到困难。本文将系统梳理ethers.js中的错误类型、处理模式和最佳实践,帮助你快速定位并解决常见问题。 ## 错误类型与常见场景 ethers.js在不同模块中定义了多种错误类型,涵盖从参数验证到...

gitblog_01166的博客 901
上一篇: 通过修改mateMask的nonce值修复replacement transaction underpriced的问题
下一篇: The Graph 1 概述
子易予
博客等级 码龄11年 114粉丝 47原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值