聚焦资讯
服务于区块链创业者

币安BSC智能链发币教程——通缩燃烧加池分红基金会地址回流合约代码【pdf+视频BSC发币教程下载】

chatGPT账号

BSC链上主流的代币模式越发的丰富起来,下面提供一份包含当前主流的代币模式的合约代码。包括:通缩燃烧+限制通缩+基金会地址回流+加池分红。具体模式功能详细介绍如下:

1、通缩燃烧:单向通缩,只在买币时通缩,卖币时不通缩,保证用户兑换代币时可以获得实际的bnb收益。线下转账时通缩,增加代币的燃烧销毁速率。每笔交易都会有4%的代币被燃烧掉。币的总量随着燃烧逐级减少。在区块链浏览器上可以查询代币的总量逐级减少

2、限制通缩:当代币燃烧到一定数量以后,停止通缩,恒定流通。

3、基金会地址回流:每笔交易都会有部分比例的代币回流到资金池地址,资金池地址的代币可以用于社区推广,运营,项目开发等,正向促进项目的良性发展。合约代码中是2%回流资金池地址。

4、加池分红:用户添加流动性,除了获得代币价格增长产生的收益外,还可以额外获取每笔交易4%的代币数量回流到资金池,根据用户加池占据资金池体量的比例,获得对应的加池分红。

本合约代码仅供学习研究交流区块链技术使用,不得用于商业用途。任何违规或者违法使用该合约代码造成的后果和作者没有任何关系。本作者不承担任何法律责任,特此声明。

具体合约代码如下:

接口文件:IERC20.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

/**
 * @title ERC20 interface
 */
interface IERC20 {
  function transfer(address to, uint256 value) external returns (bool);
  function approve(address spender, uint256 value) external returns (bool);
  function transferFrom(address from, address to, uint256 value) external returns (bool);
  function totalSupply() external view returns (uint256);
  function balanceOf(address who) external view returns (uint256);
  function allowance(address owner, address spender) external view returns (uint256);
  event Transfer(address indexed from, address indexed to, uint256 value);
  event Approval(address indexed owner, address indexed spender, uint256 value);
}

SafeMath.sol(数学安全算法文件

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

/**
 * @title SafeMath
 * @dev Unsigned math operations with safety checks that revert on error
 */
library SafeMath {

  /**
   * @dev Multiplies two unsigned integers, reverts on overflow.
   */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b, "SafeMath#mul: OVERFLOW");

    return c;
  }

Context.sol(上下文文件)

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

Ownable.sol (属主文件)

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "./Context.sol";

contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

Token.sol(代币合约文件)

// SPDX-License-Identifier: MIT
pragma solidity ^0.6.12;
pragma experimental ABIEncoderV2;

import "./IERC20.sol";
import "./Context.sol";
import "./Ownable.sol";
import "./SafeMath.sol";

contract Token is Context, IERC20, Ownable {

    using SafeMath for uint256;

    mapping (address => uint256) private _balances;
    mapping (address => mapping (address => uint256)) private _allowances;

    string private _name = 'SH TOKEN';
    string private _symbol = 'SH';
    uint8 private _decimals = 6;
    uint256 private _totalSupply = 88888 * 10**uint256(_decimals);

    address private _burnPool = address(0);
    address private _fundAddress;

    uint256 public _burnFee = 4;
    uint256 private _previousBurnFee = _burnFee;
    uint256 public _liquidityFee = 4;
    uint256 private _previousLiquidityFee = _liquidityFee;
    uint256 public _fundFee = 2;
    uint256 private _previousFundFee = _fundFee;
    uint256 public  MAX_STOP_FEE_TOTAL = 8888 * 10**uint256(_decimals);
    mapping(address => bool) private _isExcludedFromFee;

    uint256 private _burnFeeTotal;
    uint256 private _liquidityFeeTotal;
    uint256 private _fundFeeTotal;

    bool private inSwapAndLiquify = false;
    bool public swapAndLiquifyEnabled = true;

    address public _exchangePool;
    uint256 public constant delay = 15 minutes;

    event SwapAndLiquifyEnabledUpdated(bool enabled);
    event SwapAndLiquify(
        uint256 tokensSwapped,
        uint256 trxReceived,
        uint256 tokensIntoLiqudity
    );
    event InitLiquidity(
        uint256 tokensAmount,
        uint256 trxAmount,
        uint256 liqudityAmount
    );

    modifier lockTheSwap {
        inSwapAndLiquify = true;
        _;
        inSwapAndLiquify = false;
    }

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The defaut value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (address fundAddress) public {
        _fundAddress = fundAddress;
        _isExcludedFromFee[owner()] = true;
        _isExcludedFromFee[address(this)] = true;

        _balances[_msgSender()] = _totalSupply;

        emit Transfer(address(0), _msgSender(), _totalSupply);
    }
    
    receive () external payable {}

代币部署时动态输入基金会地址。

上线pancakeswap薄饼交易所后,获取资金池地址,动态传入合约,完成加池分红。

至此,完成通缩燃烧加池分红基金会地址回流合约代码的所有操作流程。

pdf+视频币安智能链BSC发币教程及多模式组合合约源代码下载:

多模式(燃烧、回流指定营销地址、分红本币及任意币种,邀请推广八代收益,LP加池分红、交易分红、复利分红、NFT分红、自动筑池、动态手续费、定时开盘、回购)组合合约源代码下载:

pdf+视频币安智能链BSC发币教程及多模式组合合约源代码下载地址:

此内容仅供注册用户可见,请登录!

添加VX或者telegram获取全程线上免费指导

免责声明

发文时比特币价格:$23249

免责声明:

本文不代表行至网立场,且不构成投资建议,请谨慎对待。用户由此造成的损失由用户自行承担,与行至网没有任何关系;

行至网不对网站所发布内容的准确性,真实性等任何方面做任何形式的承诺和保障;

网站内所有涉及到的区块链(衍生)项目,行至网对项目的真实性,准确性等任何方面均不做任何形式的承诺和保障;

网站内所有涉及到的区块链(衍生)项目,行至网不对其构成任何投资建议,用户由此造成的损失由用户自行承担,与行至网没有任何关系;

行至区块链研究院声明:行至区块链研究院内容由行至网发布,部分来源于互联网和行业分析师投稿收录,内容为行至区块链研究院加盟专职分析师独立观点,不代表行至网立场。

chatGPT账号
赞(0) 打赏
版权声明:本文采用知识共享 署名4.0国际许可协议 [BY-NC-SA] 进行授权,未经允许不得转载。
文章名称:《币安BSC智能链发币教程——通缩燃烧加池分红基金会地址回流合约代码【pdf+视频BSC发币教程下载】》
文章链接:https://www.xingzhi.io/definance/404.html
本站资源仅供个人学习交流,请于下载后24小时内删除,不允许用于商业用途,否则法律问题自行承担。
分享到: 更多 (0)

评论 抢沙发

评论前必须登录!

 

服务于区块链创业者

业务范围商务合作

觉得文章有用就打赏一下文章作者

非常感谢你的打赏,我们将继续给力更多优质内容,让我们一起创建更加美好的区块链世界!

支付宝扫一扫打赏

微信扫一扫打赏

登录后才能复制或下载网站内容