Last active
December 7, 2024 23:18
-
-
Save jeka-kiselyov/42928711f79ef78b3a2cb98955e36804 to your computer and use it in GitHub Desktop.
Sui Move Dev On Linux Cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Local Sui network | |
# Docs: https://docs.sui.io/build/sui-local-network | |
# Upgrade local: | |
brew install sui | |
## Local explorer: https://explorer.polymedia.app/?network=local | |
# Install local validator: | |
brew install sui | |
# | |
# run local Sui development test validator node | |
RUST_LOG="off,sui_node=info" sui start --with-faucet --force-regenesis | |
# Open blockchain explorer in local mode: https://explorer.sui.io/?network=local | |
# Connect CLI client to local | |
sui client new-env --alias local --rpc http://127.0.0.1:9000 | |
sui client switch --env local | |
sui client active-env # should echo "local" | |
# Generate address | |
sui client new-address ed25519 | |
# Convert sui.keystore format to import into browser's Sui Wallet | |
less ~/.sui/sui_config/sui.keystore # copy the `value` needed | |
sui keytool convert value # result is ok to import into Sui Wallet | |
# Get connected Sui Client address | |
sui client active-address # should echo configured address | |
# Get some Sui from local faucet. Need to run after each local node start, as you have nothing on fresh data | |
sui_local_address=$(sui client active-address) ; curl --location --request POST 'http://127.0.0.1:9123/gas' --header 'Content-Type: application/json' --data-raw "{\"FixedAmountRequest\": {\"recipient\": \"$sui_local_address\"}}" | |
# Display gas objects available: | |
sui client gas | |
# Test the Move package | |
sui move test | |
# Build the Move package | |
sui move build | |
# Publish the package | |
sui client publish --skip-dependency-verification --gas-budget=200000000 . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment