The Interface

Implement the Veriface Interface and watch it start to work.

Integrating veriface in your smart contracts is simple and stress-free with just a few lines of code you have the power of our security protocol at your fingertips.

Declaring the interface to check if an address is marked as blacklisted by our protocol and to require only whitelisted addresses to interact with a specific function in your smart contract

interface IVeriface{
    function requireAddressWhiteListed(address sender, bool refuseService) external;
    function checkAddress(address sender, address callerContract, uint256 level) external;
 }

After declaring the interface you can use it just like any other interface implementation you have done before.

contract GetAddress {
    IVeriface secure;
    constructor(address veriface){
        secure =  IVeriface(veriface);
    }
}

Now you can use it by calling any of our functions above before implementing your contract code. For example, check if an address is blacklisted and if it is denying it to call that function. This can be implemented like this

interface IVeriface{
    function requireAddressWhiteListed(address sender, bool refuseService) external;
    function checkAddress(address sender, address callerContract, uint256 level) external;
 }

contract Owner {
     IVeriface secure;
    constructor(address veriface){
        secure =  IVeriface(veriface);
    }

    
    //prohibit blacklisted users from getting this data
    //code 0
    function getOwnerBlacklistStrict() external returns (address) {
        secure.checkAddress(msg.sender, address(this), 0);
        return address(this);
    }
}

Last updated