- 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.
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
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:
The output is: (As of the time of writing)
Connect to Sui Devnet
Reference : https://docs.sui.io/devnet/build/devnet
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
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
- Back to your wallet and you will see your Sui balance.
- Play around with Sui Explorer see your transaction detail.
You have 2 options to create NFT.
- Create via Sui Wallet, Go to Apps tab and click Mint an NFT
- Create with
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
- Chai Phonbopit