Required KAP721 Functions for SDK system

A contract that can be used with the SDK as KAP721 must have 3 important functions:

Function approveBySDK

function approveBySDK(address _operator, uint256 _tokenId) external override onlyExecutor returns (bool)

This function acts like the function approve(address to, uint256 tokenId) where _operator is the User that the system will act on instead.

Function setApprovalForAllBySDK

function setApprovalForAllBySDK(
    address _owner,
    address _operator,
    bool _approved
  ) external override onlyExecutor returns (bool)

This function acts like the function setApprovalForAll(address operator, bool approved) where _owner is the User the system will execute.

Function transferFromBySDK

function transferFromBySDK(
    address _sender,
    address _recipient,
    uint256 _tokenId
  ) external override onlyExecutor returns (bool)

This acts like function transferFrom(

address from,

address to,

uint256 tokenId)

Where _sender is the user that the system will work on instead, in the contract that BBT distributes as an example, there is no approval check.

Basic functions are the basic functions that the SDK system expects the contract added to the SDK system to have.

The onlyExecutor modifier is responsible for allowing addresses generated by the SDK system to call the function that the modifier is attached to. And to prevent being called by an address that doesn't have permission to use.

Contract KAP721SDK, which Bitkub Chain distributes as a sample, is a standard contract that developers can use. Or modify it to match the Business Usecase of the developer and the Contract that was implemented later from the Contract KAP721 that Implement Interface IKAP20 and others.

Last updated