DeFi Anyone Can Confidently Use
Learn about Radix and collect rewards as you journey through Jetty’s quests.
Start Now

Stay updated on the latest Radix news

By clicking “Submit”, you agree to our Privacy policy. We’ll occasionally send you emails about Radix.
Radix Blog Logo
Papers

Papers

White Paper
How Radix is building the future of DeFi

No maths. Read this to learn about how Radix is building the future of DeFi. 30 pages of pure DeFi goodness! - Read now

White Paper
Atomic cross-shard consensus

Math proof by the University of California, Davis - Read now

White Paper
A Breakthrough in Consensus Theory

Learn about Linear Scaling Without Breaking Composability - Read now

Economics
Radix Economics

Same content, less maths, more diagrams - Coming soon

The Radix Tokenomics: XRD and eXRD token details - Read Now

Developers </>
Use Radix
Desktop WalletHardware WalletExplorerInstapassInstabridge
Learn
Knowledge BaseBlogDeFi Download PodcastCareersCommunityEvents
Radix Home
Sign Up For Updates
Blog home
Scrypto & Developers
Tech Blog
Scrypto & Developers
Tech Blog

Scrypto v0.5 Released!

August 25, 2022

Scrypto v0.5 has been released today, bringing a first implementation of fees, support for owned components, human-readable addresses, and an assortment of below-the-fold changes and enhancements.  These changes are primarily of interest to our bold, early-access community developers, so this post will be at a more technical level than is usual and some concepts will require basic knowledge of Scrypto.  If that isn’t your cup of tea, no hard feelings if you close the page now – or perhaps you’d like to get started learning Scrypto!

‍

Fees

Hopefully you have already read the explanation of the Babylon fee model, which outlines how the overall system will work.  In this release of Scrypto, all transactions will need to pay for their execution to get developers used to incorporating this into their operations.  Fortunately, XRD is free in your local environment and on the Public Test Environment, and Alphanet will include a free-to-anyone faucet for acquiring XRD.  For the majority of test scenarios, you can simply add a call to the lock_fee method of the appropriate Account component early in your transaction manifest (in fact, this is exactly what resim does on your behalf when using it to run simple transactions).

You can check out the developer documentation around fees for more details and some examples.

For those awaiting details on how the royalty system will work, you may have noted that payment of royalties to blueprint and component creators will utilize this same fee mechanism. However, none of the systems for defining, collecting, and distributing royalties are in yet.  Fear not, this is still coming.

A final reminder on fees: the fee table shipping with v0.5 was generated pseudo-randomly, and is only present for the purposes of testing that the collection mechanism operates correctly.  It does not represent correct relative costs between different operations, nor correct overall transaction costs, so don’t read anything into any particular fee number you see there.  The first tuning pass of the fee table to determine semi-realistic numbers will not take place before Betanet.

‍

Owned components

You’re now able to have components as members of other components, which are not globally addressable and can only be accessed from within calls to their parent components.  This lets you effectively have private components without worrying about setting up access controls for them.  This is great for building more logically modular dApps for better understandability and reusability without introducing security concerns.

Calls to instantiate now simply return a Component you can store wherever you like, or you can then call globalize to push it into global address space and get a ComponentAddress back.

Documentation on owned components is available here.

‍

VSCode support for transaction manifests

Users of VSCode need no longer suffer through dreary, monochrome transaction manifests!  You can install a shiny new extension from here, or do an extension search for “Radix Transaction Manifest Support” and experience the joy of syntax highlighting, code formatting, error detection, and other goodies.

The extension is still at an early stage of development but is one of those things that you can’t live without once you’ve started using it.

‍

And more!

Bech32 addresses with human-readable portions have been added, making it easy to distinguish between different address types by eyeball when debugging.

Some community developers have requested an alternative to Decimal when precision is highly important; you’re welcome to now use PreciseDecimal with our compliments, which supports 64 digits after the decimal point (Decimal, which is used for all resource amounts, supports 18).

Speaking of types, safe integral types have been added up through 512 bits, signed and unsigned.

New macros for simplifying calls to external blueprints or components without needing to export an ABI are now available, check out the related documentation.

Non-fungible resources now allow any SBOR value for IDs, which opens up some flexibility for developers who want meaningful identifiers.

Proof handling within Scrypto has changed a bit, too.  In v0.4, many devs were submitting examples which passed Proofs of NFTs by intent, and then within their method they were only looking at the NonFungibleId and not verifying that the Proof matched an expected resource address.  In Scrypto v0.5, Proofs passed into a method need to be validated by confirming the associated ResourceAddress before they will surrender details about their contents.  Of course, if you’re sure you know what you’re doing, you can forcibly bypass this validation step, but you’ll have to do it explicitly.  Have a peek at this example for how the new approach looks in action.

That rounds out the major changes for v0.5.  Please be sure to check out the migration page if you find that your v0.4 code is no longer building.

Next step, Alphanet!

‍

Public Test Environment update

Due to the ongoing portfolio management challenge, the PTE will remain on version 0.4 until the challenge has concluded, and will not be upgraded to use Scrypto v0.5 until August 31st.

Posted by

Russell Harvey
RDX Works CTO

Share this post

Related Articles

Radix Code Audit by Zellic
Feedback Wanted: Interface Standard for On-ledger Name Service Providers
Technical Deep Dive: How Flash Liquidity Will Work
Tech Talk: Using RadQuest Assets with your dApp

Subscribe to our newsletter

Subscribe to receive the latest Radix updates.
By clicking “Submit”, you agree to our Privacy policy. We’ll occasionally send you emails about Radix.
Discover

Explore more topics

AMA
Community & Ecosystem
Crypto & DeFi
Events
Product & Roadmap
Radix Labs
Radix Report
Scrypto & Developers
Team
Tech Blog
Token
Community & Ecosystem
Token

Token Holder Consultation Is Now Live

May 9, 2025
Community & Ecosystem
Token

Backing Growth: Radix Incentives Campaign Proposal

May 8, 2025
Token
Community & Ecosystem
Crypto & DeFi

Token Holder Consultation: Repurposing the Stablecoin Reserve

May 6, 2025
Community & Ecosystem
Crypto & DeFi
Scrypto & Developers

Radix Code Audit by Zellic

May 2, 2025
Community & Ecosystem

Penrose Findings Overview

April 18, 2025
Token

Unlocking Growth: Proposal to Supercharge Adoption on Radix by Repurposing the Stable Coin Reserve

March 10, 2025
Links
  • BlogRSS
  • PodcastRSS
  • Privacy Notice
  • Careers
  • Radix Brand Pack
Whitepapers
  • DeFi Whitepaper
  • Consensus White Paper
  • Peer Reviewed Consensus Paper
Join the Radix Community
Discord
Facebook
Github
Medium
Reddit
Telegram
Twitter
Youtube
Linkedin
Can’t find what you need? Email us on: hello@radixdlt.com
© Radix Publishing Ltd, 2024. All rights reserved. Radix Publishing Ltd.

By clicking "Allow All", you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. Cookie Policy.

Allow All