How to Query KYC/KYB States on C-Chain
This document provides a guide on how to use Remix IDE to query the KYC/KYB States of an address on C-Chain. Follow the steps below to accomplish this.
- MetaMask installation and functionality
Add Camino Network to MetaMask
To query the KYC/KYB States of an address using the Remix IDE, we will use the MetaMask wallet.
We need to add a custom network to MetaMask. In this document, we will use the Columbus test network.
Please refer to the MetaMask & RPC Endpoints document to add a custom network.
Connecting MetaMask to the Remix IDE
Follow the steps below to connect MetaMask to the IDE:
- Open the Remix IDE web page: https://remix.ethereum.org/
- Click Deploy and run transaction on the right sidebar.
- Select Inject Provider - MetaMask from the Environment dropdown menu.
- Verify that the MetaMask is connected to the Remix IDE.
Downloading the CaminoAdmin.abi file
We can either compile the contract or use the precompiled ABI file. In this guide, we will use the ABI file.
You can download the ABI file from Chain4Travel's GitHub repository: chain4travel/caminoethvm - CaminoAdmin.abi
- Rigth click on "Raw" and select "Save as..." to save it to your local computer.
Uploading the ABI file to the Remix IDE
Follow these steps to upload the ABI file to the Remix IDE:
- Switch to File Explorer on the right sidebar and click the upload button.
- Select the file you downloaded from your local computer and upload it.
- Select the
Getting the CaminoAdmin Contract Address
Camino Admin Address:
You can also find the Camino contract addresses on Camino Smart Contracts page under
Interacting with the Address
- Paste the address into the At Address field and click on the button.
- Confirm the interaction
Making the Query
Follow the steps below to make the query:
- Click the arrow to open the contracts methods list.
- Paste the address you want to query KYC/KYB States into the field and click
This is the C-Chain address of a wallet, that starts with
If you want to query the P-Chain address,
please refer to the
method in P-Chain API documentation.
The result of the query will be displayed below the
Common values are:
|No Verification||Given address has not undergone KYC verification|
|KYC Verified||Given address has undergone KYC verification|
|KYB Verified||Given address has undergone KYB verification|
|KYC & KYB Verified||Given address has undergone KYC & KYB verification|
KYC/KYB State Bits
KYC/KYB states are represented by bits in a uint256 variable. The table below illustrates the mapping of each bit to its corresponding information:
Example Result for KYC Verified Address
Example Result for Non-Verified Address
Example Result for KYC & KYB Verified Address
Smart contracts on the C-Chain can retrieve information from the CaminoAdmin contract to confirm whether an address they are interacting with has undergone KYC/KYB verification or not.
This functionality empowers developers to create use-cases where such information is necessary.