2

I am trying to perform raw transaction in quorum , but I am getting the error:

Error: Number can only safely store up to 53 bits.

The code is,

web3.eth.sendSignedTransaction(rawTx).then(function(transactionReciept,error){
      if(error){
        console.log("Error occured in send Function")
        callback(error,null,null);
      }else{
        console.log("Transaction is successfull ",transactionReciept)
        transaction = JSON.stringify(transactionReciept);  
     });
TylerH
  • 20,799
  • 66
  • 75
  • 101
GPC
  • 381
  • 2
  • 14

3 Answers3

2

JavaScript tried convert a BigNumber to a regular number, but the builtin number is too small. I am guessing it happens in the console.log when you try to print out the transactionReceipt.

TomTichy
  • 547
  • 5
  • 15
0

Before do anything else please be sure that provided gas is round number

0

In many blogs I've found it was a Truffle version problem. Truffle v5 would make problems of this type. They suggest to downgrade to truffle@4.1.15.

This has not been so for me. I have continue to use truffle v5. I've resolved by checking my gas limit when I sent a transaction.

gasLimit: web3.utils.toHex( gas_limit ),//The maximum gas provided for this transaction (gas limit)

My packages version:

  • Node: v8.11.4

  • Truffle: 5.0.12

  • Web3: 1.0.0-beta.52

  • Truffle-contract: 4.0.11

  • Truffle-interface-adapter@0.1.2

  • │ └── web3@1.0.0-beta.37

  • └── web3@1.0.0-beta.37

  • Ganache-cli: v6.4.3 (ganache-core: 2.5.5)

  • Ethereumjs-tx: 1.3.4