PONZI | Address 0xFBd0446D8C0a59822A6EbBed7C9d4f245e3C1040 | Etherscan (2024)

PONZI | Address 0xFBd0446D8C0a59822A6EbBed7C9d4f245e3C1040 | Etherscan (1)

0xFBd0446D8C0a59822A6EbBed7C9d4f245e3C1040

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Add

ContractCreator

0x29624b9a...7bF4312cf at txn 0x5238bb7d44096e0dd706758482d36af29add58950bdc98d41f14ada45be70f2e

TokenTracker

Charles PONZI (PONZI)

Multichain Info

$0 (Multichain Portfolio)

No addresses found

  • Transactions
  • Internal Transactions
  • Token Transfers (ERC-20)
  • Contract
  • Events
  • Analytics
  • Multichain Portfolio
  • CardsNew

Advanced Filter

  • Filter by Tx Type:
  • Tx
  • Internal Tx
  • ERC-20

Latest 25 from a total of 49 transactions

  • View Completed Txns
  • View Pending Txns
  • View Failed Txns
  • View Outgoing Txns
  • View Incoming Txns
  • View Contract Creation
Transaction Hash

Method

Block

From

To

Value

0xba7e1b9e5685bf64a0e5dafc2d459d4f2bd8a75430350553da5b5ad35129d028

Approve201465574 hrs ago

0xef1c3662...C528F0261

IN

0xFBd0446D...45e3C1040

0 ETH0.00049848

0x00d9b8d0063ddad8ee3e81b8c07b0f913f77ddddf40587c8d67e86fd73cb1f29

Approve201459776 hrs ago

0xf8Ed7AfB...A6bDEa2D5

IN

0xFBd0446D...45e3C1040

0 ETH0.00014789

0xeb2e218df569b40349b3787c7f7b7a7cf6d1f1b8942c7d234fc9eab2dec0107d

Approve201459696 hrs ago

0x922dc3f3...868b3faF1

IN

0xFBd0446D...45e3C1040

0 ETH0.00017036

0x6076108b9a655ea01728e92acf4aafd04a9e82bc86011cd30051e0fee0350caa

Approve201459626 hrs ago

0xb5220ec8...A5C3CD3b2

IN

0xFBd0446D...45e3C1040

0 ETH0.00049695

0x31b4521ceaddc7ee40d87d8837cbcb8571c2c1795aa2f85c8a238af59e1c6017

Approve201451868 hrs ago

0x398109E0...b690D3841

IN

0xFBd0446D...45e3C1040

0 ETH0.00021833

0xe18ccb0c1c2335fec756e7439d3f67b7354e866af0fc32a217380bdd39250d75

Transfer201451818 hrs ago

0x398109E0...b690D3841

IN

0xFBd0446D...45e3C1040

0 ETH0.00015527

0xcb89ef1dfa66cc0f587ffb183fba03eae77745fe3990e25b38e691ab03c488d5

Transfer201451678 hrs ago

0xb783Ef27...3A59e486d

IN

0xFBd0446D...45e3C1040

0 ETH0.00020093

0xe050825a36ed70b489b50ae56559a22842f0a07c67bde86667371656b123321e

Transfer201451598 hrs ago

0x398109E0...b690D3841

IN

0xFBd0446D...45e3C1040

0 ETH0.00075028

0x2335d4f3c1e8fae592aa2a2ad222e21f038a8be0fa6d153be09da8a93b2b771f

Approve2014468710 hrs ago

0x5B491532...16264878D

IN

0xFBd0446D...45e3C1040

0 ETH0.00013826

0x0dcd5e2a475144238b2bfe75d81a68b5799ec3c142b9324c98b3c247b285bd5a

Approve2014468010 hrs ago

0x5B491532...16264878D

IN

0xFBd0446D...45e3C1040

0 ETH0.00013407

0x81eed2ef13a5329c2098c85ce6c35ef43a9a5aef3049fda1ea48c3cccae88884

Approve2014455310 hrs ago

0x5B491532...16264878D

IN

0xFBd0446D...45e3C1040

0 ETH0.00043803

0xe250a914b57ff3cd6ef50c01618c4bd196854161043c354f5c7c6bb3cd1bf78e

Approve2014449411 hrs ago

0x780Fcad9...93CC283C4

IN

0xFBd0446D...45e3C1040

0 ETH0.00019589

0xde46235da6ba922d33ed3c99d218aa76e4eede05761e693f8de7f7b436e6ec0f

Approve2014449311 hrs ago

0x4a015d00...66B1b2568

IN

0xFBd0446D...45e3C1040

0 ETH0.00038786

0xf2df1c5fb453a4713de4c98cd67604713e177efdb94cbb0d31bdea4986368e3c

Approve2014448211 hrs ago

PONZI | Address 0xFBd0446D8C0a59822A6EbBed7C9d4f245e3C1040 | Etherscan (15)bjs.eth

IN

0xFBd0446D...45e3C1040

0 ETH0.00015401

0x76393b80f62b07109919fffca14c3d9376ed68bcd5c0f46ab250e130e4d79681

Approve2014432111 hrs ago

0xB97cE6Ae...ecdBc74D6

IN

0xFBd0446D...45e3C1040

0 ETH0.0001442

0xf08fc7cbeb0cf811e62bcde3c10ec5d6ea0c71b1622e90fe2e70039f36445d35

Approve2014426011 hrs ago

0x6fC02b65...bD32265Aa

IN

0xFBd0446D...45e3C1040

0 ETH0.00010479

0x0e4d33a7b769e868a7806254b0fd7c97d7b287f7520091735c5e8bb4dcc0d8f4

Approve2014426011 hrs ago

0x6fC02b65...bD32265Aa

IN

0xFBd0446D...45e3C1040

0 ETH0.00016706

0x0133402cfa10ec77023b7c2d89ac42c0f113d71a76ad98f985a571f687740e26

Transfer2014425211 hrs ago

0xf70c54cC...7120568B3

IN

0xFBd0446D...45e3C1040

0 ETH0.00013683

0x3d2bfc1aa1b284d7a6906bac5d9d8dc676f9db44c756dc6b902bc0954fbfd984

Approve2014421111 hrs ago

PONZI | Address 0xFBd0446D8C0a59822A6EbBed7C9d4f245e3C1040 | Etherscan (16)statenation.eth

IN

0xFBd0446D...45e3C1040

0 ETH0.00010148

0xd53bd9d663119bdf1f067f9461f829b9a44d4bcebb7a1cde835d45f85e560253

Approve2014419812 hrs ago

0x074f16D3...dbe3Fbd3a

IN

0xFBd0446D...45e3C1040

0 ETH0.00026066

0x999ac87e22f44fa9a9e69ce8c830e6977a951337ca75e102b458698439d7d3be

Approve2014419812 hrs ago

0x8A213c4D...7050d118a

IN

0xFBd0446D...45e3C1040

0 ETH0.00026066

0x49ac23ea156b01dc2787d9e75dd408f47349231969eb6f52580070577b074c39

Approve2014419712 hrs ago

0x36F2e51B...56d7cef62

IN

0xFBd0446D...45e3C1040

0 ETH0.00024684

0x9b85df9da7b2271c86db9549fc7950c5018da69c20954360e264b4ce3fbcfa46

Approve2014419312 hrs ago

0x45fD1b6A...3e99679a1

IN

0xFBd0446D...45e3C1040

0 ETH0.00024558

0x7d769776df870fcb293ddf6fa37fa4283b0c2ee42b9d2fddaa9579c6d36ff89a

Approve2014419112 hrs ago

0x5e49F943...809C14719

IN

0xFBd0446D...45e3C1040

0 ETH0.00023599

0x0ba05bdb80880ea38f2d0ee15f82190cf792bd260ee514cd20cedd7c1a86aa67

Approve2014418912 hrs ago

0x294A4B42...57F50f21E

IN

0xFBd0446D...45e3C1040

0 ETH0.00025332

View all transactions

View more zero value Internal Transactions inAdvanced View mode

Advanced mode:

Loading...

Loading

  • Code
  • Read Contract
  • Write Contract

Contract Source Code Verified (Exact Match)

Compiler Version

v0.8.25+commit.b61c2a91

Optimization Enabled:

Yes with 333 runs

Other Settings:

default evmVersion, MIT license

Contract Source Code (Solidity)

