Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/integration/exchange.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ curl -X 'POST' \
"destinations": [
{
"address": "1C2RAVWSuaXw8xtUxqVERR7ChKBE1XgscNFw73NSHE1v3",
"attoAlphAmount": "10000000000000000",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that it is not necessary because if the attoAlphAmount is not specified, the full node will calculate the required dust amount based on the token: https://github.com/alephium/alephium/blob/30c59df012625a3b568a455800cf025683237da2/app/src/main/scala/org/alephium/app/ServerUtils.scala#L914

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that attoAlphAmount is required from the API, i will update the endpoint.

curl -X 'POST' \
  'https://node.mainnet.alephium.org/transactions/build' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"fromPublicKey": "034e30eb5dd78000bcbe276e1202d0dc5499398321cc160cc8b10f2a71ffdfe7ca", "destinations": [{"address": "1C2RAVWSuaXw8xtUxqVERR7ChKBE1XgscNFw73NSHE1v3", "tokens":[{"id": "66da610efb5129c062e88
e5fd65fe810f31efd1597021b2edf887a4360fa0800", "amount": "1"}]}]}'
{"detail":"Invalid value for: body (missing keys in dictionary: attoAlphAmount at index 266: decoding failure)"}%

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't realize this, thanks for the fix!

"tokens": [
{
"id": "19246e8c2899bc258a1156e08466e3cdd3323da756d8a543c7fc911847b96f00",
Expand Down
Loading