LinuxCommandLibrary

sui-client-ptb

Interact with the Sui blockchain for testing

TLDR

Call a Move function from a package and module

$ sui client ptb --move-call p::m::f "<[type]>" args
copy

Make a Move vector with two elements of type u64
$ sui client ptb --make-move-vec "<u64>" "[1000,2000]"
copy

Split a gas coin and transfer it to address
$ sui client ptb --split-coins gas "[1000]" --assign new_coins --transfer-objects "[new_coins]" @[address]
copy

Transfer an object to an address
$ sui client ptb --transfer-objects "[[object_id]]" @[address]
copy

Publish a Move package, and transfer the upgrade capability to sender
$ sui client ptb --move-call sui::tx_context::sender --assign sender --publish "." --assign upgrade_cap --transfer-objects "[upgrade_cap]" sender
copy

SYNOPSIS

sui-client-ptb [OPTIONS]

PARAMETERS

--config
    Path to the Sui client configuration file. This file defines network settings, keystores, and other client parameters.

--keystore-path
    Path to the keystore file containing private keys for signing transactions.

--env
    Specifies the Sui environment to use (e.g., devnet, testnet, mainnet).

--gas-budget
    Sets the maximum gas budget for a transaction. This is the amount of SUI allocated to cover the transaction's execution cost.

--rpc-url
    Specifies the URL of the Sui RPC endpoint.

--help
    Displays help information about the sui-client-ptb command and its subcommands.


    The specific action to perform (e.g., `object`, `move`, `transfer`, `query`, `pay`).

DESCRIPTION

The `sui-client-ptb` command is a command-line interface (CLI) tool designed for interacting with the Sui blockchain. It allows users to perform various actions, including querying the Sui network state, submitting transactions, managing Sui objects, and inspecting account balances. The `ptb` suffix likely indicates a specific version or experimental branch of the Sui client, possibly related to performance testing or benchmarking. This client facilitates interaction with a Sui blockchain by providing a way to communicate with the network, sign and submit transactions, and retrieve data.

Users can use `sui-client-ptb` to deploy smart contracts (move packages), transfer SUI tokens, and manage their digital assets on the Sui network. It provides a comprehensive set of features for developers and end-users alike to engage with the Sui ecosystem. The tool typically interacts with a Sui RPC endpoint to communicate with the blockchain.

Its intended use case involves testing and benchmarking performance on the Sui blockchain.

CAVEATS

The `sui-client-ptb` tool and its specific features are subject to change as the Sui blockchain evolves. PTB suggests Performance Testing Benchmarking. Be very careful with any transactions performed, as using a testing/benchmarking client on a production environment may lead to unexpected outcomes. Ensure the configuration is correct and that you understand the implications of the actions you are taking. Gas estimations are important to consider.

SUBCOMMANDS

The `sui-client-ptb` command typically includes subcommands like:
- `object`: Interact with Sui objects.
- `move`: Deploy and interact with Move packages.
- `transfer`: Transfer SUI tokens.
- `query`: Query the Sui network state.
- `pay`: Pay others in SUI tokens.
Each subcommand has its own specific options and usage.

SEE ALSO

curl(1), jq(1)

Copied to clipboard