PONZI | Address 0xFBd0446D8C0a59822A6EbBed7C9d4f245e3C1040 | Etherscan (17)PONZI | Address 0xFBd0446D8C0a59822A6EbBed7C9d4f245e3C1040 | Etherscan (18)IDE

  • library Math
  • - function tryAdd(uint256 a, uint256 b)
  • - function trySub(uint256 a, uint256 b)
  • - function tryMul(uint256 a, uint256 b)
  • - function tryDiv(uint256 a, uint256 b)
  • - function tryMod(uint256 a, uint256 b)
  • - function max(uint256 a, uint256 b)
  • - function min(uint256 a, uint256 b)
  • - function average(uint256 a, uint256 b ...
  • - function ceilDiv(uint256 a, uint256 b ...
  • - function mulDiv(uint256 x, uint256 y, ...
  • - function mulDiv(uint256 x, uint256 y, ...
  • - function sqrt(uint256 a)
  • - function sqrt(uint256 a, Rounding rou ...
  • - function log2(uint256 value)
  • - function log2(uint256 value, Rounding ...
  • - function log10(uint256 value)
  • - function log10(uint256 value, Roundin ...
  • - function log256(uint256 value)
  • - function log256(uint256 value, Roundi ...
  • - function unsignedRoundsUp(Rounding ro ...
  • interface IERC20
  • - function totalSupply()
  • - function balanceOf(address account)
  • - function transfer(address to, uint256 ...
  • - function allowance(address owner, add ...
  • - function approve(address spender, uin ...
  • - function transferFrom(address from, a ...
  • interface IERC20Metadata is IERC20
  • - function name()
  • - function symbol()
  • - function decimals()
  • - function _msgSender()
  • - function _msgData()
  • - function _contextSuffixLength()
  • interface IERC20Errors
  • interface IERC721Errors
  • interface IERC1155Errors
  • - function name()
  • - function symbol()
  • - function decimals()
  • - function totalSupply()
  • - function balanceOf(address account)
  • - function transfer(address to, uint256 ...
  • - function allowance(address owner, add ...
  • - function approve(address spender, uin ...
  • - function transferFrom(address from, a ...
  • - function _transfer(address from, addr ...
  • - function _update(address from, addres ...
  • - function _mint(address account, uint2 ...
  • - function _burn(address account, uint2 ...
  • - function _approve(address owner, addr ...
  • - function _approve(address owner, addr ...
  • - function _spendAllowance(address owne ...
  • interface IERC20Permit
  • - function permit(
  • - function nonces(address owner)
  • - function DOMAIN_SEPARATOR()
  • library ECDSA
  • - function tryRecover(bytes32 hash, byt ...
  • - function recover(bytes32 hash, bytes ...
  • - function tryRecover(bytes32 hash, byt ...
  • - function recover(bytes32 hash, bytes3 ...
  • - function tryRecover(
  • - function recover(bytes32 hash, uint8 ...
  • - function _throwError(RecoverError err ...
  • library SignedMath
  • - function max(int256 a, int256 b)
  • - function min(int256 a, int256 b)
  • - function average(int256 a, int256 b)
  • - function abs(int256 n)
  • library Strings
  • - function toString(uint256 value)
  • - function toStringSigned(int256 value)
  • - function toHexString(uint256 value)
  • - function toHexString(uint256 value, u ...
  • - function toHexString(address addr)
  • - function equal(string memory a, strin ...
  • library MessageHashUtils
  • - function toEthSignedMessageHash(bytes ...
  • - function toEthSignedMessageHash(bytes ...
  • - function toDataWithIntendedValidatorH ...
  • - function toTypedDataHash(bytes32 doma ...
  • library StorageSlot
  • - function getAddressSlot(bytes32 slot)
  • - function getBooleanSlot(bytes32 slot)
  • - function getBytes32Slot(bytes32 slot)
  • - function getUint256Slot(bytes32 slot)
  • - function getStringSlot(bytes32 slot)
  • - function getStringSlot(string storage ...
  • - function getBytesSlot(bytes32 slot)
  • - function getBytesSlot(bytes storage s ...
  • library ShortStrings
  • - function toShortString(string memory ...
  • - function toString(ShortString sstr)
  • - function byteLength(ShortString sstr)
  • - function toShortStringWithFallback(st ...
  • - function toStringWithFallback(ShortSt ...
  • - function byteLengthWithFallback(Short ...
  • interface IERC5267
  • - function eip712Domain()
  • - function _domainSeparatorV4()
  • - function _buildDomainSeparator()
  • - function _hashTypedDataV4(bytes32 str ...
  • - function eip712Domain()
  • - function _EIP712Name()
  • - function _EIP712Version()
  • - function nonces(address owner)
  • - function _useNonce(address owner)
  • - function _useCheckedNonce(address own ...
  • - function permit(
  • - function nonces(address owner)
  • - function DOMAIN_SEPARATOR()
  • interface IERC20Rebasable is IERC20, ...
  • - function SHARES_PRECISION_FACTOR()
  • - function totalShares()
  • - function sharesOf(address user)
  • - function transferShares(address to, u ...
  • - function transferSharesFrom(address f ...
  • - function updateTotalSupply()
  • - function tokenToShares(uint256 amount ...
  • - function tokenToShares(uint256 amount ...
  • - function sharesToToken(uint256 shares ...
  • - function sharesToToken(uint256 shares ...
  • - function totalShares()
  • - function sharesOf(address user)
  • - function transferShares(address to, u ...
  • - function transferSharesFrom(address f ...
  • - function updateTotalSupply()
  • - function nonces(address owner)
  • - function balanceOf(address account)
  • - function tokenToShares(uint256 amount ...
  • - function tokenToShares(uint256 amount ...
  • - function sharesToToken(uint256 shares ...
  • - function sharesToToken(uint256 shares ...
  • - function _transferShares(address from ...
  • - function _update(address from, addres ...
  • - function _approve(address owner, addr ...
  • - function _mintShares(address account, ...
  • - function _sharesToTokenUp(uint256 sha ...
  • - function owner()
  • - function _checkOwner()
  • - function renounceOwnership()
  • - function transferOwnership(address ne ...
  • - function _transferOwnership(address n ...
  • library SafeCast
  • - function toUint248(uint256 value)
  • - function toUint240(uint256 value)
  • - function toUint232(uint256 value)
  • - function toUint224(uint256 value)
  • - function toUint216(uint256 value)
  • - function toUint208(uint256 value)
  • - function toUint200(uint256 value)
  • - function toUint192(uint256 value)
  • - function toUint184(uint256 value)
  • - function toUint176(uint256 value)
  • - function toUint168(uint256 value)
  • - function toUint160(uint256 value)
  • - function toUint152(uint256 value)
  • - function toUint144(uint256 value)
  • - function toUint136(uint256 value)
  • - function toUint128(uint256 value)
  • - function toUint120(uint256 value)
  • - function toUint112(uint256 value)
  • - function toUint104(uint256 value)
  • - function toUint96(uint256 value)
  • - function toUint88(uint256 value)
  • - function toUint80(uint256 value)
  • - function toUint72(uint256 value)
  • - function toUint64(uint256 value)
  • - function toUint56(uint256 value)
  • - function toUint48(uint256 value)
  • - function toUint40(uint256 value)
  • - function toUint32(uint256 value)
  • - function toUint24(uint256 value)
  • - function toUint16(uint256 value)
  • - function toUint8(uint256 value)
  • - function toUint256(int256 value)
  • - function toInt248(int256 value)
  • - function toInt240(int256 value)
  • - function toInt232(int256 value)
  • - function toInt224(int256 value)
  • - function toInt216(int256 value)
  • - function toInt208(int256 value)
  • - function toInt200(int256 value)
  • - function toInt192(int256 value)
  • - function toInt184(int256 value)
  • - function toInt176(int256 value)
  • - function toInt168(int256 value)
  • - function toInt160(int256 value)
  • - function toInt152(int256 value)
  • - function toInt144(int256 value)
  • - function toInt136(int256 value)
  • - function toInt128(int256 value)
  • - function toInt120(int256 value)
  • - function toInt112(int256 value)
  • - function toInt104(int256 value)
  • - function toInt96(int256 value)
  • - function toInt88(int256 value)
  • - function toInt80(int256 value)
  • - function toInt72(int256 value)
  • - function toInt64(int256 value)
  • - function toInt56(int256 value)
  • - function toInt48(int256 value)
  • - function toInt40(int256 value)
  • - function toInt32(int256 value)
  • - function toInt24(int256 value)
  • - function toInt16(int256 value)
  • - function toInt8(int256 value)
  • - function toInt256(uint256 value)
  • library Address
  • - function sendValue(address payable re ...
  • - function functionCall(address target, ...
  • - function functionCallWithValue(addres ...
  • - function functionStaticCall(address t ...
  • - function functionDelegateCall(address ...
  • - function verifyCallResultFromTarget(
  • - function verifyCallResult(bool succes ...
  • - function _revert(bytes memory returnd ...
  • library SafeERC20
  • - function safeTransfer(IERC20 token, a ...
  • - function safeTransferFrom(IERC20 toke ...
  • - function safeIncreaseAllowance(IERC20 ...
  • - function safeDecreaseAllowance(IERC20 ...
  • - function forceApprove(IERC20 token, a ...
  • - function _callOptionalReturn(IERC20 t ...
  • - function _callOptionalReturnBool(IERC ...
  • interface IUniswapV2Pair
  • - function name()
  • - function symbol()
  • - function decimals()
  • - function totalSupply()
  • - function balanceOf(address owner)
  • - function allowance(address owner, add ...
  • - function approve(address spender, uin ...
  • - function transfer(address to, uint256 ...
  • - function transferFrom(address from, a ...
  • - function DOMAIN_SEPARATOR()
  • - function PERMIT_TYPEHASH()
  • - function nonces(address owner)
  • - function permit(address owner, addres ...
  • - function MINIMUM_LIQUIDITY()
  • - function factory()
  • - function token0()
  • - function token1()
  • - function getReserves()
  • - function price0CumulativeLast()
  • - function price1CumulativeLast()
  • - function kLast()
  • - function mint(address to)
  • - function burn(address to)
  • - function swap(uint256 amount0Out, uin ...
  • - function skim(address to)
  • - function sync()
  • - function initialize(address, address)
  • interface IPonzioTheCat is IERC20Reba ...
  • - function INITIAL_SUPPLY()
  • - function HALVING_EVERY()
  • - function DEBASE_EVERY()
  • - function NB_DEBASE_PER_HALVING()
  • - function MINIMUM_TOTAL_SUPPLY()
  • - function DEPLOYED_TIME()
  • - function FEES_STAKING()
  • - function FEES_BASE()
  • - function feesCollector()
  • - function maxSharesReached()
  • - function uniswapV2Pair()
  • - function setUniswapV2Pair(address uni ...
  • - function setFeesCollector(address fee ...
  • - function setBlacklistForUpdateSupply( ...
  • - function initialize(address feesColle ...
  • - function realBalanceOf(address accoun ...
  • - function computeSupply()
  • - function computeNewState()
  • interface IWrappedPonzioTheCat is IER ...
  • - function asset()
  • - function previewWrap(uint256 assets, ...
  • - function wrap(uint256 assets)
  • - function wrap(uint256 assets, address ...
  • - function wrapShares(uint256 shares, a ...
  • - function previewUnwrap(uint256 amount ...
  • - function previewUnwrap(uint256 amount ...
  • - function unwrap(uint256 amount)
  • - function unwrap(uint256 amount, addre ...
  • - function previewWrap(uint256 assets)
  • interface IStake
  • - function LP_TOKEN()
  • - function PONZIO()
  • - function WRAPPED_PONZIO()
  • - function userInfo(address user)
  • - function PRECISION_FACTOR()
  • - function reinvest(uint256 amountPonzi ...
  • - function pendingRewards(address userA ...
  • - function deposit(uint256 amount, addr ...
  • - function withdraw(uint256 amount, add ...
  • - function harvest(address recipient)
  • - function sync()
  • - function emergencyWithdraw()
  • - function skim()
  • - function injectRewards(uint256 amount ...
  • contract PONZI is IPonzioTheCat, E ... *
  • - function feesCollector()
  • - function maxSharesReached()
  • - function uniswapV2Pair()
  • - function setUniswapV2Pair(address uni ...
  • - function setFeesCollector(address fee ...
  • - function setBlacklistForUpdateSupply( ...
  • - function initialize(address feeCollec ...
  • - function realBalanceOf(address accoun ...
  • - function updateTotalSupply()
  • - function computeSupply()
  • - function computeNewState()
  • - function balanceOf(address account)
  • - function nonces(address owner)
  • - function totalSupply()
  • - function _mintShares(address account, ...
  • Similar
  • Sol2Uml
  • Submit Audit
  • Compare
/** *Submitted for verification at Etherscan.io on 2024-06-22*/// SPDX-License-Identifier: MIT// Twitter: https://x.com/ponziether// Website: https://charlesponzi.io/// Telegram: https://t.me/ponziether// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)pragma solidity ^0.8.20;/** * @dev Standard math utilities missing in the Solidity language. */library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; }}// File: @openzeppelin/contracts/token/ERC20/IERC20.sol// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)pragma solidity ^0.8.20;/** * @dev Interface of the ERC20 standard as defined in the EIP. */interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool);}// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)pragma solidity ^0.8.20;/** * @dev Interface for the optional metadata functions from the ERC20 standard. */interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8);}// File: @openzeppelin/contracts/utils/Context.sol// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)pragma solidity ^0.8.20;/** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; }}// File: @openzeppelin/contracts/interfaces/draft-IERC6093.sol// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol)pragma solidity ^0.8.20;/** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender);}/** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator);}/** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);}// File: @openzeppelin/contracts/token/ERC20/ERC20.sol// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol)pragma solidity ^0.8.20;/** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. */abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } }}// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.sol// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)pragma solidity ^0.8.20;/** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32);}// File: @openzeppelin/contracts/utils/cryptography/ECDSA.sol// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/ECDSA.sol)pragma solidity ^0.8.20;/** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS } /** * @dev The signature derives the `address(0)`. */ error ECDSAInvalidSignature(); /** * @dev The signature has an invalid length. */ error ECDSAInvalidSignatureLength(uint256 length); /** * @dev The signature has an S value that is in the upper half order. */ error ECDSAInvalidSignatureS(bytes32 s); /** * @dev Returns the address that signed a hashed message (`hash`) with `signature` or an error. This will not * return address(0) without also returning an error description. Errors are documented using an enum (error type) * and a bytes32 providing additional information about the error. * * If no error is returned, then the address can be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError, bytes32) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength, bytes32(signature.length)); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM precompile allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {MessageHashUtils-toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, signature); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] */ function tryRecover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address, RecoverError, bytes32) { unchecked { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); // We do not check for an overflow here since the shift operation results in 0 or 1. uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. */ function recover(bytes32 hash, bytes32 r, bytes32 vs) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, r, vs); _throwError(error, errorArg); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError, bytes32) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS, s); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature, bytes32(0)); } return (signer, RecoverError.NoError, bytes32(0)); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover(bytes32 hash, uint8 v, bytes32 r, bytes32 s) internal pure returns (address) { (address recovered, RecoverError error, bytes32 errorArg) = tryRecover(hash, v, r, s); _throwError(error, errorArg); return recovered; } /** * @dev Optionally reverts with the corresponding custom error according to the `error` argument provided. */ function _throwError(RecoverError error, bytes32 errorArg) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert ECDSAInvalidSignature(); } else if (error == RecoverError.InvalidSignatureLength) { revert ECDSAInvalidSignatureLength(uint256(errorArg)); } else if (error == RecoverError.InvalidSignatureS) { revert ECDSAInvalidSignatureS(errorArg); } }}// File: @openzeppelin/contracts/utils/math/SignedMath.sol// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)pragma solidity ^0.8.20;/** * @dev Standard signed math utilities missing in the Solidity language. */library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } }}// File: @openzeppelin/contracts/utils/Strings.sol// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)pragma solidity ^0.8.20;/** * @dev String operations. */library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = HEX_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal * representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); }}// File: @openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/MessageHashUtils.sol)pragma solidity ^0.8.20;/** * @dev Signature message hash utilities for producing digests to be consumed by {ECDSA} recovery or signing. * * The library provides methods for generating a hash of a message that conforms to the * https://eips.ethereum.org/EIPS/eip-191[EIP 191] and https://eips.ethereum.org/EIPS/eip-712[EIP 712] * specifications. */library MessageHashUtils { /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing a bytes32 `messageHash` with * `"\x19Ethereum Signed Message:\n32"` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * NOTE: The `messageHash` parameter is intended to be the result of hashing a raw message with * keccak256, although any bytes32 value can be safely used because the final digest will * be re-hashed. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes32 messageHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { mstore(0x00, "\x19Ethereum Signed Message:\n32") // 32 is the bytes-length of messageHash mstore(0x1c, messageHash) // 0x1c (28) is the length of the prefix digest := keccak256(0x00, 0x3c) // 0x3c is the length of the prefix (0x1c) + messageHash (0x20) } } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x45` (`personal_sign` messages). * * The digest is calculated by prefixing an arbitrary `message` with * `"\x19Ethereum Signed Message:\n" + len(message)` and hashing the result. It corresponds with the * hash signed when using the https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] JSON-RPC method. * * See {ECDSA-recover}. */ function toEthSignedMessageHash(bytes memory message) internal pure returns (bytes32) { return keccak256(bytes.concat("\x19Ethereum Signed Message:\n", bytes(Strings.toString(message.length)), message)); } /** * @dev Returns the keccak256 digest of an EIP-191 signed data with version * `0x00` (data with intended validator). * * The digest is calculated by prefixing an arbitrary `data` with `"\x19\x00"` and the intended * `validator` address. Then hashing the result. * * See {ECDSA-recover}. */ function toDataWithIntendedValidatorHash(address validator, bytes memory data) internal pure returns (bytes32) { return keccak256(abi.encodePacked(hex"19_00", validator, data)); } /** * @dev Returns the keccak256 digest of an EIP-712 typed data (EIP-191 version `0x01`). * * The digest is calculated from a `domainSeparator` and a `structHash`, by prefixing them with * `\x19\x01` and hashing the result. It corresponds to the hash signed by the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] JSON-RPC method as part of EIP-712. * * See {ECDSA-recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32 digest) { /// @solidity memory-safe-assembly assembly { let ptr := mload(0x40) mstore(ptr, hex"19_01") mstore(add(ptr, 0x02), domainSeparator) mstore(add(ptr, 0x22), structHash) digest := keccak256(ptr, 0x42) } }}// File: @openzeppelin/contracts/utils/StorageSlot.sol// OpenZeppelin Contracts (last updated v5.0.0) (utils/StorageSlot.sol)// This file was procedurally generated from scripts/generate/templates/StorageSlot.js.pragma solidity ^0.8.20;/** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(newImplementation.code.length > 0); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` */library StorageSlot { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } }}// File: @openzeppelin/contracts/utils/ShortStrings.sol// OpenZeppelin Contracts (last updated v5.0.0) (utils/ShortStrings.sol)pragma solidity ^0.8.20;// | string | 0xAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA |// | length | 0x BB |type ShortString is bytes32;/** * @dev This library provides functions to convert short memory strings * into a `ShortString` type that can be used as an immutable variable. * * Strings of arbitrary length can be optimized using this library if * they are short enough (up to 31 bytes) by packing them with their * length (1 byte) in a single EVM word (32 bytes). Additionally, a * fallback mechanism can be used for every other case. * * Usage example: * * ```solidity * contract Named { * using ShortStrings for *; * * ShortString private immutable _name; * string private _nameFallback; * * constructor(string memory contractName) { * _name = contractName.toShortStringWithFallback(_nameFallback); * } * * function name() external view returns (string memory) { * return _name.toStringWithFallback(_nameFallback); * } * } * ``` */library ShortStrings { // Used as an identifier for strings longer than 31 bytes. bytes32 private constant FALLBACK_SENTINEL = 0x00000000000000000000000000000000000000000000000000000000000000FF; error StringTooLong(string str); error InvalidShortString(); /** * @dev Encode a string of at most 31 chars into a `ShortString`. * * This will trigger a `StringTooLong` error is the input string is too long. */ function toShortString(string memory str) internal pure returns (ShortString) { bytes memory bstr = bytes(str); if (bstr.length > 31) { revert StringTooLong(str); } return ShortString.wrap(bytes32(uint256(bytes32(bstr)) | bstr.length)); } /** * @dev Decode a `ShortString` back to a "normal" string. */ function toString(ShortString sstr) internal pure returns (string memory) { uint256 len = byteLength(sstr); // using `new string(len)` would work locally but is not memory safe. string memory str = new string(32); /// @solidity memory-safe-assembly assembly { mstore(str, len) mstore(add(str, 0x20), sstr) } return str; } /** * @dev Return the length of a `ShortString`. */ function byteLength(ShortString sstr) internal pure returns (uint256) { uint256 result = uint256(ShortString.unwrap(sstr)) & 0xFF; if (result > 31) { revert InvalidShortString(); } return result; } /** * @dev Encode a string into a `ShortString`, or write it to storage if it is too long. */ function toShortStringWithFallback(string memory value, string storage store) internal returns (ShortString) { if (bytes(value).length < 32) { return toShortString(value); } else { StorageSlot.getStringSlot(store).value = value; return ShortString.wrap(FALLBACK_SENTINEL); } } /** * @dev Decode a string that was encoded to `ShortString` or written to storage using {setWithFallback}. */ function toStringWithFallback(ShortString value, string storage store) internal pure returns (string memory) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return toString(value); } else { return store; } } /** * @dev Return the length of a string that was encoded to `ShortString` or written to storage using * {setWithFallback}. * * WARNING: This will return the "byte length" of the string. This may not reflect the actual length in terms of * actual characters as the UTF-8 encoding of a single character can span over multiple bytes. */ function byteLengthWithFallback(ShortString value, string storage store) internal view returns (uint256) { if (ShortString.unwrap(value) != FALLBACK_SENTINEL) { return byteLength(value); } else { return bytes(store).length; } }}// File: @openzeppelin/contracts/interfaces/IERC5267.sol// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC5267.sol)pragma solidity ^0.8.20;interface IERC5267 { /** * @dev MAY be emitted to signal that the domain could have changed. */ event EIP712DomainChanged(); /** * @dev returns the fields and values that describe the domain separator used by this contract for EIP-712 * signature. */ function eip712Domain() external view returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions );}// File: @openzeppelin/contracts/utils/cryptography/EIP712.sol// OpenZeppelin Contracts (last updated v5.0.0) (utils/cryptography/EIP712.sol)pragma solidity ^0.8.20;/** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding scheme specified in the EIP requires a domain separator and a hash of the typed structured data, whose * encoding is very generic and therefore its implementation in Solidity is not feasible, thus this contract * does not implement the encoding itself. Protocols need to implement the type-specific encoding they need in order to * produce the hash of their typed data using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * NOTE: In the upgradeable version of this contract, the cached values will correspond to the address, and the domain * separator of the implementation contract. This will cause the {_domainSeparatorV4} function to always rebuild the * separator from the immutable values, which is cheaper than accessing a cached version in cold storage. * * @custom:oz-upgrades-unsafe-allow state-variable-immutable */abstract contract EIP712 is IERC5267 { using ShortStrings for *; bytes32 private constant TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _cachedDomainSeparator; uint256 private immutable _cachedChainId; address private immutable _cachedThis; bytes32 private immutable _hashedName; bytes32 private immutable _hashedVersion; ShortString private immutable _name; ShortString private immutable _version; string private _nameFallback; string private _versionFallback; /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { _name = name.toShortStringWithFallback(_nameFallback); _version = version.toShortStringWithFallback(_versionFallback); _hashedName = keccak256(bytes(name)); _hashedVersion = keccak256(bytes(version)); _cachedChainId = block.chainid; _cachedDomainSeparator = _buildDomainSeparator(); _cachedThis = address(this); } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _cachedThis && block.chainid == _cachedChainId) { return _cachedDomainSeparator; } else { return _buildDomainSeparator(); } } function _buildDomainSeparator() private view returns (bytes32) { return keccak256(abi.encode(TYPE_HASH, _hashedName, _hashedVersion, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return MessageHashUtils.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @dev See {IERC-5267}. */ function eip712Domain() public view virtual returns ( bytes1 fields, string memory name, string memory version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] memory extensions ) { return ( hex"0f", // 01111 _EIP712Name(), _EIP712Version(), block.chainid, address(this), bytes32(0), new uint256[](0) ); } /** * @dev The name parameter for the EIP712 domain. * * NOTE: By default this function reads _name which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Name() internal view returns (string memory) { return _name.toStringWithFallback(_nameFallback); } /** * @dev The version parameter for the EIP712 domain. * * NOTE: By default this function reads _version which is an immutable value. * It only reads from storage if necessary (in case the value is too large to fit in a ShortString). */ // solhint-disable-next-line func-name-mixedcase function _EIP712Version() internal view returns (string memory) { return _version.toStringWithFallback(_versionFallback); }}// File: @openzeppelin/contracts/utils/Nonces.sol// OpenZeppelin Contracts (last updated v5.0.0) (utils/Nonces.sol)pragma solidity ^0.8.20;/** * @dev Provides tracking nonces for addresses. Nonces will only increment. */abstract contract Nonces { /** * @dev The nonce used for an `account` is not the expected current nonce. */ error InvalidAccountNonce(address account, uint256 currentNonce); mapping(address account => uint256) private _nonces; /** * @dev Returns the next unused nonce for an address. */ function nonces(address owner) public view virtual returns (uint256) { return _nonces[owner]; } /** * @dev Consumes a nonce. * * Returns the current value and increments nonce. */ function _useNonce(address owner) internal virtual returns (uint256) { // For each account, the nonce has an initial value of 0, can only be incremented by one, and cannot be // decremented or reset. This guarantees that the nonce never overflows. unchecked { // It is important to do x++ and not ++x here. return _nonces[owner]++; } } /** * @dev Same as {_useNonce} but checking that `nonce` is the next valid for `owner`. */ function _useCheckedNonce(address owner, uint256 nonce) internal virtual { uint256 current = _useNonce(owner); if (nonce != current) { revert InvalidAccountNonce(owner, current); } }}// File: @openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.sol// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Permit.sol)pragma solidity ^0.8.20;/** * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712, Nonces { bytes32 private constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /** * @dev Permit deadline has expired. */ error ERC2612ExpiredSignature(uint256 deadline); /** * @dev Mismatched signature. */ error ERC2612InvalidSigner(address signer, address owner); /** * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`. * * It's a good idea to use the same `name` that is defined as the ERC20 token name. */ constructor(string memory name) EIP712(name, "1") {} /** * @inheritdoc IERC20Permit */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { if (block.timestamp > deadline) { revert ERC2612ExpiredSignature(deadline); } bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline)); bytes32 hash = _hashTypedDataV4(structHash); address signer = ECDSA.recover(hash, v, r, s); if (signer != owner) { revert ERC2612InvalidSigner(signer, owner); } _approve(owner, spender, value); } /** * @inheritdoc IERC20Permit */ function nonces(address owner) public view virtual override(IERC20Permit, Nonces) returns (uint256) { return super.nonces(owner); } /** * @inheritdoc IERC20Permit */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view virtual returns (bytes32) { return _domainSeparatorV4(); }}pragma solidity 0.8.25;interface IERC20Rebasable is IERC20, IERC20Permit { /** * @notice returns the precision factor for shares. * @return The precision factor for shares. */ function SHARES_PRECISION_FACTOR() external view returns (uint256); /** * @notice returns the total shares. * @return The total shares. */ function totalShares() external view returns (uint256); /** * @notice returns the share of the user. * @param user The address of the user to get the share of. * @return The share of the user. */ function sharesOf(address user) external view returns (uint256); /** * @notice Transfer tokens to a specified address by specifying the share amount. * @param to The address to transfer the tokens to. * @param shares The amount of shares to be transferred. * @return True if the transfer was successful, revert otherwise. */ function transferShares(address to, uint256 shares) external returns (bool); /** * @notice Transfer shares from a specified address to another specified address. * @param from The address to transfer the shares from. * @param to The address to transfer the shares to. * @param shares The amount of shares to be transferred. * @return True if the transfer was successful, revert otherwise. * @dev This function tries to update the total supply by calling `updateTotalSupply()` */ function transferSharesFrom(address from, address to, uint256 shares) external returns (bool); /** * @notice update the total supply, compute the debase accordingly and transfer the fees to the feesCollector. * @dev This function is already called at each approval and transfer. It needs to be implemented by a child * contract */ function updateTotalSupply() external; /** * @notice Convert tokens to shares. * @param amount The amount of tokens to convert to shares. * @return shares_ The number of shares corresponding to the tokens. */ function tokenToShares(uint256 amount) external view returns (uint256 shares_); /** * @notice Convert tokens to shares given the new total shares and total supply. * @param amount The amount of tokens to convert to shares. * @param newTotalShares The new total shares. * @param newTotalSupply The new total supply. * @return shares_ The number of shares corresponding to the tokens. */ function tokenToShares(uint256 amount, uint256 newTotalShares, uint256 newTotalSupply) external view returns (uint256 shares_); /** * @notice Convert shares to tokens. * @param shares The amount of shares to convert to tokens. * @return tokenAmount_ The amount of tokens corresponding to the shares. */ function sharesToToken(uint256 shares) external view returns (uint256 tokenAmount_); /** * @notice Convert shares to tokens given the new total shares and total supply. * @param shares The amount of shares to convert to tokens. * @param newTotalShares The new total shares. * @param newTotalSupply The new total supply. * @return tokenAmount_ The amount of tokens corresponding to the shares. */ function sharesToToken(uint256 shares, uint256 newTotalShares, uint256 newTotalSupply) external view returns (uint256 tokenAmount_);}pragma solidity 0.8.25;/** * @title ERC20Rebasable * @dev This abstract contract is an extension of the ERC20 contract that allows for rebasing of the token supply. */abstract contract ERC20Rebasable is ERC20Permit, IERC20Rebasable { using Math for uint256; /** * @notice the total supply is redefined over time. Each user has a share of the total supply. * @dev balanceOf(user) = sharesOf[user] * totalSupply() / totalShare */ mapping(address => uint256) internal _sharesOf; /// @dev total shares of the contract uint256 internal _totalShares; /// @dev blacklist for addresses that should not trigger a total supply update mapping(address => bool) internal _blacklistForUpdateSupply; /// @inheritdoc IERC20Rebasable uint256 public constant SHARES_PRECISION_FACTOR = 1e3; constructor(string memory name, string memory symbol, uint256 initialSupply) ERC20(name, symbol) ERC20Permit(name) { _sharesOf[msg.sender] = initialSupply * SHARES_PRECISION_FACTOR; _totalShares = initialSupply * SHARES_PRECISION_FACTOR; } /* -------------------------------------------------------------------------- */ /* external functions */ /* -------------------------------------------------------------------------- */ /// @inheritdoc IERC20Rebasable function totalShares() external view override returns (uint256) { return _totalShares; } /// @inheritdoc IERC20Rebasable function sharesOf(address user) external view returns (uint256) { return _sharesOf[user]; } /// @inheritdoc IERC20Rebasable function transferShares(address to, uint256 shares) external returns (bool) { return _transferShares(msg.sender, to, shares, sharesToToken(shares)); } /// @inheritdoc IERC20Rebasable function transferSharesFrom(address from, address to, uint256 shares) external returns (bool) { // round up the token amount to decrease the allowance in all cases uint256 tokenAmount = _sharesToTokenUp(shares); if (tokenAmount == 0 && shares > 0) { tokenAmount += 1; } _spendAllowance(from, msg.sender, tokenAmount); return _transferShares(from, to, shares, tokenAmount); } /// @inheritdoc IERC20Rebasable function updateTotalSupply() external virtual; /* -------------------------------------------------------------------------- */ /* public functions */ /* -------------------------------------------------------------------------- */ /// @inheritdoc IERC20Permit function nonces(address owner) public view virtual override(ERC20Permit, IERC20Permit) returns (uint256) { return super.nonces(owner); } /// @inheritdoc IERC20 function balanceOf(address account) public view virtual override(ERC20, IERC20) returns (uint256) { return sharesToToken(_sharesOf[account]); } /// @inheritdoc IERC20Rebasable function tokenToShares(uint256 amount) public view returns (uint256) { return tokenToShares(amount, _totalShares, totalSupply()); } /// @inheritdoc IERC20Rebasable function tokenToShares(uint256 amount, uint256 newTotalShares, uint256 newTotalSupply) public pure returns (uint256) { return amount.mulDiv(newTotalShares, newTotalSupply); } /// @inheritdoc IERC20Rebasable function sharesToToken(uint256 shares) public view returns (uint256 tokenAmount_) { tokenAmount_ = sharesToToken(shares, _totalShares, totalSupply()); } /// @inheritdoc IERC20Rebasable function sharesToToken(uint256 shares, uint256 newTotalShares, uint256 newTotalSupply) public pure returns (uint256 tokenAmount_) { // we round down to be conservative tokenAmount_ = shares.mulDiv(newTotalSupply, newTotalShares); } /* -------------------------------------------------------------------------- */ /* internal functions */ /* -------------------------------------------------------------------------- */ /** * @notice Transfer tokens to a specified address by specifying the amount of shares. * @param from The address to transfer the tokens from. * @param to The address to transfer the tokens to. * @param shareAmount The amount of shares to be transferred. * @param tokenAmount The amount of token corresponding to the amount of shares (not verified, used for events) * @return True if the transfer was successful, revert otherwise. * @dev this function updates the total supply by calling `updateTotalSupply()` */ function _transferShares(address from, address to, uint256 shareAmount, uint256 tokenAmount) internal returns (bool) { if (from == address(0)) { revert ERC20InvalidSender(from); } if (to == address(0)) { revert ERC20InvalidReceiver(to); } if (shareAmount > _sharesOf[from]) { revert ERC20InsufficientBalance(from, sharesToToken(_sharesOf[from]), tokenAmount); } if ( !_blacklistForUpdateSupply[from] && !_blacklistForUpdateSupply[to] && !_blacklistForUpdateSupply[msg.sender] ) { // slither-disable-next-line reentrancy-no-eth try this.updateTotalSupply() { } catch { } } _sharesOf[from] -= shareAmount; _sharesOf[to] += shareAmount; emit Transfer(from, to, tokenAmount); return true; } /** * @inheritdoc ERC20 * @dev mint and burn will revert, use _mintShares for that, or modify the totalSupply */ function _update(address from, address to, uint256 value) internal override { _transferShares(from, to, tokenToShares(value), value); } /// @inheritdoc ERC20 function _approve(address owner, address spender, uint256 value, bool emitEvent) internal override { try this.updateTotalSupply() { } catch { } super._approve(owner, spender, value, emitEvent); } /** * @notice Mint shares to an account. * @param account The account to mint the shares to. * @param shares The number of shares to mint. */ function _mintShares(address account, uint256 shares) internal virtual { _sharesOf[account] += shares; _totalShares += shares; } function _sharesToTokenUp(uint256 shares) internal view returns (uint256 tokenAmount_) { tokenAmount_ = shares.mulDiv(totalSupply(), _totalShares, Math.Rounding.Ceil); }}// File: @openzeppelin/contracts/access/Ownable.sol// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)pragma solidity ^0.8.20;/** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); }}// File: @openzeppelin/contracts/utils/math/SafeCast.sol// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SafeCast.sol)// This file was procedurally generated from scripts/generate/templates/SafeCast.js.pragma solidity ^0.8.20;/** * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow * checks. * * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can * easily result in undesired exploitation or bugs, since developers usually * assume that overflows raise errors. `SafeCast` restores this intuition by * reverting the transaction when such an operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */library SafeCast { /** * @dev Value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedUintDowncast(uint8 bits, uint256 value); /** * @dev An int value doesn't fit in an uint of `bits` size. */ error SafeCastOverflowedIntToUint(int256 value); /** * @dev Value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedIntDowncast(uint8 bits, int256 value); /** * @dev An uint value doesn't fit in an int of `bits` size. */ error SafeCastOverflowedUintToInt(uint256 value); /** * @dev Returns the downcasted uint248 from uint256, reverting on * overflow (when the input is greater than largest uint248). * * Counterpart to Solidity's `uint248` operator. * * Requirements: * * - input must fit into 248 bits */ function toUint248(uint256 value) internal pure returns (uint248) { if (value > type(uint248).max) { revert SafeCastOverflowedUintDowncast(248, value); } return uint248(value); } /** * @dev Returns the downcasted uint240 from uint256, reverting on * overflow (when the input is greater than largest uint240). * * Counterpart to Solidity's `uint240` operator. * * Requirements: * * - input must fit into 240 bits */ function toUint240(uint256 value) internal pure returns (uint240) { if (value > type(uint240).max) { revert SafeCastOverflowedUintDowncast(240, value); } return uint240(value); } /** * @dev Returns the downcasted uint232 from uint256, reverting on * overflow (when the input is greater than largest uint232). * * Counterpart to Solidity's `uint232` operator. * * Requirements: * * - input must fit into 232 bits */ function toUint232(uint256 value) internal pure returns (uint232) { if (value > type(uint232).max) { revert SafeCastOverflowedUintDowncast(232, value); } return uint232(value); } /** * @dev Returns the downcasted uint224 from uint256, reverting on * overflow (when the input is greater than largest uint224). * * Counterpart to Solidity's `uint224` operator. * * Requirements: * * - input must fit into 224 bits */ function toUint224(uint256 value) internal pure returns (uint224) { if (value > type(uint224).max) { revert SafeCastOverflowedUintDowncast(224, value); } return uint224(value); } /** * @dev Returns the downcasted uint216 from uint256, reverting on * overflow (when the input is greater than largest uint216). * * Counterpart to Solidity's `uint216` operator. * * Requirements: * * - input must fit into 216 bits */ function toUint216(uint256 value) internal pure returns (uint216) { if (value > type(uint216).max) { revert SafeCastOverflowedUintDowncast(216, value); } return uint216(value); } /** * @dev Returns the downcasted uint208 from uint256, reverting on * overflow (when the input is greater than largest uint208). * * Counterpart to Solidity's `uint208` operator. * * Requirements: * * - input must fit into 208 bits */ function toUint208(uint256 value) internal pure returns (uint208) { if (value > type(uint208).max) { revert SafeCastOverflowedUintDowncast(208, value); } return uint208(value); } /** * @dev Returns the downcasted uint200 from uint256, reverting on * overflow (when the input is greater than largest uint200). * * Counterpart to Solidity's `uint200` operator. * * Requirements: * * - input must fit into 200 bits */ function toUint200(uint256 value) internal pure returns (uint200) { if (value > type(uint200).max) { revert SafeCastOverflowedUintDowncast(200, value); } return uint200(value); } /** * @dev Returns the downcasted uint192 from uint256, reverting on * overflow (when the input is greater than largest uint192). * * Counterpart to Solidity's `uint192` operator. * * Requirements: * * - input must fit into 192 bits */ function toUint192(uint256 value) internal pure returns (uint192) { if (value > type(uint192).max) { revert SafeCastOverflowedUintDowncast(192, value); } return uint192(value); } /** * @dev Returns the downcasted uint184 from uint256, reverting on * overflow (when the input is greater than largest uint184). * * Counterpart to Solidity's `uint184` operator. * * Requirements: * * - input must fit into 184 bits */ function toUint184(uint256 value) internal pure returns (uint184) { if (value > type(uint184).max) { revert SafeCastOverflowedUintDowncast(184, value); } return uint184(value); } /** * @dev Returns the downcasted uint176 from uint256, reverting on * overflow (when the input is greater than largest uint176). * * Counterpart to Solidity's `uint176` operator. * * Requirements: * * - input must fit into 176 bits */ function toUint176(uint256 value) internal pure returns (uint176) { if (value > type(uint176).max) { revert SafeCastOverflowedUintDowncast(176, value); } return uint176(value); } /** * @dev Returns the downcasted uint168 from uint256, reverting on * overflow (when the input is greater than largest uint168). * * Counterpart to Solidity's `uint168` operator. * * Requirements: * * - input must fit into 168 bits */ function toUint168(uint256 value) internal pure returns (uint168) { if (value > type(uint168).max) { revert SafeCastOverflowedUintDowncast(168, value); } return uint168(value); } /** * @dev Returns the downcasted uint160 from uint256, reverting on * overflow (when the input is greater than largest uint160). * * Counterpart to Solidity's `uint160` operator. * * Requirements: * * - input must fit into 160 bits */ function toUint160(uint256 value) internal pure returns (uint160) { if (value > type(uint160).max) { revert SafeCastOverflowedUintDowncast(160, value); } return uint160(value); } /** * @dev Returns the downcasted uint152 from uint256, reverting on * overflow (when the input is greater than largest uint152). * * Counterpart to Solidity's `uint152` operator. * * Requirements: * * - input must fit into 152 bits */ function toUint152(uint256 value) internal pure returns (uint152) { if (value > type(uint152).max) { revert SafeCastOverflowedUintDowncast(152, value); } return uint152(value); } /** * @dev Returns the downcasted uint144 from uint256, reverting on * overflow (when the input is greater than largest uint144). * * Counterpart to Solidity's `uint144` operator. * * Requirements: * * - input must fit into 144 bits */ function toUint144(uint256 value) internal pure returns (uint144) { if (value > type(uint144).max) { revert SafeCastOverflowedUintDowncast(144, value); } return uint144(value); } /** * @dev Returns the downcasted uint136 from uint256, reverting on * overflow (when the input is greater than largest uint136). * * Counterpart to Solidity's `uint136` operator. * * Requirements: * * - input must fit into 136 bits */ function toUint136(uint256 value) internal pure returns (uint136) { if (value > type(uint136).max) { revert SafeCastOverflowedUintDowncast(136, value); } return uint136(value); } /** * @dev Returns the downcasted uint128 from uint256, reverting on * overflow (when the input is greater than largest uint128). * * Counterpart to Solidity's `uint128` operator. * * Requirements: * * - input must fit into 128 bits */ function toUint128(uint256 value) internal pure returns (uint128) { if (value > type(uint128).max) { revert SafeCastOverflowedUintDowncast(128, value); } return uint128(value); } /** * @dev Returns the downcasted uint120 from uint256, reverting on * overflow (when the input is greater than largest uint120). * * Counterpart to Solidity's `uint120` operator. * * Requirements: * * - input must fit into 120 bits */ function toUint120(uint256 value) internal pure returns (uint120) { if (value > type(uint120).max) { revert SafeCastOverflowedUintDowncast(120, value); } return uint120(value); } /** * @dev Returns the downcasted uint112 from uint256, reverting on * overflow (when the input is greater than largest uint112). * * Counterpart to Solidity's `uint112` operator. * * Requirements: * * - input must fit into 112 bits */ function toUint112(uint256 value) internal pure returns (uint112) { if (value > type(uint112).max) { revert SafeCastOverflowedUintDowncast(112, value); } return uint112(value); } /** * @dev Returns the downcasted uint104 from uint256, reverting on * overflow (when the input is greater than largest uint104). * * Counterpart to Solidity's `uint104` operator. * * Requirements: * * - input must fit into 104 bits */ function toUint104(uint256 value) internal pure returns (uint104) { if (value > type(uint104).max) { revert SafeCastOverflowedUintDowncast(104, value); } return uint104(value); } /** * @dev Returns the downcasted uint96 from uint256, reverting on * overflow (when the input is greater than largest uint96). * * Counterpart to Solidity's `uint96` operator. * * Requirements: * * - input must fit into 96 bits */ function toUint96(uint256 value) internal pure returns (uint96) { if (value > type(uint96).max) { revert SafeCastOverflowedUintDowncast(96, value); } return uint96(value); } /** * @dev Returns the downcasted uint88 from uint256, reverting on * overflow (when the input is greater than largest uint88). * * Counterpart to Solidity's `uint88` operator. * * Requirements: * * - input must fit into 88 bits */ function toUint88(uint256 value) internal pure returns (uint88) { if (value > type(uint88).max) { revert SafeCastOverflowedUintDowncast(88, value); } return uint88(value); } /** * @dev Returns the downcasted uint80 from uint256, reverting on * overflow (when the input is greater than largest uint80). * * Counterpart to Solidity's `uint80` operator. * * Requirements: * * - input must fit into 80 bits */ function toUint80(uint256 value) internal pure returns (uint80) { if (value > type(uint80).max) { revert SafeCastOverflowedUintDowncast(80, value); } return uint80(value); } /** * @dev Returns the downcasted uint72 from uint256, reverting on * overflow (when the input is greater than largest uint72). * * Counterpart to Solidity's `uint72` operator. * * Requirements: * * - input must fit into 72 bits */ function toUint72(uint256 value) internal pure returns (uint72) { if (value > type(uint72).max) { revert SafeCastOverflowedUintDowncast(72, value); } return uint72(value); } /** * @dev Returns the downcasted uint64 from uint256, reverting on * overflow (when the input is greater than largest uint64). * * Counterpart to Solidity's `uint64` operator. * * Requirements: * * - input must fit into 64 bits */ function toUint64(uint256 value) internal pure returns (uint64) { if (value > type(uint64).max) { revert SafeCastOverflowedUintDowncast(64, value); } return uint64(value); } /** * @dev Returns the downcasted uint56 from uint256, reverting on * overflow (when the input is greater than largest uint56). * * Counterpart to Solidity's `uint56` operator. * * Requirements: * * - input must fit into 56 bits */ function toUint56(uint256 value) internal pure returns (uint56) { if (value > type(uint56).max) { revert SafeCastOverflowedUintDowncast(56, value); } return uint56(value); } /** * @dev Returns the downcasted uint48 from uint256, reverting on * overflow (when the input is greater than largest uint48). * * Counterpart to Solidity's `uint48` operator. * * Requirements: * * - input must fit into 48 bits */ function toUint48(uint256 value) internal pure returns (uint48) { if (value > type(uint48).max) { revert SafeCastOverflowedUintDowncast(48, value); } return uint48(value); } /** * @dev Returns the downcasted uint40 from uint256, reverting on * overflow (when the input is greater than largest uint40). * * Counterpart to Solidity's `uint40` operator. * * Requirements: * * - input must fit into 40 bits */ function toUint40(uint256 value) internal pure returns (uint40) { if (value > type(uint40).max) { revert SafeCastOverflowedUintDowncast(40, value); } return uint40(value); } /** * @dev Returns the downcasted uint32 from uint256, reverting on * overflow (when the input is greater than largest uint32). * * Counterpart to Solidity's `uint32` operator. * * Requirements: * * - input must fit into 32 bits */ function toUint32(uint256 value) internal pure returns (uint32) { if (value > type(uint32).max) { revert SafeCastOverflowedUintDowncast(32, value); } return uint32(value); } /** * @dev Returns the downcasted uint24 from uint256, reverting on * overflow (when the input is greater than largest uint24). * * Counterpart to Solidity's `uint24` operator. * * Requirements: * * - input must fit into 24 bits */ function toUint24(uint256 value) internal pure returns (uint24) { if (value > type(uint24).max) { revert SafeCastOverflowedUintDowncast(24, value); } return uint24(value); } /** * @dev Returns the downcasted uint16 from uint256, reverting on * overflow (when the input is greater than largest uint16). * * Counterpart to Solidity's `uint16` operator. * * Requirements: * * - input must fit into 16 bits */ function toUint16(uint256 value) internal pure returns (uint16) { if (value > type(uint16).max) { revert SafeCastOverflowedUintDowncast(16, value); } return uint16(value); } /** * @dev Returns the downcasted uint8 from uint256, reverting on * overflow (when the input is greater than largest uint8). * * Counterpart to Solidity's `uint8` operator. * * Requirements: * * - input must fit into 8 bits */ function toUint8(uint256 value) internal pure returns (uint8) { if (value > type(uint8).max) { revert SafeCastOverflowedUintDowncast(8, value); } return uint8(value); } /** * @dev Converts a signed int256 into an unsigned uint256. * * Requirements: * * - input must be greater than or equal to 0. */ function toUint256(int256 value) internal pure returns (uint256) { if (value < 0) { revert SafeCastOverflowedIntToUint(value); } return uint256(value); } /** * @dev Returns the downcasted int248 from int256, reverting on * overflow (when the input is less than smallest int248 or * greater than largest int248). * * Counterpart to Solidity's `int248` operator. * * Requirements: * * - input must fit into 248 bits */ function toInt248(int256 value) internal pure returns (int248 downcasted) { downcasted = int248(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(248, value); } } /** * @dev Returns the downcasted int240 from int256, reverting on * overflow (when the input is less than smallest int240 or * greater than largest int240). * * Counterpart to Solidity's `int240` operator. * * Requirements: * * - input must fit into 240 bits */ function toInt240(int256 value) internal pure returns (int240 downcasted) { downcasted = int240(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(240, value); } } /** * @dev Returns the downcasted int232 from int256, reverting on * overflow (when the input is less than smallest int232 or * greater than largest int232). * * Counterpart to Solidity's `int232` operator. * * Requirements: * * - input must fit into 232 bits */ function toInt232(int256 value) internal pure returns (int232 downcasted) { downcasted = int232(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(232, value); } } /** * @dev Returns the downcasted int224 from int256, reverting on * overflow (when the input is less than smallest int224 or * greater than largest int224). * * Counterpart to Solidity's `int224` operator. * * Requirements: * * - input must fit into 224 bits */ function toInt224(int256 value) internal pure returns (int224 downcasted) { downcasted = int224(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(224, value); } } /** * @dev Returns the downcasted int216 from int256, reverting on * overflow (when the input is less than smallest int216 or * greater than largest int216). * * Counterpart to Solidity's `int216` operator. * * Requirements: * * - input must fit into 216 bits */ function toInt216(int256 value) internal pure returns (int216 downcasted) { downcasted = int216(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(216, value); } } /** * @dev Returns the downcasted int208 from int256, reverting on * overflow (when the input is less than smallest int208 or * greater than largest int208). * * Counterpart to Solidity's `int208` operator. * * Requirements: * * - input must fit into 208 bits */ function toInt208(int256 value) internal pure returns (int208 downcasted) { downcasted = int208(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(208, value); } } /** * @dev Returns the downcasted int200 from int256, reverting on * overflow (when the input is less than smallest int200 or * greater than largest int200). * * Counterpart to Solidity's `int200` operator. * * Requirements: * * - input must fit into 200 bits */ function toInt200(int256 value) internal pure returns (int200 downcasted) { downcasted = int200(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(200, value); } } /** * @dev Returns the downcasted int192 from int256, reverting on * overflow (when the input is less than smallest int192 or * greater than largest int192). * * Counterpart to Solidity's `int192` operator. * * Requirements: * * - input must fit into 192 bits */ function toInt192(int256 value) internal pure returns (int192 downcasted) { downcasted = int192(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(192, value); } } /** * @dev Returns the downcasted int184 from int256, reverting on * overflow (when the input is less than smallest int184 or * greater than largest int184). * * Counterpart to Solidity's `int184` operator. * * Requirements: * * - input must fit into 184 bits */ function toInt184(int256 value) internal pure returns (int184 downcasted) { downcasted = int184(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(184, value); } } /** * @dev Returns the downcasted int176 from int256, reverting on * overflow (when the input is less than smallest int176 or * greater than largest int176). * * Counterpart to Solidity's `int176` operator. * * Requirements: * * - input must fit into 176 bits */ function toInt176(int256 value) internal pure returns (int176 downcasted) { downcasted = int176(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(176, value); } } /** * @dev Returns the downcasted int168 from int256, reverting on * overflow (when the input is less than smallest int168 or * greater than largest int168). * * Counterpart to Solidity's `int168` operator. * * Requirements: * * - input must fit into 168 bits */ function toInt168(int256 value) internal pure returns (int168 downcasted) { downcasted = int168(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(168, value); } } /** * @dev Returns the downcasted int160 from int256, reverting on * overflow (when the input is less than smallest int160 or * greater than largest int160). * * Counterpart to Solidity's `int160` operator. * * Requirements: * * - input must fit into 160 bits */ function toInt160(int256 value) internal pure returns (int160 downcasted) { downcasted = int160(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(160, value); } } /** * @dev Returns the downcasted int152 from int256, reverting on * overflow (when the input is less than smallest int152 or * greater than largest int152). * * Counterpart to Solidity's `int152` operator. * * Requirements: * * - input must fit into 152 bits */ function toInt152(int256 value) internal pure returns (int152 downcasted) { downcasted = int152(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(152, value); } } /** * @dev Returns the downcasted int144 from int256, reverting on * overflow (when the input is less than smallest int144 or * greater than largest int144). * * Counterpart to Solidity's `int144` operator. * * Requirements: * * - input must fit into 144 bits */ function toInt144(int256 value) internal pure returns (int144 downcasted) { downcasted = int144(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(144, value); } } /** * @dev Returns the downcasted int136 from int256, reverting on * overflow (when the input is less than smallest int136 or * greater than largest int136). * * Counterpart to Solidity's `int136` operator. * * Requirements: * * - input must fit into 136 bits */ function toInt136(int256 value) internal pure returns (int136 downcasted) { downcasted = int136(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(136, value); } } /** * @dev Returns the downcasted int128 from int256, reverting on * overflow (when the input is less than smallest int128 or * greater than largest int128). * * Counterpart to Solidity's `int128` operator. * * Requirements: * * - input must fit into 128 bits */ function toInt128(int256 value) internal pure returns (int128 downcasted) { downcasted = int128(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(128, value); } } /** * @dev Returns the downcasted int120 from int256, reverting on * overflow (when the input is less than smallest int120 or * greater than largest int120). * * Counterpart to Solidity's `int120` operator. * * Requirements: * * - input must fit into 120 bits */ function toInt120(int256 value) internal pure returns (int120 downcasted) { downcasted = int120(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(120, value); } } /** * @dev Returns the downcasted int112 from int256, reverting on * overflow (when the input is less than smallest int112 or * greater than largest int112). * * Counterpart to Solidity's `int112` operator. * * Requirements: * * - input must fit into 112 bits */ function toInt112(int256 value) internal pure returns (int112 downcasted) { downcasted = int112(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(112, value); } } /** * @dev Returns the downcasted int104 from int256, reverting on * overflow (when the input is less than smallest int104 or * greater than largest int104). * * Counterpart to Solidity's `int104` operator. * * Requirements: * * - input must fit into 104 bits */ function toInt104(int256 value) internal pure returns (int104 downcasted) { downcasted = int104(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(104, value); } } /** * @dev Returns the downcasted int96 from int256, reverting on * overflow (when the input is less than smallest int96 or * greater than largest int96). * * Counterpart to Solidity's `int96` operator. * * Requirements: * * - input must fit into 96 bits */ function toInt96(int256 value) internal pure returns (int96 downcasted) { downcasted = int96(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(96, value); } } /** * @dev Returns the downcasted int88 from int256, reverting on * overflow (when the input is less than smallest int88 or * greater than largest int88). * * Counterpart to Solidity's `int88` operator. * * Requirements: * * - input must fit into 88 bits */ function toInt88(int256 value) internal pure returns (int88 downcasted) { downcasted = int88(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(88, value); } } /** * @dev Returns the downcasted int80 from int256, reverting on * overflow (when the input is less than smallest int80 or * greater than largest int80). * * Counterpart to Solidity's `int80` operator. * * Requirements: * * - input must fit into 80 bits */ function toInt80(int256 value) internal pure returns (int80 downcasted) { downcasted = int80(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(80, value); } } /** * @dev Returns the downcasted int72 from int256, reverting on * overflow (when the input is less than smallest int72 or * greater than largest int72). * * Counterpart to Solidity's `int72` operator. * * Requirements: * * - input must fit into 72 bits */ function toInt72(int256 value) internal pure returns (int72 downcasted) { downcasted = int72(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(72, value); } } /** * @dev Returns the downcasted int64 from int256, reverting on * overflow (when the input is less than smallest int64 or * greater than largest int64). * * Counterpart to Solidity's `int64` operator. * * Requirements: * * - input must fit into 64 bits */ function toInt64(int256 value) internal pure returns (int64 downcasted) { downcasted = int64(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(64, value); } } /** * @dev Returns the downcasted int56 from int256, reverting on * overflow (when the input is less than smallest int56 or * greater than largest int56). * * Counterpart to Solidity's `int56` operator. * * Requirements: * * - input must fit into 56 bits */ function toInt56(int256 value) internal pure returns (int56 downcasted) { downcasted = int56(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(56, value); } } /** * @dev Returns the downcasted int48 from int256, reverting on * overflow (when the input is less than smallest int48 or * greater than largest int48). * * Counterpart to Solidity's `int48` operator. * * Requirements: * * - input must fit into 48 bits */ function toInt48(int256 value) internal pure returns (int48 downcasted) { downcasted = int48(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(48, value); } } /** * @dev Returns the downcasted int40 from int256, reverting on * overflow (when the input is less than smallest int40 or * greater than largest int40). * * Counterpart to Solidity's `int40` operator. * * Requirements: * * - input must fit into 40 bits */ function toInt40(int256 value) internal pure returns (int40 downcasted) { downcasted = int40(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(40, value); } } /** * @dev Returns the downcasted int32 from int256, reverting on * overflow (when the input is less than smallest int32 or * greater than largest int32). * * Counterpart to Solidity's `int32` operator. * * Requirements: * * - input must fit into 32 bits */ function toInt32(int256 value) internal pure returns (int32 downcasted) { downcasted = int32(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(32, value); } } /** * @dev Returns the downcasted int24 from int256, reverting on * overflow (when the input is less than smallest int24 or * greater than largest int24). * * Counterpart to Solidity's `int24` operator. * * Requirements: * * - input must fit into 24 bits */ function toInt24(int256 value) internal pure returns (int24 downcasted) { downcasted = int24(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(24, value); } } /** * @dev Returns the downcasted int16 from int256, reverting on * overflow (when the input is less than smallest int16 or * greater than largest int16). * * Counterpart to Solidity's `int16` operator. * * Requirements: * * - input must fit into 16 bits */ function toInt16(int256 value) internal pure returns (int16 downcasted) { downcasted = int16(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(16, value); } } /** * @dev Returns the downcasted int8 from int256, reverting on * overflow (when the input is less than smallest int8 or * greater than largest int8). * * Counterpart to Solidity's `int8` operator. * * Requirements: * * - input must fit into 8 bits */ function toInt8(int256 value) internal pure returns (int8 downcasted) { downcasted = int8(value); if (downcasted != value) { revert SafeCastOverflowedIntDowncast(8, value); } } /** * @dev Converts an unsigned uint256 into a signed int256. * * Requirements: * * - input must be less than or equal to maxInt256. */ function toInt256(uint256 value) internal pure returns (int256) { // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive if (value > uint256(type(int256).max)) { revert SafeCastOverflowedUintToInt(value); } return int256(value); }}// File: @openzeppelin/contracts/utils/Address.sol// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)pragma solidity ^0.8.20;/** * @dev Collection of functions related to the address type */library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } }}// File: @openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)pragma solidity ^0.8.20;/** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; }}pragma solidity >=0.5.0;interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address owner) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 value) external returns (bool); function transfer(address to, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint256); function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint256 amount0, uint256 amount1); event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to); event Swap( address indexed sender, uint256 amount0In, uint256 amount1In, uint256 amount0Out, uint256 amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint256); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint256); function price1CumulativeLast() external view returns (uint256); function kLast() external view returns (uint256); function mint(address to) external returns (uint256 liquidity); function burn(address to) external returns (uint256 amount0, uint256 amount1); function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external;}pragma solidity 0.8.25;interface IPonzioTheCat is IERC20Rebasable { /// @notice Error code is thrown when the contract is being initialized a 2nd time. error PONZIO_alreadyInitialized(); /// @notice Error code thrown in setFeesCollector when the contract has not been initialized yet. error PONZIO_notInitialized(); /// @notice Error code thrown in setFeesCollector when the new feesCollector is the zero address. error PONZIO_feeCollectorZeroAddress(); /** * @notice Emitted when the max shares are reached. * @param timestamp The timestamp at which the maximum is reached. */ event MaxSharesReached(uint256 timestamp); /** * @notice Emitted FeesCollector changes. * @param feesCollector The new feesCollector. * It's ok to set the feesCollector to the zero address, in which case no fees will be collected. */ event FeesCollectorSet(address indexed feesCollector); /** * @notice Emitted when the Uniswap V2 pair address is set. * @param uniV2PoolPair The new uniV2PoolPair. */ event UniV2PoolPairSet(address indexed uniV2PoolPair); /** * @notice Emitted when an account is blacklisted for UpdateTotalSupply. * @param account The account that is blacklisted. * @param value The new value of the blacklist. */ event BlacklistForUpdateSupplySet(address indexed account, bool indexed value); /** * @notice Emitted when the total supply is updated. * @param oldTotalSupply The old total supply. * @param newTotalSupply The new total supply. * @param oldTotalShare The old total share. * @param newTotalShare The new total share. * @param fees The fees collected. */ event TotalSupplyUpdated( uint256 oldTotalSupply, uint256 newTotalSupply, uint256 oldTotalShare, uint256 newTotalShare, uint256 fees ); /** * @notice Initial supply of the token. * @return The initial supply of the token. */ function INITIAL_SUPPLY() external view returns (uint256); /** * @notice Time between each halving. * @return The time between each halving. */ function HALVING_EVERY() external view returns (uint256); /** * @notice Time between each debasing. * @return The time between each debasing. */ function DEBASE_EVERY() external view returns (uint256); /** * @notice Number of debasing per halving. * @return The number of debasing per halving. */ function NB_DEBASE_PER_HALVING() external view returns (uint256); /** * @notice Minimum total supply. When the total supply reaches this value, it can't go lower. * @return The minimum total supply. */ function MINIMUM_TOTAL_SUPPLY() external view returns (uint256); /** * @notice The time at which the contract was deployed. * @return The time at which the contract was deployed. */ function DEPLOYED_TIME() external view returns (uint256); /** * @notice Fees collected on each debasing, in FEES_BASE percent. * @return The fees collected on each debasing. */ function FEES_STAKING() external view returns (uint256); /** * @notice The fee base used for FEES_STAKING * @return The fee base */ function FEES_BASE() external view returns (uint256); /** * @notice The address that collects the fees (the staking contract) * @return The address that collects the fees */ function feesCollector() external view returns (address); /** * @notice returns if the max shares are reached. * @return True if the max shares are reached, false otherwise. * @dev The max shares are reached when the total of shares is about to overflow. * When reached, fees are not collected anymore. */ function maxSharesReached() external view returns (bool); /** * @notice The Uniswap V2 pair to sync when debasing. * @return The Uniswap V2 pair. */ function uniswapV2Pair() external view returns (IUniswapV2Pair); /** * @notice Changes the Uniswap V2 pair address. * @param uniV2PoolAddr_ The new Uniswap V2 pair address. * @dev Set the Uniswap V2 pair address to zero address to disable syncing. */ function setUniswapV2Pair(address uniV2PoolAddr_) external; /** * @notice Changes the fees collector. * @param feesCollector_ The new fees collector. */ function setFeesCollector(address feesCollector_) external; /** * @notice Blacklist an address for UpdateTotalSupply. * @param addrToBlacklist The address to blacklist. * @param value The new value of the blacklist. */ function setBlacklistForUpdateSupply(address addrToBlacklist, bool value) external; /** * @notice Initialize the contract by setting the fees collector and staking the first amount of tokens. * @param feesCollector_ The address that will collect the fees. * @param uniV2PoolAddr_ The address of the uniswap V2 pool. */ function initialize(address feesCollector_, address uniV2PoolAddr_) external; /** * @notice Return the real-time balance of an account after an UpdateTotalSupply() call. * @param account_ The account to check the balance of. * @return balance_ The real-time balance of the account. * @dev This function will only return the right balance if the feesCollector is set. */ function realBalanceOf(address account_) external view returns (uint256 balance_); /** * @notice Compute the total supply and the fees to collect. * @return totalSupply_ The new total supply. * @return fees_ The fees to collect. */ function computeSupply() external view returns (uint256 totalSupply_, uint256 fees_); /** * @notice Compute the total shares, supply and the fees to collect. * @return totalShares_ The new total shares. * @return totalSupply_ The new total supply. * @return fees_ The fees to collect. */ function computeNewState() external view returns (uint256 totalShares_, uint256 totalSupply_, uint256 fees_);}pragma solidity 0.8.25;interface IWrappedPonzioTheCat is IERC20 { /// @notice Returns the underlying asset of the wrapped token. function asset() external view returns (IPonzioTheCat); /** * @notice Returns the amount of wrapped tokens that will be minted when wrapping the underlying assets given the * new total shares and total supply. * @param assets The amount of underlying assets to be wrapped. * @param newTotalShares The new total shares of the wrapped token. * @param newTotalSupply The new total supply of the wrapped token. * @return amount_ The amount of wrapped tokens that will be minted. */ function previewWrap(uint256 assets, uint256 newTotalShares, uint256 newTotalSupply) external view returns (uint256 amount_); /** * @notice Wraps the underlying assets into the wrapped token. * @param assets The amount of underlying assets to be wrapped. * @return amount_ The amount of wrapped tokens minted. */ function wrap(uint256 assets) external returns (uint256 amount_); /** * @notice Wraps the underlying assets into the wrapped token and mints them to the receiver. * @param assets The amount of underlying assets to be wrapped. * @param receiver The address to which the wrapped tokens are minted. * @return amount_ The amount of wrapped tokens minted. */ function wrap(uint256 assets, address receiver) external returns (uint256 amount_); /** * @notice Wraps the underlying shares into the wrapped token and mints them to the receiver. * @param shares The amount of underlying shares to be wrapped. * @param receiver The address to which the wrapped tokens are minted. * @return amount_ The amount of wrapped tokens minted. */ function wrapShares(uint256 shares, address receiver) external returns (uint256 amount_); /** * @notice Returns the amount of underlying assets that will be received when unwrapping the wrapped tokens. * @param amount The amount of wrapped tokens to be unwrapped. * @return assets_ The amount of underlying assets that will be received. */ function previewUnwrap(uint256 amount) external view returns (uint256 assets_); /** * @notice Returns the amount of underlying assets that will be received when unwrapping the wrapped tokens given * the new total shares and total supply. * @param amount The amount of wrapped tokens to be unwrapped. * @param newTotalShares The new total shares of the wrapped token. * @param newTotalSupply The new total supply of the wrapped token. * @return assets_ The amount of underlying assets that will be received. */ function previewUnwrap(uint256 amount, uint256 newTotalShares, uint256 newTotalSupply) external view returns (uint256 assets_); /** * @notice Unwraps the wrapped tokens into the underlying assets. * @param amount The amount of wrapped tokens to be unwrapped. * @return assets_ The amount of underlying assets received. */ function unwrap(uint256 amount) external returns (uint256 assets_); /** * @notice Unwraps the wrapped tokens into the underlying assets and sends them to the receiver. * @param amount The amount of wrapped tokens to be unwrapped. * @param receiver The address to which the underlying assets are sent. * @return assets_ The amount of underlying assets received. */ function unwrap(uint256 amount, address receiver) external returns (uint256 assets_); /** * @notice Returns the amount of wrapped tokens that will be minted when wrapping the underlying assets. * @param assets The amount of underlying assets to be wrapped. * @return amount_ The amount of wrapped tokens that will be minted. */ function previewWrap(uint256 assets) external view returns (uint256 amount_);}pragma solidity 0.8.25;interface IStake { /** * @notice Information about each staker's balance and reward debt. * @param amount staked amount * @param rewardDebt reward debt of the user used to calculate the pending rewards */ struct UserInfo { uint256 amount; uint256 rewardDebt; } /** * @notice Emitted when a user deposits LP tokens to the contract. * @param recipient address of the recipient * @param depositBy address of the msg.sender * @param amount amount of deposited tokens */ event Deposit(address indexed recipient, address depositBy, uint256 amount); /** * @notice Emitted when a user withdraws LP tokens from the contract. * @param user address of the user * @param recipient address of the recipient * @param amount amount of withdrawn tokens */ event Withdraw(address indexed user, address recipient, uint256 amount); /** * @notice Emitted when a user claims rewards from the contract. * @param user address of the user * @param recipient address of the recipient * @param reward amount of claimed tokens */ event ClaimReward(address indexed user, address recipient, uint256 reward); /** * @notice Emitted when a user forces the withdrawal of LP tokens from the contract. * @param user address of the user * @param amount amount of withdrawn LP tokens */ event EmergencyWithdraw(address indexed user, uint256 amount); /** * @notice Emitted when the contract is skimmed. * @param user address of the user * @param amount amount of skimmed lp tokens */ event Skim(address indexed user, uint256 amount); /// @notice Reverted when the user tries to deposit an amount of 0 tokens. error Stake_depositZeroAmount(); /// @notice Reverted when the user tries to withdraw an amount of 0 tokens. error Stake_withdrawZeroAmount(); /// @notice Revert when the refund fails. error Stake_refundFailed(); /// @notice Revert when the refund fails. error Stake_noPendingRewards(); /// @notice Revert when no value was added to the transaction but it was needed error Stake_valueNeeded(); /** * @notice Revert when the user tries to withdraw an amount higher than the staked amount. * @param withdrawAmount amount the user tries to withdraw * @param stakedAmount amount the user has staked */ error Stake_withdrawTooHigh(uint256 withdrawAmount, uint256 stakedAmount); /** * @notice Returns the address of the staking token. * @return IERC20 address of the staking token */ function LP_TOKEN() external view returns (IERC20); /** * @notice Returns the address of the Ponzio. * @return IPonzioTheCat address of the Ponzio */ function PONZIO() external view returns (IPonzioTheCat); /** * @notice Returns the address of the Ponzio token vault. * @return IWrappedPonzioTheCat address of the Ponzio token vault */ function WRAPPED_PONZIO() external view returns (IWrappedPonzioTheCat); /** * @notice Returns the staked amount and the reward debt of a user. * @param user address of the user * @return struct containing the user's staked amount and reward debt */ function userInfo(address user) external view returns (UserInfo memory); /** * @notice Returns the precision factor used to compute the reward per share. * @return The precision factor. */ function PRECISION_FACTOR() external view returns (uint256); /** * @notice Reinvests the user's rewards by adding liquidity to the Uniswap pair and staking the LP tokens. * @param amountPonzioMin The minimum amount of Ponzio tokens the user wants to add as liquidity. * @param amountEthMin The minimum amount of ETH the user wants to add as liquidity. * * This function first harvests the user's rewards. * * It then adds liquidity to the Uniswap pair with the harvested rewards and the ETH sent by the user. The LP * tokens received from adding liquidity are then staked. * * If there are any ETH or Ponzio tokens left in the contract, they are sent back to the user. * * Requirement: * - The `msg.value` (amount of ETH sent) must not be zero. */ function reinvest(uint256 amountPonzioMin, uint256 amountEthMin) external payable; /** * @notice Returns the reward amount that a user has pending to claim. * @param userAddr address of the user * @return rewards_ amount of pending rewards */ function pendingRewards(address userAddr) external view returns (uint256 rewards_); /** * @notice Deposits staking tokens to the contract. * @param amount amount of staking tokens to deposit * @param recipient address of the recipient */ function deposit(uint256 amount, address recipient) external; /** * @notice Withdraws staking tokens from the contract. * @param amount amount of staking tokens to withdraw * @param recipient address of the recipient */ function withdraw(uint256 amount, address recipient) external; /** * @notice Updates the pool and sends the pending reward amount of msg.sender. * @param recipient address of the recipient */ function harvest(address recipient) external; /** * @notice Convert all rewards to vault tokens * @dev Only call the vault if the balance is not zero */ function sync() external; /** * @notice Function to force the withdrawal of LP tokens from the contract. * @dev This function is used to withdraw the LP tokens in case of emergency. * It will send the LP tokens to the user without claiming the rewards. */ function emergencyWithdraw() external; /** * @notice Function to skim any excess lp tokens sent to the contract. * @dev Receiver is msg.sender */ function skim() external; function injectRewards(uint256 amount) external;}pragma solidity 0.8.25;contract PONZI is IPonzioTheCat, ERC20Rebasable, Ownable { using Math for uint256; using SafeCast for uint256; using SafeERC20 for IERC20; /// @notice The name of the token string internal constant NAME = "Charles PONZI"; /// @notice The symbol of the token string internal constant SYMBOL = "PONZI"; /// @notice The number of decimals of the token uint8 internal constant DECIMALS = 18; /// @inheritdoc IPonzioTheCat uint256 public constant INITIAL_SUPPLY = 21_000_000 * 10 ** DECIMALS; // in wei /// @inheritdoc IPonzioTheCat uint256 public constant HALVING_EVERY = 4 days + 144 seconds; // needs a factor of 168 between DEBASE_EVERY and // HALVING_EVERY /// @inheritdoc IPonzioTheCat uint256 public constant DEBASE_EVERY = 34 minutes + 18 seconds; /// @inheritdoc IPonzioTheCat uint256 public constant NB_DEBASE_PER_HALVING = HALVING_EVERY / DEBASE_EVERY; /// @inheritdoc IPonzioTheCat uint256 public constant MINIMUM_TOTAL_SUPPLY = 10 ** 12; // in wei /// @inheritdoc IPonzioTheCat uint256 public immutable DEPLOYED_TIME; /// @inheritdoc IPonzioTheCat uint256 public constant FEES_STAKING = 1337; // in BPS = 13.37% /// @inheritdoc IPonzioTheCat uint256 public constant FEES_BASE = 10_000; // in BPS /// @notice the address of the fees collector address internal _feesCollector; /// @notice boolean used to check if fees are collected bool internal _maxSharesReached = false; /// @notice the Uniswap V2 pair address IUniswapV2Pair internal _uniswapV2Pair; /// @notice true if the contract has been initialized bool private _initialized = false; /// @notice the total supply at the last update uint216 private _previousTotalSupply; /// @notice the timestamp of the last update uint40 private _previousUpdateTimestamp; constructor() ERC20Rebasable(NAME, SYMBOL, INITIAL_SUPPLY) Ownable(msg.sender) { DEPLOYED_TIME = block.timestamp; _previousTotalSupply = uint216(INITIAL_SUPPLY); _previousUpdateTimestamp = uint40(block.timestamp); } /* -------------------------------------------------------------------------- */ /* external functions */ /* -------------------------------------------------------------------------- */ /// @inheritdoc IPonzioTheCat function feesCollector() external view returns (address) { return _feesCollector; } /// @inheritdoc IPonzioTheCat function maxSharesReached() external view returns (bool) { return _maxSharesReached; } /// @inheritdoc IPonzioTheCat function uniswapV2Pair() external view returns (IUniswapV2Pair) { return _uniswapV2Pair; } /// @inheritdoc IPonzioTheCat function setUniswapV2Pair(address uniV2PoolAddr) external onlyOwner { _uniswapV2Pair = IUniswapV2Pair(uniV2PoolAddr); emit UniV2PoolPairSet(uniV2PoolAddr); } /// @inheritdoc IPonzioTheCat function setFeesCollector(address feeCollector) external onlyOwner { if (!_initialized) { revert PONZIO_notInitialized(); } else if (feeCollector == address(0)) { revert PONZIO_feeCollectorZeroAddress(); } updateTotalSupply(); _feesCollector = feeCollector; emit FeesCollectorSet(feeCollector); } /// @inheritdoc IPonzioTheCat function setBlacklistForUpdateSupply(address addrToBlacklist, bool value) external onlyOwner { _blacklistForUpdateSupply[addrToBlacklist] = value; emit BlacklistForUpdateSupplySet(addrToBlacklist, value); } /// @inheritdoc IPonzioTheCat function initialize(address feeCollector, address uniV2PoolAddr) external onlyOwner { if (_initialized) { revert PONZIO_alreadyInitialized(); } if (feeCollector == address(0)) { revert PONZIO_feeCollectorZeroAddress(); } _initialized = true; _uniswapV2Pair = IUniswapV2Pair(uniV2PoolAddr); emit UniV2PoolPairSet(uniV2PoolAddr); _blacklistForUpdateSupply[uniV2PoolAddr] = true; emit BlacklistForUpdateSupplySet(uniV2PoolAddr, true); _feesCollector = feeCollector; emit FeesCollectorSet(feeCollector); } /// @inheritdoc IPonzioTheCat function realBalanceOf(address account) external view returns (uint256 balance_) { (uint256 newTotalShares, uint256 newTotalSupply,) = computeNewState(); balance_ = sharesToToken(_sharesOf[account], newTotalShares, newTotalSupply); } /* -------------------------------------------------------------------------- */ /* public functions */ /* -------------------------------------------------------------------------- */ /// @inheritdoc ERC20Rebasable function updateTotalSupply() public override(ERC20Rebasable, IERC20Rebasable) { if (_previousUpdateTimestamp == uint40(block.timestamp)) { return; } (uint256 newTotalSupply, uint256 fees) = computeSupply(); address feeCollector = _feesCollector; // fees are proportional to (_previousTotalSupply - newTotalSupply), // so if fees == 0 then we can be sure that _previousTotalSupply == newTotalSupply // we then only need to update the total supply if fees != 0 if (fees != 0 && feeCollector != address(0)) { // If max shares are reached, the new total supply is the // minimum total supply so this assignment is still valid. uint256 oldTotalSupply = _previousTotalSupply; _previousTotalSupply = newTotalSupply.toUint216(); _previousUpdateTimestamp = uint40(block.timestamp); // We need to mint tokenAmount of tokens, but by minting this amount, we will influence the totalShares. // For this reason, sharesToToken() cannot be used. In the end, the following 2 equations have to be // resolved: // // new_totalShares = old_totalShares + shareToMint // tokenAmount = totalSupply * shareToMint / new_totalShares // // tokenAmount, totalSupply and old_totalShares are known. // The only unknown is shareToMint // // After resolution we have: shareToMint = totalShares * tokenAmount / (totalSupply - tokenAmount) uint256 oldTotalShares = _totalShares; if (fees >= newTotalSupply) { _mintShares(feeCollector, oldTotalShares); } else { _mintShares(feeCollector, oldTotalShares.mulDiv(fees, newTotalSupply - fees)); } emit TotalSupplyUpdated(oldTotalSupply, newTotalSupply, oldTotalShares, _totalShares, fees); /// @dev This check prevents revert in case the feesCollector is an EOA if (address(feeCollector).code.length != 0) { /// @dev This try/catch prevents revert in case of feesCollector does not implement sync() try IStake(feeCollector).injectRewards(0) { } catch { } } _uniswapV2Pair.sync(); } } /// @inheritdoc IPonzioTheCat function computeSupply() public view returns (uint256 totalSupply_, uint256 fees_) { uint256 previousTotalSupply = _previousTotalSupply; // early return if max shares are reached if (_maxSharesReached) { return (previousTotalSupply, 0); } uint256 previousUpdateTimestamp = _previousUpdateTimestamp; if (previousTotalSupply != MINIMUM_TOTAL_SUPPLY) { uint256 _timeSinceDeploy = block.timestamp - DEPLOYED_TIME; uint256 _tsLastHalving = INITIAL_SUPPLY / (2 ** (_timeSinceDeploy / HALVING_EVERY)); // slither-disable-next-line weak-prng totalSupply_ = _tsLastHalving - (_tsLastHalving * ((_timeSinceDeploy % HALVING_EVERY) / DEBASE_EVERY)) / NB_DEBASE_PER_HALVING / 2; if (totalSupply_ < MINIMUM_TOTAL_SUPPLY) { totalSupply_ = MINIMUM_TOTAL_SUPPLY; } fees_ = ((previousTotalSupply - totalSupply_) * FEES_STAKING) / FEES_BASE; } else { totalSupply_ = MINIMUM_TOTAL_SUPPLY; if (block.timestamp - previousUpdateTimestamp < HALVING_EVERY) { fees_ = (MINIMUM_TOTAL_SUPPLY * FEES_STAKING * (block.timestamp - previousUpdateTimestamp)) / HALVING_EVERY / FEES_BASE; } else { fees_ = (MINIMUM_TOTAL_SUPPLY * FEES_STAKING) / FEES_BASE; } } } /// @inheritdoc IPonzioTheCat function computeNewState() public view returns (uint256 totalShares_, uint256 totalSupply_, uint256 fees_) { uint256 totalShares = _totalShares; (totalSupply_, fees_) = computeSupply(); uint256 newShares; if (fees_ >= totalSupply_) { // if fees are greater than the total supply, we mint totalShares of shares, so we double the supply of the // shares, the fees will be equal to half of the total supply newShares = totalShares; fees_ = totalSupply_ / 2; } else { newShares = totalShares.mulDiv(fees_, totalSupply_ - fees_); } bool success; (success, totalShares_) = totalShares.tryAdd(newShares); if (!success) { totalShares_ = type(uint256).max; fees_ = sharesToToken((type(uint256).max - totalShares), totalShares_, totalSupply_); } } /// @inheritdoc IERC20 function balanceOf(address account) public view override(ERC20Rebasable, IERC20) returns (uint256) { return _sharesOf[account].mulDiv(_previousTotalSupply, _totalShares); } /// @inheritdoc IERC20Permit function nonces(address owner) public view override(ERC20Rebasable, IERC20Permit) returns (uint256) { return super.nonces(owner); } /// @inheritdoc IERC20 function totalSupply() public view override(ERC20, IERC20) returns (uint256) { return _previousTotalSupply; } /* -------------------------------------------------------------------------- */ /* internal functions */ /* -------------------------------------------------------------------------- */ /** * @notice Mint shares to an account. * @param account The account to mint the shares to. * @param shares The number of shares to mint. */ function _mintShares(address account, uint256 shares) internal override { uint256 totalShares = _totalShares; (bool success,) = totalShares.tryAdd(shares); if (!success) { super._mintShares(account, type(uint256).max - totalShares); _maxSharesReached = true; emit MaxSharesReached(block.timestamp); } else { super._mintShares(account, shares); } }}

Contract Security Audit

  • No Contract Security Audit Submitted- Submit Audit Here

Contract ABI

  • JSON Format
  • RAW/Text Format
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidShortString","type":"error"},{"inputs":[],"name":"MathOverflowedMulDiv","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"PONZIO_alreadyInitialized","type":"error"},{"inputs":[],"name":"PONZIO_feeCollectorZeroAddress","type":"error"},{"inputs":[],"name":"PONZIO_notInitialized","type":"error"},{"inputs":[{"internalType":"uint8","name":"bits","type":"uint8"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"SafeCastOverflowedUintDowncast","type":"error"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"StringTooLong","type":"error"},{"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":"account","type":"address"},{"indexed":true,"internalType":"bool","name":"value","type":"bool"}],"name":"BlacklistForUpdateSupplySet","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feesCollector","type":"address"}],"name":"FeesCollectorSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"MaxSharesReached","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldTotalSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalSupply","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oldTotalShare","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newTotalShare","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fees","type":"uint256"}],"name":"TotalSupplyUpdated","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":true,"internalType":"address","name":"uniV2PoolPair","type":"address"}],"name":"UniV2PoolPairSet","type":"event"},{"inputs":[],"name":"DEBASE_EVERY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEPLOYED_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEES_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"FEES_STAKING","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HALVING_EVERY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_TOTAL_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"NB_DEBASE_PER_HALVING","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SHARES_PRECISION_FACTOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":"value","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":[],"name":"computeNewState","outputs":[{"internalType":"uint256","name":"totalShares_","type":"uint256"},{"internalType":"uint256","name":"totalSupply_","type":"uint256"},{"internalType":"uint256","name":"fees_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"computeSupply","outputs":[{"internalType":"uint256","name":"totalSupply_","type":"uint256"},{"internalType":"uint256","name":"fees_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feesCollector","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"feeCollector","type":"address"},{"internalType":"address","name":"uniV2PoolAddr","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxSharesReached","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"realBalanceOf","outputs":[{"internalType":"uint256","name":"balance_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addrToBlacklist","type":"address"},{"internalType":"bool","name":"value","type":"bool"}],"name":"setBlacklistForUpdateSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"feeCollector","type":"address"}],"name":"setFeesCollector","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"uniV2PoolAddr","type":"address"}],"name":"setUniswapV2Pair","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"sharesOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"newTotalShares","type":"uint256"},{"internalType":"uint256","name":"newTotalSupply","type":"uint256"}],"name":"sharesToToken","outputs":[{"internalType":"uint256","name":"tokenAmount_","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"sharesToToken","outputs":[{"internalType":"uint256","name":"tokenAmount_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"tokenToShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"newTotalShares","type":"uint256"},{"internalType":"uint256","name":"newTotalSupply","type":"uint256"}],"name":"tokenToShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"transferShares","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"transferSharesFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"contract IUniswapV2Pair","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"updateTotalSupply","outputs":[],"stateMutability":"nonpayable","type":"function"}]

Contract Creation Code

Decompile Bytecode Switch to Opcodes View

610180604052600c805460ff60a01b19908116909155600d80549091169055348015610029575f80fd5b50336040518060400160405280600d81526020016c436861726c657320504f4e5a4960981b81525060405180604001604052806005815260200164504f4e5a4960d81b8152506012600a61007d91906103cf565b61008b906301406f406103e4565b6040805180820190915260018152603160f81b602082015283908190818560036100b58382610493565b5060046100c28282610493565b506100d29150839050600561021b565b610120526100e181600661021b565b61014052815160208084019190912060e052815190820120610100524660a05261016d60e05161010051604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201529081019290925260608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b60805250503060c052506101836103e8826103e4565b335f9081526008602052604090205561019e6103e8826103e4565b6009555050506001600160a01b0381166101d257604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6101db8161024d565b5042610160526101ed6012600a6103cf565b6101fb906301406f406103e4565b6001600160d81b0316600160d81b4264ffffffffff160217600e556105aa565b5f6020835110156102365761022f8361029e565b9050610247565b816102418482610493565b5060ff90505b92915050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f80829050601f815111156102c8578260405163305a27a960e01b81526004016101c99190610552565b80516102d382610587565b179392505050565b634e487b7160e01b5f52601160045260245ffd5b600181815b8085111561032957815f190482111561030f5761030f6102db565b8085161561031c57918102915b93841c93908002906102f4565b509250929050565b5f8261033f57506001610247565b8161034b57505f610247565b8160018114610361576002811461036b57610387565b6001915050610247565b60ff84111561037c5761037c6102db565b50506001821b610247565b5060208310610133831016604e8410600b84101617156103aa575081810a610247565b6103b483836102ef565b805f19048211156103c7576103c76102db565b029392505050565b5f6103dd60ff841683610331565b9392505050565b8082028115828204841417610247576102476102db565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168061042357607f821691505b60208210810361044157634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111561048e57805f5260205f20601f840160051c8101602085101561046c5750805b601f840160051c820191505b8181101561048b575f8155600101610478565b50505b505050565b81516001600160401b038111156104ac576104ac6103fb565b6104c0816104ba845461040f565b84610447565b602080601f8311600181146104f3575f84156104dc5750858301515b5f19600386901b1c1916600185901b17855561054a565b5f85815260208120601f198616915b8281101561052157888601518255948401946001909101908401610502565b508582101561053e57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b80516020808301519190811015610441575f1960209190910360031b1b16919050565b60805160a05160c05160e0516101005161012051610140516101605161218e61060c5f395f81816103d50152610a2501525f6116d701525f6116aa01525f6112b401525f61128c01525f6111e701525f61121101525f61123b015261218e5ff3fe608060405234801561000f575f80fd5b50600436106102a7575f3560e01c80637a60e06911610169578063baa83f69116100ce578063db6905ab11610093578063f2fde38b1161006e578063f2fde38b146105c4578063f5eb42dc146105d7578063fda9c947146105ff575f80fd5b8063db6905ab14610571578063dd62ed3e14610583578063ece531b0146105bb575f80fd5b8063baa83f691461050d578063c53dc75714610530578063d0dc5c6514610543578063d4245ebb1461054b578063d505accf1461055e575f80fd5b806395d89b411161012e578063a29a608911610109578063a29a6089146104df578063a9059cbb146104f2578063b23b36ad14610505575f80fd5b806395d89b41146104b357806399a03c70146104bb5780639cf160f6146104ce575f80fd5b80637a60e069146104445780637ecebe001461046157806384b0196e146104745780638da5cb5b1461048f5780638fcb4e5b146104a0575f80fd5b80633a98ef391161020f57806365017796116101d457806370a08231116101af57806370a082311461041d57806370fc982d14610430578063715018a61461043c575f80fd5b806365017796146103d05780636cf81ec6146103f75780636d7804591461040a575f80fd5b80633a98ef3914610374578063485cc9551461037c57806349bd5a5e1461038f5780634b457d98146103b45780635e703fec146103bd575f80fd5b8063280cc3d21161026f578063361bb0c11161024a578063361bb0c1146103445780633644e51514610357578063373071f21461035f575f80fd5b8063280cc3d2146103245780632ff2e9dc1461032d578063313ce56714610335575f80fd5b806306fdde03146102ab578063095ea7b3146102c957806318160ddd146102ec5780631db6e8501461030757806323b872dd14610311575b5f80fd5b6102b3610608565b6040516102c09190611d12565b60405180910390f35b6102dc6102d7366004611d3f565b610698565b60405190151581526020016102c0565b600e546001600160d81b03165b6040519081526020016102c0565b6102f96205469081565b6102dc61031f366004611d67565b6106b1565b6102f961080a81565b6102f96106d6565b604051601281526020016102c0565b6102f9610352366004611da0565b6106f3565b6102f961070d565b61037261036d366004611db7565b61071b565b005b6009546102f9565b61037261038a366004611dd0565b6107c5565b600d546001600160a01b03165b6040516001600160a01b0390911681526020016102c0565b6102f961053981565b6102f96103cb366004611e01565b610912565b6102f97f000000000000000000000000000000000000000000000000000000000000000081565b6102f9610405366004611da0565b610926565b6102dc610418366004611d67565b610940565b6102f961042b366004611db7565b61098d565b6102f964e8d4a5100081565b6103726109c2565b61044c6109d5565b604080519283526020830191909152016102c0565b6102f961046f366004611db7565b610bad565b61047c610bb7565b6040516102c09796959493929190611e2a565b600b546001600160a01b031661039c565b6102dc6104ae366004611d3f565b610bf9565b6102b3610c0e565b6102f96104c9366004611db7565b610c1d565b600c546001600160a01b031661039c565b6103726104ed366004611db7565b610c51565b6102dc610500366004611d3f565b610ca2565b6102f9610caf565b610515610cbe565b604080519384526020840192909252908201526060016102c0565b6102f961053e366004611e01565b610d40565b610372610d4c565b610372610559366004611ec1565b610f23565b61037261056c366004611efa565b610f7e565b600c54600160a01b900460ff166102dc565b6102f9610591366004611dd0565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6102f961271081565b6103726105d2366004611db7565b6110b9565b6102f96105e5366004611db7565b6001600160a01b03165f9081526008602052604090205490565b6102f96103e881565b60606003805461061790611f67565b80601f016020809104026020016040519081016040528092919081815260200182805461064390611f67565b801561068e5780601f106106655761010080835404028352916020019161068e565b820191905f5260205f20905b81548152906001019060200180831161067157829003601f168201915b5050505050905090565b5f336106a58185856110f6565b60019150505b92915050565b5f336106be858285611103565b6106c985858561117e565b60019150505b9392505050565b6106e26012600a612093565b6106f0906301406f406120a1565b81565b5f6106ab8260095461053e600e546001600160d81b031690565b5f6107166111db565b905090565b610723611304565b600d54600160a01b900460ff1661074d57604051632a8c935f60e21b815260040160405180910390fd5b6001600160a01b0381166107745760405163874252b560e01b815260040160405180910390fd5b61077c610d4c565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517f2e5c9b2d1f2851a0e14220e58e1e816d1320fc05d2c89a5657bedc5a9943c20d905f90a250565b6107cd611304565b600d54600160a01b900460ff16156107f857604051634221a22560e11b815260040160405180910390fd5b6001600160a01b03821661081f5760405163874252b560e01b815260040160405180910390fd5b600d80546001600160a01b03831674ffffffffffffffffffffffffffffffffffffffffff199091168117600160a01b179091556040517f73f069d9129374dc8becc030b822edfd551de07458e25992e89e7bf50cd4a063905f90a26001600160a01b0381165f818152600a6020526040808220805460ff1916600190811790915590519092917f4a8bc871bc382f8f05aa4ee5015bd9d5eeafc8334ba96536b463dd2657a64f1591a3600c80546001600160a01b0319166001600160a01b0384169081179091556040517f2e5c9b2d1f2851a0e14220e58e1e816d1320fc05d2c89a5657bedc5a9943c20d905f90a25050565b5f61091e848385611331565b949350505050565b5f6106ab826009546103cb600e546001600160d81b031690565b5f8061094b836113f0565b90508015801561095a57505f83115b1561096d5761096a6001826120b8565b90505b610978853383611103565b61098485858584611413565b95945050505050565b600e546009546001600160a01b0383165f9081526008602052604081205490926106ab926001600160d81b0390911690611331565b6109ca611304565b6109d35f611648565b565b600e54600c545f9182916001600160d81b0390911690600160a01b900460ff1615610a0257925f92509050565b600e54600160d81b900464ffffffffff1664e8d4a510008214610b23575f610a4a7f0000000000000000000000000000000000000000000000000000000000000000426120cb565b90505f610a5a62054690836120f2565b610a65906002612105565b610a716012600a612093565b610a7f906301406f406120a1565b610a8991906120f2565b90506002610a9c61080a620546906120f2565b61080a610aac6205469086612110565b610ab691906120f2565b610ac090846120a1565b610aca91906120f2565b610ad491906120f2565b610ade90826120cb565b955064e8d4a51000861015610af65764e8d4a5100095505b612710610539610b0688876120cb565b610b1091906120a1565b610b1a91906120f2565b94505050610ba7565b64e8d4a51000935062054690610b3982426120cb565b1015610b865761271062054690610b5083426120cb565b610b6161053964e8d4a510006120a1565b610b6b91906120a1565b610b7591906120f2565b610b7f91906120f2565b9250610ba7565b612710610b9a61053964e8d4a510006120a1565b610ba491906120f2565b92505b50509091565b5f6106ab82611699565b5f6060805f805f6060610bc86116a3565b610bd06116d0565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b5f6106cf338484610c0986610926565b611413565b60606004805461061790611f67565b5f805f610c28610cbe565b506001600160a01b0386165f90815260086020526040902054919350915061091e908383610912565b610c59611304565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517f73f069d9129374dc8becc030b822edfd551de07458e25992e89e7bf50cd4a063905f90a250565b5f336106a581858561117e565b6106f061080a620546906120f2565b5f805f806009549050610ccf6109d5565b90935091505f838310610cf0575080610ce96002856120f2565b9250610d09565b610d0683610cfe81876120cb565b849190611331565b90505b5f610d1483836116fd565b9650905080610d38575f199550610d35610d2e84886120cb565b8787610912565b93505b505050909192565b5f61091e848484611331565b600e5464ffffffffff428116600160d81b9092041603610d6857565b5f80610d726109d5565b600c5491935091506001600160a01b03168115801590610d9a57506001600160a01b03811615155b15610f1e57600e546001600160d81b0316610db484611724565b6001600160d81b0316600160d81b4264ffffffffff160217600e55600954848410610de857610de3838261175b565b610e07565b610e0783610e0286610dfa818a6120cb565b859190611331565b61175b565b6009546040805184815260208101889052808201849052606081019290925260808201869052517f9e58b170e0350f4db79237b74fbf8c29c7d19c7c09b71d0f0f8e9316334acaed9181900360a00190a16001600160a01b0383163b15610eb957604051633bdc8a1f60e01b81525f60048201526001600160a01b03841690633bdc8a1f906024015f604051808303815f87803b158015610ea6575f80fd5b505af1925050508015610eb7575060015b505b600d5f9054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b81526004015f604051808303815f87803b158015610f05575f80fd5b505af1158015610f17573d5f803e3d5ffd5b5050505050505b505050565b610f2b611304565b6001600160a01b0382165f818152600a6020526040808220805460ff191685151590811790915590519092917f4a8bc871bc382f8f05aa4ee5015bd9d5eeafc8334ba96536b463dd2657a64f1591a35050565b83421115610fa75760405163313c898160e11b8152600481018590526024015b60405180910390fd5b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610ff28c6001600160a01b03165f90815260076020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f61104c826117e1565b90505f61105b8287878761180d565b9050896001600160a01b0316816001600160a01b0316146110a2576040516325c0072360e11b81526001600160a01b0380831660048301528b166024820152604401610f9e565b6110ad8a8a8a6110f6565b50505050505050505050565b6110c1611304565b6001600160a01b0381166110ea57604051631e4fbdf760e01b81525f6004820152602401610f9e565b6110f381611648565b50565b610f1e8383836001611839565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f198114611178578181101561116a57604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610f9e565b61117884848484035f611839565b50505050565b6001600160a01b0383166111a757604051634b637e8f60e11b81525f6004820152602401610f9e565b6001600160a01b0382166111d05760405163ec442f0560e01b81525f6004820152602401610f9e565b610f1e83838361188f565b5f306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561123357507f000000000000000000000000000000000000000000000000000000000000000046145b1561125d57507f000000000000000000000000000000000000000000000000000000000000000090565b610716604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527f0000000000000000000000000000000000000000000000000000000000000000918101919091527f000000000000000000000000000000000000000000000000000000000000000060608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b600b546001600160a01b031633146109d35760405163118cdaa760e01b8152336004820152602401610f9e565b5f838302815f1985870982811083820303915050805f036113655783828161135b5761135b6120de565b04925050506106cf565b8084116113855760405163227bc15360e01b815260040160405180910390fd5b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f6106ab611406600e546001600160d81b031690565b60095484919060016118a3565b5f6001600160a01b03851661144657604051634b637e8f60e11b81526001600160a01b0386166004820152602401610f9e565b6001600160a01b0384166114785760405163ec442f0560e01b81526001600160a01b0385166004820152602401610f9e565b6001600160a01b0385165f908152600860205260409020548311156114eb576001600160a01b0385165f9081526008602052604090205485906114ba90610926565b60405163391434e360e21b81526001600160a01b039092166004830152602482015260448101839052606401610f9e565b6001600160a01b0385165f908152600a602052604090205460ff1615801561152b57506001600160a01b0384165f908152600a602052604090205460ff16155b80156115465750335f908152600a602052604090205460ff16155b1561159657306001600160a01b031663d0dc5c656040518163ffffffff1660e01b81526004015f604051808303815f87803b158015611583575f80fd5b505af1925050508015611594575060015b505b6001600160a01b0385165f90815260086020526040812080548592906115bd9084906120cb565b90915550506001600160a01b0384165f90815260086020526040812080548592906115e99084906120b8565b92505081905550836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161163591815260200190565b60405180910390a3506001949350505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6106ab826118f0565b60606107167f0000000000000000000000000000000000000000000000000000000000000000600561190d565b60606107167f0000000000000000000000000000000000000000000000000000000000000000600661190d565b5f8083830184811015611716575f80925092505061171d565b6001925090505b9250929050565b5f6001600160d81b03821115611757576040516306dfcc6560e41b815260d8600482015260248101839052604401610f9e565b5090565b6009545f61176982846116fd565b509050806117d75761178584611780845f196120cb565b6119b6565b600c805460ff60a01b1916600160a01b1790556040517f628240a53f7ebe5375e91882d66546bf9e49d01336f63e6afcc71ff6b8cdfa20906117ca9042815260200190565b60405180910390a1611178565b61117884846119b6565b5f6106ab6117ed6111db565b8360405161190160f01b8152600281019290925260228201526042902090565b5f805f8061181d888888886119fe565b92509250925061182d8282611ac6565b50909695505050505050565b306001600160a01b031663d0dc5c656040518163ffffffff1660e01b81526004015f604051808303815f87803b158015611871575f80fd5b505af1925050508015611882575060015b5061117884848484611b82565b611178838361189d846106f3565b84611413565b5f806118b0868686611331565b90506118bb83611c54565b80156118d657505f84806118d1576118d16120de565b868809115b15610984576118e66001826120b8565b9695505050505050565b6001600160a01b0381165f908152600760205260408120546106ab565b606060ff83146119275761192083611c80565b90506106ab565b81805461193390611f67565b80601f016020809104026020016040519081016040528092919081815260200182805461195f90611f67565b80156119aa5780601f10611981576101008083540402835291602001916119aa565b820191905f5260205f20905b81548152906001019060200180831161198d57829003601f168201915b505050505090506106ab565b6001600160a01b0382165f90815260086020526040812080548392906119dd9084906120b8565b925050819055508060095f8282546119f591906120b8565b90915550505050565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611a3757505f91506003905082611abc565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611a88573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116611ab357505f925060019150829050611abc565b92505f91508190505b9450945094915050565b5f826003811115611ad957611ad9612123565b03611ae2575050565b6001826003811115611af657611af6612123565b03611b145760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115611b2857611b28612123565b03611b495760405163fce698f760e01b815260048101829052602401610f9e565b6003826003811115611b5d57611b5d612123565b03611b7e576040516335e2f38360e21b815260048101829052602401610f9e565b5050565b6001600160a01b038416611bab5760405163e602df0560e01b81525f6004820152602401610f9e565b6001600160a01b038316611bd457604051634a1406b160e11b81525f6004820152602401610f9e565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561117857826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611c4691815260200190565b60405180910390a350505050565b5f6002826003811115611c6957611c69612123565b611c739190612137565b60ff166001149050919050565b60605f611c8c83611cbd565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156106ab57604051632cd44ac360e21b815260040160405180910390fd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6106cf6020830184611ce4565b80356001600160a01b0381168114611d3a575f80fd5b919050565b5f8060408385031215611d50575f80fd5b611d5983611d24565b946020939093013593505050565b5f805f60608486031215611d79575f80fd5b611d8284611d24565b9250611d9060208501611d24565b9150604084013590509250925092565b5f60208284031215611db0575f80fd5b5035919050565b5f60208284031215611dc7575f80fd5b6106cf82611d24565b5f8060408385031215611de1575f80fd5b611dea83611d24565b9150611df860208401611d24565b90509250929050565b5f805f60608486031215611e13575f80fd5b505081359360208301359350604090920135919050565b60ff60f81b881681525f602060e06020840152611e4a60e084018a611ce4565b8381036040850152611e5c818a611ce4565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825260208088019350909101905f5b81811015611eaf57835183529284019291840191600101611e93565b50909c9b505050505050505050505050565b5f8060408385031215611ed2575f80fd5b611edb83611d24565b915060208301358015158114611eef575f80fd5b809150509250929050565b5f805f805f805f60e0888a031215611f10575f80fd5b611f1988611d24565b9650611f2760208901611d24565b95506040880135945060608801359350608088013560ff81168114611f4a575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b600181811c90821680611f7b57607f821691505b602082108103611f9957634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b600181815b80851115611fed57815f1904821115611fd357611fd3611f9f565b80851615611fe057918102915b93841c9390800290611fb8565b509250929050565b5f82612003575060016106ab565b8161200f57505f6106ab565b8160018114612025576002811461202f5761204b565b60019150506106ab565b60ff84111561204057612040611f9f565b50506001821b6106ab565b5060208310610133831016604e8410600b841016171561206e575081810a6106ab565b6120788383611fb3565b805f190482111561208b5761208b611f9f565b029392505050565b5f6106cf60ff841683611ff5565b80820281158282048414176106ab576106ab611f9f565b808201808211156106ab576106ab611f9f565b818103818111156106ab576106ab611f9f565b634e487b7160e01b5f52601260045260245ffd5b5f82612100576121006120de565b500490565b5f6106cf8383611ff5565b5f8261211e5761211e6120de565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f60ff831680612149576121496120de565b8060ff8416069150509291505056fea2646970667358221220726a847111bc3dca2c2770b5696e30d701621fbe9cc0d832018ac8e1e295498f64736f6c63430008190033


Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106102a7575f3560e01c80637a60e06911610169578063baa83f69116100ce578063db6905ab11610093578063f2fde38b1161006e578063f2fde38b146105c4578063f5eb42dc146105d7578063fda9c947146105ff575f80fd5b8063db6905ab14610571578063dd62ed3e14610583578063ece531b0146105bb575f80fd5b8063baa83f691461050d578063c53dc75714610530578063d0dc5c6514610543578063d4245ebb1461054b578063d505accf1461055e575f80fd5b806395d89b411161012e578063a29a608911610109578063a29a6089146104df578063a9059cbb146104f2578063b23b36ad14610505575f80fd5b806395d89b41146104b357806399a03c70146104bb5780639cf160f6146104ce575f80fd5b80637a60e069146104445780637ecebe001461046157806384b0196e146104745780638da5cb5b1461048f5780638fcb4e5b146104a0575f80fd5b80633a98ef391161020f57806365017796116101d457806370a08231116101af57806370a082311461041d57806370fc982d14610430578063715018a61461043c575f80fd5b806365017796146103d05780636cf81ec6146103f75780636d7804591461040a575f80fd5b80633a98ef3914610374578063485cc9551461037c57806349bd5a5e1461038f5780634b457d98146103b45780635e703fec146103bd575f80fd5b8063280cc3d21161026f578063361bb0c11161024a578063361bb0c1146103445780633644e51514610357578063373071f21461035f575f80fd5b8063280cc3d2146103245780632ff2e9dc1461032d578063313ce56714610335575f80fd5b806306fdde03146102ab578063095ea7b3146102c957806318160ddd146102ec5780631db6e8501461030757806323b872dd14610311575b5f80fd5b6102b3610608565b6040516102c09190611d12565b60405180910390f35b6102dc6102d7366004611d3f565b610698565b60405190151581526020016102c0565b600e546001600160d81b03165b6040519081526020016102c0565b6102f96205469081565b6102dc61031f366004611d67565b6106b1565b6102f961080a81565b6102f96106d6565b604051601281526020016102c0565b6102f9610352366004611da0565b6106f3565b6102f961070d565b61037261036d366004611db7565b61071b565b005b6009546102f9565b61037261038a366004611dd0565b6107c5565b600d546001600160a01b03165b6040516001600160a01b0390911681526020016102c0565b6102f961053981565b6102f96103cb366004611e01565b610912565b6102f97f0000000000000000000000000000000000000000000000000000000066762adf81565b6102f9610405366004611da0565b610926565b6102dc610418366004611d67565b610940565b6102f961042b366004611db7565b61098d565b6102f964e8d4a5100081565b6103726109c2565b61044c6109d5565b604080519283526020830191909152016102c0565b6102f961046f366004611db7565b610bad565b61047c610bb7565b6040516102c09796959493929190611e2a565b600b546001600160a01b031661039c565b6102dc6104ae366004611d3f565b610bf9565b6102b3610c0e565b6102f96104c9366004611db7565b610c1d565b600c546001600160a01b031661039c565b6103726104ed366004611db7565b610c51565b6102dc610500366004611d3f565b610ca2565b6102f9610caf565b610515610cbe565b604080519384526020840192909252908201526060016102c0565b6102f961053e366004611e01565b610d40565b610372610d4c565b610372610559366004611ec1565b610f23565b61037261056c366004611efa565b610f7e565b600c54600160a01b900460ff166102dc565b6102f9610591366004611dd0565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6102f961271081565b6103726105d2366004611db7565b6110b9565b6102f96105e5366004611db7565b6001600160a01b03165f9081526008602052604090205490565b6102f96103e881565b60606003805461061790611f67565b80601f016020809104026020016040519081016040528092919081815260200182805461064390611f67565b801561068e5780601f106106655761010080835404028352916020019161068e565b820191905f5260205f20905b81548152906001019060200180831161067157829003601f168201915b5050505050905090565b5f336106a58185856110f6565b60019150505b92915050565b5f336106be858285611103565b6106c985858561117e565b60019150505b9392505050565b6106e26012600a612093565b6106f0906301406f406120a1565b81565b5f6106ab8260095461053e600e546001600160d81b031690565b5f6107166111db565b905090565b610723611304565b600d54600160a01b900460ff1661074d57604051632a8c935f60e21b815260040160405180910390fd5b6001600160a01b0381166107745760405163874252b560e01b815260040160405180910390fd5b61077c610d4c565b600c80546001600160a01b0319166001600160a01b0383169081179091556040517f2e5c9b2d1f2851a0e14220e58e1e816d1320fc05d2c89a5657bedc5a9943c20d905f90a250565b6107cd611304565b600d54600160a01b900460ff16156107f857604051634221a22560e11b815260040160405180910390fd5b6001600160a01b03821661081f5760405163874252b560e01b815260040160405180910390fd5b600d80546001600160a01b03831674ffffffffffffffffffffffffffffffffffffffffff199091168117600160a01b179091556040517f73f069d9129374dc8becc030b822edfd551de07458e25992e89e7bf50cd4a063905f90a26001600160a01b0381165f818152600a6020526040808220805460ff1916600190811790915590519092917f4a8bc871bc382f8f05aa4ee5015bd9d5eeafc8334ba96536b463dd2657a64f1591a3600c80546001600160a01b0319166001600160a01b0384169081179091556040517f2e5c9b2d1f2851a0e14220e58e1e816d1320fc05d2c89a5657bedc5a9943c20d905f90a25050565b5f61091e848385611331565b949350505050565b5f6106ab826009546103cb600e546001600160d81b031690565b5f8061094b836113f0565b90508015801561095a57505f83115b1561096d5761096a6001826120b8565b90505b610978853383611103565b61098485858584611413565b95945050505050565b600e546009546001600160a01b0383165f9081526008602052604081205490926106ab926001600160d81b0390911690611331565b6109ca611304565b6109d35f611648565b565b600e54600c545f9182916001600160d81b0390911690600160a01b900460ff1615610a0257925f92509050565b600e54600160d81b900464ffffffffff1664e8d4a510008214610b23575f610a4a7f0000000000000000000000000000000000000000000000000000000066762adf426120cb565b90505f610a5a62054690836120f2565b610a65906002612105565b610a716012600a612093565b610a7f906301406f406120a1565b610a8991906120f2565b90506002610a9c61080a620546906120f2565b61080a610aac6205469086612110565b610ab691906120f2565b610ac090846120a1565b610aca91906120f2565b610ad491906120f2565b610ade90826120cb565b955064e8d4a51000861015610af65764e8d4a5100095505b612710610539610b0688876120cb565b610b1091906120a1565b610b1a91906120f2565b94505050610ba7565b64e8d4a51000935062054690610b3982426120cb565b1015610b865761271062054690610b5083426120cb565b610b6161053964e8d4a510006120a1565b610b6b91906120a1565b610b7591906120f2565b610b7f91906120f2565b9250610ba7565b612710610b9a61053964e8d4a510006120a1565b610ba491906120f2565b92505b50509091565b5f6106ab82611699565b5f6060805f805f6060610bc86116a3565b610bd06116d0565b604080515f80825260208201909252600f60f81b9b939a50919850469750309650945092509050565b5f6106cf338484610c0986610926565b611413565b60606004805461061790611f67565b5f805f610c28610cbe565b506001600160a01b0386165f90815260086020526040902054919350915061091e908383610912565b610c59611304565b600d80546001600160a01b0319166001600160a01b0383169081179091556040517f73f069d9129374dc8becc030b822edfd551de07458e25992e89e7bf50cd4a063905f90a250565b5f336106a581858561117e565b6106f061080a620546906120f2565b5f805f806009549050610ccf6109d5565b90935091505f838310610cf0575080610ce96002856120f2565b9250610d09565b610d0683610cfe81876120cb565b849190611331565b90505b5f610d1483836116fd565b9650905080610d38575f199550610d35610d2e84886120cb565b8787610912565b93505b505050909192565b5f61091e848484611331565b600e5464ffffffffff428116600160d81b9092041603610d6857565b5f80610d726109d5565b600c5491935091506001600160a01b03168115801590610d9a57506001600160a01b03811615155b15610f1e57600e546001600160d81b0316610db484611724565b6001600160d81b0316600160d81b4264ffffffffff160217600e55600954848410610de857610de3838261175b565b610e07565b610e0783610e0286610dfa818a6120cb565b859190611331565b61175b565b6009546040805184815260208101889052808201849052606081019290925260808201869052517f9e58b170e0350f4db79237b74fbf8c29c7d19c7c09b71d0f0f8e9316334acaed9181900360a00190a16001600160a01b0383163b15610eb957604051633bdc8a1f60e01b81525f60048201526001600160a01b03841690633bdc8a1f906024015f604051808303815f87803b158015610ea6575f80fd5b505af1925050508015610eb7575060015b505b600d5f9054906101000a90046001600160a01b03166001600160a01b031663fff6cae96040518163ffffffff1660e01b81526004015f604051808303815f87803b158015610f05575f80fd5b505af1158015610f17573d5f803e3d5ffd5b5050505050505b505050565b610f2b611304565b6001600160a01b0382165f818152600a6020526040808220805460ff191685151590811790915590519092917f4a8bc871bc382f8f05aa4ee5015bd9d5eeafc8334ba96536b463dd2657a64f1591a35050565b83421115610fa75760405163313c898160e11b8152600481018590526024015b60405180910390fd5b5f7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9888888610ff28c6001600160a01b03165f90815260076020526040902080546001810190915590565b6040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810186905260e0016040516020818303038152906040528051906020012090505f61104c826117e1565b90505f61105b8287878761180d565b9050896001600160a01b0316816001600160a01b0316146110a2576040516325c0072360e11b81526001600160a01b0380831660048301528b166024820152604401610f9e565b6110ad8a8a8a6110f6565b50505050505050505050565b6110c1611304565b6001600160a01b0381166110ea57604051631e4fbdf760e01b81525f6004820152602401610f9e565b6110f381611648565b50565b610f1e8383836001611839565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f198114611178578181101561116a57604051637dc7a0d960e11b81526001600160a01b03841660048201526024810182905260448101839052606401610f9e565b61117884848484035f611839565b50505050565b6001600160a01b0383166111a757604051634b637e8f60e11b81525f6004820152602401610f9e565b6001600160a01b0382166111d05760405163ec442f0560e01b81525f6004820152602401610f9e565b610f1e83838361188f565b5f306001600160a01b037f000000000000000000000000fbd0446d8c0a59822a6ebbed7c9d4f245e3c10401614801561123357507f000000000000000000000000000000000000000000000000000000000000000146145b1561125d57507fcf14e3503e82ee80cd61f4d407fd4e57100f062b35690330286d2aa0ff850caf90565b610716604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60208201527fd53a98ea506df179c10cbc19726c5bf86f39ad8e77425dc769b7a96c138fa3bc918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a08201525f9060c00160405160208183030381529060405280519060200120905090565b600b546001600160a01b031633146109d35760405163118cdaa760e01b8152336004820152602401610f9e565b5f838302815f1985870982811083820303915050805f036113655783828161135b5761135b6120de565b04925050506106cf565b8084116113855760405163227bc15360e01b815260040160405180910390fd5b5f848688095f868103871696879004966002600389028118808a02820302808a02820302808a02820302808a02820302808a02820302808a02909103029181900381900460010186841190950394909402919094039290920491909117919091029150509392505050565b5f6106ab611406600e546001600160d81b031690565b60095484919060016118a3565b5f6001600160a01b03851661144657604051634b637e8f60e11b81526001600160a01b0386166004820152602401610f9e565b6001600160a01b0384166114785760405163ec442f0560e01b81526001600160a01b0385166004820152602401610f9e565b6001600160a01b0385165f908152600860205260409020548311156114eb576001600160a01b0385165f9081526008602052604090205485906114ba90610926565b60405163391434e360e21b81526001600160a01b039092166004830152602482015260448101839052606401610f9e565b6001600160a01b0385165f908152600a602052604090205460ff1615801561152b57506001600160a01b0384165f908152600a602052604090205460ff16155b80156115465750335f908152600a602052604090205460ff16155b1561159657306001600160a01b031663d0dc5c656040518163ffffffff1660e01b81526004015f604051808303815f87803b158015611583575f80fd5b505af1925050508015611594575060015b505b6001600160a01b0385165f90815260086020526040812080548592906115bd9084906120cb565b90915550506001600160a01b0384165f90815260086020526040812080548592906115e99084906120b8565b92505081905550836001600160a01b0316856001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161163591815260200190565b60405180910390a3506001949350505050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f6106ab826118f0565b60606107167f436861726c657320504f4e5a490000000000000000000000000000000000000d600561190d565b60606107167f3100000000000000000000000000000000000000000000000000000000000001600661190d565b5f8083830184811015611716575f80925092505061171d565b6001925090505b9250929050565b5f6001600160d81b03821115611757576040516306dfcc6560e41b815260d8600482015260248101839052604401610f9e565b5090565b6009545f61176982846116fd565b509050806117d75761178584611780845f196120cb565b6119b6565b600c805460ff60a01b1916600160a01b1790556040517f628240a53f7ebe5375e91882d66546bf9e49d01336f63e6afcc71ff6b8cdfa20906117ca9042815260200190565b60405180910390a1611178565b61117884846119b6565b5f6106ab6117ed6111db565b8360405161190160f01b8152600281019290925260228201526042902090565b5f805f8061181d888888886119fe565b92509250925061182d8282611ac6565b50909695505050505050565b306001600160a01b031663d0dc5c656040518163ffffffff1660e01b81526004015f604051808303815f87803b158015611871575f80fd5b505af1925050508015611882575060015b5061117884848484611b82565b611178838361189d846106f3565b84611413565b5f806118b0868686611331565b90506118bb83611c54565b80156118d657505f84806118d1576118d16120de565b868809115b15610984576118e66001826120b8565b9695505050505050565b6001600160a01b0381165f908152600760205260408120546106ab565b606060ff83146119275761192083611c80565b90506106ab565b81805461193390611f67565b80601f016020809104026020016040519081016040528092919081815260200182805461195f90611f67565b80156119aa5780601f10611981576101008083540402835291602001916119aa565b820191905f5260205f20905b81548152906001019060200180831161198d57829003601f168201915b505050505090506106ab565b6001600160a01b0382165f90815260086020526040812080548392906119dd9084906120b8565b925050819055508060095f8282546119f591906120b8565b90915550505050565b5f80807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0841115611a3757505f91506003905082611abc565b604080515f808252602082018084528a905260ff891692820192909252606081018790526080810186905260019060a0016020604051602081039080840390855afa158015611a88573d5f803e3d5ffd5b5050604051601f1901519150506001600160a01b038116611ab357505f925060019150829050611abc565b92505f91508190505b9450945094915050565b5f826003811115611ad957611ad9612123565b03611ae2575050565b6001826003811115611af657611af6612123565b03611b145760405163f645eedf60e01b815260040160405180910390fd5b6002826003811115611b2857611b28612123565b03611b495760405163fce698f760e01b815260048101829052602401610f9e565b6003826003811115611b5d57611b5d612123565b03611b7e576040516335e2f38360e21b815260048101829052602401610f9e565b5050565b6001600160a01b038416611bab5760405163e602df0560e01b81525f6004820152602401610f9e565b6001600160a01b038316611bd457604051634a1406b160e11b81525f6004820152602401610f9e565b6001600160a01b038085165f908152600160209081526040808320938716835292905220829055801561117857826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051611c4691815260200190565b60405180910390a350505050565b5f6002826003811115611c6957611c69612123565b611c739190612137565b60ff166001149050919050565b60605f611c8c83611cbd565b6040805160208082528183019092529192505f91906020820181803683375050509182525060208101929092525090565b5f60ff8216601f8111156106ab57604051632cd44ac360e21b815260040160405180910390fd5b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f6106cf6020830184611ce4565b80356001600160a01b0381168114611d3a575f80fd5b919050565b5f8060408385031215611d50575f80fd5b611d5983611d24565b946020939093013593505050565b5f805f60608486031215611d79575f80fd5b611d8284611d24565b9250611d9060208501611d24565b9150604084013590509250925092565b5f60208284031215611db0575f80fd5b5035919050565b5f60208284031215611dc7575f80fd5b6106cf82611d24565b5f8060408385031215611de1575f80fd5b611dea83611d24565b9150611df860208401611d24565b90509250929050565b5f805f60608486031215611e13575f80fd5b505081359360208301359350604090920135919050565b60ff60f81b881681525f602060e06020840152611e4a60e084018a611ce4565b8381036040850152611e5c818a611ce4565b606085018990526001600160a01b038816608086015260a0850187905284810360c0860152855180825260208088019350909101905f5b81811015611eaf57835183529284019291840191600101611e93565b50909c9b505050505050505050505050565b5f8060408385031215611ed2575f80fd5b611edb83611d24565b915060208301358015158114611eef575f80fd5b809150509250929050565b5f805f805f805f60e0888a031215611f10575f80fd5b611f1988611d24565b9650611f2760208901611d24565b95506040880135945060608801359350608088013560ff81168114611f4a575f80fd5b9699959850939692959460a0840135945060c09093013592915050565b600181811c90821680611f7b57607f821691505b602082108103611f9957634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b600181815b80851115611fed57815f1904821115611fd357611fd3611f9f565b80851615611fe057918102915b93841c9390800290611fb8565b509250929050565b5f82612003575060016106ab565b8161200f57505f6106ab565b8160018114612025576002811461202f5761204b565b60019150506106ab565b60ff84111561204057612040611f9f565b50506001821b6106ab565b5060208310610133831016604e8410600b841016171561206e575081810a6106ab565b6120788383611fb3565b805f190482111561208b5761208b611f9f565b029392505050565b5f6106cf60ff841683611ff5565b80820281158282048414176106ab576106ab611f9f565b808201808211156106ab576106ab611f9f565b818103818111156106ab576106ab611f9f565b634e487b7160e01b5f52601260045260245ffd5b5f82612100576121006120de565b500490565b5f6106cf8383611ff5565b5f8261211e5761211e6120de565b500690565b634e487b7160e01b5f52602160045260245ffd5b5f60ff831680612149576121496120de565b8060ff8416069150509291505056fea2646970667358221220726a847111bc3dca2c2770b5696e30d701621fbe9cc0d832018ac8e1e295498f64736f6c63430008190033

Deployed Bytecode Sourcemap

159700:11417:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28948:91;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;31241:190;;;;;;:::i;:::-;;:::i;:::-;;;1158:14:1;;1151:22;1133:41;;1121:2;1106:18;31241:190:0;993:187:1;170101:123:0;170196:20;;-1:-1:-1;;;;;170196:20:0;170101:123;;;1331:25:1;;;1319:2;1304:18;170101:123:0;1185:177:1;160297:60:0;;160337:20;160297:60;;32009:249;;;;;;:::i;:::-;;:::i;160475:62::-;;160514:23;160475:62;;160177:68;;;:::i;29901:84::-;;;29975:2;1842:36:1;;1830:2;1815:18;29901:84:0;1700:184:1;85368:145:0;;;;;;:::i;:::-;;:::i;78501:114::-;;;:::i;162837:383::-;;;;;;:::i;:::-;;:::i;:::-;;83629:102;83711:12;;83629:102;;163537:639;;;;;;:::i;:::-;;:::i;162467:104::-;162549:14;;-1:-1:-1;;;;;162549:14:0;162467:104;;;-1:-1:-1;;;;;2899:55:1;;;2881:74;;2869:2;2854:18;162467:104:0;2712:249:1;160886:43:0;;160925:4;160886:43;;86034:286;;;;;;:::i;:::-;;:::i;160804:38::-;;;;;85823:166;;;;;;:::i;:::-;;:::i;84135:452::-;;;;;;:::i;:::-;;:::i;169692:186::-;;;;;;:::i;:::-;;:::i;160697:55::-;;160744:8;160697:55;;91489:103;;;:::i;167222:1464::-;;;:::i;:::-;;;;3461:25:1;;;3517:2;3502:18;;3495:34;;;;3434:18;167222:1464:0;3287:248:1;169920:145:0;;;;;;:::i;:::-;;:::i;72902:580::-;;;:::i;:::-;;;;;;;;;;;;;:::i;90814:87::-;90887:6;;-1:-1:-1;;;;;90887:6:0;90814:87;;83926:164;;;;;;:::i;:::-;;:::i;29158:95::-;;;:::i;164219:258::-;;;;;;:::i;:::-;;:::i;162184:97::-;162259:14;;-1:-1:-1;;;;;162259:14:0;162184:97;;162614:180;;;;;;:::i;:::-;;:::i;30535:182::-;;;;;;:::i;:::-;;:::i;160579:76::-;;;:::i;168729:927::-;;;:::i;:::-;;;;5260:25:1;;;5316:2;5301:18;;5294:34;;;;5344:18;;;5337:34;5248:2;5233:18;168729:927:0;5058:319:1;85558:220:0;;;;;;:::i;:::-;;:::i;164781:2398::-;;;:::i;163263:231::-;;;;;;:::i;:::-;;:::i;77489:695::-;;;;;;:::i;:::-;;:::i;162324:100::-;162399:17;;-1:-1:-1;;;162399:17:0;;;;162324:100;;30780:142;;;;;;:::i;:::-;-1:-1:-1;;;;;30887:18:0;;;30860:7;30887:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;;;;30780:142;160990:42;;161026:6;160990:42;;91747:220;;;;;;:::i;:::-;;:::i;83776:105::-;;;;;;:::i;:::-;-1:-1:-1;;;;;83858:15:0;83831:7;83858:15;;;:9;:15;;;;;;;83776:105;82977:53;;83027:3;82977:53;;28948:91;28993:13;29026:5;29019:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;28948:91;:::o;31241:190::-;31314:4;20033:10;31370:31;20033:10;31386:7;31395:5;31370:8;:31::i;:::-;31419:4;31412:11;;;31241:190;;;;;:::o;32009:249::-;32096:4;20033:10;32154:37;32170:4;20033:10;32185:5;32154:15;:37::i;:::-;32202:26;32212:4;32218:2;32222:5;32202:9;:26::i;:::-;32246:4;32239:11;;;32009:249;;;;;;:::o;160177:68::-;160231:14;160131:2;160231;:14;:::i;:::-;160218:27;;:10;:27;:::i;:::-;160177:68;:::o;85368:145::-;85428:7;85455:50;85469:6;85477:12;;85491:13;170196:20;;-1:-1:-1;;;;;170196:20:0;;170101:123;78501:114;78560:7;78587:20;:18;:20::i;:::-;78580:27;;78501:114;:::o;162837:383::-;90700:13;:11;:13::i;:::-;162920:12:::1;::::0;-1:-1:-1;;;162920:12:0;::::1;;;162915:180;;162956:23;;-1:-1:-1::0;;;162956:23:0::1;;;;;;;;;;;162915:180;-1:-1:-1::0;;;;;163001:26:0;::::1;162997:98;;163051:32;;-1:-1:-1::0;;;163051:32:0::1;;;;;;;;;;;162997:98;163105:19;:17;:19::i;:::-;163135:14;:29:::0;;-1:-1:-1;;;;;;163135:29:0::1;-1:-1:-1::0;;;;;163135:29:0;::::1;::::0;;::::1;::::0;;;163182:30:::1;::::0;::::1;::::0;-1:-1:-1;;163182:30:0::1;162837:383:::0;:::o;163537:639::-;90700:13;:11;:13::i;:::-;163636:12:::1;::::0;-1:-1:-1;;;163636:12:0;::::1;;;163632:79;;;163672:27;;-1:-1:-1::0;;;163672:27:0::1;;;;;;;;;;;163632:79;-1:-1:-1::0;;;;;163725:26:0;::::1;163721:98;;163775:32;;-1:-1:-1::0;;;163775:32:0::1;;;;;;;;;;;163721:98;163831:12;:19:::0;;-1:-1:-1;;;;;163863:46:0;::::1;-1:-1:-1::0;;163863:46:0;;;;;-1:-1:-1;;;163863:46:0;;;;163925:31:::1;::::0;::::1;::::0;163831:19;;163925:31:::1;-1:-1:-1::0;;;;;163969:40:0;::::1;;::::0;;;:25:::1;:40;::::0;;;;;:47;;-1:-1:-1;;163969:47:0::1;164012:4;163969:47:::0;;::::1;::::0;;;164032:48;;164012:4;;163969:40;164032:48:::1;::::0;::::1;164093:14;:29:::0;;-1:-1:-1;;;;;;164093:29:0::1;-1:-1:-1::0;;;;;164093:29:0;::::1;::::0;;::::1;::::0;;;164138:30:::1;::::0;::::1;::::0;-1:-1:-1;;164138:30:0::1;163537:639:::0;;:::o;86034:286::-;86169:20;86267:45;:6;86281:14;86297;86267:13;:45::i;:::-;86252:60;86034:286;-1:-1:-1;;;;86034:286:0:o;85823:166::-;85883:20;85931:50;85945:6;85953:12;;85967:13;170196:20;;-1:-1:-1;;;;;170196:20:0;;170101:123;84135:452;84223:4;84317:19;84339:24;84356:6;84339:16;:24::i;:::-;84317:46;-1:-1:-1;84380:16:0;;:30;;;;;84409:1;84400:6;:10;84380:30;84376:79;;;84427:16;84442:1;84427:16;;:::i;:::-;;;84376:79;84467:46;84483:4;84489:10;84501:11;84467:15;:46::i;:::-;84533;84549:4;84555:2;84559:6;84567:11;84533:15;:46::i;:::-;84526:53;84135:452;-1:-1:-1;;;;;84135:452:0:o;169692:186::-;169835:20;;169857:12;;-1:-1:-1;;;;;169809:18:0;;169782:7;169809:18;;;:9;:18;;;;;;169782:7;;169809:61;;-1:-1:-1;;;;;169835:20:0;;;;169809:25;:61::i;91489:103::-;90700:13;:11;:13::i;:::-;91554:30:::1;91581:1;91554:18;:30::i;:::-;91489:103::o:0;167222:1464::-;167346:20;;167434:17;;167268:20;;;;-1:-1:-1;;;;;167346:20:0;;;;-1:-1:-1;;;167434:17:0;;;;167430:81;;;167476:19;167497:1;;-1:-1:-1;167222:1464:0;-1:-1:-1;167222:1464:0:o;167430:81::-;167557:24;;-1:-1:-1;;;167557:24:0;;;;160744:8;167598:43;;167594:1085;;167658:24;167685:31;167703:13;167685:15;:31;:::i;:::-;167658:58;-1:-1:-1;167731:22:0;167780:32;160337:20;167658:58;167780:32;:::i;:::-;167774:39;;:1;:39;:::i;:::-;160231:14;160131:2;160231;:14;:::i;:::-;160218:27;;:10;:27;:::i;:::-;167756:58;;;;:::i;:::-;167731:83;-1:-1:-1;168029:1:0;160627:28;160514:23;160337:20;160627:28;:::i;:::-;160514:23;167952:32;160337:20;167952:16;:32;:::i;:::-;167951:49;;;;:::i;:::-;167933:68;;:14;:68;:::i;:::-;167932:94;;;;:::i;:::-;:98;;;;:::i;:::-;167898:132;;:14;:132;:::i;:::-;167883:147;;160744:8;168051:12;:35;168047:111;;;160744:8;168107:35;;168047:111;161026:6;160925:4;168184:34;168206:12;168184:19;:34;:::i;:::-;168183:51;;;;:::i;:::-;168182:65;;;;:::i;:::-;168174:73;;167643:616;;167594:1085;;;160744:8;;-1:-1:-1;160337:20:0;168336:41;168354:23;168336:15;:41;:::i;:::-;:57;168332:336;;;161026:6;160337:20;168462:41;168480:23;168462:15;:41;:::i;:::-;168423:35;160925:4;160744:8;168423:35;:::i;:::-;:81;;;;:::i;:::-;168422:120;;;;:::i;:::-;:132;;;;:::i;:::-;168414:140;;168332:336;;;161026:6;168604:35;160925:4;160744:8;168604:35;:::i;:::-;168603:49;;;;:::i;:::-;168595:57;;168332:336;167305:1381;;167222:1464;;:::o;169920:145::-;170011:7;170038:19;170051:5;170038:12;:19::i;72902:580::-;73005:13;73033:18;73066:21;73102:15;73132:25;73172:12;73199:27;73307:13;:11;:13::i;:::-;73335:16;:14;:16::i;:::-;73447;;;73430:1;73447:16;;;;;;;;;-1:-1:-1;;;73254:220:0;;;-1:-1:-1;73254:220:0;;-1:-1:-1;73366:13:0;;-1:-1:-1;73402:4:0;;-1:-1:-1;73430:1:0;-1:-1:-1;73447:16:0;-1:-1:-1;73254:220:0;-1:-1:-1;72902:580:0:o;83926:164::-;83996:4;84020:62;84036:10;84048:2;84052:6;84060:21;84074:6;84060:13;:21::i;:::-;84020:15;:62::i;29158:95::-;29205:13;29238:7;29231:14;;;;;:::i;164219:258::-;164282:16;164312:22;164336;164363:17;:15;:17::i;:::-;-1:-1:-1;;;;;;164418:18:0;;;;;;:9;:18;;;;;;164311:69;;-1:-1:-1;164311:69:0;-1:-1:-1;164404:65:0;;164311:69;;164404:13;:65::i;162614:180::-;90700:13;:11;:13::i;:::-;162693:14:::1;:46:::0;;-1:-1:-1;;;;;;162693:46:0::1;-1:-1:-1::0;;;;;162693:46:0;::::1;::::0;;::::1;::::0;;;162755:31:::1;::::0;::::1;::::0;-1:-1:-1;;162755:31:0::1;162614:180:::0;:::o;30535:182::-;30604:4;20033:10;30660:27;20033:10;30677:2;30681:5;30660:9;:27::i;160579:76::-;160627:28;160514:23;160337:20;160627:28;:::i;168729:927::-;168777:20;168799;168821:13;168847:19;168869:12;;168847:34;;168916:15;:13;:15::i;:::-;168892:39;;-1:-1:-1;168892:39:0;-1:-1:-1;168944:17:0;168976:21;;;168972:404;;-1:-1:-1;169222:11:0;169256:16;169271:1;169256:12;:16;:::i;:::-;169248:24;;168972:404;;;169317:47;169336:5;169343:20;169336:5;169343:12;:20;:::i;:::-;169317:11;;:47;:18;:47::i;:::-;169305:59;;168972:404;169388:12;169437:29;:11;169456:9;169437:18;:29::i;:::-;169411:55;-1:-1:-1;169411:55:0;-1:-1:-1;169411:55:0;169477:172;;-1:-1:-1;;169521:17:0;-1:-1:-1;169561:76:0;169576:31;169596:11;169521:17;169576:31;:::i;:::-;169610:12;169624;169561:13;:76::i;:::-;169553:84;;169477:172;168836:820;;;168729:927;;;:::o;85558:220::-;85693:7;85725:45;:6;85739:14;85755;85725:13;:45::i;164781:2398::-;164874:24;;:51;164909:15;164874:51;;-1:-1:-1;;;164874:24:0;;;;:51;164870:90;;164781:2398::o;164870:90::-;164973:22;164997:12;165013:15;:13;:15::i;:::-;165062:14;;164972:56;;-1:-1:-1;164972:56:0;-1:-1:-1;;;;;;165062:14:0;165333:9;;;;;:39;;-1:-1:-1;;;;;;165346:26:0;;;;165333:39;165329:1843;;;165557:20;;-1:-1:-1;;;;;165557:20:0;165615:26;:14;:24;:26::i;:::-;-1:-1:-1;;;;;165592:49:0;-1:-1:-1;;;165690:15:0;165656:50;;;;165592:20;165656:50;166424:12;;166455:22;;;166451:222;;166498:41;166510:12;166524:14;166498:11;:41::i;:::-;166451:222;;;166580:77;166592:12;166606:50;166628:4;166634:21;166628:4;166634:14;:21;:::i;:::-;166606:14;;:50;:21;:50::i;:::-;166580:11;:77::i;:::-;166761:12;;166694:86;;;9663:25:1;;;9719:2;9704:18;;9697:34;;;9747:18;;;9740:34;;;9805:2;9790:18;;9783:34;;;;9848:3;9833:19;;9826:35;;;166694:86:0;;;;;;9650:3:1;166694:86:0;;;-1:-1:-1;;;;;166886:33:0;;;:38;166882:241;;167057:37;;-1:-1:-1;;;167057:37:0;;167092:1;167057:37;;;1331:25:1;-1:-1:-1;;;;;167057:34:0;;;;;1304:18:1;;167057:37:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;167053:55;;167139:14;;;;;;;;;-1:-1:-1;;;;;167139:14:0;-1:-1:-1;;;;;167139:19:0;;:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;165374:1798;;165329:1843;164859:2320;;;164781:2398::o;163263:231::-;90700:13;:11;:13::i;:::-;-1:-1:-1;;;;;163367:42:0;::::1;;::::0;;;:25:::1;:42;::::0;;;;;:50;;-1:-1:-1;;163367:50:0::1;::::0;::::1;;::::0;;::::1;::::0;;;163435:51;;163367:50;;:42;163435:51:::1;::::0;::::1;163263:231:::0;;:::o;77489:695::-;77719:8;77701:15;:26;77697:99;;;77751:33;;-1:-1:-1;;;77751:33:0;;;;;1331:25:1;;;1304:18;;77751:33:0;;;;;;;;77697:99;77808:18;76809:95;77867:5;77874:7;77883:5;77890:16;77900:5;-1:-1:-1;;;;;75593:14:0;75286:7;75593:14;;;:7;:14;;;;;:16;;;;;;;;;75226:402;77890:16;77839:78;;;;;;10349:25:1;;;;-1:-1:-1;;;;;10471:15:1;;;10451:18;;;10444:43;10523:15;;;;10503:18;;;10496:43;10555:18;;;10548:34;10598:19;;;10591:35;10642:19;;;10635:35;;;10321:19;;77839:78:0;;;;;;;;;;;;77829:89;;;;;;77808:110;;77931:12;77946:28;77963:10;77946:16;:28::i;:::-;77931:43;;77987:14;78004:28;78018:4;78024:1;78027;78030;78004:13;:28::i;:::-;77987:45;;78057:5;-1:-1:-1;;;;;78047:15:0;:6;-1:-1:-1;;;;;78047:15:0;;78043:90;;78086:35;;-1:-1:-1;;;78086:35:0;;-1:-1:-1;;;;;10934:15:1;;;78086:35:0;;;10916:34:1;10986:15;;10966:18;;;10959:43;10828:18;;78086:35:0;10681:327:1;78043:90:0;78145:31;78154:5;78161:7;78170:5;78145:8;:31::i;:::-;77686:498;;;77489:695;;;;;;;:::o;91747:220::-;90700:13;:11;:13::i;:::-;-1:-1:-1;;;;;91832:22:0;::::1;91828:93;;91878:31;::::0;-1:-1:-1;;;91878:31:0;;91906:1:::1;91878:31;::::0;::::1;2881:74:1::0;2854:18;;91878:31:0::1;2712:249:1::0;91828:93:0::1;91931:28;91950:8;91931:18;:28::i;:::-;91747:220:::0;:::o;36068:130::-;36153:37;36162:5;36169:7;36178:5;36185:4;36153:8;:37::i;37784:487::-;-1:-1:-1;;;;;30887:18:0;;;37884:24;30887:18;;;:11;:18;;;;;;;;:27;;;;;;;;;;-1:-1:-1;;37951:37:0;;37947:317;;38028:5;38009:16;:24;38005:132;;;38061:60;;-1:-1:-1;;;38061:60:0;;-1:-1:-1;;;;;11233:55:1;;38061:60:0;;;11215:74:1;11305:18;;;11298:34;;;11348:18;;;11341:34;;;11188:18;;38061:60:0;11013:368:1;38005:132:0;38180:57;38189:5;38196:7;38224:5;38205:16;:24;38231:5;38180:8;:57::i;:::-;37873:398;37784:487;;;:::o;32643:308::-;-1:-1:-1;;;;;32727:18:0;;32723:88;;32769:30;;-1:-1:-1;;;32769:30:0;;32796:1;32769:30;;;2881:74:1;2854:18;;32769:30:0;2712:249:1;32723:88:0;-1:-1:-1;;;;;32825:16:0;;32821:88;;32865:32;;-1:-1:-1;;;32865:32:0;;32894:1;32865:32;;;2881:74:1;2854:18;;32865:32:0;2712:249:1;32821:88:0;32919:24;32927:4;32933:2;32937:5;32919:7;:24::i;71569:268::-;71622:7;71654:4;-1:-1:-1;;;;;71663:11:0;71646:28;;:63;;;;;71695:14;71678:13;:31;71646:63;71642:188;;;-1:-1:-1;71733:22:0;;71569:268::o;71642:188::-;71795:23;71937:80;;;69761:95;71937:80;;;11917:25:1;71959:11:0;11958:18:1;;;11951:34;;;;71972:14:0;12001:18:1;;;11994:34;71988:13:0;12044:18:1;;;12037:34;72011:4:0;12087:19:1;;;12080:84;71900:7:0;;11889:19:1;;71937:80:0;;;;;;;;;;;;71927:91;;;;;;71920:98;;71845:181;;90979:166;90887:6;;-1:-1:-1;;;;;90887:6:0;20033:10;91039:23;91035:103;;91086:40;;-1:-1:-1;;;91086:40:0;;20033:10;91086:40;;;2881:74:1;2854:18;;91086:40:0;2712:249:1;4041:4195:0;4123:14;4491:5;;;4123:14;-1:-1:-1;;4495:1:0;4491;4666:20;4740:5;4736:2;4733:13;4725:5;4721:2;4717:14;4713:34;4704:43;;;4846:5;4855:1;4846:10;4842:373;;5188:11;5180:5;:19;;;;;:::i;:::-;;5173:26;;;;;;4842:373;5339:5;5324:11;:20;5320:90;;5372:22;;-1:-1:-1;;;5372:22:0;;;;;;;;;;;5320:90;5672:17;5810:11;5807:1;5804;5797:25;6220:12;6250:15;;;6235:31;;6372:22;;;;;7112:1;7093;:15;;7092:21;;7349;;;7345:25;;7334:36;7419:21;;;7415:25;;7404:36;7490:21;;;7486:25;;7475:36;7561:21;;;7557:25;;7546:36;7632:21;;;7628:25;;7617:36;7704:21;;;7700:25;;;7689:36;6623:12;;;;6619:23;;;6644:1;6615:31;5927:20;;;5916:32;;;6739:12;;;;5975:21;;;;6473:16;;;;6730:21;;;;8174:15;;;;;-1:-1:-1;;4041:4195:0;;;;;:::o;88954:183::-;89019:20;89067:62;89081:13;170196:20;;-1:-1:-1;;;;;170196:20:0;;170101:123;89081:13;89096:12;;89067:6;;:62;89110:18;89067:13;:62::i;87155:915::-;87284:4;-1:-1:-1;;;;;87310:18:0;;87306:82;;87352:24;;-1:-1:-1;;;87352:24:0;;-1:-1:-1;;;;;2899:55:1;;87352:24:0;;;2881:74:1;2854:18;;87352:24:0;2712:249:1;87306:82:0;-1:-1:-1;;;;;87402:16:0;;87398:80;;87442:24;;-1:-1:-1;;;87442:24:0;;-1:-1:-1;;;;;2899:55:1;;87442:24:0;;;2881:74:1;2854:18;;87442:24:0;2712:249:1;87398:80:0;-1:-1:-1;;;;;87506:15:0;;;;;;:9;:15;;;;;;87492:29;;87488:144;;;-1:-1:-1;;;;;87590:15:0;;;;;;:9;:15;;;;;;87570:4;;87576:30;;:13;:30::i;:::-;87545:75;;-1:-1:-1;;;87545:75:0;;-1:-1:-1;;;;;11233:55:1;;;87545:75:0;;;11215:74:1;11305:18;;;11298:34;11348:18;;;11341:34;;;11188:18;;87545:75:0;11013:368:1;87488:144:0;-1:-1:-1;;;;;87663:31:0;;;;;;:25;:31;;;;;;;;87662:32;:66;;;;-1:-1:-1;;;;;;87699:29:0;;;;;;:25;:29;;;;;;;;87698:30;87662:66;:108;;;;-1:-1:-1;87759:10:0;87733:37;;;;:25;:37;;;;;;;;87732:38;87662:108;87644:266;;;87861:4;-1:-1:-1;;;;;87861:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;87857:42;;-1:-1:-1;;;;;87922:15:0;;;;;;:9;:15;;;;;:30;;87941:11;;87922:15;:30;;87941:11;;87922:30;:::i;:::-;;;;-1:-1:-1;;;;;;;87963:13:0;;;;;;:9;:13;;;;;:28;;87980:11;;87963:13;:28;;87980:11;;87963:28;:::i;:::-;;;;;;;;88024:2;-1:-1:-1;;;;;88009:31:0;88018:4;-1:-1:-1;;;;;88009:31:0;;88028:11;88009:31;;;;1331:25:1;;1319:2;1304:18;;1185:177;88009:31:0;;;;;;;;-1:-1:-1;88058:4:0;87155:915;;;;;;:::o;92127:191::-;92220:6;;;-1:-1:-1;;;;;92237:17:0;;;-1:-1:-1;;;;;;92237:17:0;;;;;;;92270:40;;92220:6;;;92237:17;92220:6;;92270:40;;92201:16;;92270:40;92190:128;92127:191;:::o;84980:150::-;85076:7;85103:19;85116:5;85103:12;:19::i;73811:128::-;73857:13;73890:41;:5;73917:13;73890:26;:41::i;74274:137::-;74323:13;74356:47;:8;74386:16;74356:29;:47::i;725:222::-;786:4;;849:5;;;873;;;869:28;;;888:5;895:1;880:17;;;;;;;869:28;920:4;;-1:-1:-1;926:1:0;-1:-1:-1;725:222:0;;;;;;:::o;96131:223::-;96188:7;-1:-1:-1;;;;;96212:25:0;;96208:107;;;96261:42;;-1:-1:-1;;;96261:42:0;;96292:3;96261:42;;;11568:36:1;11620:18;;;11613:34;;;11541:18;;96261:42:0;11386:267:1;96208:107:0;-1:-1:-1;96340:5:0;96131:223::o;170663:451::-;170768:12;;170746:19;170809:26;170768:12;170828:6;170809:18;:26::i;:::-;170791:44;;;170853:7;170848:259;;170877:59;170895:7;170904:31;170924:11;-1:-1:-1;;170904:31:0;:::i;:::-;170877:17;:59::i;:::-;170951:17;:24;;-1:-1:-1;;;;170951:24:0;-1:-1:-1;;;170951:24:0;;;170995:33;;;;;;171012:15;1331:25:1;;1319:2;1304:18;;1185:177;170995:33:0;;;;;;;;170848:259;;;171061:34;171079:7;171088:6;171061:17;:34::i;72668:178::-;72745:7;72772:66;72805:20;:18;:20::i;:::-;72827:10;58266:4;58260:11;-1:-1:-1;;;58285:23:0;;58338:4;58329:14;;58322:39;;;;58391:4;58382:14;;58375:34;58448:4;58433:20;;;58061:410;49208:264;49293:7;49314:17;49333:18;49353:16;49373:25;49384:4;49390:1;49393;49396;49373:10;:25::i;:::-;49313:85;;;;;;49409:28;49421:5;49428:8;49409:11;:28::i;:::-;-1:-1:-1;49455:9:0;;49208:264;-1:-1:-1;;;;;;49208:264:0:o;88398:218::-;88512:4;-1:-1:-1;;;;;88512:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;88508:42;88560:48;88575:5;88582:7;88591:5;88598:9;88560:14;:48::i;88214:149::-;88301:54;88317:4;88323:2;88327:20;88341:5;88327:13;:20::i;:::-;88349:5;88301:15;:54::i;8373:308::-;8474:7;8494:14;8511:25;8518:1;8521;8524:11;8511:6;:25::i;:::-;8494:42;;8551:26;8568:8;8551:16;:26::i;:::-;:59;;;;;8609:1;8594:11;8581:25;;;;;:::i;:::-;8591:1;8588;8581:25;:29;8551:59;8547:103;;;8627:11;8637:1;8627:11;;:::i;:::-;;8667:6;-1:-1:-1;;;;;;8373:308:0:o;78243:145::-;-1:-1:-1;;;;;75083:14:0;;78334:7;75083:14;;;:7;:14;;;;;;78361:19;74996:109;66038:273;66132:13;63984:66;66162:46;;66158:146;;66232:15;66241:5;66232:8;:15::i;:::-;66225:22;;;;66158:146;66287:5;66280:12;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;88795:151;-1:-1:-1;;;;;88877:18:0;;;;;;:9;:18;;;;;:28;;88899:6;;88877:18;:28;;88899:6;;88877:28;:::i;:::-;;;;;;;;88932:6;88916:12;;:22;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;88795:151:0:o;47513:1556::-;47644:7;;;48587:66;48574:79;;48570:166;;;-1:-1:-1;48686:1:0;;-1:-1:-1;48690:30:0;;-1:-1:-1;48722:1:0;48670:54;;48570:166;48850:24;;;48833:14;48850:24;;;;;;;;;12402:25:1;;;12475:4;12463:17;;12443:18;;;12436:45;;;;12497:18;;;12490:34;;;12540:18;;;12533:34;;;48850:24:0;;12374:19:1;;48850:24:0;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;48850:24:0;;-1:-1:-1;;48850:24:0;;;-1:-1:-1;;;;;;;48889:20:0;;48885:115;;-1:-1:-1;48942:1:0;;-1:-1:-1;48946:29:0;;-1:-1:-1;48942:1:0;;-1:-1:-1;48926:62:0;;48885:115;49020:6;-1:-1:-1;49028:20:0;;-1:-1:-1;49028:20:0;;-1:-1:-1;47513:1556:0;;;;;;;;;:::o;49610:542::-;49706:20;49697:5;:29;;;;;;;;:::i;:::-;;49693:452;;49610:542;;:::o;49693:452::-;49804:29;49795:5;:38;;;;;;;;:::i;:::-;;49791:354;;49857:23;;-1:-1:-1;;;49857:23:0;;;;;;;;;;;49791:354;49911:35;49902:5;:44;;;;;;;;:::i;:::-;;49898:247;;49970:46;;-1:-1:-1;;;49970:46:0;;;;;1331:25:1;;;1304:18;;49970:46:0;1185:177:1;49898:247:0;50047:30;50038:5;:39;;;;;;;;:::i;:::-;;50034:111;;50101:32;;-1:-1:-1;;;50101:32:0;;;;;1331:25:1;;;1304:18;;50101:32:0;1185:177:1;50034:111:0;49610:542;;:::o;37049:443::-;-1:-1:-1;;;;;37162:19:0;;37158:91;;37205:32;;-1:-1:-1;;;37205:32:0;;37234:1;37205:32;;;2881:74:1;2854:18;;37205:32:0;2712:249:1;37158:91:0;-1:-1:-1;;;;;37263:21:0;;37259:92;;37308:31;;-1:-1:-1;;;37308:31:0;;37336:1;37308:31;;;2881:74:1;2854:18;;37308:31:0;2712:249:1;37259:92:0;-1:-1:-1;;;;;37361:18:0;;;;;;;:11;:18;;;;;;;;:27;;;;;;;;;:35;;;37407:78;;;;37458:7;-1:-1:-1;;;;;37442:31:0;37451:5;-1:-1:-1;;;;;37442:31:0;;37467:5;37442:31;;;;1331:25:1;;1319:2;1304:18;;1185:177;37442:31:0;;;;;;;;37049:443;;;;:::o;15520:124::-;15588:4;15630:1;15618:8;15612:15;;;;;;;;:::i;:::-;:19;;;;:::i;:::-;:24;;15635:1;15612:24;15605:31;;15520:124;;;:::o;64693:415::-;64752:13;64778:11;64792:16;64803:4;64792:10;:16::i;:::-;64918:14;;;64929:2;64918:14;;;;;;;;;64778:30;;-1:-1:-1;64898:17:0;;64918:14;;;;;;;;;-1:-1:-1;;;65011:16:0;;;-1:-1:-1;65057:4:0;65048:14;;65041:28;;;;-1:-1:-1;65011:16:0;64693:415::o;65185:251::-;65246:7;65319:4;65283:40;;65347:2;65338:11;;65334:71;;;65373:20;;-1:-1:-1;;;65373:20:0;;;;;;;;;;;14:289:1;56:3;94:5;88:12;121:6;116:3;109:19;177:6;170:4;163:5;159:16;152:4;147:3;143:14;137:47;229:1;222:4;213:6;208:3;204:16;200:27;193:38;292:4;285:2;281:7;276:2;268:6;264:15;260:29;255:3;251:39;247:50;240:57;;;14:289;;;;:::o;308:220::-;457:2;446:9;439:21;420:4;477:45;518:2;507:9;503:18;495:6;477:45;:::i;533:196::-;601:20;;-1:-1:-1;;;;;650:54:1;;640:65;;630:93;;719:1;716;709:12;630:93;533:196;;;:::o;734:254::-;802:6;810;863:2;851:9;842:7;838:23;834:32;831:52;;;879:1;876;869:12;831:52;902:29;921:9;902:29;:::i;:::-;892:39;978:2;963:18;;;;950:32;;-1:-1:-1;;;734:254:1:o;1367:328::-;1444:6;1452;1460;1513:2;1501:9;1492:7;1488:23;1484:32;1481:52;;;1529:1;1526;1519:12;1481:52;1552:29;1571:9;1552:29;:::i;:::-;1542:39;;1600:38;1634:2;1623:9;1619:18;1600:38;:::i;:::-;1590:48;;1685:2;1674:9;1670:18;1657:32;1647:42;;1367:328;;;;;:::o;1889:180::-;1948:6;2001:2;1989:9;1980:7;1976:23;1972:32;1969:52;;;2017:1;2014;2007:12;1969:52;-1:-1:-1;2040:23:1;;1889:180;-1:-1:-1;1889:180:1:o;2256:186::-;2315:6;2368:2;2356:9;2347:7;2343:23;2339:32;2336:52;;;2384:1;2381;2374:12;2336:52;2407:29;2426:9;2407:29;:::i;2447:260::-;2515:6;2523;2576:2;2564:9;2555:7;2551:23;2547:32;2544:52;;;2592:1;2589;2582:12;2544:52;2615:29;2634:9;2615:29;:::i;:::-;2605:39;;2663:38;2697:2;2686:9;2682:18;2663:38;:::i;:::-;2653:48;;2447:260;;;;;:::o;2966:316::-;3043:6;3051;3059;3112:2;3100:9;3091:7;3087:23;3083:32;3080:52;;;3128:1;3125;3118:12;3080:52;-1:-1:-1;;3151:23:1;;;3221:2;3206:18;;3193:32;;-1:-1:-1;3272:2:1;3257:18;;;3244:32;;2966:316;-1:-1:-1;2966:316:1:o;3540:1282::-;3946:3;3941;3937:13;3929:6;3925:26;3914:9;3907:45;3888:4;3971:2;4009:3;4004:2;3993:9;3989:18;3982:31;4036:46;4077:3;4066:9;4062:19;4054:6;4036:46;:::i;:::-;4130:9;4122:6;4118:22;4113:2;4102:9;4098:18;4091:50;4164:33;4190:6;4182;4164:33;:::i;:::-;4228:2;4213:18;;4206:34;;;-1:-1:-1;;;;;4277:55:1;;4271:3;4256:19;;4249:84;4364:3;4349:19;;4342:35;;;4414:22;;;4408:3;4393:19;;4386:51;4486:13;;4508:22;;;4558:2;4584:15;;;;-1:-1:-1;4546:15:1;;;;-1:-1:-1;4627:169:1;4641:6;4638:1;4635:13;4627:169;;;4702:13;;4690:26;;4771:15;;;;4736:12;;;;4663:1;4656:9;4627:169;;;-1:-1:-1;4813:3:1;;3540:1282;-1:-1:-1;;;;;;;;;;;;3540:1282:1:o;5382:347::-;5447:6;5455;5508:2;5496:9;5487:7;5483:23;5479:32;5476:52;;;5524:1;5521;5514:12;5476:52;5547:29;5566:9;5547:29;:::i;:::-;5537:39;;5626:2;5615:9;5611:18;5598:32;5673:5;5666:13;5659:21;5652:5;5649:32;5639:60;;5695:1;5692;5685:12;5639:60;5718:5;5708:15;;;5382:347;;;;;:::o;5734:693::-;5845:6;5853;5861;5869;5877;5885;5893;5946:3;5934:9;5925:7;5921:23;5917:33;5914:53;;;5963:1;5960;5953:12;5914:53;5986:29;6005:9;5986:29;:::i;:::-;5976:39;;6034:38;6068:2;6057:9;6053:18;6034:38;:::i;:::-;6024:48;;6119:2;6108:9;6104:18;6091:32;6081:42;;6170:2;6159:9;6155:18;6142:32;6132:42;;6224:3;6213:9;6209:19;6196:33;6269:4;6262:5;6258:16;6251:5;6248:27;6238:55;;6289:1;6286;6279:12;6238:55;5734:693;;;;-1:-1:-1;5734:693:1;;;;6312:5;6364:3;6349:19;;6336:33;;-1:-1:-1;6416:3:1;6401:19;;;6388:33;;5734:693;-1:-1:-1;;5734:693:1:o;6432:380::-;6511:1;6507:12;;;;6554;;;6575:61;;6629:4;6621:6;6617:17;6607:27;;6575:61;6682:2;6674:6;6671:14;6651:18;6648:38;6645:161;;6728:10;6723:3;6719:20;6716:1;6709:31;6763:4;6760:1;6753:15;6791:4;6788:1;6781:15;6645:161;;6432:380;;;:::o;6817:127::-;6878:10;6873:3;6869:20;6866:1;6859:31;6909:4;6906:1;6899:15;6933:4;6930:1;6923:15;6949:416;7038:1;7075:5;7038:1;7089:270;7110:7;7100:8;7097:21;7089:270;;;7169:4;7165:1;7161:6;7157:17;7151:4;7148:27;7145:53;;;7178:18;;:::i;:::-;7228:7;7218:8;7214:22;7211:55;;;7248:16;;;;7211:55;7327:22;;;;7287:15;;;;7089:270;;;7093:3;6949:416;;;;;:::o;7370:806::-;7419:5;7449:8;7439:80;;-1:-1:-1;7490:1:1;7504:5;;7439:80;7538:4;7528:76;;-1:-1:-1;7575:1:1;7589:5;;7528:76;7620:4;7638:1;7633:59;;;;7706:1;7701:130;;;;7613:218;;7633:59;7663:1;7654:10;;7677:5;;;7701:130;7738:3;7728:8;7725:17;7722:43;;;7745:18;;:::i;:::-;-1:-1:-1;;7801:1:1;7787:16;;7816:5;;7613:218;;7915:2;7905:8;7902:16;7896:3;7890:4;7887:13;7883:36;7877:2;7867:8;7864:16;7859:2;7853:4;7850:12;7846:35;7843:77;7840:159;;;-1:-1:-1;7952:19:1;;;7984:5;;7840:159;8031:34;8056:8;8050:4;8031:34;:::i;:::-;8101:6;8097:1;8093:6;8089:19;8080:7;8077:32;8074:58;;;8112:18;;:::i;:::-;8150:20;;7370:806;-1:-1:-1;;;7370:806:1:o;8181:140::-;8239:5;8268:47;8309:4;8299:8;8295:19;8289:4;8268:47;:::i;8326:168::-;8399:9;;;8430;;8447:15;;;8441:22;;8427:37;8417:71;;8468:18;;:::i;8499:125::-;8564:9;;;8585:10;;;8582:36;;;8598:18;;:::i;8629:128::-;8696:9;;;8717:11;;;8714:37;;;8731:18;;:::i;8762:127::-;8823:10;8818:3;8814:20;8811:1;8804:31;8854:4;8851:1;8844:15;8878:4;8875:1;8868:15;8894:120;8934:1;8960;8950:35;;8965:18;;:::i;:::-;-1:-1:-1;8999:9:1;;8894:120::o;9019:131::-;9079:5;9108:36;9135:8;9129:4;9108:36;:::i;9155:112::-;9187:1;9213;9203:35;;9218:18;;:::i;:::-;-1:-1:-1;9252:9:1;;9155:112::o;12578:127::-;12639:10;12634:3;12630:20;12627:1;12620:31;12670:4;12667:1;12660:15;12694:4;12691:1;12684:15;12710:157;12740:1;12774:4;12771:1;12767:12;12798:3;12788:37;;12805:18;;:::i;:::-;12857:3;12850:4;12847:1;12843:12;12839:22;12834:27;;;12710:157;;;;:::o

Swarm Source

ipfs://726a847111bc3dca2c2770b5696e30d701621fbe9cc0d832018ac8e1e295498f
BlockTransactionDifficultyGas UsedReward

View All Blocks Produced

BlockUncle NumberDifficultyGas UsedReward

View All Uncles

Loading...

Loading

Loading...

Loading

    Validator IndexBlockAmount

    View All Withdrawals

    Transaction HashBlockValueEth2 PubKeyValid

    View All Deposits

    Multichain Portfolio | 26 Chains

    Display all chains

    Last updated: less than 1 sec ago

    Ethereum (0)0 (0%)
    BNB Chain (0)0 (0%)
    Polygon (0)0 (0%)
    Arbitrum One (0)0 (0%)
    Optimism (0)0 (0%)
    Base (0)0 (0%)
    BTTC (0)0 (0%)
    Celo (0)0 (0%)
    Fantom (0)0 (0%)
    Gnosis (0)0 (0%)
    Polygon zkEVM (0)0 (0%)
    Kroma (0)0 (0%)
    Linea (0)0 (0%)
    Moonbeam (0)0 (0%)
    Moonriver (0)0 (0%)
    Arbitrum Nova (0)0 (0%)
    Scroll (0)0 (0%)
    Wemix (0)0 (0%)
    Avax C-Chain (0)0 (0%)
    zkSync Era (0)0 (0%)
    opBNB (0)0 (0%)
    Fraxtal (0)0 (0%)
    Blast (0)0 (0%)
    Cronos (0)0 (0%)
    Mantle (0)0 (0%)
    Taiko (0)0 (0%)

    Show 26 more chains Hide 26 chains

    ChainTokenPortfolio %PriceAmountValue

    Loading...

    Loading

    [Download: CSV Export ]

    A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.

    Address QR Code
    My Address - Private Name Tag or Note

    My Name Tag:

    Private Name Tags (up to 35 characters) can be used for easy identification of addresses

    Private Note:

    A private note (up to 500 characters) can be attached to this address.
    Please DO NOT store any passwords or private keys here.

    View all Private Name Tags

    Connect a Wallet
    Connect a Wallet
    Connect a Wallet
    PONZI | Address 0xFBd0446D8C0a59822A6EbBed7C9d4f245e3C1040 | Etherscan (2024)
    Top Articles
    Latest Posts
    Article information

    Author: Greg Kuvalis

    Last Updated:

    Views: 6215

    Rating: 4.4 / 5 (55 voted)

    Reviews: 94% of readers found this page helpful

    Author information

    Name: Greg Kuvalis

    Birthday: 1996-12-20

    Address: 53157 Trantow Inlet, Townemouth, FL 92564-0267

    Phone: +68218650356656

    Job: IT Representative

    Hobby: Knitting, Amateur radio, Skiing, Running, Mountain biking, Slacklining, Electronics

    Introduction: My name is Greg Kuvalis, I am a witty, spotless, beautiful, charming, delightful, thankful, beautiful person who loves writing and wants to share my knowledge and understanding with you.