{"file_path":"contracts/f(x)/v1/FractionalToken.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.6;\n\nimport { SafeMathUpgradeable } from \"@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol\";\nimport { ERC20Upgradeable } from \"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol\";\n\nimport { IFxFractionalToken } from \"../../interfaces/f(x)/IFxFractionalToken.sol\";\nimport { IFxTreasury } from \"../../interfaces/f(x)/IFxTreasury.sol\";\n\ncontract FractionalToken is ERC20Upgradeable, IFxFractionalToken {\n  using SafeMathUpgradeable for uint256;\n\n  /**********\n   * Events *\n   **********/\n\n  /// @notice Emitted when the net asset value for the token is updated.\n  /// @param oldNav The net asset value before update.\n  /// @param newNav The net asset value after update.\n  event UpdateNav(uint256 oldNav, uint256 newNav);\n\n  /*************\n   * Constants *\n   *************/\n\n  /// @dev The precision used to compute nav.\n  uint256 private constant PRECISION = 1e18;\n\n  /*************\n   * Variables *\n   *************/\n\n  /// @notice The address of Treasury contract.\n  address public treasury;\n\n  /// @inheritdoc IFxFractionalToken\n  uint256 public override nav;\n\n  /*************\n   * Modifiers *\n   *************/\n\n  modifier onlyTreasury() {\n    require(msg.sender == treasury, \"Only treasury\");\n    _;\n  }\n\n  /***************\n   * Constructor *\n   ***************/\n\n  function initialize(\n    address _treasury,\n    string memory _name,\n    string memory _symbol\n  ) external initializer {\n    ERC20Upgradeable.__ERC20_init(_name, _symbol);\n\n    treasury = _treasury;\n    nav = PRECISION;\n  }\n\n  /*************************\n   * Public View Functions *\n   *************************/\n\n  /// @inheritdoc IFxFractionalToken\n  /// @dev Normally `multiple/1e18` should be in the range `(-1, 1e18)`.\n  /// @dev This function provides the actual value in case of collateralized and under collateralized.\n  /// @dev In case of under collateralized, it returns the ceil(baseValue / fSupply). In case of collateralized, it returns the candidate nav.\n  function getNav(int256 multiple) public view override returns (uint256) {\n    uint256 _candidateNav = getCandidateNav(multiple);\n    uint256 _fSupply = totalSupply();\n\n    if (_fSupply > 0) {\n      uint256 baseNav = IFxTreasury(treasury).currentBaseTokenPrice();\n      uint256 baseSupply = IFxTreasury(treasury).totalBaseToken();\n\n      uint256 baseValue = baseSupply.mul(baseNav);\n      uint256 fValue = _fSupply.mul(_candidateNav);\n\n      if (baseValue < fValue) {\n        // Under-collateral: ceil(baseValue / fSupply) so Treasury detects xNAV == 0\n        return baseValue.add(_fSupply).sub(1).div(_fSupply);\n      }\n    }\n\n    return _candidateNav;\n  }\n\n  /// @inheritdoc IFxFractionalToken\n  /// @dev Remains 1e18 if multiple is 0. In stablecoin, beta = 0 -> multiple = 0 -> fNav = 1e18\n  function getCandidateNav(int256 multiple) public view override returns (uint256) {\n    if (multiple < 0) {\n      require(uint256(-multiple) < PRECISION, \"multiple too small\");\n    } else {\n      require(uint256(multiple) < PRECISION * PRECISION, \"multiple too large\");\n    }\n\n    return nav.mul(uint256(int256(PRECISION) + multiple)).div(PRECISION);\n  }\n\n  /****************************\n   * Public Mutated Functions *\n   ****************************/\n\n  /// @inheritdoc IFxFractionalToken\n  /// @dev Normally `multiple/1e18` should be in the range `(-1, 1e18)`.\n  function updateNav(int256 multiple) external override onlyTreasury returns (uint256) {\n    uint256 _oldNav = nav;\n    uint256 _newNav = getCandidateNav(multiple);\n    nav = _newNav;\n\n    emit UpdateNav(_oldNav, _newNav);\n\n    return _newNav;\n  }\n\n  /// @inheritdoc IFxFractionalToken\n  function setNav(uint256 _newNav) external override onlyTreasury {\n    uint256 _oldNav = nav;\n    nav = _newNav;\n\n    emit UpdateNav(_oldNav, _newNav);\n  }\n\n  /// @inheritdoc IFxFractionalToken\n  function mint(address _to, uint256 _amount) external override onlyTreasury {\n    _mint(_to, _amount);\n  }\n\n  /// @inheritdoc IFxFractionalToken\n  function burn(address _from, uint256 _amount) external override onlyTreasury {\n    _burn(_from, _amount);\n  }\n}\n","deployed_bytecode":"0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806370a08231116100ad578063a457c2d711610071578063a457c2d7146104c8578063a9059cbb146104f4578063c1590cd714610520578063d751cf9d14610528578063dd62ed3e146105455761012c565b806370a08231146103145780638f32899a1461033a578063906571471461035757806395d89b41146104945780639dc29fac1461049c5761012c565b8063251d8ffb116100f4578063251d8ffb1461025b578063313ce5671461027a578063395093511461029857806340c10f19146102c457806361d027b3146102f05761012c565b806306fdde0314610131578063095ea7b3146101ae578063134d158c146101ee57806318160ddd1461021d57806323b872dd14610225575b600080fd5b610139610573565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017357818101518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101da600480360360408110156101c457600080fd5b506001600160a01b038135169060200135610609565b604080519115158252519081900360200190f35b61020b6004803603602081101561020457600080fd5b5035610627565b60408051918252519081900360200190f35b61020b6106d3565b6101da6004803603606081101561023b57600080fd5b506001600160a01b038135811691602081013590911690604001356106d9565b6102786004803603602081101561027157600080fd5b5035610760565b005b6102826107f6565b6040805160ff9092168252519081900360200190f35b6101da600480360360408110156102ae57600080fd5b506001600160a01b0381351690602001356107ff565b610278600480360360408110156102da57600080fd5b506001600160a01b03813516906020013561084d565b6102f86108aa565b604080516001600160a01b039092168252519081900360200190f35b61020b6004803603602081101561032a57600080fd5b50356001600160a01b03166108b9565b61020b6004803603602081101561035057600080fd5b50356108d4565b6102786004803603606081101561036d57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561039857600080fd5b8201836020820111156103aa57600080fd5b803590602001918460018302840111640100000000831117156103cc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561041f57600080fd5b82018360208201111561043157600080fd5b8035906020019184600183028401116401000000008311171561045357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610a3d945050505050565b610139610b13565b610278600480360360408110156104b257600080fd5b506001600160a01b038135169060200135610b74565b6101da600480360360408110156104de57600080fd5b506001600160a01b038135169060200135610bcd565b6101da6004803603604081101561050a57600080fd5b506001600160a01b038135169060200135610c35565b61020b610c49565b61020b6004803603602081101561053e57600080fd5b5035610c4f565b61020b6004803603604081101561055b57600080fd5b506001600160a01b0381358116916020013516610d35565b60368054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105ff5780601f106105d4576101008083540402835291602001916105ff565b820191906000526020600020905b8154815290600101906020018083116105e257829003601f168201915b5050505050905090565b600061061d610616610d60565b8484610d64565b5060015b92915050565b6065546000906001600160a01b03163314610679576040805162461bcd60e51b815260206004820152600d60248201526c4f6e6c7920747265617375727960981b604482015290519081900360640190fd5b606654600061068784610c4f565b6066819055604080518481526020810183905281519293507f158c60336e818f906a12109e751ea08ccd23594e5db7cf9285e7e20aca3eb702929081900390910190a19150505b919050565b60355490565b60006106e6848484610e50565b610756846106f2610d60565b61075185604051806060016040528060288152602001611775602891396001600160a01b038a16600090815260346020526040812090610730610d60565b6001600160a01b031681526020810191909152604001600020549190610fad565b610d64565b5060019392505050565b6065546001600160a01b031633146107af576040805162461bcd60e51b815260206004820152600d60248201526c4f6e6c7920747265617375727960981b604482015290519081900360640190fd5b6066805490829055604080518281526020810184905281517f158c60336e818f906a12109e751ea08ccd23594e5db7cf9285e7e20aca3eb702929181900390910190a15050565b60385460ff1690565b600061061d61080c610d60565b84610751856034600061081d610d60565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611044565b6065546001600160a01b0316331461089c576040805162461bcd60e51b815260206004820152600d60248201526c4f6e6c7920747265617375727960981b604482015290519081900360640190fd5b6108a682826110a5565b5050565b6065546001600160a01b031681565b6001600160a01b031660009081526033602052604090205490565b6000806108e083610c4f565b905060006108ec6106d3565b90508015610a3657606554604080516001621836d160e11b0319815290516000926001600160a01b03169163ffcf925e916004808301926020929190829003018186803b15801561093c57600080fd5b505afa158015610950573d6000803e3d6000fd5b505050506040513d602081101561096657600080fd5b5051606554604080516344d90cf960e01b815290519293506000926001600160a01b03909216916344d90cf991600480820192602092909190829003018186803b1580156109b357600080fd5b505afa1580156109c7573d6000803e3d6000fd5b505050506040513d60208110156109dd57600080fd5b5051905060006109ed8284611197565b905060006109fb8587611197565b905080821015610a3157610a2485610a1e6001610a188684611044565b906111f0565b9061124d565b96505050505050506106ce565b505050505b5092915050565b600054610100900460ff1680610a565750610a566112b4565b80610a64575060005460ff16155b610a9f5760405162461bcd60e51b815260040180806020018281038252602e815260200180611726602e913960400191505060405180910390fd5b600054610100900460ff16158015610aca576000805460ff1961ff0019909116610100171660011790555b610ad483836112c5565b606580546001600160a01b0319166001600160a01b038616179055670de0b6b3a76400006066558015610b0d576000805461ff00191690555b50505050565b60378054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105ff5780601f106105d4576101008083540402835291602001916105ff565b6065546001600160a01b03163314610bc3576040805162461bcd60e51b815260206004820152600d60248201526c4f6e6c7920747265617375727960981b604482015290519081900360640190fd5b6108a6828261137b565b600061061d610bda610d60565b84610751856040518060600160405280602581526020016118076025913960346000610c04610d60565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610fad565b600061061d610c42610d60565b8484610e50565b60665481565b600080821215610cb257670de0b6b3a76400008260000310610cad576040805162461bcd60e51b81526020600482015260126024820152711b5d5b1d1a5c1b19481d1bdbc81cdb585b1b60721b604482015290519081900360640190fd5b610d0a565b6ec097ce7bc90715b34b9f10000000008210610d0a576040805162461bcd60e51b81526020600482015260126024820152716d756c7469706c6520746f6f206c6172676560701b604482015290519081900360640190fd5b610621670de0b6b3a7640000610a1e84670de0b6b3a76400000160665461119790919063ffffffff16565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b3390565b6001600160a01b038316610da95760405162461bcd60e51b81526004018080602001828103825260248152602001806117e36024913960400191505060405180910390fd5b6001600160a01b038216610dee5760405162461bcd60e51b81526004018080602001828103825260228152602001806116de6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260346020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610e955760405162461bcd60e51b81526004018080602001828103825260258152602001806117be6025913960400191505060405180910390fd5b6001600160a01b038216610eda5760405162461bcd60e51b81526004018080602001828103825260238152602001806116996023913960400191505060405180910390fd5b610ee5838383611376565b610f2281604051806060016040528060268152602001611700602691396001600160a01b0386166000908152603360205260409020549190610fad565b6001600160a01b038085166000908152603360205260408082209390935590841681522054610f519082611044565b6001600160a01b0380841660008181526033602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561103c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611001578181015183820152602001610fe9565b50505050905090810190601f16801561102e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008282018381101561109e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216611100576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61110c60008383611376565b6035546111199082611044565b6035556001600160a01b03821660009081526033602052604090205461113f9082611044565b6001600160a01b03831660008181526033602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000826111a657506000610621565b828202828482816111b357fe5b041461109e5760405162461bcd60e51b81526004018080602001828103825260218152602001806117546021913960400191505060405180910390fd5b600082821115611247576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008082116112a3576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816112ac57fe5b049392505050565b60006112bf30611477565b15905090565b600054610100900460ff16806112de57506112de6112b4565b806112ec575060005460ff16155b6113275760405162461bcd60e51b815260040180806020018281038252602e815260200180611726602e913960400191505060405180910390fd5b600054610100900460ff16158015611352576000805460ff1961ff0019909116610100171660011790555b61135a61147d565b611364838361151f565b8015611376576000805461ff00191690555b505050565b6001600160a01b0382166113c05760405162461bcd60e51b815260040180806020018281038252602181526020018061179d6021913960400191505060405180910390fd5b6113cc82600083611376565b611409816040518060600160405280602281526020016116bc602291396001600160a01b0385166000908152603360205260409020549190610fad565b6001600160a01b03831660009081526033602052604090205560355461142f90826111f0565b6035556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b3b151590565b600054610100900460ff168061149657506114966112b4565b806114a4575060005460ff16155b6114df5760405162461bcd60e51b815260040180806020018281038252602e815260200180611726602e913960400191505060405180910390fd5b600054610100900460ff1615801561150a576000805460ff1961ff0019909116610100171660011790555b801561151c576000805461ff00191690555b50565b600054610100900460ff168061153857506115386112b4565b80611546575060005460ff16155b6115815760405162461bcd60e51b815260040180806020018281038252602e815260200180611726602e913960400191505060405180910390fd5b600054610100900460ff161580156115ac576000805460ff1961ff0019909116610100171660011790555b82516115bf9060369060208601906115f7565b5081516115d39060379060208501906115f7565b506038805460ff191660121790558015611376576000805461ff0019169055505050565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261162d5760008555611673565b82601f1061164657805160ff1916838001178555611673565b82800160010185558215611673579182015b82811115611673578251825591602001919060010190611658565b5061167f929150611683565b5090565b5b8082111561167f576000815560010161168456fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220801cc97faf9eaab2919c04d32e825cd07f0c3dd59c29b29cc27eb4c6cebb7ddf64736f6c63430007060033","optimization_enabled":true,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"istanbul","libraries":{},"metadata":{"bytecodeHash":"ipfs"},"optimizer":{"enabled":true,"runs":200},"outputSelection":{"*":{"":["*"],"*":["*"]}}},"optimization_runs":200,"sourcify_repo_url":null,"decoded_constructor_args":null,"compiler_version":"v0.7.6+commit.7338295f","is_verified_via_verifier_alliance":false,"verified_at":"2025-12-10T08:39:38.369142Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x608060405234801561001057600080fd5b50611861806100206000396000f3fe608060405234801561001057600080fd5b506004361061012c5760003560e01c806370a08231116100ad578063a457c2d711610071578063a457c2d7146104c8578063a9059cbb146104f4578063c1590cd714610520578063d751cf9d14610528578063dd62ed3e146105455761012c565b806370a08231146103145780638f32899a1461033a578063906571471461035757806395d89b41146104945780639dc29fac1461049c5761012c565b8063251d8ffb116100f4578063251d8ffb1461025b578063313ce5671461027a578063395093511461029857806340c10f19146102c457806361d027b3146102f05761012c565b806306fdde0314610131578063095ea7b3146101ae578063134d158c146101ee57806318160ddd1461021d57806323b872dd14610225575b600080fd5b610139610573565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017357818101518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101da600480360360408110156101c457600080fd5b506001600160a01b038135169060200135610609565b604080519115158252519081900360200190f35b61020b6004803603602081101561020457600080fd5b5035610627565b60408051918252519081900360200190f35b61020b6106d3565b6101da6004803603606081101561023b57600080fd5b506001600160a01b038135811691602081013590911690604001356106d9565b6102786004803603602081101561027157600080fd5b5035610760565b005b6102826107f6565b6040805160ff9092168252519081900360200190f35b6101da600480360360408110156102ae57600080fd5b506001600160a01b0381351690602001356107ff565b610278600480360360408110156102da57600080fd5b506001600160a01b03813516906020013561084d565b6102f86108aa565b604080516001600160a01b039092168252519081900360200190f35b61020b6004803603602081101561032a57600080fd5b50356001600160a01b03166108b9565b61020b6004803603602081101561035057600080fd5b50356108d4565b6102786004803603606081101561036d57600080fd5b6001600160a01b03823516919081019060408101602082013564010000000081111561039857600080fd5b8201836020820111156103aa57600080fd5b803590602001918460018302840111640100000000831117156103cc57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561041f57600080fd5b82018360208201111561043157600080fd5b8035906020019184600183028401116401000000008311171561045357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610a3d945050505050565b610139610b13565b610278600480360360408110156104b257600080fd5b506001600160a01b038135169060200135610b74565b6101da600480360360408110156104de57600080fd5b506001600160a01b038135169060200135610bcd565b6101da6004803603604081101561050a57600080fd5b506001600160a01b038135169060200135610c35565b61020b610c49565b61020b6004803603602081101561053e57600080fd5b5035610c4f565b61020b6004803603604081101561055b57600080fd5b506001600160a01b0381358116916020013516610d35565b60368054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105ff5780601f106105d4576101008083540402835291602001916105ff565b820191906000526020600020905b8154815290600101906020018083116105e257829003601f168201915b5050505050905090565b600061061d610616610d60565b8484610d64565b5060015b92915050565b6065546000906001600160a01b03163314610679576040805162461bcd60e51b815260206004820152600d60248201526c4f6e6c7920747265617375727960981b604482015290519081900360640190fd5b606654600061068784610c4f565b6066819055604080518481526020810183905281519293507f158c60336e818f906a12109e751ea08ccd23594e5db7cf9285e7e20aca3eb702929081900390910190a19150505b919050565b60355490565b60006106e6848484610e50565b610756846106f2610d60565b61075185604051806060016040528060288152602001611775602891396001600160a01b038a16600090815260346020526040812090610730610d60565b6001600160a01b031681526020810191909152604001600020549190610fad565b610d64565b5060019392505050565b6065546001600160a01b031633146107af576040805162461bcd60e51b815260206004820152600d60248201526c4f6e6c7920747265617375727960981b604482015290519081900360640190fd5b6066805490829055604080518281526020810184905281517f158c60336e818f906a12109e751ea08ccd23594e5db7cf9285e7e20aca3eb702929181900390910190a15050565b60385460ff1690565b600061061d61080c610d60565b84610751856034600061081d610d60565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611044565b6065546001600160a01b0316331461089c576040805162461bcd60e51b815260206004820152600d60248201526c4f6e6c7920747265617375727960981b604482015290519081900360640190fd5b6108a682826110a5565b5050565b6065546001600160a01b031681565b6001600160a01b031660009081526033602052604090205490565b6000806108e083610c4f565b905060006108ec6106d3565b90508015610a3657606554604080516001621836d160e11b0319815290516000926001600160a01b03169163ffcf925e916004808301926020929190829003018186803b15801561093c57600080fd5b505afa158015610950573d6000803e3d6000fd5b505050506040513d602081101561096657600080fd5b5051606554604080516344d90cf960e01b815290519293506000926001600160a01b03909216916344d90cf991600480820192602092909190829003018186803b1580156109b357600080fd5b505afa1580156109c7573d6000803e3d6000fd5b505050506040513d60208110156109dd57600080fd5b5051905060006109ed8284611197565b905060006109fb8587611197565b905080821015610a3157610a2485610a1e6001610a188684611044565b906111f0565b9061124d565b96505050505050506106ce565b505050505b5092915050565b600054610100900460ff1680610a565750610a566112b4565b80610a64575060005460ff16155b610a9f5760405162461bcd60e51b815260040180806020018281038252602e815260200180611726602e913960400191505060405180910390fd5b600054610100900460ff16158015610aca576000805460ff1961ff0019909116610100171660011790555b610ad483836112c5565b606580546001600160a01b0319166001600160a01b038616179055670de0b6b3a76400006066558015610b0d576000805461ff00191690555b50505050565b60378054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156105ff5780601f106105d4576101008083540402835291602001916105ff565b6065546001600160a01b03163314610bc3576040805162461bcd60e51b815260206004820152600d60248201526c4f6e6c7920747265617375727960981b604482015290519081900360640190fd5b6108a6828261137b565b600061061d610bda610d60565b84610751856040518060600160405280602581526020016118076025913960346000610c04610d60565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190610fad565b600061061d610c42610d60565b8484610e50565b60665481565b600080821215610cb257670de0b6b3a76400008260000310610cad576040805162461bcd60e51b81526020600482015260126024820152711b5d5b1d1a5c1b19481d1bdbc81cdb585b1b60721b604482015290519081900360640190fd5b610d0a565b6ec097ce7bc90715b34b9f10000000008210610d0a576040805162461bcd60e51b81526020600482015260126024820152716d756c7469706c6520746f6f206c6172676560701b604482015290519081900360640190fd5b610621670de0b6b3a7640000610a1e84670de0b6b3a76400000160665461119790919063ffffffff16565b6001600160a01b03918216600090815260346020908152604080832093909416825291909152205490565b3390565b6001600160a01b038316610da95760405162461bcd60e51b81526004018080602001828103825260248152602001806117e36024913960400191505060405180910390fd5b6001600160a01b038216610dee5760405162461bcd60e51b81526004018080602001828103825260228152602001806116de6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260346020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610e955760405162461bcd60e51b81526004018080602001828103825260258152602001806117be6025913960400191505060405180910390fd5b6001600160a01b038216610eda5760405162461bcd60e51b81526004018080602001828103825260238152602001806116996023913960400191505060405180910390fd5b610ee5838383611376565b610f2281604051806060016040528060268152602001611700602691396001600160a01b0386166000908152603360205260409020549190610fad565b6001600160a01b038085166000908152603360205260408082209390935590841681522054610f519082611044565b6001600160a01b0380841660008181526033602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561103c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611001578181015183820152602001610fe9565b50505050905090810190601f16801561102e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008282018381101561109e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b038216611100576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61110c60008383611376565b6035546111199082611044565b6035556001600160a01b03821660009081526033602052604090205461113f9082611044565b6001600160a01b03831660008181526033602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000826111a657506000610621565b828202828482816111b357fe5b041461109e5760405162461bcd60e51b81526004018080602001828103825260218152602001806117546021913960400191505060405180910390fd5b600082821115611247576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b60008082116112a3576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b8183816112ac57fe5b049392505050565b60006112bf30611477565b15905090565b600054610100900460ff16806112de57506112de6112b4565b806112ec575060005460ff16155b6113275760405162461bcd60e51b815260040180806020018281038252602e815260200180611726602e913960400191505060405180910390fd5b600054610100900460ff16158015611352576000805460ff1961ff0019909116610100171660011790555b61135a61147d565b611364838361151f565b8015611376576000805461ff00191690555b505050565b6001600160a01b0382166113c05760405162461bcd60e51b815260040180806020018281038252602181526020018061179d6021913960400191505060405180910390fd5b6113cc82600083611376565b611409816040518060600160405280602281526020016116bc602291396001600160a01b0385166000908152603360205260409020549190610fad565b6001600160a01b03831660009081526033602052604090205560355461142f90826111f0565b6035556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b3b151590565b600054610100900460ff168061149657506114966112b4565b806114a4575060005460ff16155b6114df5760405162461bcd60e51b815260040180806020018281038252602e815260200180611726602e913960400191505060405180910390fd5b600054610100900460ff1615801561150a576000805460ff1961ff0019909116610100171660011790555b801561151c576000805461ff00191690555b50565b600054610100900460ff168061153857506115386112b4565b80611546575060005460ff16155b6115815760405162461bcd60e51b815260040180806020018281038252602e815260200180611726602e913960400191505060405180910390fd5b600054610100900460ff161580156115ac576000805460ff1961ff0019909116610100171660011790555b82516115bf9060369060208601906115f7565b5081516115d39060379060208501906115f7565b506038805460ff191660121790558015611376576000805461ff0019169055505050565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261162d5760008555611673565b82601f1061164657805160ff1916838001178555611673565b82800160010185558215611673579182015b82811115611673578251825591602001919060010190611658565b5061167f929150611683565b5090565b5b8082111561167f576000815560010161168456fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220801cc97faf9eaab2919c04d32e825cd07f0c3dd59c29b29cc27eb4c6cebb7ddf64736f6c63430007060033","name":"FractionalToken","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"istanbul","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMathUpgradeable {\n    /**\n     * @dev Returns the addition of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        uint256 c = a + b;\n        if (c < a) return (false, 0);\n        return (true, c);\n    }\n\n    /**\n     * @dev Returns the substraction of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        if (b > a) return (false, 0);\n        return (true, a - b);\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n        // benefit is lost if 'b' is also tested.\n        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n        if (a == 0) return (true, 0);\n        uint256 c = a * b;\n        if (c / a != b) return (false, 0);\n        return (true, c);\n    }\n\n    /**\n     * @dev Returns the division of two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        if (b == 0) return (false, 0);\n        return (true, a / b);\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.\n     *\n     * _Available since v3.4._\n     */\n    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {\n        if (b == 0) return (false, 0);\n        return (true, a % b);\n    }\n\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     *\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 c = a + b;\n        require(c >= a, \"SafeMath: addition overflow\");\n        return c;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        require(b <= a, \"SafeMath: subtraction overflow\");\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     *\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        if (a == 0) return 0;\n        uint256 c = a * b;\n        require(c / a == b, \"SafeMath: multiplication overflow\");\n        return c;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        require(b > 0, \"SafeMath: division by zero\");\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        require(b > 0, \"SafeMath: modulo by zero\");\n        return a % b;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {trySub}.\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     *\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b <= a, errorMessage);\n        return a - b;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers, reverting with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryDiv}.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b > 0, errorMessage);\n        return a / b;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * reverting with custom message when dividing by zero.\n     *\n     * CAUTION: This function is deprecated because it requires allocating memory for the error\n     * message unnecessarily. For custom revert reasons use {tryMod}.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     *\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b > 0, errorMessage);\n        return a % b;\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/proxy/Initializable.sol","source_code":"// SPDX-License-Identifier: MIT\n\n// solhint-disable-next-line compiler-version\npragma solidity >=0.4.24 <0.8.0;\n\nimport \"../utils/AddressUpgradeable.sol\";\n\n/**\n * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed\n * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an\n * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer\n * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.\n *\n * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as\n * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}.\n *\n * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure\n * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.\n */\nabstract contract Initializable {\n\n    /**\n     * @dev Indicates that the contract has been initialized.\n     */\n    bool private _initialized;\n\n    /**\n     * @dev Indicates that the contract is in the process of being initialized.\n     */\n    bool private _initializing;\n\n    /**\n     * @dev Modifier to protect an initializer function from being invoked twice.\n     */\n    modifier initializer() {\n        require(_initializing || _isConstructor() || !_initialized, \"Initializable: contract is already initialized\");\n\n        bool isTopLevelCall = !_initializing;\n        if (isTopLevelCall) {\n            _initializing = true;\n            _initialized = true;\n        }\n\n        _;\n\n        if (isTopLevelCall) {\n            _initializing = false;\n        }\n    }\n\n    /// @dev Returns true if and only if the function is running in the constructor\n    function _isConstructor() private view returns (bool) {\n        return !AddressUpgradeable.isContract(address(this));\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/token/ERC20/ERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\nimport \"../../utils/ContextUpgradeable.sol\";\nimport \"./IERC20Upgradeable.sol\";\nimport \"../../math/SafeMathUpgradeable.sol\";\nimport \"../../proxy/Initializable.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin guidelines: functions revert instead\n * of returning `false` on failure. This behavior is nonetheless conventional\n * and does not conflict with the expectations of ERC20 applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20Upgradeable is Initializable, ContextUpgradeable, IERC20Upgradeable {\n    using SafeMathUpgradeable for uint256;\n\n    mapping (address => uint256) private _balances;\n\n    mapping (address => mapping (address => uint256)) private _allowances;\n\n    uint256 private _totalSupply;\n\n    string private _name;\n    string private _symbol;\n    uint8 private _decimals;\n\n    /**\n     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with\n     * a default value of 18.\n     *\n     * To select a different value for {decimals}, use {_setupDecimals}.\n     *\n     * All three of these values are immutable: they can only be set once during\n     * construction.\n     */\n    function __ERC20_init(string memory name_, string memory symbol_) internal initializer {\n        __Context_init_unchained();\n        __ERC20_init_unchained(name_, symbol_);\n    }\n\n    function __ERC20_init_unchained(string memory name_, string memory symbol_) internal initializer {\n        _name = name_;\n        _symbol = symbol_;\n        _decimals = 18;\n    }\n\n    /**\n     * @dev Returns the name of the token.\n     */\n    function name() public view virtual returns (string memory) {\n        return _name;\n    }\n\n    /**\n     * @dev Returns the symbol of the token, usually a shorter version of the\n     * name.\n     */\n    function symbol() public view virtual returns (string memory) {\n        return _symbol;\n    }\n\n    /**\n     * @dev Returns the number of decimals used to get its user representation.\n     * For example, if `decimals` equals `2`, a balance of `505` tokens should\n     * be displayed to a user as `5,05` (`505 / 10 ** 2`).\n     *\n     * Tokens usually opt for a value of 18, imitating the relationship between\n     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is\n     * called.\n     *\n     * NOTE: This information is only used for _display_ purposes: it in\n     * no way affects any of the arithmetic of the contract, including\n     * {IERC20-balanceOf} and {IERC20-transfer}.\n     */\n    function decimals() public view virtual returns (uint8) {\n        return _decimals;\n    }\n\n    /**\n     * @dev See {IERC20-totalSupply}.\n     */\n    function totalSupply() public view virtual override returns (uint256) {\n        return _totalSupply;\n    }\n\n    /**\n     * @dev See {IERC20-balanceOf}.\n     */\n    function balanceOf(address account) public view virtual override returns (uint256) {\n        return _balances[account];\n    }\n\n    /**\n     * @dev See {IERC20-transfer}.\n     *\n     * Requirements:\n     *\n     * - `recipient` cannot be the zero address.\n     * - the caller must have a balance of at least `amount`.\n     */\n    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n        _transfer(_msgSender(), recipient, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-allowance}.\n     */\n    function allowance(address owner, address spender) public view virtual override returns (uint256) {\n        return _allowances[owner][spender];\n    }\n\n    /**\n     * @dev See {IERC20-approve}.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function approve(address spender, uint256 amount) public virtual override returns (bool) {\n        _approve(_msgSender(), spender, amount);\n        return true;\n    }\n\n    /**\n     * @dev See {IERC20-transferFrom}.\n     *\n     * Emits an {Approval} event indicating the updated allowance. This is not\n     * required by the EIP. See the note at the beginning of {ERC20}.\n     *\n     * Requirements:\n     *\n     * - `sender` and `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     * - the caller must have allowance for ``sender``'s tokens of at least\n     * `amount`.\n     */\n    function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {\n        _transfer(sender, recipient, amount);\n        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, \"ERC20: transfer amount exceeds allowance\"));\n        return true;\n    }\n\n    /**\n     * @dev Atomically increases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     */\n    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));\n        return true;\n    }\n\n    /**\n     * @dev Atomically decreases the allowance granted to `spender` by the caller.\n     *\n     * This is an alternative to {approve} that can be used as a mitigation for\n     * problems described in {IERC20-approve}.\n     *\n     * Emits an {Approval} event indicating the updated allowance.\n     *\n     * Requirements:\n     *\n     * - `spender` cannot be the zero address.\n     * - `spender` must have allowance for the caller of at least\n     * `subtractedValue`.\n     */\n    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, \"ERC20: decreased allowance below zero\"));\n        return true;\n    }\n\n    /**\n     * @dev Moves tokens `amount` from `sender` to `recipient`.\n     *\n     * This is internal function is equivalent to {transfer}, and can be used to\n     * e.g. implement automatic token fees, slashing mechanisms, etc.\n     *\n     * Emits a {Transfer} event.\n     *\n     * Requirements:\n     *\n     * - `sender` cannot be the zero address.\n     * - `recipient` cannot be the zero address.\n     * - `sender` must have a balance of at least `amount`.\n     */\n    function _transfer(address sender, address recipient, uint256 amount) internal virtual {\n        require(sender != address(0), \"ERC20: transfer from the zero address\");\n        require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n        _beforeTokenTransfer(sender, recipient, amount);\n\n        _balances[sender] = _balances[sender].sub(amount, \"ERC20: transfer amount exceeds balance\");\n        _balances[recipient] = _balances[recipient].add(amount);\n        emit Transfer(sender, recipient, amount);\n    }\n\n    /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n     * the total supply.\n     *\n     * Emits a {Transfer} event with `from` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `to` cannot be the zero address.\n     */\n    function _mint(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: mint to the zero address\");\n\n        _beforeTokenTransfer(address(0), account, amount);\n\n        _totalSupply = _totalSupply.add(amount);\n        _balances[account] = _balances[account].add(amount);\n        emit Transfer(address(0), account, amount);\n    }\n\n    /**\n     * @dev Destroys `amount` tokens from `account`, reducing the\n     * total supply.\n     *\n     * Emits a {Transfer} event with `to` set to the zero address.\n     *\n     * Requirements:\n     *\n     * - `account` cannot be the zero address.\n     * - `account` must have at least `amount` tokens.\n     */\n    function _burn(address account, uint256 amount) internal virtual {\n        require(account != address(0), \"ERC20: burn from the zero address\");\n\n        _beforeTokenTransfer(account, address(0), amount);\n\n        _balances[account] = _balances[account].sub(amount, \"ERC20: burn amount exceeds balance\");\n        _totalSupply = _totalSupply.sub(amount);\n        emit Transfer(account, address(0), amount);\n    }\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n     *\n     * This internal function is equivalent to `approve`, and can be used to\n     * e.g. set automatic allowances for certain subsystems, etc.\n     *\n     * Emits an {Approval} event.\n     *\n     * Requirements:\n     *\n     * - `owner` cannot be the zero address.\n     * - `spender` cannot be the zero address.\n     */\n    function _approve(address owner, address spender, uint256 amount) internal virtual {\n        require(owner != address(0), \"ERC20: approve from the zero address\");\n        require(spender != address(0), \"ERC20: approve to the zero address\");\n\n        _allowances[owner][spender] = amount;\n        emit Approval(owner, spender, amount);\n    }\n\n    /**\n     * @dev Sets {decimals} to a value other than the default one of 18.\n     *\n     * WARNING: This function should only be called from the constructor. Most\n     * applications that interact with token contracts will not expect\n     * {decimals} to ever change, and may work incorrectly if it does.\n     */\n    function _setupDecimals(uint8 decimals_) internal virtual {\n        _decimals = decimals_;\n    }\n\n    /**\n     * @dev Hook that is called before any transfer of tokens. This includes\n     * minting and burning.\n     *\n     * Calling conditions:\n     *\n     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n     * will be to transferred to `to`.\n     * - when `from` is zero, `amount` tokens will be minted for `to`.\n     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n     * - `from` and `to` are never both zero.\n     *\n     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n     */\n    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }\n    uint256[44] private __gap;\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/token/ERC20/IERC20Upgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20Upgradeable {\n    /**\n     * @dev Returns the amount of tokens in existence.\n     */\n    function totalSupply() external view returns (uint256);\n\n    /**\n     * @dev Returns the amount of tokens owned by `account`.\n     */\n    function balanceOf(address account) external view returns (uint256);\n\n    /**\n     * @dev Moves `amount` tokens from the caller's account to `recipient`.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transfer(address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Returns the remaining number of tokens that `spender` will be\n     * allowed to spend on behalf of `owner` through {transferFrom}. This is\n     * zero by default.\n     *\n     * This value changes when {approve} or {transferFrom} are called.\n     */\n    function allowance(address owner, address spender) external view returns (uint256);\n\n    /**\n     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * IMPORTANT: Beware that changing an allowance with this method brings the risk\n     * that someone may use both the old and the new allowance by unfortunate\n     * transaction ordering. One possible solution to mitigate this race\n     * condition is to first reduce the spender's allowance to 0 and set the\n     * desired value afterwards:\n     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n     *\n     * Emits an {Approval} event.\n     */\n    function approve(address spender, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Moves `amount` tokens from `sender` to `recipient` using the\n     * allowance mechanism. `amount` is then deducted from the caller's\n     * allowance.\n     *\n     * Returns a boolean value indicating whether the operation succeeded.\n     *\n     * Emits a {Transfer} event.\n     */\n    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);\n\n    /**\n     * @dev Emitted when `value` tokens are moved from one account (`from`) to\n     * another (`to`).\n     *\n     * Note that `value` may be zero.\n     */\n    event Transfer(address indexed from, address indexed to, uint256 value);\n\n    /**\n     * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n     * a call to {approve}. `value` is the new allowance.\n     */\n    event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary AddressUpgradeable {\n    /**\n     * @dev Returns true if `account` is a contract.\n     *\n     * [IMPORTANT]\n     * ====\n     * It is unsafe to assume that an address for which this function returns\n     * false is an externally-owned account (EOA) and not a contract.\n     *\n     * Among others, `isContract` will return false for the following\n     * types of addresses:\n     *\n     *  - an externally-owned account\n     *  - a contract in construction\n     *  - an address where a contract will be created\n     *  - an address where a contract lived, but was destroyed\n     * ====\n     */\n    function isContract(address account) internal view returns (bool) {\n        // This method relies on extcodesize, which returns 0 for contracts in\n        // construction, since the code is only stored at the end of the\n        // constructor execution.\n\n        uint256 size;\n        // solhint-disable-next-line no-inline-assembly\n        assembly { size := extcodesize(account) }\n        return size > 0;\n    }\n\n    /**\n     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n     * `recipient`, forwarding all available gas and reverting on errors.\n     *\n     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n     * of certain opcodes, possibly making contracts go over the 2300 gas limit\n     * imposed by `transfer`, making them unable to receive funds via\n     * `transfer`. {sendValue} removes this limitation.\n     *\n     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n     *\n     * IMPORTANT: because control is transferred to `recipient`, care must be\n     * taken to not create reentrancy vulnerabilities. Consider using\n     * {ReentrancyGuard} or the\n     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n     */\n    function sendValue(address payable recipient, uint256 amount) internal {\n        require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value\n        (bool success, ) = recipient.call{ value: amount }(\"\");\n        require(success, \"Address: unable to send value, recipient may have reverted\");\n    }\n\n    /**\n     * @dev Performs a Solidity function call using a low level `call`. A\n     * plain`call` is an unsafe replacement for a function call: use this\n     * function instead.\n     *\n     * If `target` reverts with a revert reason, it is bubbled up by this\n     * function (like regular Solidity function calls).\n     *\n     * Returns the raw returned data. To convert to the expected return value,\n     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n     *\n     * Requirements:\n     *\n     * - `target` must be a contract.\n     * - calling `target` with `data` must not revert.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n      return functionCall(target, data, \"Address: low-level call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n     * `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, 0, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but also transferring `value` wei to `target`.\n     *\n     * Requirements:\n     *\n     * - the calling contract must have an ETH balance of at least `value`.\n     * - the called Solidity function must be `payable`.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {\n        return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n     * with `errorMessage` as a fallback revert reason when `target` reverts.\n     *\n     * _Available since v3.1._\n     */\n    function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {\n        require(address(this).balance >= value, \"Address: insufficient balance for call\");\n        require(isContract(target), \"Address: call to non-contract\");\n\n        // solhint-disable-next-line avoid-low-level-calls\n        (bool success, bytes memory returndata) = target.call{ value: value }(data);\n        return _verifyCallResult(success, returndata, errorMessage);\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n        return functionStaticCall(target, data, \"Address: low-level static call failed\");\n    }\n\n    /**\n     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n     * but performing a static call.\n     *\n     * _Available since v3.3._\n     */\n    function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {\n        require(isContract(target), \"Address: static call to non-contract\");\n\n        // solhint-disable-next-line avoid-low-level-calls\n        (bool success, bytes memory returndata) = target.staticcall(data);\n        return _verifyCallResult(success, returndata, errorMessage);\n    }\n\n    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {\n        if (success) {\n            return returndata;\n        } else {\n            // Look for revert reason and bubble it up if present\n            if (returndata.length > 0) {\n                // The easiest way to bubble the revert reason is using memory via assembly\n\n                // solhint-disable-next-line no-inline-assembly\n                assembly {\n                    let returndata_size := mload(returndata)\n                    revert(add(32, returndata), returndata_size)\n                }\n            } else {\n                revert(errorMessage);\n            }\n        }\n    }\n}\n"},{"file_path":"@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity >=0.6.0 <0.8.0;\nimport \"../proxy/Initializable.sol\";\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 GSN 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 ContextUpgradeable is Initializable {\n    function __Context_init() internal initializer {\n        __Context_init_unchained();\n    }\n\n    function __Context_init_unchained() internal initializer {\n    }\n    function _msgSender() internal view virtual returns (address payable) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes memory) {\n        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n        return msg.data;\n    }\n    uint256[50] private __gap;\n}\n"},{"file_path":"contracts/interfaces/f(x)/IFxFractionalToken.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0 || ^0.8.0;\n\ninterface IFxFractionalToken {\n  /*************************\n   * Public View Functions *\n   *************************/\n\n  /// @notice Return the net asset value for the token.\n  function nav() external view returns (uint256);\n\n  /// @notice Compute the new nav with multiple.\n  /// @param multiple The multiplier used to update the nav, multiplied by 1e18.\n  /// @return newNav The new net asset value of the token.\n  function getNav(int256 multiple) external view returns (uint256 newNav);\n\n  /// @notice Compute the new nav with multiple.\n  /// @param multiple The multiplier used to update the nav, multiplied by 1e18.\n  /// @return newNav The new net asset value of the token.\n  function getCandidateNav(int256 multiple) external view returns (uint256);\n\n  /****************************\n   * Public Mutated Functions *\n   ****************************/\n\n  /// @notice Update the net asset value by times `(1 + multiple / 1e18)`.\n  /// @param multiple The multiplier used to update the nav, multiplied by 1e18.\n  /// @return newNav The new net asset value of the token.\n  function updateNav(int256 multiple) external returns (uint256 newNav);\n\n  /// @notice Update the net asset value by direct setting.\n  /// @param newNav The new net asset value, multiplied by 1e18.\n  function setNav(uint256 newNav) external;\n\n  /// @notice Mint some token to someone.\n  /// @param to The address of recipient.\n  /// @param amount The amount of token to mint.\n  function mint(address to, uint256 amount) external;\n\n  /// @notice Burn some token from someone.\n  /// @param from The address of owner to burn.\n  /// @param amount The amount of token to burn.\n  function burn(address from, uint256 amount) external;\n}\n"},{"file_path":"contracts/interfaces/f(x)/IFxTreasury.sol","source_code":"// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.0 || ^0.8.0;\n\ninterface IFxTreasury {\n  /**********\n   * Events *\n   **********/\n\n  /// @notice Emitted when the net asset value is updated.\n  /// @param price The new price of base token.\n  /// @param fNav The new net asset value of fToken.\n  event ProtocolSettle(uint256 price, uint256 fNav);\n\n  /*********\n   * Enums *\n   *********/\n\n  enum MintOption {\n    Both,\n    FToken,\n    XToken\n  }\n\n  /*************************\n   * Public View Functions *\n   *************************/\n\n  /// @notice Return the address of base token.\n  function baseToken() external view returns (address);\n\n  /// @notice Return the address fractional base token.\n  function fToken() external view returns (address);\n\n  /// @notice Return the address leveraged base token.\n  function xToken() external view returns (address);\n\n  /// @notice Return the address of strategy contract.\n  function strategy() external view returns (address);\n\n  /// @notice The last updated permissioned base token price.\n  function lastPermissionedPrice() external view returns (uint256);\n\n  /// @notice Return the total amount of base token deposited.\n  function totalBaseToken() external view returns (uint256);\n\n  /// @notice Return the total amount of base token managed by strategy.\n  function strategyUnderlying() external view returns (uint256);\n\n  /// @notice Return the current collateral ratio of fToken, multipled by 1e18.\n  function collateralRatio() external view returns (uint256);\n\n  /// @notice Convert unwrapped token amount to wrapped token amount.\n  /// @param amount The unwrapped token amount.\n  function convertToWrapped(uint256 amount) external view returns (uint256);\n\n  /// @notice Convert wrapped token amount to unwrapped token amount.\n  /// @param amount The wrapped token amount.\n  function convertToUnwrapped(uint256 amount) external view returns (uint256);\n\n  /// @notice Return current nav for base token, fToken and xToken.\n  /// @return baseNav The nav for base token.\n  /// @return fNav The nav for fToken.\n  /// @return xNav The nav for xToken.\n  function getCurrentNav()\n    external\n    view\n    returns (\n      uint256 baseNav,\n      uint256 fNav,\n      uint256 xNav\n    );\n\n  /// @notice Compute the amount of base token needed to reach the new collateral ratio.\n  /// @param newCollateralRatio The target collateral ratio, multipled by 1e18.\n  /// @return maxBaseIn The amount of base token needed.\n  /// @return maxFTokenMintable The amount of fToken can be minted.\n  function maxMintableFToken(uint256 newCollateralRatio)\n    external\n    view\n    returns (uint256 maxBaseIn, uint256 maxFTokenMintable);\n\n  /// @notice Compute the amount of fToken can be minted without adding base to reach the new collateral ratio.\n  /// @param newCollateralRatio The target collateral ratio, multipled by 1e18.\n  /// @return maxFTokenMintable The amount of fToken can be minted without adding base.\n  function maxMintableFTokenWithoutBaseToken(uint256 newCollateralRatio)\n    external\n    view\n    returns (uint256 maxFTokenMintable);\n\n  /// @notice Compute the amount of base token needed to reach the new collateral ratio.\n  /// @param newCollateralRatio The target collateral ratio, multipled by 1e18.\n  /// @return maxBaseIn The amount of base token needed.\n  /// @return maxXTokenMintable The amount of xToken can be minted.\n  function maxMintableXToken(uint256 newCollateralRatio)\n    external\n    view\n    returns (uint256 maxBaseIn, uint256 maxXTokenMintable);\n\n  /// @notice Compute the amount of base token needed to reach the new collateral ratio, with incentive.\n  /// @param newCollateralRatio The target collateral ratio, multipled by 1e18.\n  /// @param incentiveRatio The extra incentive ratio, multipled by 1e18.\n  /// @return maxBaseIn The amount of base token needed.\n  /// @return maxXTokenMintable The amount of xToken can be minted.\n  function maxMintableXTokenWithIncentive(uint256 newCollateralRatio, uint256 incentiveRatio)\n    external\n    view\n    returns (uint256 maxBaseIn, uint256 maxXTokenMintable);\n\n  /// @notice Compute the amount of fToken needed to reach the new collateral ratio.\n  /// @param newCollateralRatio The target collateral ratio, multipled by 1e18.\n  /// @return maxBaseOut The amount of base token redeemed.\n  /// @return maxFTokenRedeemable The amount of fToken needed.\n  function maxRedeemableFToken(uint256 newCollateralRatio)\n    external\n    view\n    returns (uint256 maxBaseOut, uint256 maxFTokenRedeemable);\n\n  /// @notice Compute the amount of xToken needed to reach the new collateral ratio.\n  /// @param newCollateralRatio The target collateral ratio, multipled by 1e18.\n  /// @return maxBaseOut The amount of base token redeemed.\n  /// @return maxXTokenRedeemable The amount of xToken needed.\n  function maxRedeemableXToken(uint256 newCollateralRatio)\n    external\n    view\n    returns (uint256 maxBaseOut, uint256 maxXTokenRedeemable);\n\n  /// @notice Return the maximum amount of base token that can be donated to reach the new collateral ratio.\n  /// @param newCollateralRatio The target collateral ratio, multipled by 1e18.\n  /// @return maxBaseIn The amount of base token needed.\n  function maxBaseForCollateralRatio(uint256 newCollateralRatio) external view returns (uint256 maxBaseIn);\n\n  /// @notice Compute the maximum amount of fToken can be liquidated.\n  /// @param newCollateralRatio The target collateral ratio, multipled by 1e18.\n  /// @param incentiveRatio The extra incentive ratio, multipled by 1e18.\n  /// @return maxBaseOut The maximum amount of base token can liquidate, without incentive.\n  /// @return maxFTokenLiquidatable The maximum amount of fToken can be liquidated.\n  function maxLiquidatable(uint256 newCollateralRatio, uint256 incentiveRatio)\n    external\n    view\n    returns (uint256 maxBaseOut, uint256 maxFTokenLiquidatable);\n\n  /// @notice Return the exponential moving average of the leverage ratio.\n  function leverageRatio() external view returns (uint256);\n\n  /****************************\n   * Public Mutated Functions *\n   ****************************/\n\n  /// @notice Mint fToken and xToken with some base token.\n  /// @param baseIn The amount of base token deposited.\n  /// @param recipient The address of receiver.\n  /// @param option The mint option, xToken or fToken or both.\n  /// @return fTokenOut The amount of fToken minted.\n  /// @return xTokenOut The amount of xToken minted.\n  function mint(\n    uint256 baseIn,\n    address recipient,\n    MintOption option\n  ) external returns (uint256 fTokenOut, uint256 xTokenOut);\n\n  /// @notice Redeem fToken and xToken to base tokne.\n  /// @param fTokenIn The amount of fToken to redeem.\n  /// @param xTokenIn The amount of xToken to redeem.\n  /// @param owner The owner of the fToken or xToken.\n  /// @param baseOut The amount of base token redeemed.\n  function redeem(\n    uint256 fTokenIn,\n    uint256 xTokenIn,\n    address owner\n  ) external returns (uint256 baseOut);\n\n  /// @notice Add some base token to mint xToken with incentive.\n  /// @param baseIn The amount of base token deposited.\n  /// @param incentiveRatio The incentive ratio.\n  /// @param recipient The address of receiver.\n  /// @return xTokenOut The amount of xToken minted.\n  function addBaseToken(\n    uint256 baseIn,\n    uint256 incentiveRatio,\n    address recipient\n  ) external returns (uint256 xTokenOut);\n\n  /// @notice Donate base token to the treasury.\n  /// @param baseIn The amount of base token to donate.\n  function donateBaseToken(uint256 baseIn) external;\n\n  /// @notice Mint fToken without adding base token by targeting a collateral ratio.\n  /// @param newCollateralRatio The target collateral ratio, multipled by 1e18.\n  /// @param recipient The address of receiver.\n  /// @return fTokenOut The amount of fToken minted.\n  function mintFTokenWithoutBaseToken(uint256 newCollateralRatio, address recipient)\n    external\n    returns (uint256 fTokenOut);\n\n  /// @notice Liquidate fToken to base token with incentive.\n  /// @param fTokenIn The amount of fToken to liquidate.\n  /// @param incentiveRatio The incentive ratio.\n  /// @param owner The owner of the fToken.\n  /// @param baseOut The amount of base token liquidated.\n  function liquidate(\n    uint256 fTokenIn,\n    uint256 incentiveRatio,\n    address owner\n  ) external returns (uint256 baseOut);\n\n  /// @notice Settle the nav of base token, fToken and xToken.\n  function protocolSettle() external;\n\n  /// @notice Transfer some base token to strategy contract.\n  /// @param amount The amount of token to transfer.\n  function transferToStrategy(uint256 amount) external;\n\n  /// @notice Notify base token profit from strategy contract.\n  /// @param amount The amount of base token.\n  function notifyStrategyProfit(uint256 amount) external;\n\n  /// @notice Return the current price of base token.\n  function currentBaseTokenPrice() external view returns (uint256);\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldNav","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newNav","type":"uint256"}],"name":"UpdateNav","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"multiple","type":"int256"}],"name":"getCandidateNav","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"multiple","type":"int256"}],"name":"getNav","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasury","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nav","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newNav","type":"uint256"}],"name":"setNav","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"int256","name":"multiple","type":"int256"}],"name":"updateNav","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":null}