Etherlime
  • Introduction
  • Developer Documentation
    • Quick Start
    • Etherlime Library API
      • Deployer
      • Deployed Contract Wrapper
    • Etherlime CLI
      • Installing and Help
      • etherlime init
      • etherlime ganache
      • etherlime compile
      • etherlime deploy
      • etherlime history
      • etherlime test
      • etherlime coverage
      • etherlime flatten
      • etherlime ide
      • etherlime zk
      • etherlime utils
    • Migration from Truffle to Etherlime
    • Migration from v1.2 to v2.0
    • License
Powered by GitBook
On this page
  • Installing
  • Running embedded ganache-cli
  • Deploying with etherlime
  • Initialize etherlime
  • Deployer Example
  • Verifying Smart Contract Example
  • Deploying
  • History of your deploys

Was this helpful?

  1. Developer Documentation

Quick Start

Installing

npm i -g etherlime

Having Etherlime installed you'll have the ability to compile, deploy, test, debug and many other cli-command options for a smart contracts development.

Note that you have to install etherlime-lib package separately for using the deployment API.

Running embedded ganache-cli

etherlime ganache

Allows the use of EtherlimeGanacheDeployer

Deploying with etherlime

Initialize etherlime

etherlime init

This will create deployment directory with deploy.js file inside. You can use this file to write your deployment procedure.

Deployer Example

    const etherlime = require('etherlime-lib');

    // Path to your etherlime compiled contract json file
    const TestContract = require('../build/TestContract.json'); 

    const deploy = async (network, secret) => {

        const deployer = new etherlime.EtherlimeGanacheDeployer();

        // Add params separated with ,
        const result = await deployer.deploy(TestContract, {});
    }

    module.exports = { deploy }

Verifying Smart Contract Example

    const etherlime = require('etherlime-lib');
    // Path to your etherlime compiled contract json file
    const TestContract = require('../build/TestContract.json'); 

    const deploy = async (network, secret, etherscanApiKey) => {
        const deployer = new etherlime.InfuraPrivateKeyDeployer(secret, network,
            "INFURA_API_KEY");
        deployer.defaultOverrides = { etherscanApiKey };
        // Add params separated with ,
        const result = await deployer.deployAndVerify(TestContract, {});
    }

    module.exports = { deploy }

Deploying

Run the following in order to execute the deployment file mentioned above:

etherlime deploy

The deployment process is verbose and gives you real-time info about the performed actions. In addition there is a report of the actions when the deployment finishes (as not all of us monitor the deployment process constantly);

Result of etherlime deploy would be something like this:

History of your deploys

In order to see a list of what you've deployed you can run the following command:

etherlime history
PreviousIntroductionNextEtherlime Library API

Last updated 5 years ago

Was this helpful?