Why is etherlime needed? by mdobreva

View this thread on steempeak.com
· @mdobreva ·
Why is etherlime needed?
etherlime is an ethereum development and deployment framework based on ethers.js

![etherlime.png](https://cdn.steemitimages.com/DQmVyybvHZJwwSvzm7F9qEivZ41ev8bSnivBtk7Y6sqHFMB/etherlime.png)

At the current state of ethereum smart contract development, there are very few alternatives to truffle as a framework. Despite truffle being a good tool, the more you use it the more you find the little hiccups and hurdles that frustrate or stop you from being efficient.

Most of them are due to the underlying web3.js that sometimes, mainly due to legacy reasons, tends to be unstable. Much like ethers.js has grown to be the major alternative to web3.js, etherlime strives to be what truffle is to ethers.js — framework for development and deployment based on this library.

The first obstacle we are about to tackle is deployment of smart contracts and allowing the developers to write their own deployment scripts that are not constrained to just the deployment transactions, but also allow them to use the newly deployed contracts right away as part of the initialisation sequence (this is the main point where truffle struggles as an efficient deployment tool). Inevitably we are going to move to compilation and unit testing too, but we like to move step by step and deliver constant frequent improvements.

Milestones:

1. Being able to deploy compiled contracts (compiled in the truffle format) on local and infura nodes ←We are here
2. [Not Ready]Being able to compile contracts to the desired formats for deployment
3. [Not Ready]Being able to run unit tests on the compiled contracts

<b>Installing</b>

![Screen Shot 2018-06-28 at 10.51.31.png](https://cdn.steemitimages.com/DQmeT9r8TKtJ51SbzLedCK8QU5FPuWsNCwDYBALE8uehYTr/Screen%20Shot%202018-06-28%20at%2010.51.31.png)


<b>Deploying</b>
etherlime exposes the following deployers:

![Screen Shot 2018-06-28 at 10.52.42.png](https://cdn.steemitimages.com/DQmeGiNQiFQAdS3LLMNa4oKY5HL8ZQYDqxJbWhchfE3fTuo/Screen%20Shot%202018-06-28%20at%2010.52.42.png)

All deployers share the same base functionality:

<b>Deployer functionality</b>
The main functionality the deployer exposes is (obviously) the ability to deploy compiled contract.

This is achieved through the deploy(contract) function. As mentioned before, the contract is descriptor object that needs to have at least the following three fields:

![Screen Shot 2018-06-28 at 10.53.57.png](https://cdn.steemitimages.com/DQmStNQprykkNeRo9ABGYGsbyrJns5BaE62wg67Hs2Rq48N/Screen%20Shot%202018-06-28%20at%2010.53.57.png)

<i>All of these you can get by compiling with Truffle. We will soon expose you a way to do this through etherlime. </i>

![Screen Shot 2018-06-28 at 10.56.03.png](https://cdn.steemitimages.com/DQmaCM6qenEtKhGj3rtdGNTdT4bFwz1zASUQD63GmQ5fYjd/Screen%20Shot%202018-06-28%20at%2010.56.03.png)

<b>Deployed Contract Wrapper</b>

One of the advancements of the etherlime is the result of the deployment — the DeployedContractWrapper

The <b>DeployedContractWrapper</b> is a powerful object that provides you with <b>ethers.Contract</b> amongst other functionalities. This allows you to start using your deployed contract right away as part of your deployment sequence (f.e. you can call initialization methods)

In addition it exposes you <b>verboseWaitForTransaction(transactionHash, transactionLabel)</b> function. This function can be used to wait for transaction to be mined while giving you verbose output of the state. In addition it allows you to specify a label for the transaction you are waiting for, so that you can get a better understanding of what transaction is being waited for. This comes in handy when deployment scripts start to grow.

![Screen Shot 2018-06-28 at 10.57.42.png](https://cdn.steemitimages.com/DQma8twyqYMUJc8gVr8i6VaoMvPsVzRY8aob4VA3ZaYFe1A/Screen%20Shot%202018-06-28%20at%2010.57.42.png)

<b>Working with previously deployed contracts</b>
Sometimes you want to work with an already deployed contract. The deployer object allows you to wrap such a deployed contract by its' address and continue using the power of the wrapper object. The function you can use to achieve this is <b>wrapDeployedContract(contract, contractAddress)</b>.

<b>Compiling</b>
Not ready. TBD

<b>Testing</b>
Not ready. TBD

<b>License</b>
Completely MIT Licensed. Including ALL dependencies.

<b>Useful links:</b>
https://github.com/LimeChain/etherlime 
	
https://limechain.tech/
👍  ,
properties (23)
post_id54,663,245
authormdobreva
permlinkwhy-is-etherlime-needed
categoryframework
json_metadata{"format":"markdown","tags":["framework","ethereum","upgradeability","blockchain","development"],"links":["https:\/\/github.com\/LimeChain\/etherlime","https:\/\/limechain.tech\/"],"image":["https:\/\/cdn.steemitimages.com\/DQmVyybvHZJwwSvzm7F9qEivZ41ev8bSnivBtk7Y6sqHFMB\/etherlime.png"],"app":"steemit\/0.1"}
created2018-06-28 08:02:30
last_update2018-06-28 08:02:30
depth0
children1
net_rshares6,872,013,361
last_payout2018-07-05 08:02:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length4,411
author_reputation0
root_title"Why is etherlime needed?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (2)
@introduce.bot ·
✅  @mdobreva, I gave you an upvote on your post! **Please give me a follow** and I will give you a follow in return and possible future votes!<br><br>Thank you in advance!
👍  
properties (23)
post_id54,665,675
authorintroduce.bot
permlinkintroduce-bot-re-mdobrevawhy-is-etherlime-needed
categoryframework
json_metadata{}
created2018-06-28 08:32:39
last_update2018-06-28 08:32:39
depth1
children0
net_rshares6,520,357,915
last_payout2018-07-05 08:32:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length171
author_reputation20,574,691,560,478
root_title"Why is etherlime needed?"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)