Abort Called is usually an indicating of a segmentation violation. So look for things like:
accessing elements of a vector or pointer
calling new or delete on objects that have already been created or deleted
any of the other thousands of reasons why you can get a seg fault
I identified the problem - later in the function I'm trying to create a new extended asset by adding two extended assets together, and they don't have the same extended symbol.
I'm really not sure why the print statements between that line and the line in my question weren't being printed, though - that left me with the impression that the above line was ...
In the first line you're entering an EOS public key in what should be a private key
const addPrivateKey = "EOS8i1CXTY4Sz39XaQWX2RpccsCZ1nWM3w9zRhjCFChdci2Y65ck4";
Change this to the private key but as the comments say, be sure you keep this private, don't upload it or anything.
Error-Code 3040006's message is "Transaction Expiration Too Far"
What kind of client (cleos, eos-js, eos-sharp?) and what kind of network (EOS-mainnet, Telos, Wax?) are you using?
Default maximum transaction lifetime is 3600 seconds, therefore if expiration exceeds this maximum, you will get this error.
Here are the things I would do:
Check if ...
I think this is specific to the EOSIO testnet from Block One. You can try adding it by doing the following:
cleos -u https://api.testnet.eos.io set account permission lsqkeotnnpyu active --add-code
Let us know if this solution works for you
The --contracts-console option to nodeos will cause it to output any print statements made by a smart contract to its console log. When running from the command line, these end up in the terminal. If running from Docker, check the nodeos log file.