- Published on
How to install Sui and Connect to Devnet
Hi there! 👋
I just heard about Sui a few days ago, and these are my notes for learning for the first time. I installed Sui, connected to Sui Devnet, joined discord to get some faucet token, installed Sui Wallet and learned how to use wallet by trying to mint NFT.
What's Sui?
Sui is a Layer 1 blockchain written in Rust and supports smart contracts written in the Move
Sui: pronounced "sweet" without the "T" - with Transactions (loads of them), things are SWEET indeed. :-) - https://docs.sui.io/devnet/learn
Install Sui
Reference: https://docs.sui.io/devnet/build/install
Prerequisites:
I install sui via Cargo
The easier way is to install it with brew (I already installed)
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch "devnet" sui sui-gateway
The installation step is to take a couple of minutes after installed you can check it with this command:
sui --version
The output is: (As of the time of writing)
sui 0.10.0
Connect to Sui Devnet
Reference : https://docs.sui.io/devnet/build/devnet
sui client
This step will be generated like a your wallet (keypair)
Config file ["/Users/chai/.sui/sui_config/client.yaml"] doesn't exist, do you want to connect to a Sui RPC server [yN]?y
Sui RPC server Url (Default to Sui DevNet if not specified) :
Select key scheme to generate keypair (0 for ed25519, 1 for secp256k1):
0
Generated new keypair for address with scheme "ed25519" [0x0000000000000000000000000000000]
Secret Recovery Phrase : [your twelve words will appear here your twelve words will appear here]
If you already have sui config file, you can configure RPC server URL to Devnet by using:
sui client switch --rpc https://gateway.devnet.sui.io:443
If you forget your sui address, you can run this command:
sui client active-address
Sui Wallet
Reference : https://docs.sui.io/devnet/explore/wallet-browser
Sui Wallet is a chrome extension, you can install like a Metamask (create a new wallet or import an existing wallet)I import from keypair that I already set up in the previous step.
When the wallet is created, there is no Sui token. We can request faucet token (Yes, it's Devnet, you can't request free money on Mainnet 🤣)
- Join Sui Discord
- Go to channel devnet-faucet
- Type a command
!faucet <address>
- Back to your wallet and you will see your Sui balance.
- Play around with Sui Explorer see your transaction detail.
Create NFT
You have 2 options to create NFT.
- Create via Sui Wallet, Go to Apps tab and click Mint an NFT
- Create with
sui client
command:
sui client create-example-nft
and you also can easily customize the name, description, or image :
sui client create-example-nft --url=https://devahoy.com/static/images/avatar.png --description="This is Chai" --name="Chai"
Here is my result : https://explorer.devnet.sui.io/objects/0x0240ab3b816f00c4d0fe31272b3cbcac93c22346
Further reading
- Authors
- Name
- Chai Phonbopit
- @Phonbopit