Verify the original
Use the EVM setup andfactoryAbi from Factory reads. Set sourceSongId to the original’s catalog ID. Load it with the request client, then read its contract song:
Buy and confirm
Follow Remix’s purchase example with thisoriginalSongId, its verified state and the buyer’s connected wallet. It reads existing rights, approves the actual settlement token when needed, sends buyLicense and verifies Factory.hasLicense after confirmation.
Show the chain price and settlement currency before requesting signatures. Store the approval and purchase hashes as soon as your wallet returns them. Recover an interrupted confirmation from those hashes before retrying.
For license payments, 80% goes to the original creator and 20% to the Rawchunks treasury. Session service fees and wallet costs are separate.
Open and edit the draft
source linked to the original and zero license allocation. Use the returned ID for editing.
Mint the finished variation
Pin the finished draft JSON to getremixCid, using the metadata step. Set metadataUri to ipfs:// followed by remixCid. In Remix’s variation call, use:
Keep the original and remixer identities in the final metadata. After the successful receipt, use the Factory event example to obtain
mintedId. Check the new song’s creator, URI, isRemix = true and parentSongId = originalSongId. Then record the result with the remixer’s request headers: