> For the complete documentation index, see [llms.txt](https://docs.0xkyc.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0xkyc.id/developer-guides/blockchain-guide/smart-contract.md).

# 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

```solidity
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
    }
```
