Overspend error even though my account has algos

On each transaction I’m getting this error even though my account has 396 Algos and my smartContract also has 9 Algos

(node:76086) UnhandledPromiseRejectionWarning: Error: Network request error. Received status 400: TransactionPool.Remember: transaction 7EQT73GFS42MMNCWGZJ6K33OECBODMD734TIAGD6KLRZ5DS6JJFQ: overspend (account V4RFEEPLSXDFQ22Q45Q47ZZN5IWUQRAQTFI5N6JR3UOLHLD3UYPORMRALY, data {AccountBaseData:{Status:Offline MicroAlgos:{Raw:0} RewardsBase:0 RewardedMicroAlgos:{Raw:0} AuthAddr:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY5HFKQ TotalAppSchema:{_struct:{} NumUint:0 NumByteSlice:0} TotalExtraAppPages:0 TotalAppParams:0 TotalAppLocalStates:0 TotalAssetParams:0 TotalAssets:0} VotingData:{VoteID:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] SelectionID:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] StateProofID:[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] VoteFirstValid:0 VoteLastValid:0 VoteKeyDilution:0}}, tried to spend {2000})

Also facing this error:

Network request error. Received status 400: TransactionPool.Remember: txn dead: round 24176411 outside of 24175322–24176322

I see two possible explanations:

  • you’re on the wrong network V4RFEEPLSXDFQ22Q45Q47ZZN5IWUQRAQTFI5N6JR3UOLHLD3UYPORMRALY has funds on TestNet but not MainNet. Are you on TestNet?
  • your node is not synced.

What node are you using?

Its fixed!

I need to deploy my contracts on mainnet, can you share the relevant docs on steps so I can deploy on production mainnet environment?

1 Like

You essentially need to use a MainNet API service or node. And you need to buy Algos on an exchange or equivalent.
Depending on your application, you may also want to audit your security, in particular key management.

1 Like

Alright! Could you please direct me to the documentation or article where we have the steps to deploy app on mainnet?

hey Fabrice, I tried creating an endpoint on Pokt Network they provide algorand mainnet node:

This is how I configured the App :

    // Setup AlgodClient Connection

    const algodToken = 'bc719064c8aa54f9f93ef980d7ef05de362958ab7f4464a317580cebefd29f83';  // Public key 
    const algodServer = 'https://algo-mainnet.gateway.pokt.network/v1/lb/632b15e189598b0039bfea5a';  // Endpoint /nodeURL
    const algodPort = "";   // No port provided

    let algodClient = new algosdk.Algodv2(algodToken, algodServer, algodPort);

When I try to call this it gives me error “timeout”

I wrote some details there:

I do not know whether Pokt Network nodes are working.
Can you try one of the API services listed there:

Note that for production software, especially if you’re expecting many users/high TVL, you want to check SLA and support for each of those services. You may also want to have a contract with them.

I have followed your recommendation and connected with PureStake mainnet Algod API:

This is how I’m trying to connect with the mainnet through my AlgoSDK scripts but I’m getting erroTimeout:

const token = { 'X-API-key': 'xxxxx' }
let algodClient = new algosdk.Algodv2(token, 'https://mainnet-algorand.api.purestake.io/ps2', undefined);

What PortNumber Do I have to add or in what way should i connect with third party node?

see code samples for PureStake there:
https://developer.purestake.io/code-samples