🟧 Clarity 4 is officially live!
With Bitcoin block 923222, SIP-033 has been activated unlocking key new functions for developers across the Stacks ecosystem. For ALEX the most important are:
🔸 (contract-hash?) - Fetch the hash of a contact's code body
This enables on-chain contract code validation, for example allowing one contract to validate that another contract follows a specific template and is therefore safe to interact with. This is especially useful for enabling bridges and marketplaces to safely and trustlessly support a dynamic set of assets.
🔸(restrict-assets?) - Allow a contract to set post-conditions
Allow a contract to set post-conditions. These functions allow a contract to safely call arbitrary external contracts (e.g. passed in as traits) while ensuring that if the executed code moves assets beyond those specified, the changes will be rolled back.

4,220
17
本頁面內容由第三方提供。除非另有說明,OKX 不是所引用文章的作者,也不對此類材料主張任何版權。該內容僅供參考,並不代表 OKX 觀點,不作為任何形式的認可,也不應被視為投資建議或購買或出售數字資產的招攬。在使用生成式人工智能提供摘要或其他信息的情況下,此類人工智能生成的內容可能不準確或不一致。請閱讀鏈接文章,瞭解更多詳情和信息。OKX 不對第三方網站上的內容負責。包含穩定幣、NFTs 等在內的數字資產涉及較高程度的風險,其價值可能會產生較大波動。請根據自身財務狀況,仔細考慮交易或持有數字資產是否適合您。

