Etherlime
Search…
Quick Start

Installing

1
npm i -g etherlime
Copied!
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

1
etherlime ganache
Copied!
Allows the use of EtherlimeGanacheDeployer

Deploying with etherlime

Initialize etherlime

1
etherlime init
Copied!
This will create deployment directory with deploy.js file inside. You can use this file to write your deployment procedure.

Deployer Example

1
const etherlime = require('etherlime-lib');
2
3
// Path to your etherlime compiled contract json file
4
const TestContract = require('../build/TestContract.json');
5
6
const deploy = async (network, secret) => {
7
8
const deployer = new etherlime.EtherlimeGanacheDeployer();
9
10
// Add params separated with ,
11
const result = await deployer.deploy(TestContract, {});
12
}
13
14
module.exports = { deploy }
Copied!

Verifying Smart Contract Example

1
const etherlime = require('etherlime-lib');
2
// Path to your etherlime compiled contract json file
3
const TestContract = require('../build/TestContract.json');
4
5
const deploy = async (network, secret, etherscanApiKey) => {
6
const deployer = new etherlime.InfuraPrivateKeyDeployer(secret, network,
7
"INFURA_API_KEY");
8
deployer.defaultOverrides = { etherscanApiKey };
9
// Add params separated with ,
10
const result = await deployer.deployAndVerify(TestContract, {});
11
}
12
13
module.exports = { deploy }
Copied!

Deploying

Run the following in order to execute the deployment file mentioned above:
1
etherlime deploy
Copied!
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:
1
etherlime history
Copied!