Hello! Welcome to this part of the universe that we lazy engineers try to deploy a smart contract on VeChain without any special tools.

Tell your fellow engineers about these tricks and let’s build on VeChain right now!

Old Days of Deployment

In the good old days, developers on the blockchain face several critical components to deploy and fine-tune their smart contracts:

A piece of source code of Solidity. A compiler to turn source code into byte code. A small utility program to deploy the byte code onto test-net. Another small utility program to interact with the deployed contract.

Although briefly described above, the whole process is not an easy-to-go process since we lack tools to help us and the setup cost of those tools are high, just to mention a few:

Install solc the compiler on the computer. Prepare an account and write a small Javascript program in web3 to deploy the contract. Or plugin remix + web3 gear to deploy the contract. Setup a test-net connection, or spin up your own blockchain node to connect to. Write another small utility program to call the functions on the smart contract to observe the final result.

Enough, enough!

Deployments are not meant to be that tedious and can be done via a more graphics-oriented way. Just a few clicks and you are good to go!

A Shortcut: VeChain Inspector

The truth about fast deployment on VeChain is:

You don’t need to write a line of code for tools, all can be done in browsers!

The appeal is quite simple and straight-forward:

I am a developer and want to fast test out my precious “smart contract” as below, what should I do?

Right. This hello.sol is our source code.

Compile

First, compile in the remix browser IDE, go to:

and open the file editor and put in our hello.sol right away!

Copy the hello.sol into Remix

Then from the left panel, add a compiler, and hit the compile button!

Enable a compiler.

Compile the source code.

Simple and easy, so far so good.

Now we can retrieve the artifacts that we have compiled from the source code, the byte code (which is what we will deploy onto the test-net) and the ABI (the map of source code if we want to interact with the contract).

Deploy

Remember how painful it is to deploy by hand? How the tools fall apart when we connect them together? Remember how long it takes to sync before the test-net is useable?

All are gone and I introduce to you a swift sword for doing it: Inspector app in the Sync browser.

In case you haven’t downloaded the Sync browser, get it from here: https://env.vechain.org/ Sync browser is really useful as it already contains functions of: wallets, networks and lightweight utility programs developed by other developers.

Great, now we click open the Sync browser and find the Inspector app down below there. (Link: https://inspector.vecha.in/)

Click “view more” to find the Inspector app

Click to use the Inspector app.

Since we haven’t deployed the contract yet, we copy-paste the byte code and hit the deploy button!

Deploy the smart contract byte code.

Soon enough, the tool will do the job for you and show you where it is deployed (contract address).

For example, my smart contract is deployed on the address of:

0x6d48628bb5bf20e5B4e591c948e0394e0d5BB078

As for now, we haven’t programmed a line of code and yet we have deployed the smart contract successfully.

Interact/Debug

Now we use the ABI we copied earlier to establish a graphic interface to access it. Click the “+” button on the right and create a new smart contract interface.

Fill in the name you want to call it, fill in the ABI JSON and with a simple click of “add” you get an interface!

Great, now it is the time to interact with it. Click on the card, and you will be presented with all the “read” and “write” methods that can be called on the smart contract.

A smart contract interface.

Methods of the smart contract.

Conclusion