An Introduction to Monkey D. App

Bakaoh
4 min readOct 4, 2019

--

In the previous Gitcoin hackathon, i took part in a Matic challenge to Enable A Set Of Decentralized Protocols On The Matic Network. That’s a good chance to get a better look at some well-known protocols.

These are the problems i encounter when working on the challenge:

  • Uniswap uses Vyper which i'm not familiar with.
  • KyberSwap contracts uses many different Solc version.
  • 0x has two major versions.
  • bZx is dependent on 0x (both version) and Kyber addresses.
  • Some repositories don’t have any migrate instructions.
  • Many contracts are not compilable.

It took me few days to figure out how to deploy these protocol, so i think it will be helpful for developers if there’s an app store where they can deploy any DApp in seconds.

Monkey D. App was born from that idea.

What is Monkey D. App?

Monkey D. App is a tool designed to make it easier to deploy decentralized applications. The tool allow a developer to package up an application with all of the parts it needs, such as abi, bytecode and other dependencies, and ship it all out as one file.

By doing so, the developer can rest assured that the application will be deployable on Ethereum (Mainnet, Rinkeby, Ropsten, Kovan…), Ganache or a sidechain (like Matic, Poa…).

For example, in Fulcrum-Compound-MakerDAO InstaDapp Bridge challenge, one may need to deploy Fulcrum, Compound, MakerDAO and InstaDapp on their Ganache for developing and testing. Monkey D. App will save them a lot of time setting environment up.

The three main components of Monkey D. App are:

  • Monkeyfile
  • MonkeyEngine
  • MonkeyHub

Monkeyfile

A Monkeyfile is a text document that contains all the commands a user could call on web3 to deploy an decentralized application. Monkeyfile syntax is simple and easy to learn with just four type of instructions.

This is the Monkeyfile to deploy a Erc-20 token:

For more details please refer to the document.

MonkeyEngine

The MonkeyEngine runs the instructions in the Monkeyfile one-by-one, sending the transaction to RPC endpoint if necessary, before finally outputting the addresses of your new contracts.

You can find POC implementation here.

MonkeyHub

MonkeyHub is a repository to store Monkeyfiles.

Anyone can upload new Monkeyfile by creating a pull request there. You may also deploy a private or local hub as needed.

Monkey D. App in Action

This session will show how to deploy Uniswap on Matic testnet.

  • Click on Uniswap view button to open detail modal
  • Uniswap doesn’t required any params, just click Deploy button
  • Your deployed Uniswap contracts on Matic will show on Instances tab

That’s all. I hope you see these steps are easier than in my previous guide. Feel free to try deploying other DApp on other Network!

Beyond the hackathon

Since this hackathon happen during my vacation, the submission is far from perfect. There’re something i think should be improved:

  • Standardize Monkeyfile syntax and document it
  • Enhance the MonkeyEngine: validate script, auto-deploy dependency, prevent injection
  • Support other Smart Contract than EVM-based
  • Implement MonkeyRegister contract to keep track of deployed DApp
  • Build monkeycli to run Monkey D. App from terminal
  • Make a plugin to generate Monkeyfile from Truffle migration scripts
  • Support more DApp in the store…

Disclaimer: Monkey D. App is not related to Straw Hat Luffy, Dragon the Revolutionary or Vice Admiral Garp

--

--