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:Network
Sepolia Base
: 0x87a7A0223D6F96B3DECaAf3666d5c550b36fEfEe
Supported roles/actors/users (
msg.sender
):DEFAULT_ADMIN_ROLE
:OPERATOR_ROLE
: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
ordataset
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
ordataset
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
ordataset
.
Return:
Type:
address
Value: The receiver's address to whom the accumulated revenue is transferred.
Setter functions:
Purpose: Update the address of
KIPManagement
contractRequirement:
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 validmsg.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 thetokenId
The provided
idType
should match thetokenId
's classification
Parameters:
tokenID
:Type:
uint256
Value: The unique ID assigned to the
app
,model
, anddataset
.
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 thetokenId
The provided
pool
address should not be0x0
Parameters:
tokenID
:Type:
uint256
Value: The unique ID assigned to the
app
,model
, anddataset
.
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 thetokenId
The provided
idType
should match thetokenId
's classificationThe provided
pool
address should not be0x0
Parameters:
tokenID
:Type:
uint256
Value: The unique ID assigned to the
app
,model
, anddataset
.
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 theTreasury
wallet.Requirement:
Caller can be
ANY
Parameters:
None
Purpose: Call to transfer the
accumulated revenue
to a designated receiver address set by thetokenId
's owner.Requirements:
Caller can be
ANY
Parameter:
tokenID
:Type:
uint256
Value: The unique ID assigned to the
app
,model
, anddataset
.
Last updated