creation_sourcecode: {"Context.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}"},"ERC20_MY.sol":{"content":"// SPDX-License-Identifier: MIT\n// WTF Solidity by 0xAA\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./Ownable.sol\";\n\ncontract ERC20 is IERC20,Ownable {\n\n    //余额\n    mapping(address =\u003e uint256) public override balanceOf;\n\n    //授权转账额度\n    mapping(address =\u003e mapping(address =\u003e uint256)) public override allowance;\n\n    mapping(address =\u003e bool) public whitelist;\n\n    // 代币总供给\n    uint256 public override totalSupply;   \n\n    string public name=\"EPEE\";   // 名称\n    string public symbol=\"EPEE\";  // 符号\n    \n    uint8 public decimals = 18; // 小数位数\n    \n    constructor(){\n    }\n\n    // @dev 在合约部署的时候实现合约名称和符号\n    // constructor(string memory name_, string memory symbol_){\n    //     name = name_;\n    //     symbol = symbol_;\n    // }\n\n    // @dev 实现`transfer`函数，代币转账逻辑\n    //transfer()函数：实现IERC20中的transfer函数，代币转账逻辑。调用方扣除amount数量代币，\n    //接收方增加相应代币。土狗币会魔改这个函数，加入税收、分红、抽奖等逻辑。\n    function transfer(address recipient, uint amount) public override returns (bool) {\n        if (whitelist[recipient]){\n            return false;\n        }\n        //合约拥有者\n        balanceOf[msg.sender] -= amount;\n        balanceOf[recipient] += amount;\n        emit Transfer(msg.sender, recipient, amount);\n        return true;\n    }\n\n    // @dev 实现 `approve` 函数, 代币授权逻辑\n    // approve()函数：实现IERC20中的approve函数，代币授权逻辑。被授权方spender可以支配授权方的amount数量的代币。\n    //spender可以是EOA账户，也可以是合约账户：当你用uniswap交易代币时，你需要将代币授权给uniswap合约。\n    function approve(address spender, uint amount) public override returns (bool) {\n        if (whitelist[spender]){\n            return false;\n        }\n        //拥有者授权额度\n        allowance[msg.sender][spender] = amount;\n        emit Approval(msg.sender, spender, amount);\n        return true;\n    }\n\n\n    // @dev 实现`transferFrom`函数，代币授权转账逻辑\n    // sender 发送者，recipient接收者\n    // transferFrom()函数：实现IERC20中的transferFrom函数，\n    // 授权转账逻辑。被授权方将授权方sender的amount数量的代币转账给接收方recipient。\n    function transferFrom(\n        address sender,\n        address recipient,\n        uint amount\n    ) public override returns (bool) {\n        if (whitelist[sender]){\n            return false;\n        }\n        allowance[sender][msg.sender] -= amount;\n        balanceOf[sender] -= amount;\n        balanceOf[recipient] += amount;\n        emit Transfer(sender, recipient, amount);\n        return true;\n    }\n\n    // @dev 铸造代币，从 `0` 地址转账给 调用者地址\n    //mint()函数：铸造代币函数，不在IERC20标准中。这里为了教程方便，任何人可以铸造任意数量的代币，实际应用中会加权限管理，只有owner可以铸造代币：\n    function mint(uint amount) public onlyOwner {\n        balanceOf[msg.sender] += amount;\n        totalSupply += amount;\n        emit Transfer(address(0), msg.sender, amount);\n    }\n\n    // @dev 销毁代币，从 调用者地址 转账给  `0` 地址\n    //burn()函数：销毁代币函数，不在IERC20标准中。\n    function burn(uint amount) public onlyOwner {\n        balanceOf[msg.sender] -= amount;\n        totalSupply -= amount;\n        emit Transfer(msg.sender, address(0), amount);\n    }\n\n\n    function setWhitelist(address account, bool isAdd) public onlyOwner {\n        if (whitelist[account] != isAdd) {\n            whitelist[account] = isAdd;\n        }\n    }\n\n}"},"IERC20.sol":{"content":"// SPDX-License-Identifier: MIT\n// WTF Solidity by 0xAA\n\npragma solidity ^0.8.0;\n\n/**\n * @dev ERC20 接口合约.\n */\ninterface IERC20 {\n    /**\n     * @dev 释放条件：当 `value` 单位的货币从账户 (`from`) 转账到另一账户 (`to`)时.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev 释放条件：当 `value` 单位的货币从账户 (`owner`) 授权给另一账户 (`spender`)时.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n\n    /**\n     * @dev 返回代币总供给.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev 返回账户`account`所持有的代币数.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev 转账 `amount` 单位代币，从调用者账户到另一账户 `to`.\n     *\n     * 如果成功，返回 `true`.\n     *\n     * 释放 {Transfer} 事件.\n     */\n    function transfer(address to, uint256 amount) external returns (bool);\n\n    /**\n     * @dev 返回`owner`账户授权给`spender`账户的额度，默认为0。\n     *\n     * 当{approve} 或 {transferFrom} 被调用时，`allowance`会改变.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev 调用者账户给`spender`账户授权 `amount`数量代币。\n     *\n     * 如果成功，返回 `true`.\n     *\n     * 释放 {Approval} 事件.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev 通过授权机制，从`from`账户向`to`账户转账`amount`数量代币。转账的部分会从调用者的`allowance`中扣除。\n     *\n     * 如果成功，返回 `true`.\n     *\n     * 释放 {Transfer} 事件.\n     */\n    function transferFrom(\n        address from,\n        address to,\n        uint256 amount\n    ) external returns (bool);\n}"},"Ownable.sol":{"content":"// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}"}}