# EVMs

# Adding on-chain kycNFT checks

Our smart contracts deployed on EVM (Ethereum Virtual Machine) based chains implement a very simple interface which implementing smart contracts can use to quickly check if a certain address has a valid kycNFT.

    /**
    * @title An interface for checking whether an address has a valid kycNFT token
    */
    interface IKycValidity {
        /// @dev Check whether a given address has a valid kycNFT token
        /// @param _addr Address to check for tokens
        /// @return valid Whether the address has a valid token
        function hasValidToken(address _addr) external view returns (bool valid);
    }

After instantiating the above interface with the correct address for the respective chain, simply call the hasValidToken(address _addr) function to check whether a given address has a valid kycNFT token.

# Example

Here is an example of a Grant Program contract which might require users submitting new grant applications to have a valid KYC token.

// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.0;

import "../interfaces/IKycValidity.sol";

/// @title An example contract which uses the IKycValidity interface
///
contract GrantProgram {
    IKycValidity public kycValidity;

    constructor(address _kycValidity) {
        kycValidity = IKycValidity(_kycValidity);
    }

    modifier hasKYC() {
        require(kycValidity.hasValidToken(msg.sender), "You must have a valid KYC token to use this contract");
        _;
    }

    function acceptNewGrant() public hasKYC() {
        // proceed with accepting new grant application from msg.sender
    }
} 

# Contract addresses

Use the following addresses when instantiating the IKycValidity interface.

Blockchain Network Contract Address
Polygon Mainnet KYC 0x205E10d3c4C87E26eB66B1B270b71b7708494dB9
Polygon Mumbai KYC 0x205E10d3c4C87E26eB66B1B270b71b7708494dB9
CELO Mainnet KYC 0x205E10d3c4C87E26eB66B1B270b71b7708494dB9
CELO Alfajores KYC 0x205E10d3c4C87E26eB66B1B270b71b7708494dB9

NOTE: Even though we make every effort to keep the address the same on each chain, we cannot guarantee this will be the case for new chains. Please always check the address for your respective chain in the table above.

# Support for Gas Station Network

Our smart contracts support OpenGSN, which allows organizations to pay for their users gas costs on their behalf. If you're interested in using this please get in touch.