zoukankan      html  css  js  c++  java
  • ethersjs运行时出现的问题

    1.在运行部署在ganache1.1.0上的合约中的某个函数时,出现了这样的问题,之前部署在geth上时并没有这样的问题

    userdeMacBook-Pro:test-ethers user$ node test-index.js 
    CreateAndBuyToken error :Error: Transaction hash mismatch from Provider.sendTransaction. (expectedHash="0x211f260dbb90994afc634271d596bde5ddc17da85c24abca30691c1193f39f1b", returnedHash="0x8e0223f1a8627ed6b9677e0fb09bd02cda5f1cea0e19edebda44c771803bc697", version=4.0.13)

    发现这好像是ganache版本的问题:

    I experienced the same issue with ganache-cli@6.2.1 paired with ethers@4.0.12. Downgrading to ganache-cli@6.1.8 fixed the issue.

    所以后面打算还是使用geth

    2.

     Error: gas required exceeds allowance or always failing transaction

    在运行合约函数时加上{gasLimit : 500000}即可,因为eth_estimateGas得出了infinite的结果

  • 相关阅读:
    (DP)codeforces
    (树状数组)POJ
    (树状数组)POJ
    (二维树状数组)POJ
    (模拟)HDU
    (暴力+深搜)POJ
    (判连通+暴力)UVA
    (深搜)UVA
    (暴力+各种算法)hihoCoder
    (尺取法)HDU
  • 原文地址:https://www.cnblogs.com/wanghui-garcia/p/10109179.html
Copyright © 2011-2022 走看看