First, create a mintable token

// SPDX-License-Identifier: MIT
// @nhancv
pragma solidity 0.8.4;

interface IMintable {
function mint(address account, uint256 amount) external;
// SPDX-License-Identifier: MIT
// @nhancv
pragma solidity 0.8.4;

import "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
import "./ERC20Token.sol";
import "./interfaces/IMintable.sol";

contract ERC20Mintable is ERC20Token, IMintable, AccessControlUpgradeable {
bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");

* @dev Upgradable initializer…
  • Return zero with empty interface
=> bytes4: 0x00000000// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ITest {
contract Test is ITest {…

  • Clean: No unused code, nonsense comment,
  • Well document: Comment to all functions
  • Formatted: Reformat, reformat, reformat
  • Unit test all functions
  • Migration for testnet and mainnet
  • Avoid duplication code, avoid using too many unnecessary modifiers…

What is “Dividend Token”?

Preparing source

  • Clone pancake-swap-core
git clone
cd pancake-swap-core
git checkout -b factory 3b214306770e86bc3a64e67c2b5bdb566b4e94a7
yarn install
yarn compile
  • Clone pancake-swap-periphery
git clone
cd pancake-swap-periphery
git checkout -b router d769a6d136b74fde82502ec2f9334acc1afc0732
yarn install
yarn add @uniswap/v2-core@"file:../pancake-swap-core"
yarn compile

Config Server

nano /etc/zabbix/zabbix_server.conf===>Update DB information
  • Config frontend web
nano /etc/zabbix/web/zabbix.conf.php
# Update DB information, must be matched with server config above
# Integrate with server
ZBX_SERVER = '**your zabbix ip address or name**';
ZBX_SERVER_PORT = '10051';
ZBX_SERVER_NAME = '**your zabbix hostname**';

Setup MongoDB

* Check linux version: lsb_release -a
sudo apt install wget
wget -qO - | sudo apt-key add -

* Debian 10 "Buster"
echo "deb buster/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

* Ubuntu 20.04 (Focal)
echo "deb [ arch=amd64,arm64 ] focal/mongodb-org/4.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list

sudo apt update
sudo apt install -y build-essential
Make sure your application is stateless: share database/cache, cronjob
// # Start all applications
// pm2 start ecosystem.config.js
// # Stop all
// pm2 stop ecosystem.config.js
// # Restart all
// pm2 restart ecosystem.config.js
// # Reload all
// pm2 reload ecosystem.config.js
// # Delete all
// pm2 delete ecosystem.config.js
module.exports = {

Nhan Cao

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store