Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLPJS fails to get token UTXOs #27

Closed
christroutner opened this issue Mar 9, 2020 · 7 comments
Closed

SLPJS fails to get token UTXOs #27

christroutner opened this issue Mar 9, 2020 · 7 comments

Comments

@christroutner
Copy link

christroutner commented Mar 9, 2020

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.

@christroutner
Copy link
Author

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

@christroutner
Copy link
Author

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.

@christroutner
Copy link
Author

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.

@christroutner
Copy link
Author

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 }

@christroutner christroutner reopened this Mar 22, 2020
@jcramer
Copy link
Contributor

jcramer commented Apr 25, 2020

Is this still an issue for you?

@AqeelKazmi
Copy link

AqeelKazmi commented Aug 7, 2020

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

image

@jcramer
Copy link
Contributor

jcramer commented Nov 2, 2020

Closing, can't reproduce.

@jcramer jcramer closed this as completed Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants