Code for 0xb1fc…d7dc (BeDeFi)
Since block 20478814
Verified contract
- {{
- "language": "Solidity",
- "sources": {
- "@openzeppelin/contracts/access/Ownable.sol": {
- "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n address private _owner;\n\n event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n /**\n * @dev Initializes the contract setting the deployer as the initial owner.\n */\n constructor() {\n _transferOwnership(_msgSender());\n }\n\n /**\n * @dev Returns the address of the current owner.\n */\n function owner() public view virtual returns (address) {\n return _owner;\n }\n\n /**\n * @dev Throws if called by any account other than the owner.\n */\n modifier onlyOwner() {\n require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n _;\n }\n\n /**\n * @dev Leaves the contract without owner. It will not be possible to call\n * `onlyOwner` functions anymore. Can only be called by the current owner.\n *\n * NOTE: Renouncing ownership will leave the contract without an owner,\n * thereby removing any functionality that is only available to the owner.\n */\n function renounceOwnership() public virtual onlyOwner {\n _transferOwnership(address(0));\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Can only be called by the current owner.\n */\n function transferOwnership(address newOwner) public virtual onlyOwner {\n require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n _transferOwnership(newOwner);\n }\n\n /**\n * @dev Transfers ownership of the contract to a new account (`newOwner`).\n * Internal function without access restriction.\n */\n function _transferOwnership(address newOwner) internal virtual {\n address oldOwner = _owner;\n _owner = newOwner;\n emit OwnershipTransferred(oldOwner, newOwner);\n }\n}\n"
- },
- "@openzeppelin/contracts/token/ERC20/ERC20.sol": {
- "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/ERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"./IERC20.sol\";\nimport \"./extensions/IERC20Metadata.sol\";\nimport \"../../utils/Context.sol\";\n\n/**\n * @dev Implementation of the {IERC20} interface.\n *\n * This implementation is agnostic to the way tokens are created. This means\n * that a supply mechanism has to be added in a derived contract using {_mint}.\n * For a generic mechanism see {ERC20PresetMinterPauser}.\n *\n * TIP: For a detailed writeup see our guide\n * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How\n * to implement supply mechanisms].\n *\n * We have followed general OpenZeppelin Contracts guidelines: functions revert\n * instead returning `false` on failure. This behavior is nonetheless\n * conventional and does not conflict with the expectations of ERC20\n * applications.\n *\n * Additionally, an {Approval} event is emitted on calls to {transferFrom}.\n * This allows applications to reconstruct the allowance for all accounts just\n * by listening to said events. Other implementations of the EIP may not emit\n * these events, as it isn't required by the specification.\n *\n * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}\n * functions have been added to mitigate the well-known issues around setting\n * allowances. See {IERC20-approve}.\n */\ncontract ERC20 is Context, IERC20, IERC20Metadata {\n mapping(address => uint256) private _balances;\n\n mapping(address => mapping(address => uint256)) private _allowances;\n\n uint256 private _totalSupply;\n\n string private _name;\n string private _symbol;\n\n /**\n * @dev Sets the values for {name} and {symbol}.\n *\n * The default value of {decimals} is 18. To select a different value for\n * {decimals} you should overload it.\n *\n * All two of these values are immutable: they can only be set once during\n * construction.\n */\n constructor(string memory name_, string memory symbol_) {\n _name = name_;\n _symbol = symbol_;\n }\n\n /**\n * @dev Returns the name of the token.\n */\n function name() public view virtual override returns (string memory) {\n return _name;\n }\n\n /**\n * @dev Returns the symbol of the token, usually a shorter version of the\n * name.\n */\n function symbol() public view virtual override returns (string memory) {\n return _symbol;\n }\n\n /**\n * @dev Returns the number of decimals used to get its user representation.\n * For example, if `decimals` equals `2`, a balance of `505` tokens should\n * be displayed to a user as `5.05` (`505 / 10 ** 2`).\n *\n * Tokens usually opt for a value of 18, imitating the relationship between\n * Ether and Wei. This is the value {ERC20} uses, unless this function is\n * overridden;\n *\n * NOTE: This information is only used for _display_ purposes: it in\n * no way affects any of the arithmetic of the contract, including\n * {IERC20-balanceOf} and {IERC20-transfer}.\n */\n function decimals() public view virtual override returns (uint8) {\n return 18;\n }\n\n /**\n * @dev See {IERC20-totalSupply}.\n */\n function totalSupply() public view virtual override returns (uint256) {\n return _totalSupply;\n }\n\n /**\n * @dev See {IERC20-balanceOf}.\n */\n function balanceOf(address account) public view virtual override returns (uint256) {\n return _balances[account];\n }\n\n /**\n * @dev See {IERC20-transfer}.\n *\n * Requirements:\n *\n * - `recipient` cannot be the zero address.\n * - the caller must have a balance of at least `amount`.\n */\n function transfer(address recipient, uint256 amount) public virtual override returns (bool) {\n _transfer(_msgSender(), recipient, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-allowance}.\n */\n function allowance(address owner, address spender) public view virtual override returns (uint256) {\n return _allowances[owner][spender];\n }\n\n /**\n * @dev See {IERC20-approve}.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function approve(address spender, uint256 amount) public virtual override returns (bool) {\n _approve(_msgSender(), spender, amount);\n return true;\n }\n\n /**\n * @dev See {IERC20-transferFrom}.\n *\n * Emits an {Approval} event indicating the updated allowance. This is not\n * required by the EIP. See the note at the beginning of {ERC20}.\n *\n * Requirements:\n *\n * - `sender` and `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n * - the caller must have allowance for ``sender``'s tokens of at least\n * `amount`.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) public virtual override returns (bool) {\n _transfer(sender, recipient, amount);\n\n uint256 currentAllowance = _allowances[sender][_msgSender()];\n require(currentAllowance >= amount, \"ERC20: transfer amount exceeds allowance\");\n unchecked {\n _approve(sender, _msgSender(), currentAllowance - amount);\n }\n\n return true;\n }\n\n /**\n * @dev Atomically increases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n */\n function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {\n _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);\n return true;\n }\n\n /**\n * @dev Atomically decreases the allowance granted to `spender` by the caller.\n *\n * This is an alternative to {approve} that can be used as a mitigation for\n * problems described in {IERC20-approve}.\n *\n * Emits an {Approval} event indicating the updated allowance.\n *\n * Requirements:\n *\n * - `spender` cannot be the zero address.\n * - `spender` must have allowance for the caller of at least\n * `subtractedValue`.\n */\n function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {\n uint256 currentAllowance = _allowances[_msgSender()][spender];\n require(currentAllowance >= subtractedValue, \"ERC20: decreased allowance below zero\");\n unchecked {\n _approve(_msgSender(), spender, currentAllowance - subtractedValue);\n }\n\n return true;\n }\n\n /**\n * @dev Moves `amount` of tokens from `sender` to `recipient`.\n *\n * This internal function is equivalent to {transfer}, and can be used to\n * e.g. implement automatic token fees, slashing mechanisms, etc.\n *\n * Emits a {Transfer} event.\n *\n * Requirements:\n *\n * - `sender` cannot be the zero address.\n * - `recipient` cannot be the zero address.\n * - `sender` must have a balance of at least `amount`.\n */\n function _transfer(\n address sender,\n address recipient,\n uint256 amount\n ) internal virtual {\n require(sender != address(0), \"ERC20: transfer from the zero address\");\n require(recipient != address(0), \"ERC20: transfer to the zero address\");\n\n _beforeTokenTransfer(sender, recipient, amount);\n\n uint256 senderBalance = _balances[sender];\n require(senderBalance >= amount, \"ERC20: transfer amount exceeds balance\");\n unchecked {\n _balances[sender] = senderBalance - amount;\n }\n _balances[recipient] += amount;\n\n emit Transfer(sender, recipient, amount);\n\n _afterTokenTransfer(sender, recipient, amount);\n }\n\n /** @dev Creates `amount` tokens and assigns them to `account`, increasing\n * the total supply.\n *\n * Emits a {Transfer} event with `from` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n */\n function _mint(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: mint to the zero address\");\n\n _beforeTokenTransfer(address(0), account, amount);\n\n _totalSupply += amount;\n _balances[account] += amount;\n emit Transfer(address(0), account, amount);\n\n _afterTokenTransfer(address(0), account, amount);\n }\n\n /**\n * @dev Destroys `amount` tokens from `account`, reducing the\n * total supply.\n *\n * Emits a {Transfer} event with `to` set to the zero address.\n *\n * Requirements:\n *\n * - `account` cannot be the zero address.\n * - `account` must have at least `amount` tokens.\n */\n function _burn(address account, uint256 amount) internal virtual {\n require(account != address(0), \"ERC20: burn from the zero address\");\n\n _beforeTokenTransfer(account, address(0), amount);\n\n uint256 accountBalance = _balances[account];\n require(accountBalance >= amount, \"ERC20: burn amount exceeds balance\");\n unchecked {\n _balances[account] = accountBalance - amount;\n }\n _totalSupply -= amount;\n\n emit Transfer(account, address(0), amount);\n\n _afterTokenTransfer(account, address(0), amount);\n }\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.\n *\n * This internal function is equivalent to `approve`, and can be used to\n * e.g. set automatic allowances for certain subsystems, etc.\n *\n * Emits an {Approval} event.\n *\n * Requirements:\n *\n * - `owner` cannot be the zero address.\n * - `spender` cannot be the zero address.\n */\n function _approve(\n address owner,\n address spender,\n uint256 amount\n ) internal virtual {\n require(owner != address(0), \"ERC20: approve from the zero address\");\n require(spender != address(0), \"ERC20: approve to the zero address\");\n\n _allowances[owner][spender] = amount;\n emit Approval(owner, spender, amount);\n }\n\n /**\n * @dev Hook that is called before any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * will be transferred to `to`.\n * - when `from` is zero, `amount` tokens will be minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens will be burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _beforeTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n\n /**\n * @dev Hook that is called after any transfer of tokens. This includes\n * minting and burning.\n *\n * Calling conditions:\n *\n * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens\n * has been transferred to `to`.\n * - when `from` is zero, `amount` tokens have been minted for `to`.\n * - when `to` is zero, `amount` of ``from``'s tokens have been burned.\n * - `from` and `to` are never both zero.\n *\n * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].\n */\n function _afterTokenTransfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual {}\n}\n"
- },
- "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol": {
- "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\n\n/**\n * @dev Interface for the optional metadata functions from the ERC20 standard.\n *\n * _Available since v4.1._\n */\ninterface IERC20Metadata is IERC20 {\n /**\n * @dev Returns the name of the token.\n */\n function name() external view returns (string memory);\n\n /**\n * @dev Returns the symbol of the token.\n */\n function symbol() external view returns (string memory);\n\n /**\n * @dev Returns the decimals places of the token.\n */\n function decimals() external view returns (uint8);\n}\n"
- },
- "@openzeppelin/contracts/token/ERC20/IERC20.sol": {
- "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Interface of the ERC20 standard as defined in the EIP.\n */\ninterface IERC20 {\n /**\n * @dev Returns the amount of tokens in existence.\n */\n function totalSupply() external view returns (uint256);\n\n /**\n * @dev Returns the amount of tokens owned by `account`.\n */\n function balanceOf(address account) external view returns (uint256);\n\n /**\n * @dev Moves `amount` tokens from the caller's account to `recipient`.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transfer(address recipient, uint256 amount) external returns (bool);\n\n /**\n * @dev Returns the remaining number of tokens that `spender` will be\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\n * zero by default.\n *\n * This value changes when {approve} or {transferFrom} are called.\n */\n function allowance(address owner, address spender) external view returns (uint256);\n\n /**\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\n * that someone may use both the old and the new allowance by unfortunate\n * transaction ordering. One possible solution to mitigate this race\n * condition is to first reduce the spender's allowance to 0 and set the\n * desired value afterwards:\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\n *\n * Emits an {Approval} event.\n */\n function approve(address spender, uint256 amount) external returns (bool);\n\n /**\n * @dev Moves `amount` tokens from `sender` to `recipient` using the\n * allowance mechanism. `amount` is then deducted from the caller's\n * allowance.\n *\n * Returns a boolean value indicating whether the operation succeeded.\n *\n * Emits a {Transfer} event.\n */\n function transferFrom(\n address sender,\n address recipient,\n uint256 amount\n ) external returns (bool);\n\n /**\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\n * another (`to`).\n *\n * Note that `value` may be zero.\n */\n event Transfer(address indexed from, address indexed to, uint256 value);\n\n /**\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\n * a call to {approve}. `value` is the new allowance.\n */\n event Approval(address indexed owner, address indexed spender, uint256 value);\n}\n"
- },
- "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol": {
- "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../IERC20.sol\";\nimport \"../../../utils/Address.sol\";\n\n/**\n * @title SafeERC20\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\n * contract returns false). Tokens that return no value (and instead revert or\n * throw on failure) are also supported, non-reverting calls are assumed to be\n * successful.\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\n */\nlibrary SafeERC20 {\n using Address for address;\n\n function safeTransfer(\n IERC20 token,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));\n }\n\n function safeTransferFrom(\n IERC20 token,\n address from,\n address to,\n uint256 value\n ) internal {\n _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));\n }\n\n /**\n * @dev Deprecated. This function has issues similar to the ones found in\n * {IERC20-approve}, and its usage is discouraged.\n *\n * Whenever possible, use {safeIncreaseAllowance} and\n * {safeDecreaseAllowance} instead.\n */\n function safeApprove(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n // safeApprove should only be called when setting an initial allowance,\n // or when resetting it to zero. To increase and decrease it, use\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\n require(\n (value == 0) || (token.allowance(address(this), spender) == 0),\n \"SafeERC20: approve from non-zero to non-zero allowance\"\n );\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));\n }\n\n function safeIncreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n uint256 newAllowance = token.allowance(address(this), spender) + value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n\n function safeDecreaseAllowance(\n IERC20 token,\n address spender,\n uint256 value\n ) internal {\n unchecked {\n uint256 oldAllowance = token.allowance(address(this), spender);\n require(oldAllowance >= value, \"SafeERC20: decreased allowance below zero\");\n uint256 newAllowance = oldAllowance - value;\n _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));\n }\n }\n\n /**\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\n * on the return value: the return value is optional (but if data is returned, it must not be false).\n * @param token The token targeted by the call.\n * @param data The call data (encoded using abi.encode or one of its variants).\n */\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\n // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that\n // the target address contains contract code and also asserts for success in the low-level call.\n\n bytes memory returndata = address(token).functionCall(data, \"SafeERC20: low-level call failed\");\n if (returndata.length > 0) {\n // Return data is optional\n require(abi.decode(returndata, (bool)), \"SafeERC20: ERC20 operation did not succeed\");\n }\n }\n}\n"
- },
- "@openzeppelin/contracts/utils/Address.sol": {
- "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Collection of functions related to the address type\n */\nlibrary Address {\n /**\n * @dev Returns true if `account` is a contract.\n *\n * [IMPORTANT]\n * ====\n * It is unsafe to assume that an address for which this function returns\n * false is an externally-owned account (EOA) and not a contract.\n *\n * Among others, `isContract` will return false for the following\n * types of addresses:\n *\n * - an externally-owned account\n * - a contract in construction\n * - an address where a contract will be created\n * - an address where a contract lived, but was destroyed\n * ====\n */\n function isContract(address account) internal view returns (bool) {\n // This method relies on extcodesize, which returns 0 for contracts in\n // construction, since the code is only stored at the end of the\n // constructor execution.\n\n uint256 size;\n assembly {\n size := extcodesize(account)\n }\n return size > 0;\n }\n\n /**\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\n * `recipient`, forwarding all available gas and reverting on errors.\n *\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\n * imposed by `transfer`, making them unable to receive funds via\n * `transfer`. {sendValue} removes this limitation.\n *\n * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].\n *\n * IMPORTANT: because control is transferred to `recipient`, care must be\n * taken to not create reentrancy vulnerabilities. Consider using\n * {ReentrancyGuard} or the\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\n */\n function sendValue(address payable recipient, uint256 amount) internal {\n require(address(this).balance >= amount, \"Address: insufficient balance\");\n\n (bool success, ) = recipient.call{value: amount}(\"\");\n require(success, \"Address: unable to send value, recipient may have reverted\");\n }\n\n /**\n * @dev Performs a Solidity function call using a low level `call`. A\n * plain `call` is an unsafe replacement for a function call: use this\n * function instead.\n *\n * If `target` reverts with a revert reason, it is bubbled up by this\n * function (like regular Solidity function calls).\n *\n * Returns the raw returned data. To convert to the expected return value,\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\n *\n * Requirements:\n *\n * - `target` must be a contract.\n * - calling `target` with `data` must not revert.\n *\n * _Available since v3.1._\n */\n function functionCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionCall(target, data, \"Address: low-level call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\n * `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, 0, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but also transferring `value` wei to `target`.\n *\n * Requirements:\n *\n * - the calling contract must have an ETH balance of at least `value`.\n * - the called Solidity function must be `payable`.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value\n ) internal returns (bytes memory) {\n return functionCallWithValue(target, data, value, \"Address: low-level call with value failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\n * with `errorMessage` as a fallback revert reason when `target` reverts.\n *\n * _Available since v3.1._\n */\n function functionCallWithValue(\n address target,\n bytes memory data,\n uint256 value,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(address(this).balance >= value, \"Address: insufficient balance for call\");\n require(isContract(target), \"Address: call to non-contract\");\n\n (bool success, bytes memory returndata) = target.call{value: value}(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {\n return functionStaticCall(target, data, \"Address: low-level static call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a static call.\n *\n * _Available since v3.3._\n */\n function functionStaticCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal view returns (bytes memory) {\n require(isContract(target), \"Address: static call to non-contract\");\n\n (bool success, bytes memory returndata) = target.staticcall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {\n return functionDelegateCall(target, data, \"Address: low-level delegate call failed\");\n }\n\n /**\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\n * but performing a delegate call.\n *\n * _Available since v3.4._\n */\n function functionDelegateCall(\n address target,\n bytes memory data,\n string memory errorMessage\n ) internal returns (bytes memory) {\n require(isContract(target), \"Address: delegate call to non-contract\");\n\n (bool success, bytes memory returndata) = target.delegatecall(data);\n return verifyCallResult(success, returndata, errorMessage);\n }\n\n /**\n * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the\n * revert reason using the provided one.\n *\n * _Available since v4.3._\n */\n function verifyCallResult(\n bool success,\n bytes memory returndata,\n string memory errorMessage\n ) internal pure returns (bytes memory) {\n if (success) {\n return returndata;\n } else {\n // Look for revert reason and bubble it up if present\n if (returndata.length > 0) {\n // The easiest way to bubble the revert reason is using memory via assembly\n\n assembly {\n let returndata_size := mload(returndata)\n revert(add(32, returndata), returndata_size)\n }\n } else {\n revert(errorMessage);\n }\n }\n }\n}\n"
- },
- "@openzeppelin/contracts/utils/Context.sol": {
- "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n function _msgSender() internal view virtual returns (address) {\n return msg.sender;\n }\n\n function _msgData() internal view virtual returns (bytes calldata) {\n return msg.data;\n }\n}\n"
- },
- "@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol": {
- "content": "pragma solidity >=0.5.0;\n\ninterface IUniswapV2Factory {\n event PairCreated(address indexed token0, address indexed token1, address pair, uint);\n\n function feeTo() external view returns (address);\n function feeToSetter() external view returns (address);\n\n function getPair(address tokenA, address tokenB) external view returns (address pair);\n function allPairs(uint) external view returns (address pair);\n function allPairsLength() external view returns (uint);\n\n function createPair(address tokenA, address tokenB) external returns (address pair);\n\n function setFeeTo(address) external;\n function setFeeToSetter(address) external;\n}\n"
- },
- "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router01.sol": {
- "content": "pragma solidity >=0.6.2;\n\ninterface IUniswapV2Router01 {\n function factory() external pure returns (address);\n function WETH() external pure returns (address);\n\n function addLiquidity(\n address tokenA,\n address tokenB,\n uint amountADesired,\n uint amountBDesired,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB, uint liquidity);\n function addLiquidityETH(\n address token,\n uint amountTokenDesired,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external payable returns (uint amountToken, uint amountETH, uint liquidity);\n function removeLiquidity(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETH(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountToken, uint amountETH);\n function removeLiquidityWithPermit(\n address tokenA,\n address tokenB,\n uint liquidity,\n uint amountAMin,\n uint amountBMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountA, uint amountB);\n function removeLiquidityETHWithPermit(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountToken, uint amountETH);\n function swapExactTokensForTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapTokensForExactTokens(\n uint amountOut,\n uint amountInMax,\n address[] calldata path,\n address to,\n uint deadline\n ) external returns (uint[] memory amounts);\n function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)\n external\n returns (uint[] memory amounts);\n function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)\n external\n payable\n returns (uint[] memory amounts);\n\n function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);\n function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);\n function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);\n function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);\n function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);\n}\n"
- },
- "@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol": {
- "content": "pragma solidity >=0.6.2;\n\nimport './IUniswapV2Router01.sol';\n\ninterface IUniswapV2Router02 is IUniswapV2Router01 {\n function removeLiquidityETHSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline\n ) external returns (uint amountETH);\n function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(\n address token,\n uint liquidity,\n uint amountTokenMin,\n uint amountETHMin,\n address to,\n uint deadline,\n bool approveMax, uint8 v, bytes32 r, bytes32 s\n ) external returns (uint amountETH);\n\n function swapExactTokensForTokensSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n function swapExactETHForTokensSupportingFeeOnTransferTokens(\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external payable;\n function swapExactTokensForETHSupportingFeeOnTransferTokens(\n uint amountIn,\n uint amountOutMin,\n address[] calldata path,\n address to,\n uint deadline\n ) external;\n}\n"
- },
- "contracts/BeDeFi.sol": {
- "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.8.24;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/ERC20.sol\";\nimport \"@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol\";\nimport \"@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol\";\nimport \"@uniswap/v2-periphery/contracts/interfaces/IUniswapV2Router02.sol\";\n\n// \n// https://x.com/bedefi_eth\n// \ncontract BeDeFi is ERC20, Ownable {\n using SafeERC20 for IERC20;\n\n IUniswapV2Router02 internal immutable uniswapV2Router;\n address internal immutable weth;\n address internal constant ZERO_ADDRESS = address(0);\n address internal constant DEAD_ADDRESS = address(0xdEad000000000000000000000000000000000000);\n\n bool private _swapping;\n bool public limitsEnabled;\n bool public swapEnabled;\n bool public taxesEnabled;\n bool public launched;\n\n uint256 internal constant LIMITS_PERCENT_DENOMINATOR = 1000;\n\n uint256 public maxTransaction;\n uint256 public maxWallet;\n\n uint256 public swapTokensAtAmount;\n\n mapping(address => uint256) private _holderLastTransferBlock;\n mapping(address => bool) public isExcludedMaxTransactionAmount;\n mapping(address => bool) public automatedMarketMakerPairs;\n mapping(address => bool) public routers;\n mapping(address => bool) public isBot;\n\n event Launch();\n event SetLimitsEnabled(bool value);\n event WithdrawStuckTokens(address token, uint256 amount);\n event ExcludeFromMaxTransaction(address indexed account, bool value);\n event SetAutomatedMarketMakerPair(address indexed pair, bool indexed value);\n event SetRouter(address indexed pair, bool indexed value);\n event SetBots(address indexed account, bool value);\n\n modifier lockSwapping() {\n _swapping = true;\n _;\n _swapping = false;\n }\n\n constructor(address _uniswapV2Router)\n ERC20(unicode\"Be Defiant\", \"BeDeFi\") payable {\n address sender = msg.sender;\n address origin = tx.origin;\n uint256 tSupply = 1_000_000_000 ether;\n uint256 supplyToLiquidity = tSupply;\n\n uniswapV2Router = IUniswapV2Router02(_uniswapV2Router);\n weth = uniswapV2Router.WETH();\n\n maxTransaction = tSupply;\n maxWallet = tSupply;\n\n _setRouter(_uniswapV2Router, true);\n\n _excludeFromMaxTransaction(sender, true);\n _excludeFromMaxTransaction(origin, true);\n _excludeFromMaxTransaction(address(this), true);\n _excludeFromMaxTransaction(DEAD_ADDRESS, true);\n\n _mint(address(this), supplyToLiquidity);\n\n _createPair();\n }\n\n receive() external payable {}\n\n function burn(uint256 amount) external {\n _burn(msg.sender, amount);\n }\n\n function _createPair() internal {\n IUniswapV2Factory uniswapV2Factory = IUniswapV2Factory(\n uniswapV2Router.factory()\n );\n\n address uniswapV2Pair = uniswapV2Factory.getPair(\n address(this),\n weth\n );\n\n if (uniswapV2Pair == ZERO_ADDRESS) {\n uniswapV2Pair = uniswapV2Factory.createPair(\n address(this),\n weth\n );\n }\n\n _setAutomatedMarketMakerPair(uniswapV2Pair, true);\n _excludeFromMaxTransaction(uniswapV2Pair, true);\n }\n\n function enableTrading() external payable onlyOwner {\n require(!launched, \"Already launched.\");\n\n _approve(address(this), address(uniswapV2Router), type(uint256).max);\n uint256 liquidityAmountEth = address(this).balance;\n uniswapV2Router.addLiquidityETH{value: liquidityAmountEth}(\n address(this),\n balanceOf(address(this)),\n 0,\n 0,\n tx.origin,\n block.timestamp\n );\n\n launched = true;\n emit Launch();\n }\n\n function enableLimits() external payable onlyOwner {\n maxTransaction = (totalSupply() * 1) / 100;\n maxWallet = (totalSupply() * 1) / 100;\n limitsEnabled = true;\n }\n\n function setLimitsEnabled(bool value) external onlyOwner {\n limitsEnabled = value;\n emit SetLimitsEnabled(value);\n }\n\n function setLimits(uint256 _maxTransaction, uint256 _maxWallet)\n external\n onlyOwner\n {\n require(\n _maxTransaction >=\n ((totalSupply() * 1) / LIMITS_PERCENT_DENOMINATOR),\n \"Cannot set maxTransaction lower than 0.1%\"\n );\n require(\n _maxWallet >= ((totalSupply() * 1) / LIMITS_PERCENT_DENOMINATOR),\n \"Cannot set maxWallet lower than 0.1%\"\n );\n maxTransaction = _maxTransaction;\n maxWallet = _maxWallet;\n }\n\n function withdrawStuckTokens(address tkn) external onlyOwner {\n uint256 amount;\n if (tkn == ZERO_ADDRESS) {\n bool success;\n amount = address(this).balance;\n require(amount > 0, \"No native tokens\");\n (success, ) = address(_msgSender()).call{value: amount}(\"\");\n require(success, \"Failed to withdraw native tokens\");\n } else {\n amount = IERC20(tkn).balanceOf(address(this));\n require(amount > 0, \"No tokens\");\n IERC20(tkn).safeTransfer(_msgSender(), amount);\n }\n emit WithdrawStuckTokens(tkn, amount);\n }\n\n function excludeFromMaxTransaction(address[] calldata accounts, bool value)\n external\n onlyOwner\n {\n for (uint256 i = 0; i < accounts.length; i++) {\n _excludeFromMaxTransaction(accounts[i], value);\n }\n }\n\n function setAutomatedMarketMakerPair(address account, bool value)\n public\n onlyOwner\n {\n require(\n !automatedMarketMakerPairs[account],\n \"AMM Pair already set.\"\n );\n _setAutomatedMarketMakerPair(account, value);\n }\n\n function setRouter(address account, bool value) public onlyOwner {\n require(!routers[account], \"Router already set.\");\n _setRouter(account, value);\n }\n\n function setBots(address[] calldata accounts, bool value) public onlyOwner {\n for (uint256 i = 0; i < accounts.length; i++) {\n _setBots(accounts[i], value);\n }\n }\n\n function _transfer(\n address from,\n address to,\n uint256 amount\n ) internal virtual override {\n address origin = tx.origin;\n if (((isExcludedMaxTransactionAmount[from] ||\n isExcludedMaxTransactionAmount[to])) ||\n (isExcludedMaxTransactionAmount[origin])\n ) {\n super._transfer(from, to, amount);\n return;\n }\n\n address sender = _msgSender();\n require(!isBot[from], \"bot detected\");\n require(sender == from || !isBot[sender], \"bot detected\");\n require(origin == from || origin == sender || !isBot[origin], \"bot detected\");\n\n if (amount == 0) {\n super._transfer(from, to, 0);\n return;\n }\n\n address ownr = owner();\n\n require(launched || from == ownr || to == ownr || to == DEAD_ADDRESS, \"Not launched.\");\n\n if (limitsEnabled) {\n\n bool isBuy = automatedMarketMakerPairs[from] && !isExcludedMaxTransactionAmount[to];\n bool isSell = automatedMarketMakerPairs[to] && !isExcludedMaxTransactionAmount[from];\n if (isBuy) {\n require(\n amount <= maxTransaction,\n \"Buy transfer amount exceeds the maxTransaction.\"\n );\n require(\n (amount + balanceOf(to)) <= maxWallet,\n \"Max wallet exceeded\"\n );\n } else if (isSell) {\n require(\n amount <= maxTransaction,\n \"Sell transfer amount exceeds the maxTransaction.\"\n );\n } else if (!isExcludedMaxTransactionAmount[to]) {\n require(\n (amount + balanceOf(to)) <= maxWallet,\n \"Max wallet exceeded\"\n );\n }\n }\n\n super._transfer(from, to, amount);\n }\n\n function _excludeFromMaxTransaction(address account, bool value)\n internal\n virtual\n {\n isExcludedMaxTransactionAmount[account] = value;\n emit ExcludeFromMaxTransaction(account, value);\n }\n\n function _setBots(address account, bool value) internal virtual {\n if ((!automatedMarketMakerPairs[account]) &&\n (!routers[account]) &&\n (account != address(uniswapV2Router)) &&\n (account != address(this))) \n {\n isBot[account] = value;\n emit SetBots(account, value);\n }\n }\n\n function _setAutomatedMarketMakerPair(address account, bool value)\n internal\n virtual\n {\n automatedMarketMakerPairs[account] = value;\n emit SetAutomatedMarketMakerPair(account, value);\n }\n\n function _setRouter(address account, bool value) internal virtual {\n routers[account] = value;\n emit SetRouter(account, value);\n }\n}\n"
- }
- },
- "settings": {
- "optimizer": {
- "enabled": true,
- "runs": 200
- },
- "outputSelection": {
- "*": {
- "*": [
- "evm.bytecode",
- "evm.deployedBytecode",
- "devdoc",
- "userdoc",
- "metadata",
- "abi"
- ]
- }
- },
- "libraries": {}
- }
- }}
Contract sourced from Etherscan. Solidity version v0.8.24+commit.e11b9ed9
.
Panoramix decompilation
# Palkeoramix decompiler. def _fallback(?) payable: # default function require calldata.size < 4 require not calldata.size
Decompilation generated by Panoramix.
Raw bytecode
0x6080604052600436106101ff575f3560e01c806380dd9a1f11610113578063bff51ef81161009d578063cb9637281161006d578063cb963728146105d3578063dd62ed3e146105f2578063e2f4560514610636578063f2fde38b1461064b578063f8b45b051461066a575f80fd5b8063bff51ef814610560578063c3c6467414610580578063c3f70b521461059f578063c4590d3f146105b4575f80fd5b80639a7a23d6116100e35780639a7a23d6146104b65780639c0db5f3146104d5578063a457c2d7146104f4578063a9059cbb14610513578063b62496f514610532575f80fd5b806380dd9a1f146104455780638a8c523c146104735780638da5cb5b1461047b57806395d89b41146104a2575f80fd5b806341aea9de116101945780636ddd1713116101645780636ddd17131461039e5780636f4fd18e146103be57806370a08231146103dd578063715018a6146104115780638091f3bf14610425575f80fd5b806341aea9de1461032857806342966c68146103495780634bb2c785146103685780636902ca6114610396575f80fd5b8063313ce567116101cf578063313ce567146102a05780633582ad23146102bb57806339509351146102db5780633bbac579146102fa575f80fd5b806306fdde031461020a578063095ea7b31461023457806318160ddd1461026357806323b872dd14610281575f80fd5b3661020657005b5f80fd5b348015610215575f80fd5b5061021e61067f565b60405161022b9190611f9c565b60405180910390f35b34801561023f575f80fd5b5061025361024e366004611fe9565b61070f565b604051901515815260200161022b565b34801561026e575f80fd5b506002545b60405190815260200161022b565b34801561028c575f80fd5b5061025361029b366004612011565b610725565b3480156102ab575f80fd5b506040516012815260200161022b565b3480156102c6575f80fd5b5060055461025390600160a81b900460ff1681565b3480156102e6575f80fd5b506102536102f5366004611fe9565b6107d4565b348015610305575f80fd5b5061025361031436600461204a565b600d6020525f908152604090205460ff1681565b348015610333575f80fd5b50610347610342366004612070565b61080f565b005b348015610354575f80fd5b5061034761036336600461208b565b610891565b348015610373575f80fd5b5061025361038236600461204a565b600a6020525f908152604090205460ff1681565b61034761089e565b3480156103a9575f80fd5b5060055461025390600160b01b900460ff1681565b3480156103c9575f80fd5b506103476103d83660046120a2565b610923565b3480156103e8575f80fd5b506102736103f736600461204a565b6001600160a01b03165f9081526020819052604090205490565b34801561041c575f80fd5b50610347610995565b348015610430575f80fd5b5060055461025390600160c01b900460ff1681565b348015610450575f80fd5b5061025361045f36600461204a565b600c6020525f908152604090205460ff1681565b6103476109ca565b348015610486575f80fd5b506005546040516001600160a01b03909116815260200161022b565b3480156104ad575f80fd5b5061021e610b85565b3480156104c1575f80fd5b506103476104d0366004612121565b610b94565b3480156104e0575f80fd5b506103476104ef3660046120a2565b610c2c565b3480156104ff575f80fd5b5061025361050e366004611fe9565b610c98565b34801561051e575f80fd5b5061025361052d366004611fe9565b610d30565b34801561053d575f80fd5b5061025361054c36600461204a565b600b6020525f908152604090205460ff1681565b34801561056b575f80fd5b5060055461025390600160b81b900460ff1681565b34801561058b575f80fd5b5061034761059a366004612121565b610d3c565b3480156105aa575f80fd5b5061027360065481565b3480156105bf575f80fd5b506103476105ce366004612156565b610dce565b3480156105de575f80fd5b506103476105ed36600461204a565b610f01565b3480156105fd575f80fd5b5061027361060c366004612176565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b348015610641575f80fd5b5061027360085481565b348015610656575f80fd5b5061034761066536600461204a565b611115565b348015610675575f80fd5b5061027360075481565b60606003805461068e906121a7565b80601f01602080910402602001604051908101604052809291908181526020018280546106ba906121a7565b80156107055780601f106106dc57610100808354040283529160200191610705565b820191905f5260205f20905b8154815290600101906020018083116106e857829003601f168201915b5050505050905090565b5f61071b3384846111ad565b5060015b92915050565b5f6107318484846112d1565b6001600160a01b0384165f908152600160209081526040808320338452909152902054828110156107ba5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6107c785338584036111ad565b60019150505b9392505050565b335f8181526001602090815260408083206001600160a01b0387168452909152812054909161071b91859061080a9086906121f3565b6111ad565b6005546001600160a01b031633146108395760405162461bcd60e51b81526004016107b190612206565b60058054821515600160a81b0260ff60a81b199091161790556040517ff771b1e218dc92494b39e21852f9c24c3b448d6697c2b485cc1f0cff3c9ec7819061088690831515815260200190565b60405180910390a150565b61089b338261178b565b50565b6005546001600160a01b031633146108c85760405162461bcd60e51b81526004016107b190612206565b60646108d360025490565b6108de90600161223b565b6108e89190612252565b60065560646108f660025490565b61090190600161223b565b61090b9190612252565b6007556005805460ff60a81b1916600160a81b179055565b6005546001600160a01b0316331461094d5760405162461bcd60e51b81526004016107b190612206565b5f5b8281101561098f5761098784848381811061096c5761096c612271565b9050602002016020810190610981919061204a565b836118d3565b60010161094f565b50505050565b6005546001600160a01b031633146109bf5760405162461bcd60e51b81526004016107b190612206565b6109c85f611932565b565b6005546001600160a01b031633146109f45760405162461bcd60e51b81526004016107b190612206565b600554600160c01b900460ff1615610a425760405162461bcd60e51b815260206004820152601160248201527020b63932b0b23c903630bab731b432b21760791b60448201526064016107b1565b610a6e307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d5f196111ad565b476001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d1663f305d7198230610abe816001600160a01b03165f9081526020819052604090205490565b6040516001600160e01b031960e086901b1681526001600160a01b03909216600483015260248201525f6044820181905260648201523260848201524260a482015260c40160606040518083038185885af1158015610b1f573d5f803e3d5ffd5b50505050506040513d601f19601f82011682018060405250810190610b449190612285565b50506005805460ff60c01b1916600160c01b179055506040517f02ac8168caf2f254b394bd39e19417c5c28124ab89c9bc2d44921b19808e2669905f90a150565b60606004805461068e906121a7565b6005546001600160a01b03163314610bbe5760405162461bcd60e51b81526004016107b190612206565b6001600160a01b0382165f908152600b602052604090205460ff1615610c1e5760405162461bcd60e51b815260206004820152601560248201527420a6a6902830b4b91030b63932b0b23c9039b2ba1760591b60448201526064016107b1565b610c288282611983565b5050565b6005546001600160a01b03163314610c565760405162461bcd60e51b81526004016107b190612206565b5f5b8281101561098f57610c90848483818110610c7557610c75612271565b9050602002016020810190610c8a919061204a565b836119d6565b600101610c58565b335f9081526001602090815260408083206001600160a01b038616845290915281205482811015610d195760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016107b1565b610d2633858584036111ad565b5060019392505050565b5f61071b3384846112d1565b6005546001600160a01b03163314610d665760405162461bcd60e51b81526004016107b190612206565b6001600160a01b0382165f908152600c602052604090205460ff1615610dc45760405162461bcd60e51b81526020600482015260136024820152722937baba32b91030b63932b0b23c9039b2ba1760691b60448201526064016107b1565b610c288282611ac5565b6005546001600160a01b03163314610df85760405162461bcd60e51b81526004016107b190612206565b6103e8610e0460025490565b610e0f90600161223b565b610e199190612252565b821015610e7a5760405162461bcd60e51b815260206004820152602960248201527f43616e6e6f7420736574206d61785472616e73616374696f6e206c6f776572206044820152687468616e20302e312560b81b60648201526084016107b1565b6103e8610e8660025490565b610e9190600161223b565b610e9b9190612252565b811015610ef65760405162461bcd60e51b8152602060048201526024808201527f43616e6e6f7420736574206d617857616c6c6574206c6f776572207468616e20604482015263302e312560e01b60648201526084016107b1565b600691909155600755565b6005546001600160a01b03163314610f2b5760405162461bcd60e51b81526004016107b190612206565b5f6001600160a01b0382166110185750475f81610f7d5760405162461bcd60e51b815260206004820152601060248201526f4e6f206e617469766520746f6b656e7360801b60448201526064016107b1565b604051339083905f81818185875af1925050503d805f8114610fba576040519150601f19603f3d011682016040523d82523d5f602084013e610fbf565b606091505b505080915050806110125760405162461bcd60e51b815260206004820181905260248201527f4661696c656420746f207769746864726177206e617469766520746f6b656e7360448201526064016107b1565b506110cf565b6040516370a0823160e01b81523060048201526001600160a01b038316906370a0823190602401602060405180830381865afa15801561105a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061107e91906122b0565b90505f81116110bb5760405162461bcd60e51b81526020600482015260096024820152684e6f20746f6b656e7360b81b60448201526064016107b1565b6110cf6001600160a01b0383163383611b18565b604080516001600160a01b0384168152602081018390527f07c81a5e6d155913a9ed2ce53630058179c89fc94bb5de130620b0245c9f6a0b910160405180910390a15050565b6005546001600160a01b0316331461113f5760405162461bcd60e51b81526004016107b190612206565b6001600160a01b0381166111a45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107b1565b61089b81611932565b6001600160a01b03831661120f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107b1565b6001600160a01b0382166112705760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107b1565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383165f908152600a6020526040902054329060ff168061131057506001600160a01b0383165f908152600a602052604090205460ff165b8061133257506001600160a01b0381165f908152600a602052604090205460ff165b156113425761098f848484611b6a565b6001600160a01b0384165f908152600d6020526040902054339060ff161561137c5760405162461bcd60e51b81526004016107b1906122c7565b846001600160a01b0316816001600160a01b031614806113b457506001600160a01b0381165f908152600d602052604090205460ff16155b6113d05760405162461bcd60e51b81526004016107b1906122c7565b846001600160a01b0316826001600160a01b031614806114015750806001600160a01b0316826001600160a01b0316145b8061142457506001600160a01b0382165f908152600d602052604090205460ff16155b6114405760405162461bcd60e51b81526004016107b1906122c7565b825f036114595761145285855f611b6a565b5050505050565b5f61146c6005546001600160a01b031690565b600554909150600160c01b900460ff16806114985750806001600160a01b0316866001600160a01b0316145b806114b45750806001600160a01b0316856001600160a01b0316145b806114cc57506001600160a01b03851661dead60901b145b6115085760405162461bcd60e51b815260206004820152600d60248201526c2737ba103630bab731b432b21760991b60448201526064016107b1565b600554600160a81b900460ff1615611778576001600160a01b0386165f908152600b602052604081205460ff16801561155957506001600160a01b0386165f908152600a602052604090205460ff16155b6001600160a01b0387165f908152600b60205260408120549192509060ff16801561159c57506001600160a01b0388165f908152600a602052604090205460ff16155b9050811561167c5760065486111561160e5760405162461bcd60e51b815260206004820152602f60248201527f427579207472616e7366657220616d6f756e742065786365656473207468652060448201526e36b0bc2a3930b739b0b1ba34b7b71760891b60648201526084016107b1565b6007546001600160a01b0388165f9081526020819052604090205461163390886121f3565b11156116775760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016107b1565b611775565b80156116ed576006548611156116775760405162461bcd60e51b815260206004820152603060248201527f53656c6c207472616e7366657220616d6f756e7420657863656564732074686560448201526f1036b0bc2a3930b739b0b1ba34b7b71760811b60648201526084016107b1565b6001600160a01b0387165f908152600a602052604090205460ff16611775576007546001600160a01b0388165f9081526020819052604090205461173190886121f3565b11156117755760405162461bcd60e51b815260206004820152601360248201527213585e081dd85b1b195d08195e18d959591959606a1b60448201526064016107b1565b50505b611783868686611b6a565b505050505050565b6001600160a01b0382166117eb5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016107b1565b6001600160a01b0382165f908152602081905260409020548181101561185e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016107b1565b6001600160a01b0383165f90815260208190526040812083830390556002805484929061188c9084906122ed565b90915550506040518281525f906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016112c4565b505050565b6001600160a01b0382165f818152600a6020908152604091829020805460ff191685151590811790915591519182527fe0a7c1f8826ab3d62a6e242681ccca3828462e5c87816004b9f8d655b22d5f0891015b60405180910390a25050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b0382165f818152600b6020526040808220805460ff191685151590811790915590519092917fffa9187bf1f18bf477bd0ea1bcbb64e93b6a98132473929edfce215cd9b16fab91a35050565b6001600160a01b0382165f908152600b602052604090205460ff16158015611a1657506001600160a01b0382165f908152600c602052604090205460ff16155b8015611a5457507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316826001600160a01b031614155b8015611a6957506001600160a01b0382163014155b15610c28576001600160a01b0382165f818152600d6020908152604091829020805460ff191685151590811790915591519182527ff7f8b40d08076851dfb7cfd6c584ae9a829a570f264abee45e0d7ca342ae8dc89101611926565b6001600160a01b0382165f818152600c6020526040808220805460ff191685151590811790915590519092917f09b50446349d7fd45dbe59f55204a44404c2adf607c59e9420b87535ed2454b191a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526118ce908490611d36565b6001600160a01b038316611bce5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107b1565b6001600160a01b038216611c305760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107b1565b6001600160a01b0383165f9081526020819052604090205481811015611ca75760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016107b1565b6001600160a01b038085165f90815260208190526040808220858503905591851681529081208054849290611cdd9084906121f3565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611d2991815260200190565b60405180910390a361098f565b5f611d8a826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316611e079092919063ffffffff16565b8051909150156118ce5780806020019051810190611da89190612300565b6118ce5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016107b1565b6060611e1584845f85611e1d565b949350505050565b606082471015611e7e5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016107b1565b843b611ecc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016107b1565b5f80866001600160a01b03168587604051611ee7919061231b565b5f6040518083038185875af1925050503d805f8114611f21576040519150601f19603f3d011682016040523d82523d5f602084013e611f26565b606091505b5091509150611f36828286611f41565b979650505050505050565b60608315611f505750816107cd565b825115611f605782518084602001fd5b8160405162461bcd60e51b81526004016107b19190611f9c565b5f5b83811015611f94578181015183820152602001611f7c565b50505f910152565b602081525f8251806020840152611fba816040850160208701611f7a565b601f01601f19169190910160400192915050565b80356001600160a01b0381168114611fe4575f80fd5b919050565b5f8060408385031215611ffa575f80fd5b61200383611fce565b946020939093013593505050565b5f805f60608486031215612023575f80fd5b61202c84611fce565b925061203a60208501611fce565b9150604084013590509250925092565b5f6020828403121561205a575f80fd5b6107cd82611fce565b801515811461089b575f80fd5b5f60208284031215612080575f80fd5b81356107cd81612063565b5f6020828403121561209b575f80fd5b5035919050565b5f805f604084860312156120b4575f80fd5b833567ffffffffffffffff808211156120cb575f80fd5b818601915086601f8301126120de575f80fd5b8135818111156120ec575f80fd5b8760208260051b8501011115612100575f80fd5b6020928301955093505084013561211681612063565b809150509250925092565b5f8060408385031215612132575f80fd5b61213b83611fce565b9150602083013561214b81612063565b809150509250929050565b5f8060408385031215612167575f80fd5b50508035926020909101359150565b5f8060408385031215612187575f80fd5b61219083611fce565b915061219e60208401611fce565b90509250929050565b600181811c908216806121bb57607f821691505b6020821081036121d957634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561071f5761071f6121df565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b808202811582820484141761071f5761071f6121df565b5f8261226c57634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52603260045260245ffd5b5f805f60608486031215612297575f80fd5b8351925060208401519150604084015190509250925092565b5f602082840312156122c0575f80fd5b5051919050565b6020808252600c908201526b189bdd0819195d1958dd195960a21b604082015260600190565b8181038181111561071f5761071f6121df565b5f60208284031215612310575f80fd5b81516107cd81612063565b5f825161232c818460208701611f7a565b919091019291505056fea2646970667358221220ee8cf6748f4ddd8921fccac867a368b489ced749f84b4a12148f1c554d51111464736f6c63430008180033