# Aptos

# Adding on-chain kycNFT checks

Adding an on-chain check for kycNFTs to your Aptos module is quite simple.

NOTE: On Aptos the kycNFT implementation is implemented as a Soulbound Token (SBT), hence the reason for references to 'SBT' in the code and documentation.

# Adding the kycDAO dependency and addresses to your project

First, you'll need to add the kycDAO module as a dependency to your project. You can do this by adding the following to your Move.toml file:

[dependencies.kycdao]
git = 'https://github.com/kycdao/aptos-module.git'
rev = 'main'

Next, you'll need to add the relevant addresses for the network your deploying your module to. See the Contract addresses section for more details. However, here is an example for testnet:

[addresses]
kycdao_deployer = "9004e9cfb5fa0eba5823035b2461ae57fb6e4e0c3faf2ac1a9cbe5f624795675"
kycdao_sbt_obj = "a6e5cc07b1168e0d93db52cd7c75293bf2ea93c5bcbbd52b1888a0fd128b3112"
kycdao_admin = "3a87cc4c90ae0c635f0889eb026f9a3dbe6993981fdf6b944424910c596270de"

# Calling has_valid_token on the kycDAO module

Essentially, it comes down to calling the has_valid_token function on the kycDAO module, and passing in the account address you want to check.

use kycdao_sbt_obj::kycdao_sbt;

public entry fun mint_verified(receiver: &signer) acquires ModuleData {
    // verify that the receiver has a valid token
    assert!(kycdao_sbt::has_valid_token(receiver_addr), error::invalid_argument(ENOT_VERIFIED));
    // mint code here
}

See the example below for more details.

# Example

We've written an example module which uses the kycDAO module to check if an account has a valid kycNFT token.

See the example module for more details.

# Contract addresses