Post
Share your knowledge.
Dec 02, 2024
Expert Q&A
How can I create a new currency and use the TreasuryCap within the same transaction block (PTB)?
How can I create a new currency and use the TreasuryCap within the same transaction block (PTB)?
- Sui
- Move
2
2
Share
Comments
Answers
2Xavier.eth313
Dec 2 2024, 12:04In order to use the TreasuryCap inside the same PTB, it should be returned in the results of a previous command. However, since the init function cannot have a return value, there isn't a way to access the TreasuryCap in the same transaction block it is created.
1
Best Answer
Comments
skywinder269
Dec 2 2024, 18:01You will have to execute a separate transaction to access TreasuryCap.
0
Comments
Do you know the answer?
Please log in and share it.
Sui is a Layer 1 protocol blockchain designed as the first internet-scale programmable blockchain platform.
610Posts1335Answers

Reward CampaignJuly
- ... SUIBigSneh+1396
- ... SUISuiLover+1333
- ... SUI0xduckmove+1207
- ... SUIThorfin+1202
- ... SUIOwen+970
- ... SUIharry phan+847
- ... SUItheking+742
Bounty Posts
- Why does BCS require exact field order for deserialization when Move structs have named fields?53
- Multiple Source Verification Errors" in Sui Move Module Publications - Automated Error Resolution43
- Sui Transaction Failing: Objects Reserved for Another Transaction25
- How do ability constraints interact with dynamic fields in heterogeneous collections?05