current position:Home>Error: invalid JSON RPC response: typeerror: t is not a function

Error: invalid JSON RPC response: typeerror: t is not a function

2022-02-03 23:11:50 Q & A of Denglian community

I have this code , The function is to listen to the submission event of a form . But when you click Submit , You're going to report a mistake

$("#bidding").submit(event=>{   $("#msg").hide();   let amount = $("#bid-amount").val();   let sendAmount = $("#bid-send-amount").val();   let secretText = $("#secret-text").val();   let sealedBid = web3.sha3(web3.fromWei(amount, 'ether').toString() + secretText);   let productId = $("#product-id").val();   //console.log(sealedBid + " for " + productId);   EcommerceStore.deployed().then(i=>{console.log(amount )console.log(sendAmount )console.log(parseInt(productId))// There should be no problem ahead , There should be a problem below , But I don't know how wrong //bid For such a function in the contract function bid(uint _productId, bytes32 _bid) payable public returns (bool), sealedBid, {from: web3.eth.accounts[0],value: web3.toWei(sendAmount,'ether') }).then(     function(f) {      $("#msg").html("Your bid has been successfully submitted!");      $("#msg").show();      console.log(f)     }    )   });   event.preventDefault();});

An error is as follows

Error: Invalid JSON RPC response:TypeError: t is not a function

Take the answer 1:

Is there no setting provider?

Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.

Random recommended