0xKYC Documentation
  • ☀️Welcome to 0xKYC Documentation
  • Overview
    • 💡What we do
    • ✨Our Products
  • DEVELOPER GUIDES
    • 📍Start Here
    • 🧙Client or Server Guide
      • Sunscreen - Uniquness Verification
        • Define ABI
        • Get Unique Identifier of an Address
        • Working with the UUID
      • 0xKYC - Sanctions/ AML
        • Contract Addresses
        • Define ABI
        • Checking for SBT
        • Token-gate on the Front-end
    • ⛓️Blockchain Guide
      • Smart Contract
      • On Chain Verification
      • No Code (Etherscan)
    • 🤖Public APIs
Powered by GitBook
On this page
  1. DEVELOPER GUIDES
  2. Blockchain Guide

Smart Contract

Smart Contract Implementation (Solidity Modifier):

Here is an example of a solidity modifier that gates a core function, msg.sender must have a 0xKYC soulbound

interface OxKYC {
    function hasSoul(address _soul) external view returns (bool);
}

contract YourContractUsingOxKYC {
    OxKYC public myOxKYC;

    constructor(address OxKYCAddress) {
        myOxKYC = OxKYC(OxKYCAddress);
    }

    modifier hasSoul {
        require(myOxKYC.hasSoul(msg.sender), "Soul does not exist");
        _;
    }

    function coreFunction() public hasSoul {
        // do something
    }
PreviousBlockchain GuideNextOn Chain Verification

Last updated 1 year ago

⛓️