This project was built for my Meridian 2023 talk on building a simple NFT contract on Soroban.
If you haven't setup your local environment to use Soroban, please go to Soroban's Setup page and install Rust and Soroban
1. Configure the CLI for Testnet (official doc)
stellar network add \
--global testnet \
--rpc-url https://soroban-testnet.stellar.org:443 \
--network-passphrase "Test SDF Network ; September 2015"
2. Configure an identity and fund the account using Friendbot
stellar keys generate --global swift --network testnet
Fund the account using Friendbot
curl "https://friendbot.stellar.org/?addr=$(stellar keys address swift)"
cargo test
soroban contract build
Once it is successfully built, its .wasm
file should be outputted in the target
directory. The .wasm
file:
- contains the logic of the contract, as well as the contract's specification / interface types
- is the only artifact needed to deploy the contract, share the interface with others, or integration test against the contract
target/wasm32-unknown-unknown/release/eras_tour_nft.wasm
soroban contract deploy \
--wasm target/wasm32-unknown-unknown/release/eras_tour_nft.wasm \
--source swift \
--network testnet
this command should output a contract id that starts with "C..."
- ERC-721: Non-Fungible Token Standard
- Soroban's Advanced Tutorials: 'Tokens': for generic token interface
- millionlumenhomepage.art: I think this is the first nft project built on Soroban. It was so helpful to see what others did first. It also includes frontend portion.