Using Aex-9 Locally

Hello, I am trying to run the Aex-9 token contract locally and I want to give my token a name, decimals, and inital owner balance.

How should I do so? I know in the online editors we can put them as inital values, but with the local enviorment aeproject how should I do this? It seems like it would have to come from outside the contract because init is the first function to run, correct?

Should I edit the test, or how should I set these initial values?

Thank you!!

You could try to deploy the STANDARD AEX-9 token with the rough version of aeknow.chain by just ONE CLICK as below:

You could download the binaries of Windows here: GitHub - jdgcs/aeknow.chain: AEKnow.chain is designed to be a totally decentralized SNS aepp, based on Aeternity, AENS, Hugo and IPFS

A polished version of AEKnow.chain will be released this week later, and it will support more AEX-9 related functions.

1 Like

you can look at the tests using the aeproject framework

documentation is here: https://aeproject.gitbook.io/aeproject/developer-documentation/getting-started

If you have aeproject installed using aeproject env and aeproject test will execute the AEX-9 tests locally on your machine.

I think I’m a little misunderstood, I’m looking to find where I can set the arguments for the entrypoint init function.

Coincidentally your link pointed me in the right direction.

It looks like editing the deployment script is the way to do this, under the deployer file.

The specific link is here for anyone who needs this in the future:

https://aeproject.gitbook.io/aeproject/developer-documentation/aeproject-library-api/deployer

I posted a simple&quick way here: Deploy your own AEX-9 token in 3 minutes

If you are not care about the technical details, you could try.

3 Likes

thank you, sorry for the missunderstanding

Thank you! but im here for the details

Here might be the online editors’ workflow:
fill the values->compile the bytecode of the contract and the bytycode of the init call->build transaction->post to the mainnet.

So, the init function is compiled to bytecode before it was executed. for example: th_bJ3h3hmft81XJhYckeu9vXarUHcn8J1qesT8NYcTiRvXMBSFK of Aeternity - AEKnow

in this AEX-9 contract, cb_KxFE1kQfSy1Ub2tlbiBOYWVtZSQNQUFCr4IAAQEbb4wDOy48n9CAPOf//8ASHl32
is the init call, you can not read the values directly, but you could decode it in aeknow.chain, looks as:

Cannot translate FATE value {tuple,
{<<68,214,68,31>>,
{tuple,
{<<“Token Naeme”>>,18,<<“AAB”>>,
{variant,
[0,1],
1,
{1000000000000000000000000000}}}}}}
of Sophia type unit

Is this the details you mentioned?

1 Like

Absolutely, thanks for the consideration regardless.