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

pobtoken burn_coins with -i flag #142

Closed
buhtignew opened this issue Jul 8, 2024 · 4 comments
Closed

pobtoken burn_coins with -i flag #142

buhtignew opened this issue Jul 8, 2024 · 4 comments
Labels
question Further information is requested

Comments

@buhtignew
Copy link
Collaborator

buhtignew commented Jul 8, 2024

I've tested pobtoken burn_coins 1 -i a2459e054ce0f600c90be458915af6bad36a6863a0ce0e33ab76086b514f765a using the PoD deck, DTNewSpecv2, and got the error message:

Error: The given deck is not an AT deck.

So I've asked myself whether the AT deck's can be used with the pobtoken burn_coins command and launched pobtoken burn_coins 1 -i ATTokenNewSpec1 command using my local label of the deck 7a2ae406ddf44ddb17532d4888fdc14573f52749445e9e014075c9f83cbe556f
The transaction (9870a09670a4f46a7ad8bf98a2273209185198d85d4c0eaac08c965292435389) has been created without any issue.

Then I've tried pobtoken burn_coins 1 -i 'dICO test', pobtoken burn_coins 1 -i "dICO test", pobtoken burn_coins 1 -i dICO test and even pobtoken burn_coins 1 -i ATTokenNewSpec but was not able to send any coin because I've been receiving the following warning:

WARNING: If you send the coins directly to a gateway address, then possible incompatibilities (e.g. deadlines) will not be checked.
Consider using the token ID or label/name as first argument instead.
Enter 'yes' to confirm to continue

It looks like the command is perceiving the global name as a gateway address.
If I confirm by typing "yes" I'm receiving the following message:

Error: No valid address string or non-existing label in the extended configuration file.

Since I was a bit surprised that the ATtoken decks can be used with the pobtoken burn_coins command I've also tested pobtoken burn_coins 1 -i f7b1af6d565898851878cb13c88bb52996a0a5380c4ea8803c248a69c7d00d82 where the f7b1af6d565898851878cb13c88bb52996a0a5380c4ea8803c248a69c7d00d82 deck has the global name ATTokenNotPoB so there would be some contradiction in being able to use this deck with the pobtoken command, but unfortunately for my inquiry I've got the following error message:

Error: End deadline for burn or gateway transactions of this token is is block 250000.

So I don't know whether it's expected that the ATToken decks can be used with the pobtoken command or not.
In my understanding the attoken is a wider concept than the pobtoken which includes the pobtoken concept, so the pobtoken decks should be used with the attoken commands but not viceversa.
Would be interesting to have your feedback about.

@buhtignew buhtignew added the question Further information is requested label Jul 8, 2024
@d5000
Copy link

d5000 commented Jul 24, 2024

AT decks are used with attoken create_tx command. The pobtoken class is exclusive for PoB tokens. You are correct however that the -i mode works for AT tokens too, this is a "side effect" of the way the command works.

The problem in your case was probably however that you used the global name for tokens and this was not supported at this time. You had to use a local name or the deck ID. I have confirmed this with the 'dICO test' token; if I use its deck ID dbefb8c9fcb4ed2bb2722abb177188b9e7d8cde55e4163fff9c5e5ca374706e1 it works.

I have added the global name function in commit df3d2d7. It works now with 'dICO test' for me.

I don't think it's worth the time adding a test "is this a PoB token or not" to the command making it slower. The attoken create_tx command is shorter so everybody will use it for this purpose.

Can be closed if everything works.

@buhtignew
Copy link
Collaborator Author

buhtignew commented Jul 24, 2024

I don't think it's worth the time adding a test "is this a PoB token or not" to the command making it slower.

Maybe I'm wrong, but it seems like this command already makes this test for the PoD tokens. In fact as mentioned in the beginning of my previous post if I run pobtoken burn_coins 1 -i a2459e054ce0f600c90be458915af6bad36a6863a0ce0e33ab76086b514f765a using the PoD deck DTNewSpecv2 I'm getting:

Error: The given deck is not an AT deck.

If so maybe it may make sense changing the output into Error: The given deck is not a PoB deck. in this case, or even just Error: Wrong type of deck.
_
There is also some strange thing happening with the global labelATTokenNewSpec:
If I run pobtoken burn_coins 1 -i ATTokenNewSpec I'm getting the Error: The given deck is not an AT deck. message as well but if I use its id (by running pobtoken burn_coins 1 -i 7a2ae406ddf44ddb17532d4888fdc14573f52749445e9e014075c9f83cbe556f) everything runs smoothly.
I've also spawned johns_first_ATtoken attoken deck and there is no such issue with its global label on my side.
Maybe the issue is somehow connected to the fact that the ATTokenNewSpec deck is both listed in the token list -a and token list -b outputs.

@d5000
Copy link

d5000 commented Jul 24, 2024

There are two tokens with the name ATTokenNewSpec: be86176f07821b0ec9c2a531404e56fbaa371581c9625f16fe5ab3f55a3614a1 and 7a2ae406ddf44ddb17532d4888fdc14573f52749445e9e014075c9f83cbe556f. I think I did this (i.e. using the same name of an existing token) to test this case on purpose.

be86... has priority because it was created first. But the reason you get the error is that this (despite of the name) was an old AT token with a format not longer valid, it is not recognized anymore as an AT or PoB token.

This is also the reason why local labels have priority over global names. Please use local labels or deck IDs when testing to avoid these confusions with non-unique global names.

"wrong type of deck" is ok for the message, I'll change it to that.

Please close if everything's alright :)

@buhtignew
Copy link
Collaborator Author

Thank you for explanation. (I should've carefully read the output).
Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants