Introduces an extension to create semi-fungible tokens. They are non-fungible tokens with a shared baseId embedded in their token id using bit packing. Balances for each baseId are tracked. So for example this lets you create certificates for a course where each certificate has a unique id but one is able to lookup if an account holds a certificate for this course.
/**
* @dev Returns the balance of an address for a specific baseId
*/
function balanceFromBaseId(address account, uint48 baseId) external view returns (uint256);
How values are packed in the id:
[baseId (48 bits)][owner (160 bits)][counter (48 bits)]
Introduces an extension to create semi-fungible tokens. They are non-fungible tokens with a shared
baseId
embedded in their token id using bit packing. Balances for each baseId are tracked. So for example this lets you create certificates for a course where each certificate has a unique id but one is able to lookup if an account holds a certificate for this course.How values are packed in the id: [baseId (48 bits)][owner (160 bits)][counter (48 bits)]