creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "__bsn.sol": {
        "content": "//SPDX-License-Identifier: MIT\r\n\r\n/*\r\n    ██████╗░░██████╗███╗░░██╗\r\n    ██╔══██╗██╔════╝████╗░██║\r\n    ██████╦╝╚█████╗░██╔██╗██║\r\n    ██╔══██╗░╚═══██╗██║╚████║\r\n    ██████╦╝██████╔╝██║░╚███║\r\n    ╚═════╝░╚═════╝░╚═╝░░╚══╝\r\n    Website: https://blocknetwork.social/\r\n    X: https://x.com/0xBlockNet/\r\n    Whitepaper: https://block-social-network.gitbook.io/whitepaper/\r\n    Medium: https://medium.com/@blocksocialnetwork\r\n    Telegram: https://t.me/blocksocialnet\r\n    Platform: https://platform.blocknetwork.social/\r\n*/\r\npragma solidity 0.8.26;\r\n\r\nabstract contract Context {\r\n    function _msgSender() internal view virtual returns (address) {\r\n        return msg.sender;\r\n    }\r\n}\r\n\r\ninterface IERC20 {\r\n    function totalSupply() external view returns (uint256);\r\n    function balanceOf(address account) external view returns (uint256);\r\n    function transfer(address recipient, uint256 amount) external returns (bool);\r\n    function allowance(address owner, address spender) external view returns (uint256);\r\n    function approve(address spender, uint256 amount) external returns (bool);\r\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\r\n    event Transfer(address indexed from, address indexed to, uint256 value);\r\n    event Approval(address indexed owner, address indexed spender, uint256 value);\r\n}\r\n\r\ncontract Ownable is Context {\r\n    address private _owner;\r\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\r\n\r\n    constructor () {\r\n        address msgSender = _msgSender();\r\n        _owner = msgSender;\r\n        emit OwnershipTransferred(address(0), msgSender);\r\n    }\r\n\r\n    function owner() public view returns (address) {\r\n        return _owner;\r\n    }\r\n\r\n    modifier onlyOwner() {\r\n        require(_owner == _msgSender(), \"Ownable: caller is not the owner\");\r\n        _;\r\n    }\r\n\r\n    function renounceOwnership() public virtual onlyOwner {\r\n        emit OwnershipTransferred(_owner, address(0));\r\n        _owner = address(0);\r\n    }\r\n\r\n}\r\n\r\ninterface IUniswapV2Factory {\r\n    function createPair(address tokenA, address tokenB) external returns (address pair);\r\n}\r\n\r\ninterface IUniswapV2Router02 {\r\n    function swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n        uint amountIn,\r\n        uint amountOutMin,\r\n        address[] calldata path,\r\n        address to,\r\n        uint deadline\r\n    ) external;\r\n    function factory() external pure returns (address);\r\n    function WETH() external pure returns (address);\r\n    function addLiquidityETH(\r\n        address token,\r\n        uint amountTokenDesired,\r\n        uint amountTokenMin,\r\n        uint amountETHMin,\r\n        address to,\r\n        uint deadline\r\n    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\r\n}\r\n\r\ncontract BSN is Context, IERC20, Ownable {\r\n    string private constant _name = unicode\"Block Social Network\";\r\n    string private constant _symbol = unicode\"BSN\";\r\n    uint8 private constant _decimals = 18;\r\n    uint256 private constant _tTotal = 100_000_000 * 10 ** _decimals;\r\n    mapping (address => bool) private _excludedFromFee;\r\n    mapping (address => mapping (address => uint256)) private _allowances;\r\n    mapping (address => uint256) private _balances;\r\n    uint256 private _swapTokensAtAmount = _tTotal / 500;\r\n    uint256 private _maxTaxSwap = _tTotal / 50;\r\n    bool private inSwap;\r\n    IUniswapV2Router02 uniswapV2Router;\r\n    address uniswapV2Pair;\r\n    uint256 public _maxWallet = _tTotal * 2 / 100;\r\n    address payable public _taxWallet;\r\n    address payable public _devWallet;\r\n    bool public _tradeOpen;\r\n    bool private swapEnabled = true;\r\n    uint256 public _buyFee = 10;\r\n    uint256 public _sellFee = 25;\r\n    modifier lockTheSwap {\r\n        inSwap = true;\r\n        _;\r\n        inSwap = false;\r\n    }\r\n    constructor () {\r\n        _taxWallet = payable(_msgSender());\r\n        uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);\r\n        _excludedFromFee[address(uniswapV2Router)] = true;\r\n        uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH());\r\n        _excludedFromFee[address(this)] = true;\r\n        _excludedFromFee[msg.sender] = true;\r\n        _balances[msg.sender] = _tTotal;\r\n        emit Transfer(address(0), _msgSender(), _tTotal);\r\n    }\r\n\r\n    function name() public pure returns (string memory) {\r\n        return _name;\r\n    }\r\n\r\n    function symbol() public pure returns (string memory) {\r\n        return _symbol;\r\n    }\r\n\r\n    function decimals() public pure returns (uint8) {\r\n        return _decimals;\r\n    }\r\n\r\n    function totalSupply() public pure override returns (uint256) {\r\n        return _tTotal;\r\n    }\r\n\r\n    function balanceOf(address account) public view override returns (uint256) {\r\n        return _balances[account];\r\n    }\r\n\r\n    function transfer(address recipient, uint256 amount) public override returns (bool) {\r\n        _transfer(_msgSender(), recipient, amount);\r\n        return true;\r\n    }\r\n\r\n    function allowance(address owner, address spender) public view override returns (uint256) {\r\n        return _allowances[owner][spender];\r\n    }\r\n\r\n    function approve(address spender, uint256 amount) public override returns (bool) {\r\n        _approve(_msgSender(), spender, amount);\r\n        return true;\r\n    }\r\n\r\n    function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) {\r\n        _transfer(sender, recipient, amount);\r\n        _approve(sender, _msgSender(), _allowances[sender][_msgSender()] - (amount));\r\n        return true;\r\n    }\r\n\r\n    function _approve(address owner, address spender, uint256 amount) private {\r\n        _allowances[owner][spender] = amount;\r\n        emit Approval(owner, spender, amount);\r\n    }\r\n\r\n    function _transfer(address from, address to, uint256 amount) private {\r\n        uint256 taxAmount=0;\r\n        if (!_excludedFromFee[from] && !_excludedFromFee[to]) {\r\n            require(_tradeOpen, \"Cant trade yet!\");\r\n\r\n            taxAmount = amount * _buyFee / 100;\r\n\r\n            if (to != uniswapV2Pair) {\r\n                require(balanceOf(to) + amount <= _maxWallet, \"Max wallet reached\");\r\n            }\r\n\r\n            if(to == uniswapV2Pair){\r\n                taxAmount = amount * _sellFee  / 100;\r\n                require(_swapTokensAtAmount < _tTotal);\r\n            }\r\n\r\n            if (from == uniswapV2Pair) {\r\n                require(balanceOf(to) + amount <= _maxWallet);\r\n            }\r\n\r\n            uint256 contractBalance = balanceOf(address(this));\r\n            if (!inSwap && to == uniswapV2Pair && swapEnabled && contractBalance>_swapTokensAtAmount) {\r\n                swapTokensForEth(min(amount,min(contractBalance,_maxTaxSwap)));\r\n            }\r\n        }\r\n\r\n        if(taxAmount > 0){\r\n          _balances[address(this)] += (taxAmount);\r\n          emit Transfer(from, address(this),taxAmount);\r\n        }\r\n        _balances[from] -= (amount);\r\n        _balances[to] += amount - taxAmount;\r\n        emit Transfer(from, to, amount - (taxAmount));\r\n    }\r\n\r\n    function min(uint256 a, uint256 b) private pure returns (uint256){\r\n      return (a>b)?b:a;\r\n    }\r\n\r\n    function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {\r\n        address[] memory path = new address[](2);\r\n        path[0] = address(this);\r\n        path[1] = uniswapV2Router.WETH();\r\n        _approve(address(this), address(uniswapV2Router), tokenAmount);\r\n        uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(\r\n            tokenAmount,\r\n            0,\r\n            path,\r\n            _taxWallet,\r\n            block.timestamp\r\n        );\r\n    }\r\n\r\n    function openTrade() external onlyOwner {\r\n        _tradeOpen = true;\r\n    }\r\n\r\n    function updateMaxWallet(uint amount) external onlyOwner {\r\n        require(amount >= _tTotal / 500);\r\n        _maxWallet = amount;\r\n    }\r\n\r\n    function updateSwapTokensAtAmount(uint amount) external onlyOwner {\r\n        _swapTokensAtAmount = amount;\r\n    }\r\n\r\n    function excludeFromFees(address account, bool status) external onlyOwner {\r\n        _excludedFromFee[account] = status;\r\n    }\r\n\r\n    function setFees(uint newBuyFee, uint newSellFee) external onlyOwner {\r\n        _buyFee = newBuyFee;\r\n        _sellFee  = newSellFee;\r\n        require(newBuyFee <= 30);\r\n        require(newSellFee <= 30);\r\n    }\r\n\r\n    receive() external payable {}\r\n}"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}