EOSCommunity.org Forums

Error with token transfer : value must be positive

hello everyone.

I have a strange error that was not happening a couple weeks ago… no idea why i have it now.

I made a contract that react to token transfer.
It was working fine 2 weeks ago last time i worked on it.

But today, when I try to send tokens, i only get that error message :
assertion failure with message: must transfer positive quantity

the quantity i pass is “500.0000 SEEDS” so i think it should be fine.

There are looots of tokens in the wallet so no issue there.

I even went all the way to recreate a token (SADS instead of SEEDS) and change my contract.

Note :
When sending SADS to the contract configured to receive seeds, i do get my contract error that it is the wrong token)
When changing my contract to receive SADS, I get the same error again. Even though the token is freshly created and issued :

esteban@esteban-linux:~$ cleos -u https://testnet.telos.caleos.io  push action seedtestnet4 issue '[ "seedtestnet4", "1000000000.0000 SADS", "memo" ]' -p seedtestnet4@active
executed transaction: 63ec63d1d17b09598822722d7b8691ddc112245bceed9f2736fa68e5d08f1286  128 bytes  577 us
#  seedtestnet4 <= seedtestnet4::issue          {"to":"seedtestnet4","quantity":"1000000000.0000 SADS","memo":"memo"}
<4>warn  2022-06-08T01:12:40.195 cleos     main.cpp:615                  print_rwarning: transaction executed locally, but may not be confirmed by the network yet

esteban@esteban-linux:~$ cleos -u https://testnet.telos.caleos.io push action seedtestnet4 transfer '[ "seedtestnet4", "seedtestnet5", "100.0000 SADS", "m" ]' -p seedtestnet4@active
Error 3050003: eosio_assert_message assertion failure
Error Details:
assertion failure with message: We only accept SEEDS.
pending console output: 

esteban@esteban-linux:~$ cleos -u https://testnet.telos.caleos.io push action seedtestnet4 transfer '[ "seedtestnet4", "seedtestnet5", "100.0000 SADS", "m" ]' -p seedtestnet4@active
Error 3050003: eosio_assert_message assertion failure
Error Details:
assertion failure with message: must transfer positive quantity
pending console output:

Does anyone has an idea why ?

As you can see, i have plenty of SADS and the amount look positive enough to me :slight_smile:

note that I have no problem sending tokens from the seedtestnet5 account to the seedtestnet4.

So i guess it is somehow linked to my smartcontract.
But since it was working perfectly fine 2 weeks ago and i didnt touched it at all i was wondering if some new updates might affect how catching transfer actions work ?

Here is how i catch it in my contract hpp :

[[eosio::on_notify("*::transfer")]] 
          void logdeposit(name from,name destination, eosio::asset quantity, std::string memo);

But since the error message is the one from the eosio.token contract, i am confused (I have the same error check but with a different message so i know it comes from the eosio.token contract)

and here is the link to the last transaction I did couple weeks back when i was working on that project.

Again, i havnt touched anything since then so i do really understand why it doesnt work anymore

ha. I have some devellopment :

If i transfer 100000.000 seeds it works

if i transfer 1000.000 i get the error :

overdrawn_balance

the other way around (sending from the account seedtestnet5 toward seedtestnet4)

I can send 100.000 sads without any error