Skip to content

dcjanio/lisbon_bootcamp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NFT Collection with SIX Tokens

This is a Sui Move implementation of an NFT collection that integrates the SIX token from week2 of the bootcamp. The project includes:

  • A collection of NFTs with a max supply of 10
  • Integration with SIX tokens as the payment method
  • Escrow system for buying and selling NFTs
  • Display standard implementation
  • Airdrop functionality for distributing SIX tokens to NFT holders

Deployed Objects

The package has been successfully deployed with the following object IDs:

  • Package ID: 0xe2483df9c5321a14077866b7e9de5372a830a7e6fdfafcdf5d5d7b1852588a9e
  • CoinManager ID: 0x1dd0abd123bd0f28e183a944994719f40889d71df49619bb2c3fa645a48112b2
  • CollectionInfo ID: 0xead1c5c621ff184a423ba390dcf4431750c1ea7571b9110caa722f1f9c6f8aad
  • Display ID: 0x373b23efd458b27662c6f345cce325f432ae1100fa367588fd69116404d3288d

Features

  • SIX Token Integration: NFTs can be purchased using SIX tokens
  • Escrow System: Secure NFT trading without using Kiosk
  • Display Standard: Custom display for NFTs without the "creator" field
  • Airdrop Functionality: SIX tokens can be distributed to NFT holders

Usage

1. Publishing the Package

sui client publish --gas-budget 100000000

2. Swapping SUI for SIX Tokens

Before you can mint NFTs, you need SIX tokens:

sui client call --gas-budget 100000000 --function swap_sui_for_six --module six --package 0xe2483df9c5321a14077866b7e9de5372a830a7e6fdfafcdf5d5d7b1852588a9e --args 0x1dd0abd123bd0f28e183a944994719f40889d71df49619bb2c3fa645a48112b2 <SUI_COIN_ID>

3. Minting an NFT

Mint an NFT using your SIX tokens:

sui client call --gas-budget 100000000 --function mint_nft_with_six --module ptb --package 0xe2483df9c5321a14077866b7e9de5372a830a7e6fdfafcdf5d5d7b1852588a9e --args 0xead1c5c621ff184a423ba390dcf4431750c1ea7571b9110caa722f1f9c6f8aad <SIX_COIN_ID> "My NFT" "A description of my NFT" "https://example.com/image.png" "Rare"

For testing purposes, you can also mint an NFT without payment using:

sui client call --gas-budget 100000000 --function mint_free --module collection --package 0xe2483df9c5321a14077866b7e9de5372a830a7e6fdfafcdf5d5d7b1852588a9e --args 0xead1c5c621ff184a423ba390dcf4431750c1ea7571b9110caa722f1f9c6f8aad "SIX NFT #1" "My first NFT using SIX tokens" "https://example.com/nft1.png" "Common"

4. Creating an Escrow Listing

List your NFT for sale:

sui client call --gas-budget 100000000 --function create_nft_escrow --module ptb --package 0xe2483df9c5321a14077866b7e9de5372a830a7e6fdfafcdf5d5d7b1852588a9e --args <NFT_ID> 1000000

5. Buying an NFT from Escrow

Purchase an NFT that's listed in escrow:

sui client call --gas-budget 100000000 --function purchase_nft_from_escrow --module ptb --package 0xe2483df9c5321a14077866b7e9de5372a830a7e6fdfafcdf5d5d7b1852588a9e --args <ESCROW_ID> <SIX_COIN_ID>

6. Cancelling an Escrow Listing

Cancel your escrow listing (only the seller can do this):

sui client call --gas-budget 100000000 --function cancel_nft_escrow --module ptb --package 0xe2483df9c5321a14077866b7e9de5372a830a7e6fdfafcdf5d5d7b1852588a9e --args <ESCROW_ID>

7. Airdroping SIX Tokens to NFT Holders

Send SIX tokens to NFT holders:

sui client call --gas-budget 100000000 --function airdrop_six_to_nft_holder --module ptb --package 0xe2483df9c5321a14077866b7e9de5372a830a7e6fdfafcdf5d5d7b1852588a9e --args 0x1dd0abd123bd0f28e183a944994719f40889d71df49619bb2c3fa645a48112b2 <NFT_ID> 1000000

Testing Results

The package has been successfully tested with:

  1. Publishing the package
  2. Minting an NFT using the free mint function
  3. Creating an escrow listing for the NFT (price: 1,000,000 SIX)
  4. Cancelling the escrow listing

All operations worked as expected, confirming the proper integration of the SIX token with the NFT collection.

Integration Details

This project integrates the SIX token from week2_challenge with the NFT collection from week4_challenge. Key integration points include:

  1. Using SIX tokens for payments instead of GOLD tokens
  2. Adapting the escrow system to handle SIX tokens
  3. Implementing airdrop functionality for SIX tokens
  4. Creating PTBs (Programmable Transaction Builders) for common operations

SDK Integration

To add the "creator" field to the Display, use the SDK script in the sdk directory:

  1. Edit add_creator_field.js to configure:

    • PRIVATE_KEY: Your private key in base64 format
    • PACKAGE_ID: The Package ID from above
    • DISPLAY_ID: The Display ID from above
    • CREATOR_ADDRESS: Your address
  2. Run the script:

    cd sdk
    npm install
    node add_creator_field.js

Notes

  • SIX tokens have a 1% fee on swaps and burns
  • The NFT collection has a maximum supply of 10
  • All transactions require a gas budget (recommended: 100,000,000 MIST / 0.1 SUI)

Sui Bootcamp Lisbon

This repository contains the code and challenges for the Sui Bootcamp in Lisbon (April-July 2025).

Week 4 Challenge Integration

The Week 4 Challenge has been successfully integrated with the SIX token from Week 2. The integration can be found in:

./week4_challenge/challenge/my_nft_collection_six/

This implementation replaces the GOLD token with the SIX token while maintaining all the required functionality.

See the project-specific README in that directory for details on:

  • How to publish and use the package
  • Object IDs from our deployment
  • Testing results
  • SDK for adding the "creator" field to the Display

About

The code used for Lisbon Bootcamp of April to July 2025

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Move 89.5%
  • TypeScript 10.1%
  • JavaScript 0.4%