Skip to content

jeesunikim/soroban-eras-tour-nft

Repository files navigation

Soroban Eras Tour NFT

This project was built for my Meridian 2023 talk on building a simple NFT contract on Soroban.

Getting Started

If you haven't setup your local environment to use Soroban, please go to Soroban's Setup page and install Rust and Soroban

Running the contract on Testnet

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)"

3. Run cargo test to make sure the tests for the contract is passing

cargo test

4. Build a Soroban contract

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

5. Deploy to Testnet

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..."

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published