Migrating your dApp from ethereum to ebakus

in steem •  5 years ago 

While ethereum has been a pioneer in the blockchain space by enabling dApp development through smart contracts, nowadays dApps built on ethereum are decreasing in popularity and dApp developers are researching other platforms like EOS and Tron, that reduce the latency and throughput problem found in Ethereum while improving on accessibility.

On this article we propose an alternative solution to Ethereum, EOS and Tron called ebakus, that further improves throughput and does leaps in terms of accessibility and usability. The best thing about ebakus is that it’s pretty forward to migrate your ethereum dApp to, or start developing a new dApp from scratch if you have prior experience with Ethereum. You can read more about ebakus here and check how it compares as a platform to ethereum and EOS.

This article will focus on onboarding ethereum developers to ebakus and will also act as a guide on how to migrate your dApp to ebakus.

Developing on ebakus for ethereum developers

To remove friction for Ethereum devs, we designed ebakus to keep the ebakus node API to be the same as go-ethereum’s (geth) and to also be compatible with web3. The only substantial difference is that in order to send transactions through webjs you need to use our web3-ebakus wrapper that extends it with the functions needed to calculate the POW. This means that dev tools built for ethereum’s geth (like truffle) are also compatible with ebakus’ node and dApps that use web3 (web3 version >1.x) to interface with their smart contracts are plug and play with ebakus.

Improving accessibility and usability with ebakus’ web wallet

To further remove friction with ebakus, we have implemented a web wallet in the form of a JS library. This wallet can be embedded inside a dApp and along with the “free” transactions model of ebakus, they provide a transparent (as far as the users are concerned) interface to the ebakus blockchain. The moment your dApp loads, the user is ready to interact with the blockchain.

To further improve experience we went a step further and developed a wallet loader library that creates an iframe and loads a hosted version of the ebakus web wallet in it. This way multiple dApps can share the same wallet drastically improving the UX while also strengthening security.

After downloading the wallet loader library from here all you have to do to load it in your project is to add the following in your dApp’s html link:medium.com/ebakus/migrating-your-dapp-from-ethereum-to-ebakus-5f508c58e3dd

After loading it, you can easily interface with the wallet through javascript the following functions:

ebakusWallet.getDefaultAddress()
as the name suggests, this function returns the wallet’s address. (Current version of the webwallet only supports one address.)

ebakusWallet.getBalance()
returns the wallet’s address’ current balance in wei

ebakusWallet.sendTransaction(tx_object)
calls the wallet with a transaction object (tx_object). Your tx object here is the same as you would use it for ethereum. The wallet handles calculating POW, before sending the tx, in the background.

ebakusWallet.suggestDifficulty(account_address)
Returns the suggested target difficulty for your account taking into account your accounts stake and network congestion conditions.

Further optimizations

You may further want to optimize your dApp’s code to take advantage of ebakus’ lower latency(1 sec) and to leverage ebakusDB. EbakusDB allows you to use schema defined tables, with indexes that allows handling large datasets with ease. EbakusDB integration to EVM is already implemented and active in our testnet and an article describing how you can utilize it, is in the works. If you feel adventurous feel free to check out this indie leaderboard repository where we implement a leaderboard-achievements solution running completely decentralized on ebakus, leveraging ebakusDB.

You can download and play with ebakus boilerplate here(ebakus.com/assets/ebakus_devkit.pdf)

Reach Ebakus at discord (discordapp.com/invite/S6WxAKS), telegram (t.me/ebakus) and twitter (twitter.com/EbakusNetwork)

General Information:
Homepage (www.ebakus.com/)
Whitepaper(www.ebakus.com/ebakus_whitepaper.pdf)

Source:(medium.com/ebakus/migrating-your-dapp-from-ethereum-to-ebakus-5f508c58e3dd)

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

Hi! I am a robot. I just upvoted you! I found similar content that readers might be interested in:
https://www.reddit.com/r/cryptobots/comments/cpn778/migrating_your_dapp_from_ethereum_to_ebakus/