gpt4 book ai didi

payload - 我收到错误 : "MetaMask - RPC Error: Error: Error: [ethjs-rpc] rpc error with payload"

转载 作者:行者123 更新时间:2023-12-03 22:07:29 26 4
gpt4 key购买 nike

  • 我从我的 javascript
  • 发送交易
  • Metamask 打开传输对话框
  • 我确定

    i get an error message in metamask (inpage.js:1 MetaMask - RPC Error: Error: Error: [ethjs-rpc] rpc error with payload {"id":3801695059583,"jsonrpc":"2.0","params":["0xf8ac098504a817c80082753094bd212f85764be5ecdb5d0ca44ed46ac866b352c781c8b844d0679d3400000000000000000000000058f9015d8b36eacbd4d105cb79872992c073583f0000000000000000000000000000000000000000000000000000000000000000822d45a028d2355a1149fac93070742fc4e14213f441d4a8dfd97611b4de238f1ef70ffaa048f0eed65a9c495ce42229d569d156a7ff4cc206efced1f25e1c779c53f24485"],"method":"eth_sendRawTransaction"} Error: VM Exception while processing transaction: revert )


  • 我在元掩码设置中重置帐户的交易历史记录

    **有关我的 html 中帐户的信息 ****************************
    硬币:(obj/adr/data):[object Object]/0xBd212f85764Be5ecDB5d0ca44ed46AC866B352c7/undefined
    CoinContract: (obj/adr/data):[object Object]/undefined/undefined
    硬币 anzeigen 铸币厂:0x6d8c98f8eb01f8f7ee55d25bf01e30fa64333940
    硬币 erzeugen Account1 0x6d8C98f8eb01F8f7ee55D25Bf01e30Fa64333940 Saldo1 65764158165999998600 数量:0.37
    Coin senden Account2 0x58f9015d8B36EAcBD4d105CB79872992C073583F Saldo2 30997031680000000000 金额:0.37
    Coin senden Account3 0xBd212f85764Be5ecDB5d0ca44ed46AC866B352c7 Saldo3 0 数量:0.37

    ************从 container.js 调用事务**************

    函数 CoinSenden(数据,地址){

    console.log("硬币发送:"+ 地址);

    尝试 {
    //
    // Code für ändern ????
    //
    var param1=data.amount;
    var myContract = web3.eth.contract(CoinABI);
    var myContractInstance = myContract.at(CoinContractADR);
    console.log("contract/contractinstanz:" + myContract + "/" + myContractInstance);
    console.log("contract/contractinstanz:" + myContract.address + "/" + myContractInstance.address);
    console.log("para:" + param1 + "/" + "adr:" + ContainerAccount2);

    myContractInstance.send(
    ContainerAccount2,param1,
    {from : ContainerAccount2, value: 200, gas: 30000, gasPriceInWei : 1000},
    function(err, myContract){
    if(!err) {
    // NOTE: The callback will fire twice!
    // Once the contract has the transactionHash property set and once its deployed on an address.
    // e.g. check tx hash on the first call (transaction send)
    if(!myContract.address) {
    console.log("Phase1- " + myContract.transactionHash) // The hash of the transaction, which deploys the contract

    // check address on the second call (contract deployed)
    } else {
    console.log("Phase2- " + myContract.address) // the contract address
    }
    // Note that the returned "myContractReturned" === "myContract",
    // so the returned "myContractReturned" object will also get the address set.
    }
    else {

    console.log("Fehler in der Methode beim Coin senden: " + err);

    }
    });



    console.log("Coin senden fertig.")

    } 捕获(错误){
    console.log("Fehler beim Coin senden: " + err);

    }

    }

    嗯,不多。我想看看它是否有效:
    1. ganache 中提交的事务
    2. 账户的新余额

    最佳答案

    是的,我也有同样的问题。但对我来说,答案很简单。我只需要清除 Metamask 中的交易历史记录。设置 -> 重置帐户。 enter image description here .原因是因为 Metamask 在内部保存了跟踪本地区块链随机数的状态。当您重置本地区块链但不重置 Metamask 时,它会感到困惑,并认为它正在尝试为过去的区块发送交易。但是重置帐户会清除该历史记录,因此您很高兴。它不会改变余额,所以它 super 快速和简单。

    关于payload - 我收到错误 : "MetaMask - RPC Error: Error: Error: [ethjs-rpc] rpc error with payload",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56514352/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com