Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to send transaction #1

Open
raslegion opened this issue Jun 5, 2021 · 1 comment
Open

Unable to send transaction #1

raslegion opened this issue Jun 5, 2021 · 1 comment

Comments

@raslegion
Copy link

I am trying to send 1 Celo on Baklava, but keep getting an insufficient funds error when using this library. It works perfectly fine when I try the same with @celo/ contractkit. There is sufficient balance (100+ Celo) in the account and I am following the exact same steps as in the documentation. What could be going wrong?

Code

import {
     CeloProvider,
     CeloTransactionRequest,
     CeloWallet,
 } from '@celo-tools/celo-ethers-wrapper'
 import { utils } from 'ethers'
 
 const provider = new CeloProvider('https://baklava-forno.celo-testnet.org')
 await provider.ready
 
 const wallet = new CeloWallet(PRIVATE_KEY_HERE, provider)
 const amount = utils.parseEther('1')
 
 const txResponse = await wallet.sendTransaction({
         chainId: 62320,
         to: 'ADDRESS_HERE',
         value: amount,
     })
 
 const txReceipt = await txResponse.wait()

Error

Unhandled Rejection at Promise: [object Promise]. Reason: Error: insufficient funds for intrinsic transaction cost (error={"reason":"processing response error","code":"SERVER_ERROR","body":"{\"jsonrpc\":\"2.0\",\"id\":49,\"error\":{\"code\":-32000,\"message\":\"insufficient funds for transfer (after fees)\"}}\n","error":{"code":-32000},"requestBody":"{\"method\":\"eth_estimateGas\",\"params\":[{\"gasPrice\":\"0x1dcd6500\",\"value\":\"0xde0b6b3a7640000\",\"to\":\"ADDRESS\"}],\"id\":49,\"jsonrpc\":\"2.0\"}","requestMethod":"POST","url":"https://baklava-forno.celo-testnet.org"}, method="estimateGas", transaction={"gasPrice":{"type":"BigNumber","hex":"0x1dcd6500"},"to":"ADDRESS","value":{"type":"BigNumber","hex":"0x0de0b6b3a7640000"},"accessList":null}, code=INSUFFICIENT_FUNDS, version=providers/5.1.2)

@codemaster101
Copy link

@raslegion found a solution for this or an alternative?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants