What does the swap() method do in AEX-9?

What does the swap() method do in AEX-9?
I don’t understand what this method can do, can you give me some instructions?

1 Like

@philipp.chain can you explain shortly?

maybe we should add a description here to clarify that:

@LiuShao please note that this is an extension which is not required. afaik it’s purpose is to track swaps of the token in case of migration to a new contract or to another chain

1 Like

I don’t know exactly what it can do tomorrow, just now I need to migrate an aex-9 to a new contract. Also I have a few more questions and I will start another new post.

1 Like

Hello @LiuShao ,

the swap function can be used to swap AEX-9 to any other Token on aeternity, e.g. another AEX-9, another standard or future native token.

An example how to swap AEX-9 to AEX-9 is given here aeternity-fungible-token/fungible-token-migration.aes at master · aeternity/aeternity-fungible-token · GitHub

Are there any other questions?
Kind regards

2 Likes