I am seeing the error

Error 3040000: Transaction exception
Ensure that your transaction satisfy the contract's constraint!
Error Details:
max inline action depth per transaction reached

after a simple call to an EOS transfer action

cleos -u http://api.eosnewyork.io:80 push action eosio.token transfer '{"from":"aromaticbeer", "to":"polyeosiswin", "quantity":"0.1000 EOS", "memo":"jbj"}' -p aromaticbeer@active

Here is my inline transfer action code in the polyeosiswin smart contract on the mainnet:

    if (quantity.symbol == EOS_SYMBOL)
    name eosio_name = "cooperbaxter"_n;
    asset amount = asset(10000, EOS_SYMBOL);
    action (
            permission_level{_self, "active"_n},
            std::make_tuple (
                from = _self, to = eosio_name, quantity = amount, memo = "Test"

This is too simple to be seeing an error. What gives?

  • have you found the root cause ? i got this error occasionally as well.
    – James Cai
    Aug 31 at 2:40

I solved it.

Changing the if statement to...

if (latestRecord.account.name != _self)

did it. A check to see if the contract is not the receiver of the tokens is necessary.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.