class="language-solidity"

Split Contract

The "Permet-Designer-Split-Research-Contract-V0" smart contract is an advanced blockchain-based solution designed for the intricate task of managing and distributing profits in the garment industry. This contract leverages the capabilities of 0xsplits' liquid split, a sophisticated mechanism in the blockchain realm, and it is built upon the ERC721 standard, a well-established protocol for non-fungible tokens (NFTs). This standard is pivotal in representing unique physical assets or designs within the garment sector, allowing for a clear and unequivocal identification of each item.

At its core, the contract is programmed to meticulously set up profit split allocations for each item or artwork included in a collection. This feature is vital as it assigns specific profit percentages to different tokens. Such an approach not only facilitates an equitable distribution of revenues among various contributors but also ensures a high degree of transparency in financial dealings.

uint32[] public splitByTokenId = [
        333333, // token 0 - distribution token 1 
        333333, // token 1 - distribution token 2
        7936,   // token 2 - garment item 001
        70902,  // token 3 - garment item 002
        49736,  // token 4 - garment item 003
        47102,  // token 5 - garment item 004
        73350,  // token 6 - garment item 005
        36676,  // token 7 - garment item 006
        31754,  // token 8 - embroidery token 1
        15878   // token 9 - embroidery token 2
    ];

function royaltyInfo(uint256 _tokenId, uint256 _value)
        external
        view
        override(IERC2981Royalties)
        returns (address _receiver, uint256 _royaltyAmount)
    {
        return (address(this), (_value * royaltyPoints) / 10000);
    }

Beyond mere profit allocation, the contract has the capability to mint NFTs. These tokens are not just digital representations; they are functionally integrated with the 0xsplits interface. This integration is crucial as it enables users to claim and monitor the allocated percentage for each token, thereby providing an unprecedented level of clarity and control over financial distributions.

Furthermore, the contract incorporates robust mechanisms for retrieving unique identifiers for each token, effectively linking them to their corresponding digital assets. This linkage is essential for maintaining the integrity and traceability of each item within the blockchain ecosystem. Additionally, the contract encompasses comprehensive functions for managing token approvals and transfers. These management functions are instrumental in enhancing the security and control over transactions involving these digital tokens. As a result, the smart contract not only streamlines the financial management in the fashion industry but also fortifies the security of digital transactions, especially for items that are represented as NFTs, commonly referred to as digital twins.

In summary, this split smart contract is a multifaceted and powerful tool in the fashion industry's move towards digitalization. It effectively harnesses blockchain technology to ensure transparency, fairness, and security in the distribution of profits from the sale of unique garments and designs. Its role in promoting equity among contributors and safeguarding the integrity of digital transactions marks a significant advancement in the digital fashion space, offering a glimpse into the future of how fashion items are created, shared, and monetized in a digital-first world.

View the full contract codebase on github. To use the contract in your project, redeploy a forked version with your own parameters.

© 2024 Permet Co.
SUBSCRIBE