Move.

Post

Share your knowledge.

Raju.
Raju158
Dec 31, 2024
Expert Q&A

Can deploying and calling a contract be done in one step?

I'm trying to reduce the number of user clicks in my application process. Currently, I have two separate actions: deploying a contract and sending a PTB. I'm looking for a way to merge these into a single action to make things simpler for the users. Is it possible to deploy a contract and simultaneously call some of its functions within a single PTB?

  • Move CLI
1
1
Share
Comments
.

Answers

1
Pluto Dev👽.
Jan 1 2025, 08:22

It seems that while you can publish or deploy a contract in a PTB, you cannot call it immediately because the package address is not known in the PTB, and it isn't provided as a return value from the publish call itself.

0
Best Answer
Comments
.

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.

148Posts231Answers
Sui.X.Peera.

Earn Your Share of 1000 Sui

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

Reward CampaignJune
We use cookies to ensure you get the best experience on our website.
More info