Development using SmartX

Developing and Deploying WASM Contracts using SmartX IDE

SmartX supports WASM contract deployment and invocation. Head over to smartx.ont.io (supported on Chrome browsers only) and try it out!

1. Selecting and Uploading a WASM file

First, we login to SmartX, and then once in the system we can see the "Project List". Here, we select the "Open WASM File" option.

Here we enter the name of the WASM contract and upload the WASM bytecode file. This creates a new WASM contact project which we can return to later as well.

2. Opening a WASM Project

We can click on the newly created WASM project. As soon as we enter the project we can see the bytecode in the editor. We can make changes to this bytecode if necessary.

3. Deploying a WASM Contract

Next, we can proceed to deploy this WASM contract. The process is the same as deploying a NeoVM contract.

We fill out the necessary details in the top right "Information" pane, and then click on the "Deploy" button. SmartX then calls the Cyano Wallet plugin in the Chrome browser (assuming the latest version is already installed). The user is prompted to enter the password. If the wallet has sufficient ONG balance, the WASM contract will be deployed to the Ontology network.

4. Executing a WASM Contract

After deploying the contract successfully, we can open the "Run" pane. This is where we can choose the method that we want to call. After entering the necessary parameter values and types the contract can be prerun. The result of the execution will be displayed in the "Logs" pane at the bottom.

Here we conclude this simple guide on how to deploy and execute WASM smart contract in SmartX.

Last updated