KIP Identification
This contract is used as a KIP Identity to classify users in the KIP Ecosystem.
The contract uses the
ERC-721standard with the external implementationERC721URIStorageCurrently, there are three types of Users:
App Owner(idType= 1)Model Owner(idType= 2)Dataset Owner(idType= 3)
Deployed
KIPIdentificationcontract:Network
Sepolia Base: 0x3cDfD20F5AA27335bE4A68d0e1B1085A65418b09
Supported roles/actors/users (
msg.sender):DEFAULT_ADMIN_ROLE:bytes32 DEFAULT_ADMIN_ROLE = 0x0000000000000000000000000000000000000000000000000000000000000000;MINTER_ROLE:/// MINTER_ROLE = keccak256("MINTER_ROLE") bytes32 MINTER_ROLE = 0x9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6;Users:ownersoftokenId
Contract Interfaces
Getter functions:
Purpose: Query the current address of the
KIPManagementcontract.Parameters:
NoneReturn:
Type:
addressValue: The address of the
KIPManagementcontract
Purpose: Query the name of the Identity NFT Collection (
ERC-721standard).Parameters:
NoneReturn:
Type:
stringValue: The Identity NFT Collection's name
Purpose: Query the symbol of the Identity NFT Collection (
ERC-721standard)Parameters:
NoneReturn:
Type:
stringValue: The Identity NFT Collection's symbol
Purpose: Query the number of identities
ownerhas in the NFT Collection (ERC-721standard)Parameter:
owner:Type:
addressValue: The account's address to check
Return:
Type:
uint256Value: The total number of identities
ownerhas
Purpose: Query the
ownerof the issuedtokenId(ERC-721standard)Parameter:
tokenId:Type:
uint256Value: The unique ID assigned to an identity
Return:
Type:
addressValue: The
ownerof the providedtokenId
Purpose: Query the
idTypeof the issuedtokenIdParameter:
tokenId:Type:
uint256Value: The unique ID assigned to an identity
Return:
Type:
uint256Value: The unique classification that has been assigned to the
tokenId
Purpose: Query the
URLof the issuedtokenIdwhich links to its metadata (ERC-721standard)Parameter:
tokenId:Type:
uint256Value: The unique ID assigned to an identity
Return:
Type:
stringValue: The string value of
URL
Purpose: Query the address that has been approved as
spenderof thetokenId(ERC-721standard)Parameter:
tokenId:Type:
uint256Value: The unique ID assigned to an identity
Return:
Type:
addressValue: The address of an approved
spender
Purpose: Check whether
operatoris approved asspenderfor alltokenIds owned byowner(ERC-721standard)Parameter:
owner:Type:
addressValue: The
owners address
operator:Type:
addressValue: The
owners address
Return:
Type:
boolValue:
trueorfalse
Setter functions:
Purpose: Update the address of
KIPManagementcontractRequirement:
Caller must have
DEFAULT_ADMIN_ROLE
Parameter:
management:Type:
addressValue: The address of the
KIPManagementcontract
Purpose: Generate the identity and assign to
toRequirements:
Caller must have
MINTER_ROLEReceiving address must follow:
Should not be
0x0If a contract, it should have the required interface (
IERC721Receiver)
tokenIdshould not have been issued prior to the request
Parameters:
to:Type:
addressValue: The address that will be the
owneroftokenId
tokenId:Type:
uint256Value: The unique ID assigned to an identity
idType:Type:
uint256Value: The classification of the
tokenId
tokenURI:Type:
stringValue: The string value of
URL
Purpose: Update the new string
URLoftokenIdwhich links to its metadataRequirements:
Caller must be the
ownerof thetokenId
Parameters:
tokenId:Type:
uint256Value: The unique ID assigned to an identity
tokenURI:Type:
stringValue: The new string of
URL
Purpose: Transfer the ownership of the
tokenIdRequirements:
Caller must be one of the following:
The
ownerof the transferringtokenIdApproved as
spenderfor thetokenId
Receiver must meet the following requirements:
Should not be
0x0If a contract, it should have the required interface (
IERC721Receiver)
Parameters:
from:Type:
addressValue: The current
ownerof thetokenId
to:Type:
addressValue: The new
ownerto whom thetokenIdwill be transferred
tokenId:Type:
uint256Value: The unique ID assigned to an identity
Purpose: Transfer the ownership of the tokenId. This function does not validate/check the Receiver. It is recommended to use the above function when transferring the identity's ownership.
Requirements:
Caller must be one of the following:
The
ownerof the transferringtokenIdApproved as
spenderfor thetokenId
Receiver should not be
0x0
Parameters:
from:Type:
addressValue: The current
ownerof thetokenId
to:Type:
addressValue: The new
ownerto whom thetokenIdwill be transferred
tokenId:Type:
uint256Value: The unique ID assigned to an identity
Purpose: Authorize
toas thespenderfortokenIdRequirements:
Caller must be the
ownerof thetokenId
Parameters:
to:Type:
addressValue: The account address that will be assigned as the
spender
tokenId:Type:
uint256Value: The unique ID assigned to an identity
Purpose: Set or reset
operatoras the approvalspenderfor alltokenIds that owned bymsg.senderRequirements:
Caller can be
ANY
Parameters:
operator:Type:
addressValue: The account address that will be assigned as the
spender
approved:Type:
boolValue:
trueto set, andfalseto reset
Last updated