Bunzz Releases its User Triggered Deployment SDK for DApp Development

This is an overview of Bunzz SDK new functionality that makes the process of allowing users to deploy a contract easier for developers to implement.

The Deployment/Cloning Functionality challenge

In some cases, DApps need to deploy/clone the same contract by “users action”.

For example,

  • No-code web3 tools like a DAO platform
  • Protocols like Uniswap
  • NFT marketplace that allows users to create their own NFT project

However, when it comes to implementing this cloning functionality, it can be a time-consuming and error-prone task for developers.

But now with the User Triggered Deployment SDK developed by Bunzz, developers can quickly and easily integrate the cloning functionality into their DApps, allowing users to clone smart contracts with a simple user action. 

Among its advantages, we can find:

  • It can greatly simplify the development process
  • Reduce the risk of errors 
  • Speed up time to market.

The functionality can be better depicted with an auto DAO creation platform, as an example.

The process without the User Triggered Deployment SDK would look like this:

While the process with the User Triggered Deployment SDK would look like this:

Features

In a few words, among the features of the User Triggered Deployment SDK we find:

  • Simplified contract cloning with a simple user action
  • Integration with Bunzz’s smart contract hub
  • Reduces development time and risk of errors

Using the User Triggered Deployment SDK

Installation

First of all, install it from your CLI as follows:

npm install @bunzz/deploy-sdk ethers@^5.7.0

  • By now, @bunzz/deploy-sdk is not supporting ethers version 6

Implementation Process

The complete implementation process will include the following steps:

1. Find an appropriate smart contract module from the explorer.

2. If you can’t find a good one, upload your own smart contract module from the repository page. (It requires signing up)

3. Copy the module template ID from the module template page.


4. You can easily implement a deploy function with the SDK as shown below:

import { deploy } from '@bunzz/deploy-sdk';
import { providers } from 'ethers';

const TEMPLATE_ID = '<TEMPLATE_ID>';

const cloneContract = async () => {
  // get a Signer object in the ethers' style.
  const signer = getSigner();

  // Arguments for the constructor as an array.
  // The types must follow the ethers style.
  const arg = ['dummy', 123456];

  // The return value is the same as the ethers one.
  const tx = await deploy(TEMPLATE_ID, signer, args);

  // You can get receipt as well.
  const receipt = await tx.wait();

Bunzz is helping to increase the number of blockchain developers who want to contribute to the Web3 scene. We would love to have your feedback.

Feel free to reach out to us on Discord!

Get to know more about Bunzz and start building your Dapps now!

Share this article:

Leave a Comment

Your email address will not be published. Required fields are marked *