Overview

Understanding the two ways to integrate Cicleo into your project

On Chain usage exemple

If you want to use cicleo into your smartcontract and read it on chain you'll have to use a smartcontract on the same chain as your subscription manager. Here we assume you have created your subscription manager and you know it id.

First you will import this interface into your sol file

interface ICicleoRouter {
    function getUserSubscriptionStatus(
        uint256 subscriptionManagerId,
        address user
    ) public view returns (uint256 subscriptionId, bool isActive);
}

Then you just call with the this function to get the status of a specific user with the given submanager id (in that case it's 5 but use yours)

function getUserStatus(address user) returns (uint256 subscriptionId, bool isActive) {
    uint258 subManagerId = 5;
    return ICicleoRouter(0x7B960C2F89a2829b323e6624cB03f6cD0046C97e).getUserSubscriptionStatus(subManagerId, user)   
}

If you need some more complex integration let us know on discord we can do it for sure !

Last updated