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
KIPServicecontract:Network
Sepolia Base: 0x87a7A0223D6F96B3DECaAf3666d5c550b36fEfEe
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 OwnerModel OwnerDataset OwnerPayer
Contract Interfaces
Getter functions:
Purpose: Query the current address of the
KIPManagementcontract.Parameters:
NoneReturn:
Type:
addressValue: The address of the
KIPManagementcontract
Purpose: Query the current address of the
KIPIdentificationcontract.Parameters:
NoneReturn:
Type:
addressValue: The address of the
KIPIdentificationcontract
Purpose: Query the current address of the
KIPRegistrationcontract.Parameters:
NoneReturn:
Type:
addressValue: The address of the
KIPRegistrationcontract
Purpose: Query the current setting rate of the commission fee.
Parameters:
NoneReturn:
Type:
uint256Value: The commission fee's rate.
Purpose: Query the total amount of the accumulated commission fee.
Parameters:
NoneReturn:
Type:
uint256Value: The commission fee's total amount.
Purpose: Query the current listing price of the
tokenId.Parameter:
tokenId:Type:
uint256Value: The unique ID assigned to the
app,modelordataset
Return:
Type:
uint256Value: The listing price of the
tokenId
Purpose: Query the accumulated revenues acquired per
tokenId.Parameter:
tokenId:Type:
uint256Value: The unique ID assigned to the
app,modelordataset
Return:
Type:
uint256Value: The
tokenId's accumulated revenue
Purpose: Query the designated address, set by the tokenId's owner, to receive the accumulated revenue.
Parameter:
tokenId:Type:
uint256Value: The unique ID assigned to the
app,modelordataset.
Return:
Type:
addressValue: The receiver's address to whom the accumulated revenue is transferred.
Setter functions:
Purpose: Update the address of
KIPManagementcontractRequirement:
Caller must have
DEFAULT_ADMIN_ROLE
Parameter:
management:Type:
addressValue: The address of the
KIPManagementcontract.
Purpose: Update the new rate of the commission fee.
Requirement:
Caller must have
OPERATOR_ROLE
Parameter:
newFee:Type:
uint256Value: The new rate of the commission fee.
Purpose: Make a payment for the
appId.Requirements:
The provided
appIdshould be validmsg.sendershould meet following requirements:Have sufficient balance
Have already approved a sufficient amount to
KIPServicecontract.
Parameter:
appId:Type:
uint256Value: The unique ID assigned to the
app.
Purpose: Set a listing price for
tokenId.Requirements:
Caller must be the
ownerof thetokenIdThe provided
idTypeshould match thetokenId's classification
Parameters:
tokenID:Type:
uint256Value: The unique ID assigned to the
app,model, anddataset.
idType:Type:
uint256Value: The classification of the
tokenId.
price:Type:
uint256Value: The expected listing price for the item.
Purpose: Set a designated address to receive the accumulated revenue.
Requirements:
Caller must be the
ownerof thetokenIdThe provided
pooladdress should not be0x0
Parameters:
tokenID:Type:
uint256Value: The unique ID assigned to the
app,model, anddataset.
pool:Type:
addressValue: The receiver's address.
Purpose: Set a listing price and receiver's address for the
tokenId.Requirements:
Caller must be the
ownerof thetokenIdThe provided
idTypeshould match thetokenId's classificationThe provided
pooladdress should not be0x0
Parameters:
tokenID:Type:
uint256Value: The unique ID assigned to the
app,model, anddataset.
idType:Type:
uint256Value: The classification of the
tokenId.
price:Type:
uint256Value: The expected listing price for the item.
pool:Type:
addressValue: The receiver's address.
Purpose: Call to transfer the
accumulated feeto theTreasurywallet.Requirement:
Caller can be
ANY
Parameters:
None
Purpose: Call to transfer the
accumulated revenueto a designated receiver address set by thetokenId's owner.Requirements:
Caller can be
ANY
Parameter:
tokenID:Type:
uint256Value: The unique ID assigned to the
app,model, anddataset.
Last updated