RootSoft / algorand-dart

Unofficial community SDK to interact with the Algorand network, for Dart & Flutter
MIT License
36 stars 16 forks source link

assetName, unitName & url restrictions in AssetConfigTransaction #27

Closed jasonhtpham closed 1 year ago

jasonhtpham commented 2 years ago

I had a lot of trouble creating an asset. And after a whole day with trials and errors, I found out that we had been putting the name of the asset and its unit name incorrectly (longer than permitted?).

We use AssetConfigTransactionBuilder() to create the transaction, then sign and send it. We wanted to use this because we need to pass the URL and some notes with the asset creation. So, the weird thing here is:

When I tried with these name:

But when I tried using the assetManager which is simple but does not allow us to specify that many parameters. When I tried to name an asset with "FlutterCoin" (about 11 bytes) => it works.

Also, my colleagues passed his URL, which is much longer than 32 bytes, when he uses JavaScript SDK, the transaction always goes through.

However, in the official document of Algorand, it says: image

It would be great if this information could be clarified so other developers will not waste their time.

RootSoft commented 2 years ago

Thanks for the feedback @jasonhtpham I will improve the documentation in the next release. assetManager and applicationManager will also be getting deprecated in favor of using simpler creation methods to construct transactions.

jasonhtpham commented 2 years ago

Thank you for replying @RootSoft ! I am looking forward to the new release!