Token-Controlled Contracts on Radiant (Pay to Token)
Token-controlled contracts revolutionize contract composition and management on Radiant, facilitating the separation of contracts into multiple UTXOs, each with distinct functionalities. With token ownership housed in its UTXO and additional UTXOs for data storage and specialized functionalities, developers can seamlessly integrate custom functionalities with standard token scripts, extending contract capabilities effortlessly.
Script Details
Token Input
A standard singleton + P2PKH token script:
Token Output
The token output features a state script binding it to the contract input using ´OP_REQUIREINPUTREF´ , followed by the contract's script signature hash:
Script Sig
Script Pub Key
This script empowers complex contracts composed of multiple UTXOs, each with unique responsibilities. Token scripts maintain standard scripts easily understood by wallets but can be associated with custom contracts. Pay to token contracts can be deployed at any time to expand token functionality.
Advantages
Enhanced Functionality: Contracts can be extended with custom functionalities effortlessly.
Streamlined Updates: Token transfers and data updates are segregated, simplifying history tracking.
Reduced Load: Wallets can focus on relevant transaction histories, improving efficiency.
This script can be used to break a contract up into multiple parts. For example a complex NFT contract, split into a token contract and ownership contract:
Token-controlled contracts pave the way for more flexible and manageable blockchain contracts, fostering innovation and scalability in decentralized applications.
Last updated
Was this helpful?