KUB Docs
  • Introduction to KUB
  • Connect to KUB
  • KUB PoS
    • Increase block gas limit to 90M
    • Update GasPrice Instruction
    • Incident from chaophaya hardfork
    • Overview
    • Considerations
    • Validator Node
      • Node Requirements
      • Run Validator Node
      • Validator Staking
      • StakeManager Contract
      • ValidatorShare Contract
      • Slashing
    • Run Full Node
    • Run Archive Node
    • Chaindata Snapshot
    • Migration PoSA to PoS
    • Delegator
      • How to delegate
      • How to claim reward
      • How to unstake
    • Lausanne Upgrade
  • Developer Center
    • ✨Getting Started
    • 🏆Project Tiers
    • 👨‍💻Connect Bitkub NEXT to register as a new user
    • ✔️Verify your identity via Bitkub NEXT (KYC or KYB)
    • 💰Subscribe to the KUB Developer Package
    • 🗳️Submit your project
      • 📗Create submit project
      • 📘Manage your project
        • Submit project
        • Create a new project version
        • Status of project version
      • 📙Manage project information
  • KUB SDK
    • NEXT SDK
      • NEXT SDK Code Cookbook
      • KUB SDK Compatible Smart Contract
        • Example Smart Contract for Testing
        • Example KUB SDK Compatible KAP20 Smart Contract
        • Example KUB SDK Compatible KAP721 Smart Contract
  • KUB Playground
    • Quick Start Guide on KUB Playground
  • KUB Layer 2
  • KUB Scan
  • RPC Service
    • JSON-RPC Endpoint
  • IPFS Service
    • IPFS Guideline
  • FAQ
  • Glossary
  • Reference and Service
    • KUB Whitepaper Version 3.3
    • Technical Paper Version 3.2
    • KUB Explorer
    • KUB Faucet
    • KUB Oracle
    • KUB Bridge
    • KKUB OTP
Powered by GitBook
On this page
  • Source Code
  • Constructor

Was this helpful?

  1. KUB SDK
  2. NEXT SDK
  3. KUB SDK Compatible Smart Contract

Example KUB SDK Compatible KAP721 Smart Contract

🛑 Warning: The contract is not ready for production. It is intended for demonstration and educational purposes only. Please ensure you thoroughly review, test, and audit the contract before deploying it to a live environment.

The contract presented on this page is KUB SDK compatible. To get started with using the SDK, all you need to do is input the correct values into the constructor.

Source Code

You can access the source code of the example contract within the Remix workspace. Learn more about how to clone the Remix workspace here.

The contract is located in the Solidity file named BKCSDKExampleKAP721.sol.

Constructor

contract ExampleKAP721 is KAP721 {
    ...

    constructor(
        address transferRouter_,
        address adminRouter_,
        address kyc_,
        address committee_,
        uint256 acceptedKycLevel_
    )
        KAP721(
            "ExampleKAP721",
            "EX721",
            "sdk-example-project",
            adminRouter_,
            kyc_,
            committee_,
            acceptedKycLevel_
        )
    {
        _setBaseURI("https://youripfs.link/ipfs/");
        transferRouter = transferRouter_;
    }
    
    ...
}

Here are the parameters for deploying the ExampleKAP721 contract on the KUB testnet:

  • _transferRouter: 0x70E7702bE0D8Bbe746C2fd521F6260Af8Ec9b70A.

  • _adminProjectRouter: 0x0Fe7773B44b2CFE4C9778616Db526359Ccda16bE.

  • _kyc: 0x99166455989a868d5151799c716B3c1Be95D5114.

  • _committee: Use your MetaMask address for this parameter.

  • _acceptedKYCLevel: 0.

You can modify the "ExampleKAP721" and "EX721" values to suit your preferences. These represent the name and symbol of your token, respectively.

💡 Note: The provided arguments are for testing purposes on the testnet only. Make sure to adjust the values appropriately for production environments.

PreviousExample KUB SDK Compatible KAP20 Smart ContractNextKUB Playground

Last updated 3 months ago

Was this helpful?