For the complete documentation index, see llms.txt. This page is also available as Markdown.

KIP Service

  • The contract is used to manage payment-related features in the ecosystem.

  • The current version of the contract supports several features:

    • As the App Owner | Model Owner | Data Owner:

      • Set a listing price for their items.

      • Set a payment pool to receive the accumulated revenue

      • Claim the revenue generated by their items.

    • As the User (payer)

      • Make a payment for using an app

  • Deployed KIPService contract:

  • Supported roles/actors/users (msg.sender):

    • DEFAULT_ADMIN_ROLE:

      bytes32 DEFAULT_ADMIN_ROLE = 0x0000000000000000000000000000000000000000000000000000000000000000;
    • OPERATOR_ROLE:

      ///  OPERATOR_ROLE = keccak256("OPERATOR_ROLE")
      bytes32 OPERATOR_ROLE = 0x97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929;
    • Users:

      • App Owner

      • Model Owner

      • Dataset Owner

      • Payer

Contract Interfaces

Getter functions:

  • Purpose: Query the current address of the KIPManagement contract.

  • Parameters: None

  • Return:

    • Type: address

    • Value: The address of the KIPManagement contract

  • Purpose: Query the current address of the KIPIdentification contract.

  • Parameters: None

  • Return:

    • Type: address

    • Value: The address of the KIPIdentification contract

  • Purpose: Query the current address of the KIPRegistration contract.

  • Parameters: None

  • Return:

    • Type: address

    • Value: The address of the KIPRegistration contract

  • Purpose: Query the current setting rate of the commission fee.

  • Parameters: None

  • Return:

    • Type: uint256

    • Value: The commission fee's rate.

  • Purpose: Query the total amount of the accumulated commission fee.

  • Parameters: None

  • Return:

    • Type: uint256

    • Value: The commission fee's total amount.

  • Purpose: Query the current listing price of the tokenId.

  • Parameter:

    • tokenId:

      • Type: uint256

      • Value: The unique ID assigned to the app, model or dataset

  • Return:

    • Type: uint256

    • Value: The listing price of the tokenId

  • Purpose: Query the accumulated revenues acquired per tokenId.

  • Parameter:

    • tokenId:

      • Type: uint256

      • Value: The unique ID assigned to the app, model or dataset

  • Return:

    • Type: uint256

    • Value: The tokenId's accumulated revenue

  • Purpose: Query the designated address, set by the tokenId's owner, to receive the accumulated revenue.

  • Parameter:

    • tokenId:

      • Type: uint256

      • Value: The unique ID assigned to the app, model or dataset.

  • Return:

    • Type: address

    • Value: The receiver's address to whom the accumulated revenue is transferred.

Setter functions:

  • Purpose: Update the address of KIPManagement contract

  • Requirement:

    • Caller must have DEFAULT_ADMIN_ROLE

  • Parameter:

    • management:

      • Type: address

      • Value: The address of the KIPManagement contract.

  • Purpose: Update the new rate of the commission fee.

  • Requirement:

    • Caller must have OPERATOR_ROLE

  • Parameter:

    • newFee:

      • Type: uint256

      • Value: The new rate of the commission fee.

  • Purpose: Make a payment for the appId.

  • Requirements:

    • The provided appId should be valid

    • msg.sender should meet following requirements:

      • Have sufficient balance

      • Have already approved a sufficient amount to KIPService contract.

  • Parameter:

    • appId:

      • Type: uint256

      • Value: The unique ID assigned to the app.

  • Purpose: Set a listing price for tokenId.

  • Requirements:

    • Caller must be the owner of the tokenId

    • The provided idType should match the tokenId's classification

  • Parameters:

    • tokenID:

      • Type: uint256

      • Value: The unique ID assigned to the app, model, and dataset.

    • idType:

      • Type: uint256

      • Value: The classification of the tokenId.

    • price:

      • Type: uint256

      • Value: The expected listing price for the item.

  • Purpose: Set a designated address to receive the accumulated revenue.

  • Requirements:

    • Caller must be the owner of the tokenId

    • The provided pool address should not be 0x0

  • Parameters:

    • tokenID:

      • Type: uint256

      • Value: The unique ID assigned to the app, model, and dataset.

    • pool:

      • Type: address

      • Value: The receiver's address.

  • Purpose: Set a listing price and receiver's address for the tokenId.

  • Requirements:

    • Caller must be the owner of the tokenId

    • The provided idType should match the tokenId's classification

    • The provided pool address should not be 0x0

  • Parameters:

    • tokenID:

      • Type: uint256

      • Value: The unique ID assigned to the app, model, and dataset.

    • idType:

      • Type: uint256

      • Value: The classification of the tokenId.

    • price:

      • Type: uint256

      • Value: The expected listing price for the item.

    • pool:

      • Type: address

      • Value: The receiver's address.

  • Purpose: Call to transfer the accumulated fee to the Treasury wallet.

  • Requirement:

    • Caller can be ANY

  • Parameters: None

  • Purpose: Call to transfer the accumulated revenue to a designated receiver address set by the tokenId's owner.

  • Requirements:

    • Caller can be ANY

  • Parameter:

    • tokenID:

      • Type: uint256

      • Value: The unique ID assigned to the app, model, and dataset.

Last updated