{
    "Function": "initialize",
    "File": "contracts/rubiconPools/BathToken.sol",
    "Parent Contracts": [],
    "High-Level Calls": [
        "ERC20",
        "IERC20",
        "ERC20"
    ],
    "Internal Calls": [
        "keccak256(bytes)",
        "abi.encode()",
        "require(bool)",
        "abi.encodePacked()",
        "keccak256(bytes)",
        "keccak256(bytes)",
        "keccak256(bytes)",
        "abi.encodePacked()",
        "chainid()"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function initialize(\n        ERC20 token,\n        address market,\n        address _feeTo\n    ) external {\n        require(!initialized);\n        string memory _symbol = string(\n            abi.encodePacked((\"bath\"), token.symbol())\n        );\n        symbol = _symbol;\n        underlyingToken = token;\n        RubiconMarketAddress = market;\n        bathHouse = msg.sender; //NOTE: assumed admin is creator on BathHouse\n\n        uint256 chainId;\n        assembly {\n            chainId := chainid()\n        }\n        DOMAIN_SEPARATOR = keccak256(\n            abi.encode(\n                keccak256(\n                    \"EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)\"\n                ),\n                keccak256(bytes(name)),\n                keccak256(bytes(\"1\")),\n                chainId,\n                address(this)\n            )\n        );\n        name = string(abi.encodePacked(_symbol, (\" v1\")));\n        decimals = token.decimals(); // v1 Change - 4626 Adherence\n\n        // Add infinite approval of Rubicon Market for this asset\n        IERC20(address(token)).approve(RubiconMarketAddress, 2**256 - 1);\n        emit LogInit(block.timestamp);\n\n        feeTo = address(this); //This contract is the fee recipient, rewarding HODLers\n        feeBPS = 3; //Fee set to 3 BPS initially\n\n        // Complete constract instantiation\n        initialized = true;\n    }"
}