RedStone WASM Contracts and more
RedStone Finance has just hit us with their latest announcement – WASM contracts! They have been coming for a long time, and we have been waiting excitedly.
What is WASM?
WASM is an official web standard that offers developers many benefits, like being able to compile their code in many different non-web-specific programming languages. Subsequently, they can be converted to WASM binary, enabling the efficient execution and compact representation of their code on modern processors and web browsers.
Essentially, the implementation of WASM means that you can now utilize the RedStone SDK while taking advantage of the highly secure SmartWeave contracts.
RedStone is working hard to migrate all their contracts to WASM, including their Providers Registry contract responsible for managing Oracle nodes. Currently, their tools, gateway, testnet, and SonAR explorer are already adapted to WASM. Let’s have a better look at WASM and see their other latest.
You’ll also be able to set a gas limit for any interaction with the smart contract, which will safeguard against infinite loops burning up all your resources.
They will soon be adding tutorials, guides, and docs for WASM contracts on the RedStone Academy as well.
VM2 and SonaAR enhancements
Along with WASM, RedStone has also introduced VM2. VM2 is a sandbox that can run untrusted code with whitelisted Node’s built-in modules that run in a NodeJS environment and enhance security. The trade-off is that you will be sacrificing a small amount of performance.
VM2 is particularly helpful when running contracts you don’t fully trust but still want to run!
Lastly, a new section has been added to the explorer to show whether the interaction was successful or not, using red crosses and green ticks.
Get started now with ease by using one of the WASM templates that RedStone has prepared here. They contain examples of Profit-Sharing Community contracts, tools for compiling contracts to WASM, testing and deploying them(to the testnet as well as the mainnet), and writing interactions. Simply clone them and start tweaking!