Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

Bug: Incorrect behavior in case of creating token with already existing name #15

Open
PavelMal opened this issue Jul 11, 2024 · 0 comments

Comments

@PavelMal
Copy link
Contributor

In case of creating token with same name twice - I got an error but after getting an error, token with the same name is created (according to console output)

Steps to reproduce:

  1. Create token with a name (for example Ttest)

nil_cli -c ./config.ini minter create-currency 0x0001aaCE66d451CAc32d99118260a56e4eb1f5Dd 50000 Ttoken --withdraw

output should be:

21:43:10 INF msgHash=[0x2272940c0fa71b8c5381242f61984d80718dd4f479cb88743ba8dc52fa4dc182]        shardId=[1]
21:43:16 INF Created Ttoken:50000 CurrencyId=[0x0000000000000000000000000001aace66d451cac32d99118260a56e4eb1f5dd]
  1. Try to create token with the same name but another token amount:

nil_cli -c ./config.ini minter create-currency 0x0001aaCE66d451CAc32d99118260a56e4eb1f5Dd 10000 Ttoken --withdraw

output should be:

21:48:19 INF msgHash=[0x102f5e33c8721ee002aea29bc22abf2d8242cefef27194ced6c79d70f6b5da53]        shardId=[1]
21:48:24 INF Failed outgoing messages:
21:48:24 ERR err=["execution reverted: Token already exists"]    msgHash=[0x0dc0dae3579fdb1886a04628b836f3ccb9a150cdf08e204312d375e983ddffcf]
21:48:24 INF To view full receipts, run with debug log level or use `nil_cli receipt`.
21:48:24 INF Created Ttoken:10000 CurrencyId=[0x0000000000000000000000000001aace66d451cac32d99118260a56e4eb1f5dd]

Expected result: Right after we got an error that token already exists we should not send next transactions

according to explorer token with the same name is not added to account:

image
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant