# About dappKit

SDK for Faster Web3 Development

## More than a standard open-source library

**dappKit** is a curated framework so that you can automate creation and unit testing, javascript wrappers, and extended integration just by writing solidity - a tool built with @Truffle (*integrates compiling in solc together in your Smart Contracts)* & @OpenZeppelin (*provides trustable, audited & tested Smart Contracts*) already integrated, solving a very simple problem: **velocity in solidity development**&#x20;

{% hint style="info" %}
All the Documentation for each Object can be found here&#x20;

<https://sdk.dappkit.dev>
{% endhint %}

## dappKi&#x74;*:* build decentralized applications faster

If you are a developer, here are a few reasons why you should start considering building with dappKit.

**✅  Better ramp-up:** You can add Blockchain-related capabilities to your software in a faster way, and avoid all the repetitive tasks associated with Smart Contracts Development.

**✅  Javascript SDK:** Javascript is one of the most used programming languages in the world, especially for web apps and front-end purposes. You don't need to add additional languages to your stack, in order to build decentralized web3 applications.

**✅   Faster time-to-market:** Increase the speed of development, testing, and deployment of Smart Contracts;

**✅  Reduce costs:** Reduce your application development costs by using an open-source framework;

**✅  Become part of a strong Brand & Community:** TAIKAI has a very strong and engaged community that you can become a part of too. We have a beloved brand that you can use to work on interesting and challenging projects aligned with your interests and goals.&#x20;


# Start building

After [installation](/start-building/installation) is complete, you can start building right away. You can access our detailed documentation [here](https://bepronetwork.github.io/bepro-js/index.html), and our GitHub repository [here](< https://github.com/bepronetwork/bepro-js>).

Below you can find a brief explanation about the main *bepro-js* templates to get you started too.

| Template                                                                              | Brief Description                                                                                                                                                           |
| ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ERC20Contract](https://bepronetwork.github.io/bepro-js/ERC20Contract.html)           | Javascript wrapper around the ERC20 standard. Use this template to easily create and deploy ERC20 tokens.                                                                   |
| [ERC721Standard](https://bepronetwork.github.io/bepro-js/ERC721Standard.html)         | Javascript wrapper around the ERC721 standard. Allows you to create and mint Non-Fungible Tokens (NFTs).                                                                    |
| [ERC721Collectibles](https://bepronetwork.github.io/bepro-js/ERC721Collectibles.html) | Template to allow you to create sophisticated actions on top of newly minted NFTs, including buying and selling tokens on the Blockchain. Uses the ERC721 Standard wrapper. |
| [ERC1155Standard](https://sdk.dappkit.dev/classes/ERC1155Standard.html)               | Javascript wrapper around the ERC1155 standard. Use it to boost your process on creating ERC1155 tokens.                                                                    |
| [ERC1155Ownable](https://sdk.dappkit.dev/classes/ERC1155Ownable.html)                 | This template also implements the ERC1155 token standard, with a single difference, it only allow the contract owner to call certain methods.                               |
| [StakingContract](https://bepronetwork.github.io/bepro-js/StakingContract.html)       | Structure to create a simple staking mechanism for ERC20 tokens.                                                                                                            |
| [DexStorage](https://bepronetwork.github.io/bepro-js/DexStorage.html)                 | Storage solution using IPFS (InterPlanetary File System). You can use this template to easily save and retrieve documents.                                                  |
| [Web3Connection](https://bepronetwork.github.io/bepro-js/Web3Connection.html)         | Template to connect with Metamask and access wallet information.                                                                                                            |


# Installation

Ready for Javascript systems

## 1) Installation

dappkit is available as an [npm package](https://www.npmjs.com/package/@taikai/dappkit),

```bash
# with npm
$ npm install @taikai/dappkit

# with yarn
$ yarn add @taikai/dappkit
```

### 2) Access the Object Functions directly via

* [Web3Connection](/start-building/how-to-guides/create-web3connection) \<Metamask Login, Address, Balances, etc>
* [ERC20 Tokens](/start-building/how-to-guides/create-an-erc-20-token) \<Deploy, GetBalance, Total Supply, etc>
* [ERC721 NFTs](/start-building/how-to-guides/create-an-nft) \<Deploy, Mint, Transfer, etc>
* Other Objects & Full Implementation can be found [here](https://github.com/taikai/dappkit/tree/master/how-to)
* [Request Aditional Functions/Smart Contracts ](/start-building/how-to-guides/how-to-create-an-object)or access the webapp to request developers your needs

{% hint style="info" %}
If you are facing any issue in the development process please go to our [`Discord`](https://discord.gg/bepronetwork) at #div-issues-support
{% endhint %}

##

***Optional***

### Set up NVM

```c
// Install NVM recommended version for dappkit
$ nvm install 16.14.3

// Set it on the working directory
$ nvm alias default v16.14.3

// Use the settled as default
$ nvm use default
```


# How To Guides

Simple dappkit tutorials to get started

{% content-ref url="/pages/-Mb5px09HDW2--AnEJPL" %}
[Create an ERC20 Token](/start-building/how-to-guides/create-an-erc-20-token)
{% endcontent-ref %}

{% content-ref url="/pages/-Mb5qBXK9-3dJyvR0mOu" %}
[Create your NFT Art Gallery](/start-building/how-to-guides/create-an-nft)
{% endcontent-ref %}

{% content-ref url="/pages/-MbEH2TwR8m7nwHHeMgl" %}
[Create custom Object](/start-building/how-to-guides/how-to-create-an-object)
{% endcontent-ref %}

{% content-ref url="/pages/-Mb6ACqShdHAQyBCEmj1" %}
[Create other Project](/start-building/how-to-guides/usage)
{% endcontent-ref %}


# Create a Web3Connection

Create a Simple Web3 Connection

A very simple way to connect your app to the web3 Environment

```javascript
 import { Web3Connection } from '@taikai/dappkit';

const web3Connection = new Web3Connection({ 
 web3Host: 'WEB3_LINK',
 /* privateKey: '' */
});

await web3Connection.start();
await web3Connection.connect(); // if a privateKey was provided, can be ignored

console.log("User address", await web3Connection.getAddress());
```

**Looking for more functions**

See all available functions [here](https://sdk.dappkit.dev/classes/Web3Connection.html)


# Create an ERC20 Token

A very simple project to launch/access your own ERC20 Contract Address, login with metamask & connect with solidity methods available

{% hint style="info" %}
In order to use **ERC20** a [Web3Connection](/start-building/how-to-guides/create-web3connection) instance object or **Web3ConnectionOptions** must be provided
{% endhint %}

```javascript
import { ERC20 } from '@taikai/dappkit';

/* Create Instance */
const deployer = 
  new ERC20({ 
    web3Host: 'WEB3_LINK', 
    privateKey: '', });

await deployer.loadAbi(); // Only needed for deploy
const address = await deployer.connection.getAddress();

/* Deploy ERC20 Contract */
const tx = await deployer.deployJsonAbi(
    "YOUR_TOKEN_NAME",
    "YOUR_TOKEN_SYMBOL",
    "1000000000000000000000000",
    address
);

/* Use your new ERC20 Token */
const erc20 = new ERC20(web3connection, tx.contractAddress);
await erc20.start();

console.log(erc20.transferTokenAmount('0xADDRESS', 100));

```

**Looking for more functions?**

See all available functions [here](https://sdk.dappkit.dev/classes/ERC20.html)


# Create an ERC1155

A very simple example on how to deploy/access your own ERC-1155 contract aka Multi Token Contract.

{% hint style="info" %}
In order to instantiate the **ERC1155** you will need to provide a [Web3Connection](/start-building/how-to-guides/create-web3connection) instance object or a [Web3ConnectionOptions](https://sdk.dappkit.dev/interfaces/Web3ConnectionOptions.html)
{% endhint %}

```javascript
import { ERC1155Standard, Web3Connection } from '@taikai/dappkit';

/* Create your web3Connection */
const web3Connection = new Web3Connection({ 
 web3Host: 'WEB3_LINK',
 /* privateKey: '' */
});

await web3Connection.start();
await web3Connection.connect(); // if a privateKey was provided, can be ignored

/* Create an ERC1155Standard Deployer */
const deployer = new ERC1155Standard(web3Connection);

/* Deploy the ERC1155 Contract */
await deployer.loadAbi();
const tx = await deployer.deployJsonAbi('http://localhost:1337/');
 
/* Instantiate and use your new ERC1155 Token Contract*/
const erc1155Contract = new ERC1155Standard(web3connection, tx.contractAddress);
await erc1155Contract.start();

erc1155Contract.mint('0xTO_ADDRESS', 0, 1000, '0x12345678');
```

If you prefer your contract to be ownable, you can appeal to the erc-1155 ownable version:

```javascript
import { ERC1155Ownable, Web3Connection } from '@taikai/dappkit';

/* Create your web3Connection */
const web3Connection = new Web3Connection({ 
 web3Host: 'WEB3_LINK',
 /* privateKey: '' */
});

await web3Connection.start();
await web3Connection.connect(); // if a privateKey was provided, can be ignored

/* Create an ERC1155Ownable Deployer */
const deployer = new ERC1155Ownable(web3Connection);

/* Deploy the ERC1155 Contract */
await deployer.loadAbi();
const tx = await deployer.deployJsonAbi('http://localhost:1337/');
 
/* Instantiate and use your new ERC1155 Token Contract*/
const erc1155Contract = new ERC1155Ownable(web3connection, tx.contractAddress);
await erc1155Contract.start();

erc1155Contract.mint('0xTO_ADDRESS', 0, 1000, '0x12345678');
```

**Looking for more functions?**

See all available functions [here](https://sdk.dappkit.dev/classes/ERC1155Ownable.html)


# Create an ERC721

Simple example of how to deploy a ERC721 contract

{% hint style="info" %}
In order to instantiate the **ERC721** a [Web3Connection](/start-building/how-to-guides/create-web3connection) instance object or a[ Web3ConnectionOptions](https://sdk.dappkit.dev/interfaces/Web3ConnectionOptions.html) object must be provided.
{% endhint %}

```typescript
import {Erc721Standard} from '@taikai/dappkit'

/* Deploying your NFT */
const deployer = new Erc721Standard({
  web3Host: 'https://localhost:1337',
  privateKey: 'ub3rPr1v47eK'
});

deployer.connection.start();
deployer.loadAbi();

let receipt;

receipt = await deployer.deployJsonAbi('My NFT Name', '$MyNftSymbol');
console.log('deployed!', receipt);

/* Using your NFT after deployment */
const myNFT = new Erc721Standard(deployer.connection, receipt.contractAddress);

await myNFT.loadContract();

receipt = await myNFT.mint('0xMyAddress', 'tokenId-1');
console.log('Minted!', receipt);
```


# Create your NFT Art Gallery

A simple NFT Collectibles contract where you can create a limited set of NFTs available&#x20;

Details&#x20;

* All NFTs have the same price `setPricePerPack`
* All NFTs are identified via the metadata via a `baseURI` & `tokenURI`
* These can be created with an unlimited Amount of Packs or unlimited by providing `limitedAmount` as `0`&#x20;
* A tokenURI can be set to provide Information Metadata for each NFT at `setTokenURI` to make all NFT have the same URI - example `https://bepronetwork.github.io/B.E.P.R.O/meta/`
  * This will make the tokenID the suffix of the `baseURI` - for example for the NFT number 1, the `tokenURI` will be `https://bepronetwork.github.io/B.E.P.R.O/meta/1` - structure as `baseURI + tokenURI`
  * Ensure the API returns data structures similar to [this one](https://sdk.dappkit.dev/classes/ERC721Collectibles.html)
  * This will make systems such as [opensea](https://opensea.io) automatically gather the metadata for your NFT directly from your API
* You can also set each one independently via the call `setTokenURI(tokenId, url)` - this will make it abandon the baseURI standard - structure as `tokenURI`

{% hint style="info" %}
In order to use **ERC721Collectibles** you also need to provide instance [Web3Connection](/start-building/how-to-guides/create-web3connection)

instance object of **Web3ConnectionOptions**
{% endhint %}

```javascript
import { ERC721Collectibles } from '@taikai/dappkit';

const erc721Collectibles = new ERC721Collectibles({
     web3Host: 'WEB3_LINK',
});

await erc721Contract.start();
await erc721Collectibles.loadAbi();

// Deploy
const transactionReceipt = await erc721Collectibles.deployJsonAbi(
    "Art | BEPRO",
    "B.E.P.R.O",
    1000,
    "0xDAI_ADDRESS",
    "0xPURCHASE_TOKEN",
    "0xBASE_FEE_ADDRESS",
    "0xOTHER_ADDRESS" 
 );

console.log(transactionReceipt);

```

**Looking for more functions?**

See all available functions [here](https://sdk.dappkit.dev/classes/ERC721Collectibles.html)


# Create other Project

Simple Usage of the dappkit

All objects are created in a similar fashion, and we will use `StakingContract` as an example

\
Here you can create a Staking Contract with a given ERC20 Contract Address, login with metamask & connect with solidity methods available

```javascript
import { Web3Connection, StakingContract } from '@taikai/dappkit';

const web3Connection = new Web3Connection({ 
    web3Host: 'WEB3_LINK'
});

await web3Connection.start();

const deployer = new StakingContract(web3Connection);
await deployer.loadAbi();

await web3Connection.connect();

const tx = await deployer.deployJsonAbi('0xCONTRACT_ADDRESS');

// Creating new Instance of StakingContract to be able to access the tokens
const stakingContract = new StakingContract(web3Connection, tx.contractAddress);
await stakingContract.start();
​
console.log(await stakingContract.availableTokens());

```

{% hint style="info" %}
What if the contract was deployed already?&#x20;
{% endhint %}

If the Contract is already deployed the use case is very similar&#x20;

```javascript
import { Web3Connection, StakingContract } from '@taikai/dappkit';

const web3Connection = new Web3Connection({
    web3Host: 'WEB3_LINK'
});

await web3Connection.start();

const stakingContrat = new StakingContract(web3Connection, '0xCONTRACT_ADDRESS');
await stakingContrat.start();

await web3Connection.connect();

console.log(await stakingContrat.availableTokens());
```


# Create custom Object

A custom project is a project wich only depends on dappkit (and dappkit-launcher) to complement its own Solidity contracts.

**Dependencies**

```shell
$ npm i -s @taikai/dappkit
$ npm i -g @taikai/dappkit-launchpad
```

@taikai/dappkit will be used to provide the user with proxies for common contracts, along with a Web3Connection, and @taikai/dappkit-launchpad will be responsible for transpiling your custom contract into something understandable by @taikai/dappkit.

**Compiling your contracts**

Both truffle and hardhat will provide a `ContractName.json` file wich holds the ABI and bytecode for the contract

**Truffle**

```shell
$ npm i -g truffle
$ truffle compile
```

**Hardhat**

```shell
$ npx install --save-dev hardhat
$ npx hardhat compile
```

### Transpiling and using your custom contract

```bash
$ dk-transpile -f "path/to/ContractName.json"
```

Depending on your configuration (and contract) this will output a extension of the [`Model`](https://sdk.dappkit.dev/classes/Model.html) class, with the methods loaded in, and with the name of the file matching the name of the contract.

#### Deploying the custom contract <a href="#transpiled-deploy" id="transpiled-deploy"></a>

```typescript
import {CustomContract} from './path/to/CustomContract';
const customContract = new CustomContract({web3Host: 'http://localhost:1337', privateKey: '0xPrivateKey'});

customContract.web3Connection.start();
customContract.loadAbi();

const tx = await customContract.deployJsonAbi('arg1', 'arg2'/*, arg3, arg4, ...etc*/);
console.log('Deployed contract; Address: ', tx.contractAddress);
```

#### Using the custom contract <a href="#transpiled-use" id="transpiled-use"></a>

```typescript
const customContract = new CustomContract({web3Host: 'http://localhost:1337', privateKey: '0xPrivateKey'});

customContract.start();

// Get a value on the contract
const receipt = await customContract.CustomMethod('arg1'/*, 'otherArgument', ...etc */);

// Change a value on the contract
const receipt2 = await customContract.OtherCustomMethod('newValue'/*, 'otherArgument', ...etc */)
```

#### Costumizing a custom contract proxy

@taikai/dappkit-launchpad made a custom proxy from the coded that was provided, but this proxy can be futher customized - by hand.&#x20;

Just open the `./path/to/CustomContract` and add more functions, or add a customization to the `super.start` that loads information for a custom API:

```typescript
/* ... erased code for brevity */
async function start() {
  const data = await fetch('http://localhost:1337/api/health').then(() => true).catch(() => false)
  if (!data)
    throw Error('Something happened!!!11');
  return super.start()
}
/* erased code for brevity... */
```


# Examples

Simple "start me up" examples

<table><thead><tr><th width="188">Technology</th><th>Link</th></tr></thead><tbody><tr><td>NodeJS</td><td><a href="https://stackblitz.com/edit/node-b3cgaa?file=index.js">https://stackblitz.com/edit/node-b3cgaa?file=index.js</a></td></tr><tr><td>NextJS</td><td><a href="https://stackblitz.com/edit/nextjs-nzulwe?file=pages/index.js">https://stackblitz.com/edit/nextjs-nzulwe?file=pages/index.js</a></td></tr><tr><td>Angular</td><td><a href="https://github.com/layerx-labs/dappkit-testflight">https://github.com/layerx-labs/dappkit-testflight</a></td></tr><tr><td>React + NextJS</td><td><a href="https://github.com/layerx-labs/layerx-web3-boilerplate">https://github.com/layerx-labs/layerx-web3-boilerplate</a></td></tr></tbody></table>


# Use Cases

Below you can find some practical use cases of dappkit technology

{% tabs %}
{% tab title="NFT Collectibles" %}
With *dappkit* you can easily create NFT collectibles in gaming and esports environments.

You can give the opportunity to anyone to acquire digital assets that are unique, rare, and indivisible. By using a blockchain that underpins NFTs you're giving users ownership, provable scarcity, interoperability, and immutability.

### Related Content

{% content-ref url="/pages/-Mb5qBXK9-3dJyvR0mOu" %}
[Create your NFT Art Gallery](/start-building/how-to-guides/create-an-nft)
{% endcontent-ref %}

### Real Examples

#### [**RealFevr - Video Collectibles**](https://www.realfevr.com/nft-explanation/)

* BEPRO Network's NFT Factory codebase to create NFT video collectibles for the most exciting moments in football history (Soccer, if you are from America), the world's most popular sport.
* Uses the Opener Framework with the custom Class [`OpenerRealFvr`](https://sdk.dappkit.dev/classes/RealFevrOpener.html)

{% endtab %}

{% tab title="Digital Art Galleries" %}
Digital Art is booming and more and more artists are participating. The emergence of NFTs allows artists and creators to finally claim proper ownership of their digital content in a decentralized manner, that can also be openly verified by anyone.

With dappkit we give a white-label solution for artists and galleries to create their own online digital showcase, using their own brand and naming.

### Related Content

{% content-ref url="/pages/-Mb5qBXK9-3dJyvR0mOu" %}
[Create your NFT Art Gallery](/start-building/how-to-guides/create-an-nft)
{% endcontent-ref %}

### Real Examples

#### [**b.e.p.r.o. (belle et puissante, la raisonnablement obligée) - Automated Art**](https://bepro.gallery)  &#x20;

* This open beta is entitled Minimal Art Gallery and is a preview of what can be built using BEPRO Network's NFT technology in just a few days of development.
* Uses the [`ERC721Collectibles`](https://sdk.dappkit.dev/classes/ERC721Collectibles.html) Class and was created as a way to show how easy is to build a gallery for anyone.

{% endtab %}

{% tab title="Prediction Markets" %}
Prediction markets are markets where participants trade on the outcome of future events, with multiple timeframes of resolution.

They are a very applicable use case for Blockchain because by removing a centralized entity and using smart contracts to govern the interactions, you can remove intermediaries allowing individuals from any part of the world to create and participate in any market or pool.

With *dappkit* you can quickly create sophisticated contracts to govern several market activities including creating your own token for utility and governance, adding and removing liquidity, and buying and selling shares.

### Real Examples

#### [Polkamarkets ](https://app.polkamarkets.com)

* Using the [`ExchangeMarket`](https://github.com/bepronetwork/bepro-js/blob/feature/prediction-markets/contracts/PredictionMarket.sol), Polkamarkets is a DeFi oriented prediction market built for cross-chain information exchange and trade.
  {% endtab %}

{% tab title="DeFi" %}
With *dappkit* we allow anyone to add common decentralized finance mechanisms (like staking, locking tokens, etc) to their applications and websites.

### **Related Content**

{% content-ref url="/pages/-Mb6ACqShdHAQyBCEmj1" %}
[Create other Project](/start-building/how-to-guides/usage)
{% endcontent-ref %}

{% content-ref url="/pages/-Mb5px09HDW2--AnEJPL" %}
[Create an ERC20 Token](/start-building/how-to-guides/create-an-erc-20-token)
{% endcontent-ref %}

### Real Examples

#### [**Exeedme**](https://www.exeedme.com/)

* Exeedme is a fair and trusted Play2Earn gaming platform, built on top of the blockchain. They are enabling gamers to monetize their skills and earn money while playing their favorite games. Exeedme is using BEPRO's technology and its gaming software to accelerate the development and production of key features of the roadmap.
* Using the [**`StakingContract`**](https://sdk.dappkit.dev/classes/StakingContract.html) Framework, decentralized ERC20 staking is easy
  {% endtab %}

{% tab title="Governance" %}
Many decentralized applications and organizations have built-in governance methods for token holders to participate and engage in discussions about the future of the protocol.

*dappkit* allows you to add these mechanisms in a quick and simple manner.
{% endtab %}

{% tab title="Staking" %}
ERC20 Staking is something common, still, platforms undervalue its real use of trustable decentralization.

You can find the integration process [here](/start-building/how-to-guides/usage) and the API [here](https://bepronetwork.github.io/bepro-js/StakingContract.html) - ready to go!

*bepro-js* allows you to add these mechanisms in a quick and simple manner.

### Real Examples

#### [**RealFevr - Video Collectibles**](https://staking.realfevr.com/)

* BEPRO Network's Staking codebase allows operators to create staking infrastructure in without reinventing the wheel
* Uses the Opener Framework with the custom Class `StakingContract`
  {% endtab %}
  {% endtabs %}


# How to Contribute

Develop in solidity/javascript & receive $BEPRO based on your value to each bounty!

### Contribution

Contributions are welcome, but we ask new contributors to read existing code guidelines, specially the code format. Please review [Contributor guidelines](https://github.com/bepronetwork/bepro-js/blob/master/CONTRIBUTING.md)

### Process

1\) Check the [Protocol](https://development.bepro.network) for open bounties available

![](/files/zEYYsJxaQ1nvVmuMvStx)

2\)  Click on "Start Working"

![](/files/H0dDWyxjGLVmP89cs7nk)

3\) Develop the specific [**`bounty`**  following the standards](/start-building/how-to-guides/how-to-create-an-object) and communicate with other developers in [Discord](https://discord.com/invite/9aUufhzhfm)

[DONT FORGET TO : Follow the Standard Object Development Guidelines](https://github.com/bepronetwork/bepro-js/blob/master/CONTRIBUTING.md)

4\) After Finalizing the Development alone or with other developers in your own Fork **`Propose the Pull Request`** via the interface like below

![](/files/oS83b80K9A0tD29yYRxs)

5\) Now the creator of the bounty has to verify if the PR fulfills the goals of the bounty. After verifying it goes into the distribution stage, here Curators & Council will determine the % of the bounty going to each developer. Follow the process in Discord & receive your bounty payment!  🎉

### License

[MIT](https://choosealicense.com/licenses/mit/)

<br>


# External Links

{% content-ref url="/pages/-MbBQd3OFr7uELgSa066" %}
[Broken mention](broken://pages/-MbBQd3OFr7uELgSa066)
{% endcontent-ref %}

{% content-ref url="/pages/-Mb6DJZSp1Xy\_B8vox4F" %}
[How to Contribute](/technical-support)
{% endcontent-ref %}


