SLPJS fails to get token UTXOs
Closed this issue · 7 comments
I'm still investigating this issue. This GitHub Issue will be used to track the data as I uncover the root-cause. I've followed the trail to slpjs and suspect the issue I'm seeing is caused by the switch to SLPDB v1.
Overview
The slp-sdk e2e test recently started failing, with the error Could not find any SLP token UTXOs
. The error is originating from this line in the slp-sdk send()
method of the TokenType1.ts library.
That bitboxNetwork.getTokenInformation(tokenId)
call is returning a query from SLPDB with the slpTokenUtxos
property as an empty object for an address that does have a token UTXO. This is ultimately what is causing the error.
I'm not familiar with the slpjs code base. It appears to be calling Bitcore? Then makes a query SLPDB. I can't seem to follow the code at this point.
I suspect that the root cause of this issue is one of two possible sources:
- Changes we've recently made to rest.bitcoin.com to switch the SLP endpoints to use SLPDB v1.
- Changes in SLPDB v1 that no longer support whatever query is being made.
I've updated slp-sdk to use the latest version slpjs (v0.24.3) with no change.
This is the address being used by the e2e test:
simpleledger:qrkja6v5qhns3cg2x9qz6qpk9emmslh3egldpmga29
Here is a query from rest.bitcoin.com showing the SLP balance:
https://rest.bitcoin.com/v2/slp/balancesForAddress/simpleledger:qrkja6v5qhns3cg2x9qz6qpk9emmslh3egldpmga29
I just tried to use the slp-sdk examples to create and send a new token, and it worked. I can try swapping out the old e2e test token with a new token, to try and fix the e2e test.
It's still really curious why this particular token would have issues.
I'm going to go ahead and close this issue. I still can't explain what was happening with the token. What caused this issue to begin with was that the token in the slp-sdk e2e test was displaying the behavior captured here.
I was able to create a new token and move test over to this new token. So whatever this issue is, it's not effecting new tokens.
Reopening this issue as other people are seeing it.
Yes, from this:
simpleledger:qqzcyl5h59lus0y825kywlaggte5562mnsdmqw93zw
to:
simpleledger:qq9gychx3424jvh5m30z0lghnny9tveqesed3y8e5f
sendConfig
:
{ fundingAddress: 'simpleledger:qqzcyl5h59lus0y825kywlaggte5562mnsdmqw93zw',
fundingWif: 'xxxxx',
tokenReceiverAddress: 'simpleledger:qq9gychx3424jvh5m30z0lghnny9tveqesed3y8e5f',
bchChangeReceiverAddress: 'bitcoincash:qqzcyl5h59lus0y825kywlaggte5562mnspqt4s3us',
tokenId:
'7f8889682d57369ed0e32336f8b7e0ffec625a35cca183f4e81fde4e71a538a1',
amount: 5000 }
Is this still an issue for you?
Hey! @christroutner
I am also facing the same issue as i have 100 "SP" tokens in this address
https://testnet.simpleledger.info/address/slptest:qzhamf8f74g8vpmrzra80pdau879qqfzfsss4hlltf
But when on calling send-token , facing this
Closing, can't reproduce.