Sui.

Post

Share your knowledge.

LargeCappWithTwo.
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

2
Xavier.eth.
Dec 2 2024, 12:04

In 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
.
skywinder.
Dec 2 2024, 18:01

You 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.

364Posts503Answers
Sui.X.Peera.

Earn Your Share of 1000 Sui

Gain Reputation Points & Get Rewards for Helping the Sui Community Grow.

Reward CampaignJuly