KIP Registration

  • This contract is used as the MINTER_ROLE to manage identification registration within the ecosystem.

  • The current version of the contract supports three types of registration:

    • App registration

    • Model registration

    • Dataset registration

  • Deployed KIPRegistration 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

Contract Interfaces

Getter functions:

function KIPManagement() external view returns (address);
  • Purpose: Query the current address of the KIPManagement contract.

  • Parameters: None

  • Return:

    • Type: address

    • Value: The address of the KIPManagement contract

function KIPIdentification() external view returns (address);
  • Purpose: Query the current address of the KIPIdentification contract.

  • Parameters: None

  • Return:

    • Type: address

    • Value: The address of the KIPIdentification contract

function fee() external view returns (uint256);
  • Purpose: Query the current registration fee.

  • Parameters: None

  • Return:

    • Type: uint256

    • Value: The registration fee

function registered() external view returns (uint256);
  • Purpose: Query the total number of successful registrations handled by this contract.

  • Parameters: None

  • Return:

    • Type: uint256

    • Value: The number of successful registrations

function appBindings(uint256 appId) external view returns (uint256, uint256);
  • Purpose: Query the modelId and dataId (optional) that the appId has bound.

  • Parameter:

    • appId:

      • Type: uint256

      • Value: The unique ID assigned to an app

  • Returns:

    • modelId:

      • Type: uint256

      • Value: The unique ID assigned to a model

    • dataId:

      • Type: uint256

      • Value: The unique ID assigned to a dataset (optional = 0, otherwise != 0)

Setter functions:

function setManagement(address management) external;
  • 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

function setFee(uint256 newFee) external;
  • Purpose: Update the registration fee.

  • Requirement:

    • Caller must have OPERATOR_ROLE

  • Parameter:

    • newFee:

      • Type: uint256

      • Value: The new registration fee

function mintModel(string url) external;
  • Purpose: Register the model

  • Requirement: None

  • Parameter:

    • url:

      • Type: string

      • Value: The string value of tokenURI linking to its metadata

function mintData(string url) external;
  • Purpose: Register the dataset

  • Requirement: None

  • Parameter:

    • url:

      • Type: string

      • Value: The string value of tokenURI linking to its metadata

function mintApp(uint256 modelId, uint256 dataId, string url) external;
  • Purpose: Register the app. App Owner has two options:

    • Option 1: Register the app and bind it to both a model and a dataset

    • Option 2: Register the app and bind it to a model only (without a dataset)

  • Requirements:

    • Option 1:

      • modelId and dataId must be valid

      • The idType of each must be valid

    • Option 2:

      • modelId and its idType must be valid

  • Parameters:

    • modelId:

      • Type: uint256

      • Value: The unique ID assigned to the model

    • dataId:

      • Type: uint256

      • Value: The unique ID assigned to the dataset

    • url:

      • Type: string

      • Value: The string value of tokenURI linking to the app's metadata

Last updated