ethereumblockchainsmartcontractsmove-langsui

What does the gas budget mean when publishing a fungible token via the sui CLI?


What does "gas budget" mean when publishing a package to the Sui chain?

In the tutorial from the sui documentation there is the following command:

sui client publish --path <your-sui-repo>/sui_programmability/examples/move_tutorial --gas-budget 30000

Why is --gas-budget 30000 required? I always thought the gas price isn't decided by the user


Solution

  • You are providing the budget amount you are willing to pay for the transaction.

    The txn may fail if the budget you provided is less than what node will accept.

    On the other hand, your txn may not require that much and you will only be charged for what it costs.

    There is no cost to do queries (i.e. sui client gas, sui client objects, etc.)