sovereign-sdk icon indicating copy to clipboard operation
sovereign-sdk copied to clipboard

Return token address from `create_token`. Emit `token_created` event.

Open preston-evans98 opened this issue 1 year ago • 2 comments

Currently the bank module's create_token returns an empty list of events. We should emit an event indicating which token was created, and return the address to the caller.

cc @bkolad

preston-evans98 avatar Apr 21 '23 18:04 preston-evans98

For sure we can add the event. Here is also another way of getting the the address for tests: We can use the create_token_address::<C>(&token_name, sender_address.as_ref(), salt) method directly in tests and calculate the deployed address. Example: https://github.com/Sovereign-Labs/sovereign/blob/research/sov-modules/sov-modules-impl/bank/src/tests.rs#L141

bkolad avatar Apr 24 '23 06:04 bkolad

@bkolad @preston-evans98 can you confirm, if current state of affairs require that?

citizen-stig avatar Sep 26 '23 15:09 citizen-stig