Post
Share your knowledge.
Creating new currency and using Treasury Cap in one transaction?
So, I'm trying to set up a new currency and I want to use the treasury cap within the same PTB transaction, but I've hit a snag. It seems like the init function only returns 'update_cap' and not 'treasury_cap', which stops me from accessing it in the same transaction block. Is there a workaround for this, or do I need to handle it with two separate transactions?
- Move CLI
Answers
1To use the TreasuryCap within the same PTB, it has to be returned in the results of a previous command. Unfortunately, since the init function cannot return a value, there’s no way to access TreasuryCap in the same transaction block it is created. You will need to perform a separate transaction for this.
Do you know the answer?
Please log in and share it.
Move is an executable bytecode language used to implement custom transactions and smart contracts.

- ... SUIderiss+5
- ... SUIRamirez+5
- ... SUIElvin CLONE +5
- ... SUI
- ... SUI
- ... SUI
- ... SUIBritain+2