• Make sure you optimize the app logic first. (redundancy requests, too much bad interval calling, asynchronous callback handling, crashing loop, heavy process — need split them…

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 git@github.com:pancakeswap/pancake-swap-core.git
cd pancake-swap-core
git checkout -b factory 3b214306770e86bc3a64e67c2b5bdb566b4e94a7
yarn install
yarn compile
  • Clone pancake-swap-periphery
git clone git@github.com:pancakeswap/pancake-swap-periphery.git
cd pancake-swap-periphery
git checkout -b router d769a6d136b74fde82502ec2f9334acc1afc0732
yarn install
yarn add @uniswap/v2-core@"file:../pancake-swap-core"
yarn compile

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