sui: add page (#14479)
Co-authored-by: Wiktor Perskawiec <git@spageektti.cc> Co-authored-by: Sebastiaan Speck <12570668+sebastiaanspeck@users.noreply.github.com>
This commit is contained in:

committed by
GitHub

parent
17b0f1480b
commit
d74970154c
16
pages/common/sui-client-faucet.md
Normal file
16
pages/common/sui-client-faucet.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# sui client faucet
|
||||
|
||||
> Interact with the Sui faucet.
|
||||
> More information: <https://docs.sui.io/references/cli/client#request-a-sui-coin-from-faucet>.
|
||||
|
||||
- Get a SUI coin from the faucet associated with the active network:
|
||||
|
||||
`sui client faucet`
|
||||
|
||||
- Get a SUI coin for the address (accepts also an alias):
|
||||
|
||||
`sui client faucet --address {{address}}`
|
||||
|
||||
- Get a SUI coin from custom faucet:
|
||||
|
||||
`sui client faucet --url {{custom-faucet-url}}`
|
24
pages/common/sui-client-ptb.md
Normal file
24
pages/common/sui-client-ptb.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# sui client ptb
|
||||
|
||||
> Create, sign and execute programmable transaction blocks.
|
||||
> More information: <https://docs.sui.io/references/cli/ptb>.
|
||||
|
||||
- Call a Move function from a package and module:
|
||||
|
||||
`sui client ptb --move-call p::m::f "<{{type}}>" args`
|
||||
|
||||
- Make a Move vector with two elements of type u64:
|
||||
|
||||
`sui client ptb --make-move-vec "<u64>" "[1000,2000]"`
|
||||
|
||||
- Split a gas coin and transfer it to address:
|
||||
|
||||
`sui client ptb --split-coins gas "[1000]" --assign new_coins --transfer-objects "[new_coins]" @{{address}}`
|
||||
|
||||
- Transfer an object to an address:
|
||||
|
||||
`sui client ptb --transfer-objects "[{{object_id}}]" @{{address}}`
|
||||
|
||||
- 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`
|
36
pages/common/sui-client.md
Normal file
36
pages/common/sui-client.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# sui client
|
||||
|
||||
> Publish smart contracts, get object information, execute transactions, and more.
|
||||
> More information: <https://docs.sui.io/references/cli/client>.
|
||||
|
||||
- Create a new address with the ED25519 scheme:
|
||||
|
||||
`sui client new-address ed25519 {{address-alias}}`
|
||||
|
||||
- Create a new testnet environment with an RPC URL and alias:
|
||||
|
||||
`sui client new-env --rpc https://fullnode.testnet.sui.io:443 --alias testnet`
|
||||
|
||||
- Switch to the address of your choice (accepts also an alias):
|
||||
|
||||
`sui client switch --address {{address-alias}}`
|
||||
|
||||
- Switch to the given environment:
|
||||
|
||||
`sui client switch --env {{env-alias}}`
|
||||
|
||||
- Publish a smart contract:
|
||||
|
||||
`sui client publish {{package-path}}`
|
||||
|
||||
- Interact with the Sui faucet:
|
||||
|
||||
`sui client faucet {{subcommand}}`
|
||||
|
||||
- List the gas coins for the given address (accepts also an alias):
|
||||
|
||||
`sui client gas {{address}}`
|
||||
|
||||
- Create, sign, and execute programmable transaction blocks:
|
||||
|
||||
`sui client ptb {{options}} {{subcommand}}`
|
32
pages/common/sui-move.md
Normal file
32
pages/common/sui-move.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# sui move
|
||||
|
||||
> Work with Move source code.
|
||||
> More information: <https://docs.sui.io/references/cli/move>.
|
||||
|
||||
- Create a new Move project in the given folder:
|
||||
|
||||
`sui move new {{project_name}}`
|
||||
|
||||
- Test the Move project in the current directory:
|
||||
|
||||
`sui move test`
|
||||
|
||||
- Test with coverage and get a summary:
|
||||
|
||||
`sui move test --coverage; sui move coverage summary`
|
||||
|
||||
- Find which parts of your code are covered from tests (i.e. explain coverage results):
|
||||
|
||||
`sui move coverage source --module {{module_name}}`
|
||||
|
||||
- Build the Move project in the current directory:
|
||||
|
||||
`sui move build`
|
||||
|
||||
- Build the Move project from the given path:
|
||||
|
||||
`sui move build --path {{path}}`
|
||||
|
||||
- Migrate to Move 2024 for the package at the provided path:
|
||||
|
||||
`sui move migrate {{path}}`
|
24
pages/common/sui.md
Normal file
24
pages/common/sui.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# sui
|
||||
|
||||
> Interact with the Sui network.
|
||||
> More information: <https://docs.sui.io/references/cli/cheatsheet>.
|
||||
|
||||
- Execute a Sui subcommand:
|
||||
|
||||
`sui {{subcommand}}`
|
||||
|
||||
- Build tools for a smart contract:
|
||||
|
||||
`sui move {{subcommand}}`
|
||||
|
||||
- Publish smart contracts, get object information, execute transactions and more:
|
||||
|
||||
`sui client {{subcommand}}`
|
||||
|
||||
- Start a local network:
|
||||
|
||||
`sui start`
|
||||
|
||||
- Update from source:
|
||||
|
||||
`cargo install --locked --git https://github.com/MystenLabs/sui.git --branch testnet sui`
|
Reference in New Issue
Block a user