Deploy Smart Contracts with 0 ETH: LOOM

Pranshu Rastogi
Coinmonks
4 min readOct 28, 2019

--

Yes, you heard it right. This is no clickbait article, I will tell you how to deploy your smart contracts from scratch with 0 ETH fees.

Before, going ahead first try to understand what is LOOM?

Source — LOOM

“Loom Network is a production-ready, multichain interop platform for serious dapp developers. It provides the tools and knowledge developers need to launch high-performance dapps that require a fast and seamless UX across multiple chains. With integrations to Bitcoin, Ethereum, Binance Chain, and all major blockchains, deploying once to Loom lets you future-proof your dapp by reaching the largest possible user base today.”

loom blockchain

This article mostly focuses on technical aspects and how to deploy the contract on Loom from scratch, to learn more in theory you can always visit Loom documentation.

Without wasting much time, let’s start.

  1. Download the LOOM Binary.

2. Generate Private and Public Key for LOOM.

3. Install and Setup Truffle.

We will be using Truffle to set up our structure.

Now we will initialise the truffle

Till now we have created a raw structure of Loom and Truffle, now all we need to do is write a simple smart contract and choose a network to deploy. As it is meant for testing purpose, so here we are deploying on extdev-plasma-us1.

4. Write a simple smart contract-

Here I am just showing you a demo, you can write your smart contract with n complexity.

I have written a simple smart contract for Counter.

This you have to save on /contracts/counter.sol

I am providing you Github repo link for this project, for further reference you can view that.

And we also need to modify the migrations file.

5. Install require dependencies.

We need to install Loom support for Truffle HD wallet, so we can connect with it.

6. Setup truffle_config.js file.

Now we are almost done and we need to do the most crucial part, we need to set up the truffle config file and define all the configuration that will be needed to deploy it on Loom.

Here you can notice that we have used chainId as extdev-plasma-us1 because we are deploying it on testnet you can change it if you need to deploy it on production.

Also, if you remember we have generated a private and public key for the loom. We are using that here, you can make an .env file and define the PRIVATE_KEY so that it can access by this.

Voila !! Now we are all set up and now we can compile and migrate it.

Open a terminal in the current directory.

and RUN

You will see something like this on the terminal.

Congratulations !!! You have successfully deployed a smart contract with 0 ETH and that you can see in Final cost.

And now you can send those save ETH to me *wink*.

S0, that’s all from my side. You can find Github link below for this and also do let me know any queries or feedback down below.

Thank you

Happy Blockchaining.

GithubLinkedinTwitter

Get Best Software Deals Directly In Your Inbox

--

--

Pranshu Rastogi
Coinmonks

Blockchain || ZKP || Queerly curious 🧐|| Empathy resonates 💗 || Learn & Grow together