Arweave.news

RedStone WASM Contracts and more

0 226

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.

WASM contracts allow for code execution within an isolated sandboxed environment. This protects against malicious code being injected into the contract. On top of this, WASM allows you to write your contract in various programming languages instead of relying only on JavaScript. Use languages like AssemblyScript, Rust, or Go. 

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!

RedStone also updated their contracts explorer. You can now filter contracts by source type – JavaScript or WASM – and see the language they were initially compiled to, before being converted to WASM binary. Adding WASM contracts source code to the explorer is in the making too.

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!


Join our

Telegram / Discord / Twitter

Leave A Reply

Your email address will not be published.