[Solved] Error: Giving up after 10 blocks mined

Hello all,

I am using the js sdk to test a sophia smart contract, but when I call a contract function, it freezes for about 5 minutes, after which I receive this message:

Giving up after 10 blocks mined. TxHash th_2uRLKmh8BbnCahMNbL18yX5YCgh5DdA4RphbSzgSewXseQoFQN

When I check the transaction in the testnet explorer - it says there’s no transaction found, possibly because it didn’t go through, but I cannot understand why.

Thanks in advance!

Is there a question hidden somewhere in there?

Hi @arthas168
Please try to do the following

try {
  ... // your transaction code
} catch (e) {
  console.log(await e.verifyTx()) // inspect this object
}
1 Like

Again, nothing happens. It just hangs like that indefinitely. :confused:

{ validation:
[ { msg: ‘The account balance 999073430000000000 is not enough to execute the transaction’,
txKey: ‘fee’,
type: ‘warning’ },
{ msg: ‘The account balance 999073430000000000 is not enough to execute the transaction’,
txKey: ‘amount’,
type: ‘warning’ } ],
tx:
{ tag: ‘43’,
VSN: ‘1’,
callerId: ‘ak_SMwGaaRfryc8s7wPhpa1jzxAAtJfkWz2rZG5zrBny968Eqiqr’,
nonce: ‘3’,
contractId: ‘ct_2M9XPMwz1GggFRPatEd2aAPZbig32ZqRJBnhTT2yRVM4k6CQnb’,
abiVersion: ‘3’,
fee: ‘455060000000000’,
ttl: ‘0’,
amount: ‘104049618000000000000000000000000000000’,
gas: ‘1579000’,
gasPrice: ‘1000000000’,
callData: ‘cb_KxG71F19a2+IAWNFeF2J/8BvhgFwLpi5D58BgSoLs8Q3e2ochU0k8GyTAi/YeYOX4xXbH1G22i1ANQkHnwCg4k/2Sa76nck7YA3EtT7BSH7QyOab3fCxrvfqCexLSgUNRVRIqTB4ZGQ3NGRkMjY5NzIwNmE5MTBjNDJmOWY1ZWY4Yzc2MGEzMDY0ODNiOOfbNds=’ },
signatures:
[ { raw: <Buffer 4c d0 cf 22 94 25 2f 5d 03 0b 5b 92 aa 16 b5 9d f2 bd 9c ff 8d 21 86 79 a4 bd 3d 9d 19 7e b8 b0 cc f7 04 18 ff 63 24 09 74 54 e0 d3 41 36 e8 30 7d bd … >,
hash: ‘sg_B3t7HQ8rnKd6ewoKR31S98tdasdqhXMsLSa8iEYFXX2oKeFdEAABHdYQ17qgnihEY62XyhRHas5EzLZh11cBhw2Vnv4RC’ } ],
txType: ‘contractCallTx’ }

Oops, that’s a pretty silly error :smile: Still, why doesn’t it return the error message by default after a failed tx? Nvm, thank you very much! I just need to top up my balance then.

2 Likes