Adding features onto AEX-9 "Fungible token"

My goal is to make a token called smash that has some special features beyond the Fungible Token Contract, but uses the Fungible token contract to make these features.

For example I have a Fungible Token Contract with the name initialized to “Smash”, and I want to add a feature called “reward” where it mints 100 “Smash” to all users with a balance > 10.

So I am using the balances, names, and mint of Fungible token contract, but the “reward” feature is not part of the Fungible Token Contract.

Can I call the fungible token contract remotely from a “smash” contract to do this?

Fungible token will store the name, balances, mint, transfer functions, and my “smash” contract will call it remotely to add the “reward” feature.

Is this how I should do this type of thing?

Hoping to put my token on jellyswap too.

Thank you so much!! Really appreciate any help!

Fungible Token Contract (Found here:https://github.com/mradkov/aeternity-fungible-token/tree/master/contracts)

2 Likes

I summon @milenradkov.chain to help you out as he is on speed with the contract.

2 Likes

you can bake it right into your contract, e.g. just add the functions as long as the base token contract stays the same.

sure also this is possible, maybe check the sample token sale doing something similar. https://github.com/mradkov/aeternity-token-sale-example

1 Like

Thank you for clarifying. Glad this is OK.

Are there any separate standards i need to meet for jellyswap compatability?

@kraykov can maybe elaborate

Hey, there is already an implementation for AEX9 support in Jelly, but it’s not deployed since there are no active AEX9 tokens.

As long as you follow the AEX9 interface, it will be compatible with Jelly.

I assume only the “allowance” extension is needed, burn, mint and swap can be discarded?

1 Like