These code will help you create NFTs and publish on SUI for development and testing purposes.
See deployment for notes on how to deploy the project on a live system.
- Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
- Set Environment Variable
source "$HOME/.cargo/env"
- Update to Stable Edition
rustup update stable
- Download brew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
- Install curl
brew install curl
- Install cmake
brew install cmake
- Install git
brew install git
- Install SUI-binary Document
cargo install --locked --git https://github.com/MystenLabs/sui.git --branch devnet sui
- Open VScode and Install sui-move-analyzer
cargo install --git https://github.com/move-language/move move-analyzer --branch sui-move --features "address32"
- Modify Extension Settings path to
/Users/{user_name}/.cargo/bin/move-analyzer
sui client
If starting for the first time, the console would display the message
Config file ["<PATH-TO-FILE>/client.yaml"] doesn't exist, do you want to connect to a Sui Full node server [y/N]?
please type 'y' and click enter
Then will display the message
Sui Full node server URL (Defaults to Sui Devnet if not specified) :
Default is Sui Devnet, you can also type in Sui Testnet or Sui Mainnet
Sui Mainnet URL: https://fullnode.mainnet.sui.io:443
Sui Testnet URL: https://fullnode.testnet.sui.io:443
Sui Devnet URL: https://fullnode.devnet.sui.io:443
Then will create a new wallet address, please type 0 as ed25519
Select key scheme to generate keypair (0 for ed25519, 1 for secp256k1, 2 for secp256r1):
Console log will display your address and 12 recovert phrases, and please memorize those mnemonic phrases
In VScode console
sui move build
- SUI Move
- SUI discord - get SUI test coin
- sui - SUI framework used
- std - Move-stdlib framework
In VScode console
sui client publish --gas-budget 100000000
In the output log, you can found a package id, and copy it to the sui explorer to find the contract.