Apps Contracts

For providers

Apps Contract is the main contract of subs apps that can be use for interaction with apps.

View Methods

getAppPayments

function getAppPayments(uint256 _appId)

Returns all app payments ids (bytes32).

getAppByOwner

function getAppByOwner(address _owner)

Returns all app ids by owner (uint256[]).

Write Methods

createApp

function createApp(
    bytes32 _name,
    Payment[] calldata _payments
)

Create new subs app

deleteApp

function deleteApp(uint _appId)

Delete subs app.

addPayment

function addPayment(uint256 _appId, Payment[] calldata _payments)

Add new payment to an existed app.

deletePayment

function deletePayment(uint256 _appId, bytes32 _paymentId)

Delete app Payment

changeTokenPayment

function changeTokenPayment(
        uint256 _appId,
        bytes32 _paymentId,
        address _oldToken,
        address _newToken,
        uint256 _newPrice,
        uint256 _firstAmount
)

change payment Token properties.

modifyPayment

function modifyPayment(
        uint256 _appId,
        bytes32 _oldPaymentId,
        bytes32 name
        address owner,
        uint256 fee,
        uint256 trialPeriod,
        uint256 loadingTime
    )

Change payment properties

addTokenPaymentToMyApp

function addTokenPaymentToMyApp(
        uint256 _appId,
        bytes32 _paymentId,
        address _newToken,
        uint256 _price,
        uint256 _firstAmount
)

Add new token to an existed payment

removeTokenPaymentFromMyApp

function removeTokenPaymentFromMyApp(
        uint256 _appId,
        bytes32 _paymentId,
        address _token
)

Remove existed token from a payment

transferAppOwnership

function transferAppOwnership(uint _appId, address _newOwner)

Transfer app ownership to new address

renounceAppOwnership

function renounceAppOwnership(uint _appId)

Renounce app ownership

Last updated