Contract 0x7de3fce3de3cdc34595eed74773cd47b84bca340 13

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x86475defd8d4e22d41357b3adb4c9226235a2c599e471c8460a13a2895b052afWithdraw1951305002024-03-28 15:14:1516 hrs 20 mins ago0x59d16da47a795a02e1f4e71224915c5112adfa36 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000271 0.01
0x6d3c58fea5d4f304f287370007dd1e1319f71f183de4992f7fa0af9e35bd836cWithdraw1951102462024-03-28 13:48:5017 hrs 45 mins ago0xf32dadc62a825933ea5a5a20eed0879400cee480 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000283 0.01
0x35c672c0d7b06651a9e9d4bc584160db4cfe287a0a4a4b7282b647f39a9decb0Withdraw1947765622024-03-27 14:33:211 day 17 hrs ago0x1ffdfe8a5368a9a5f16ac56e11927eac00712eec IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.0000108 0.15692
0x7304dbdb794becbd635af0b23911c6be4ccc0c8840fbc2832612b3eee641e7ffWithdraw1947703762024-03-27 14:07:101 day 17 hrs ago0x504d736eeb63bedf64456522fa6e9a01e280a99f IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.000023810.295778
0xcc1d50722272c09071319a3d089dd82346f8f9bccf98b7780debd20ff8fae085Withdraw1946103582024-03-27 2:58:402 days 4 hrs ago0x82e4d78c6c62d461251fa5a1d4deb9f0fe378e30 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000118 0.01
0x121de2112b018e8525b199a9ea67f493d8b41b5d3c565662a7c382722a581653Withdraw1944861882024-03-26 18:19:572 days 13 hrs ago0x6689f80a5cc6503fa44ad820d62ae46942ff18ee IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000199 0.01
0x9d881ef6c6a7860bf90c7266f37de78cc1366c374aa1866728892897ff12d8c9Withdraw1944398852024-03-26 15:06:162 days 16 hrs ago0xb084812c45c4960d45e70cf14b71de8f5e4e7b74 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000198 0.012478
0x9e3aaa7d1c82d6f9a00e085f79f1e6e2fa0ee259cdabfa3eeeb3aa6bacf46777Withdraw1943752982024-03-26 10:37:022 days 20 hrs ago0x21fd46befccba4f158fbfd9bc1b0d8e43f83148b IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000099 0.01
0xb3695ed2537aaf5c2f2c3187c5a49dd2ec950f9a9a79faf6f25d25ad528860faWithdraw1943011622024-03-26 5:28:223 days 2 hrs ago0x291d8c790601dfacc8cace93a1ca4ac7c6a1250d IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000107 0.01
0x6f921c6556c3e6a44e940c62459bc82a368e16c556eaa35f554821bf95309d10Withdraw1940779302024-03-25 13:57:093 days 17 hrs ago0x77425b77df57d9373f5fe9251e80a2c522b0221e IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000118 0.01
0xc60f38e42947f2a6168bbf8b48e1abe6a4e165d59dc2bfcbb8932174927c1201Withdraw1940724782024-03-25 13:34:273 days 18 hrs ago0x3f89d23fdad4eab3f30caa40107755b31fb6ce69 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000101 0.01
0xa046e781b578eae94b9f164cbddcdff7064c9ad671469baa2dd4352f18ae93f7Withdraw1940439882024-03-25 11:35:493 days 19 hrs ago0x93242bb2b8f429a21c8d194ad88e7c4745e395a1 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000098 0.01
0xce393d72f329a7316075cec1e021a34adb1e026fb6f64d8d53d6e3da8076f32eWithdraw1940200982024-03-25 9:56:103 days 21 hrs ago0x94a5bb14c0db0fbbd1d08af8f0f7fe25f32c2027 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000141 0.01
0x69f11a83036e3facb904f57efcf7e0b811b643c0e3b1f9d521a5fc425adef240Withdraw1939904812024-03-25 7:52:423 days 23 hrs ago0xed700750030916903e94a114fdb950a04cef0c18 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000097 0.01
0x9163ca3ec1b76ce8104443dd9a151429ffeac569b08bcaf1c0264a4678fa8e67Withdraw1939796482024-03-25 7:07:334 days 27 mins ago0x0e93cf5ed2965b31d62533aea091252832eb3727 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000108 0.01
0x178e242fdf17217ee146ea19d74294e4bc92becfaa8b0a6f3d177a3e6d98afd5Withdraw1938819852024-03-25 0:20:094 days 7 hrs ago0xc697ef736408a36af88433501a764373b7c22f88 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000109 0.01
0x0b842014e81fa7b31c21e59fd04edf03be35a6dca0beb80e892c3a28d21a065aWithdraw1935268982024-03-23 23:37:155 days 7 hrs ago0xe0b2add5c2d094008d014369ab6bc5c42cf3acad IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000119 0.01
0xd2d098212312e2b0b8981d60d17cc0173d1e2b7bd9e1744fd068d3234e5a97e9Withdraw1927785112024-03-21 19:27:217 days 12 hrs ago0x8b63fb4b3106a457488f5e99ac7e874eaa91286b IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000119 0.01
0x98dab5d6b16ea6cecda9f23c9d2732e206669bbf125f9bfdde581d466d3ae145Withdraw1925391872024-03-21 2:47:308 days 4 hrs ago0x1dbcfdaa8671012f4864725581a378c877bb903d IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000136 0.01
0x1175a4937dcb7e6fd2091c04f6eed22b244f5d446e9f6f637a804b65253a45d7Withdraw1923797212024-03-20 15:34:368 days 16 hrs ago0x790c5373792944956565ba43511ae31f9e34768d IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000224 0.014851
0xbb7809c8678e8e625a0211734a5e2136394f39c5066d8b97e123443e21b42a15Withdraw1923761402024-03-20 15:19:408 days 16 hrs ago0x054d2469e7eb066317b865f08e41b2d1723c238a IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000415 0.051245
0x078cc115584834c0b58552f4d9f61d5e7d4a9850a40fb13b56418e13497ea4ddWithdraw1923714612024-03-20 15:00:098 days 16 hrs ago0xeb992fa2c5066e3b83446fc1a0a9a87a249d5548 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000141 0.01
0x141f5346f252c8f9a8922a1d450cb43fe719b6f402fdbfaf8fc096acfc9f114cWithdraw1923682762024-03-20 14:46:528 days 16 hrs ago0x685b2d1a87dccdbb1883a48740a9f487a37966c3 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000152 0.01
0x2b1388d695b411073d420ceee75b536104e4b5e92ad3a4133cd886d20e9cf091Withdraw1923275592024-03-20 11:57:148 days 19 hrs ago0x1b1bdb951ea5da32d421378b24e90612eb56ff5a IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000161 0.01
0x6a439fa441553797f8c6d4d4234debbdcb8ce96d69ca9e0dd58560d73a21f6aeWithdraw1923241052024-03-20 11:42:488 days 19 hrs ago0xb982a76636e78626c2b6b080f49610581814df97 IN  0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH0.00000104 0.01
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xc1e10a08c8e75976d6cc7a969e8644a9b452f7807778dd69d335ef7fa69a3af0715934682023-03-20 0:00:29375 days 7 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0xc1e10a08c8e75976d6cc7a969e8644a9b452f7807778dd69d335ef7fa69a3af0715934682023-03-20 0:00:29375 days 7 hrs ago 0x5a6b073e090388c909b9f3bf9d9323be908cad62 0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH
0xc1e10a08c8e75976d6cc7a969e8644a9b452f7807778dd69d335ef7fa69a3af0715934682023-03-20 0:00:29375 days 7 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0xc1e10a08c8e75976d6cc7a969e8644a9b452f7807778dd69d335ef7fa69a3af0715934682023-03-20 0:00:29375 days 7 hrs ago 0x5a6b073e090388c909b9f3bf9d9323be908cad62 0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH
0x0cf60d9793c76a441850afdf45c4450c13d040758b8553c4da13e2d03de95407701602282023-03-15 18:56:26379 days 12 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0xbb7c6315a2b93d9c3272b1ded881fd1daa0a7493396f4b508e8b5ac4e8e81832696006682023-03-14 1:48:57381 days 5 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0xcd4607167e5d6d97590cfa5ce3e0beab68381be92ec1437ed9691b3a47a469f6695290672023-03-13 19:39:25381 days 11 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x1d2b8147db51a880b056e6a4dd7996876e6190f613771281349a40e09a25b622694610352023-03-13 14:24:16381 days 17 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x941df3e99eb9a0048ff246152482d4602572c14f73313a332be7403977368494694478222023-03-13 13:25:59381 days 18 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0xc6090ba6eb2f598b31aa69ae5930374ea5cca1b74605b0c80a473c1d2b98fa25694162192023-03-13 10:55:46381 days 20 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x17bae576d72439fe9c741cb5641db8f8b7e525318b082ac8c09a8731ab5019b6694018492023-03-13 9:48:02381 days 21 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x633a676d33c836aa76061d9eb59a94e783846653b94cecc26c463c351e00c6fc693875872023-03-13 8:45:00381 days 22 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x7cf77e699a6e5ee602551642d4698ce1a9e3668f003296e8ed612f1e46cefd31693815412023-03-13 8:17:34381 days 23 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x3e6b4de194d3718eb68f8e07ae86dbede01951353b390c82df8133ca4cb59aa8693787652023-03-13 8:05:08381 days 23 hrs ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x5a6b073e090388c909b9f3bf9d9323be908cad62 0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x5a6b073e090388c909b9f3bf9d9323be908cad62 0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x5a6b073e090388c909b9f3bf9d9323be908cad62 0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x5a6b073e090388c909b9f3bf9d9323be908cad62 0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x5a6b073e090388c909b9f3bf9d9323be908cad62 0x7de3fce3de3cdc34595eed74773cd47b84bca3400 ETH
0x61ecf5e7636ed29bc3560685c368adb9517fbd6ad3c09bccf02a820d59402f3e693679912023-03-13 7:15:39382 days 19 mins ago 0x7de3fce3de3cdc34595eed74773cd47b84bca340 Arbitrum: USDC Token0 ETH
[ Download CSV Export 
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0xE77ADf3936F70a2Ed44f26CeD01d26c1430EAd6a
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
WooWithdrawManager

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion
File 1 of 12 : WooWithdrawManager.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

import "../interfaces/IWETH.sol";
import "../interfaces/IWooAccessManager.sol";

import "../libraries/TransferHelper.sol";

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

contract WooWithdrawManager is Ownable, ReentrancyGuard {
    // addedAmount: added withdrawal amount for this user
    // totalAmount: total withdrawal amount for this user
    event WithdrawAdded(address indexed user, uint256 addedAmount, uint256 totalAmount);

    event Withdraw(address indexed user, uint256 amount);

    address public want;
    address public weth;
    address public accessManager;
    address public superChargerVault;

    mapping(address => uint256) public withdrawAmount;

    address constant ETH_PLACEHOLDER_ADDR = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;

    constructor() {}

    function init(
        address _weth,
        address _want,
        address _accessManager,
        address _superChargerVault
    ) external onlyOwner {
        weth = _weth;
        want = _want;
        accessManager = _accessManager;
        superChargerVault = _superChargerVault;
    }

    modifier onlyAdmin() {
        require(
            owner() == msg.sender || IWooAccessManager(accessManager).isVaultAdmin(msg.sender),
            "WooWithdrawManager: !owner"
        );
        _;
    }

    modifier onlySuperChargerVault() {
        require(superChargerVault == msg.sender, "WooWithdrawManager: !superChargerVault");
        _;
    }

    function setSuperChargerVault(address _superChargerVault) external onlyAdmin {
        superChargerVault = _superChargerVault;
    }

    function addWithdrawAmount(address user, uint256 amount) external onlySuperChargerVault {
        TransferHelper.safeTransferFrom(want, msg.sender, address(this), amount);
        withdrawAmount[user] = withdrawAmount[user] + amount;
        emit WithdrawAdded(user, amount, withdrawAmount[user]);
    }

    function withdraw() external nonReentrant {
        uint256 amount = withdrawAmount[msg.sender];
        if (amount == 0) {
            return;
        }
        withdrawAmount[msg.sender] = 0;
        if (want == weth) {
            IWETH(weth).withdraw(amount);
            TransferHelper.safeTransferETH(msg.sender, amount);
        } else {
            TransferHelper.safeTransfer(want, msg.sender, amount);
        }
        emit Withdraw(msg.sender, amount);
    }

    function inCaseTokenGotStuck(address stuckToken) external onlyOwner {
        require(stuckToken != want);
        if (stuckToken == ETH_PLACEHOLDER_ADDR) {
            TransferHelper.safeTransferETH(msg.sender, address(this).balance);
        } else {
            uint256 amount = IERC20(stuckToken).balanceOf(address(this));
            TransferHelper.safeTransfer(stuckToken, msg.sender, amount);
        }
    }

    receive() external payable {}
}

File 2 of 12 : IWETH.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/// @title Wrapped ETH.
interface IWETH {
    /// @dev Deposit ETH into WETH
    function deposit() external payable;

    /// @dev Transfer WETH to receiver
    /// @param to address of WETH receiver
    /// @param value amount of WETH to transfer
    /// @return get true when succeed, else false
    function transfer(address to, uint256 value) external returns (bool);

    /// @dev Withdraw WETH to ETH
    function withdraw(uint256) external;
}

File 3 of 12 : TransferHelper.sol
// SPDX-License-Identifier: GPL-3.0-or-later
pragma solidity ^0.8.0;

// helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false
library TransferHelper {
    function safeApprove(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('approve(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeApprove: approve failed'
        );
    }

    function safeTransfer(
        address token,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transfer(address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::safeTransfer: transfer failed'
        );
    }

    function safeTransferFrom(
        address token,
        address from,
        address to,
        uint256 value
    ) internal {
        // bytes4(keccak256(bytes('transferFrom(address,address,uint256)')));
        (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value));
        require(
            success && (data.length == 0 || abi.decode(data, (bool))),
            'TransferHelper::transferFrom: transferFrom failed'
        );
    }

    function safeTransferETH(address to, uint256 value) internal {
        (bool success, ) = to.call{value: value}(new bytes(0));
        require(success, 'TransferHelper::safeTransferETH: ETH transfer failed');
    }
}

File 4 of 12 : IWooAccessManager.sol
// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;

/*

░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝

*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/// @title Reward manager interface for WooFi Swap.
/// @notice this is for swap rebate or potential incentive program
interface IWooAccessManager {
    /* ----- Events ----- */

    event FeeAdminUpdated(address indexed feeAdmin, bool flag);

    event VaultAdminUpdated(address indexed vaultAdmin, bool flag);

    event RebateAdminUpdated(address indexed rebateAdmin, bool flag);

    event ZeroFeeVaultUpdated(address indexed vault, bool flag);

    /* ----- External Functions ----- */

    function isFeeAdmin(address feeAdmin) external returns (bool);

    function isVaultAdmin(address vaultAdmin) external returns (bool);

    function isRebateAdmin(address rebateAdmin) external returns (bool);

    function isZeroFeeVault(address vault) external returns (bool);

    /* ----- Admin Functions ----- */

    /// @notice Sets feeAdmin
    function setFeeAdmin(address feeAdmin, bool flag) external;

    /// @notice Sets vaultAdmin
    function setVaultAdmin(address vaultAdmin, bool flag) external;

    /// @notice Sets rebateAdmin
    function setRebateAdmin(address rebateAdmin, bool flag) external;

    /// @notice Sets zeroFeeVault
    function setZeroFeeVault(address vault, bool flag) external;
}

File 5 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @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.
 *
 * By default, the owner account will be the one that deploys the contract. 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;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @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 {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing 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 {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _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 6 of 12 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;

        _;

        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 7 of 12 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 *
 * [WARNING]
 * ====
 *  Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable.
 *  See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 *  In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet.
 * ====
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 8 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @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;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 9 of 12 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @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;
    }
}

File 10 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @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 amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` 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 amount) 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 `amount` 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 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` 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 amount
    ) external returns (bool);
}

File 11 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @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, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * 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.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @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`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // 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(errorMessage);
            }
        }
    }
}

File 12 of 12 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @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.
 */
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].
     */
    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);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 20000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"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":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Withdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"addedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"totalAmount","type":"uint256"}],"name":"WithdrawAdded","type":"event"},{"inputs":[],"name":"accessManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addWithdrawAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stuckToken","type":"address"}],"name":"inCaseTokenGotStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_want","type":"address"},{"internalType":"address","name":"_accessManager","type":"address"},{"internalType":"address","name":"_superChargerVault","type":"address"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_superChargerVault","type":"address"}],"name":"setSuperChargerVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"superChargerVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"withdrawAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

Deployed Bytecode

0x6080604052600436106100d65760003560e01c80634f4201511161007f5780639b927a91116100595780639b927a9114610265578063e1a4e72a14610285578063f2fde38b146102a5578063fdcb6068146102c557600080fd5b80634f420151146101ea578063715018a6146102255780638da5cb5b1461023a57600080fd5b8063245b74be116100b0578063245b74be1461017b5780633ccfd60b146101a85780633fc8cef3146101bd57600080fd5b806306552ff3146100e25780631779aacf146101045780631f1fcd511461012457600080fd5b366100dd57005b600080fd5b3480156100ee57600080fd5b506101026100fd366004610f5c565b6102f2565b005b34801561011057600080fd5b5061010261011f366004610fb0565b61036f565b34801561013057600080fd5b506002546101519073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020015b60405180910390f35b34801561018757600080fd5b506005546101519073ffffffffffffffffffffffffffffffffffffffff1681565b3480156101b457600080fd5b506101026104f3565b3480156101c957600080fd5b506003546101519073ffffffffffffffffffffffffffffffffffffffff1681565b3480156101f657600080fd5b50610217610205366004610fb0565b60066020526000908152604090205481565b604051908152602001610172565b34801561023157600080fd5b506101026106ab565b34801561024657600080fd5b5060005473ffffffffffffffffffffffffffffffffffffffff16610151565b34801561027157600080fd5b50610102610280366004610fd2565b6106bf565b34801561029157600080fd5b506101026102a0366004610fb0565b610829565b3480156102b157600080fd5b506101026102c0366004610fb0565b610945565b3480156102d157600080fd5b506004546101519073ffffffffffffffffffffffffffffffffffffffff1681565b6102fa6109f9565b6003805473ffffffffffffffffffffffffffffffffffffffff9586167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216179091556002805494861694821694909417909355600480549285169284169290921790915560058054919093169116179055565b3361038f60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1614806104415750600480546040517faf5b052b000000000000000000000000000000000000000000000000000000008152339281019290925273ffffffffffffffffffffffffffffffffffffffff169063af5b052b906024016020604051808303816000875af115801561041d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104419190610ffc565b6104ac576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601a60248201527f576f6f57697468647261774d616e616765723a20216f776e657200000000000060448201526064015b60405180910390fd5b600580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60026001540361055f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104a3565b6002600155336000908152600660205260408120549081900361058257506106a5565b3360009081526006602052604081205560035460025473ffffffffffffffffffffffffffffffffffffffff91821691160361064a576003546040517f2e1a7d4d0000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff90911690632e1a7d4d90602401600060405180830381600087803b15801561062357600080fd5b505af1158015610637573d6000803e3d6000fd5b505050506106453382610a7a565b61066e565b60025461066e9073ffffffffffffffffffffffffffffffffffffffff163383610b89565b60405181815233907f884edad9ce6fa2440d8a54cc123490eb96d2768479d49ff9c7366125a94243649060200160405180910390a2505b60018055565b6106b36109f9565b6106bd6000610d1f565b565b60055473ffffffffffffffffffffffffffffffffffffffff163314610766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f576f6f57697468647261774d616e616765723a2021737570657243686172676560448201527f725661756c74000000000000000000000000000000000000000000000000000060648201526084016104a3565b60025461078b9073ffffffffffffffffffffffffffffffffffffffff16333084610d94565b73ffffffffffffffffffffffffffffffffffffffff82166000908152600660205260409020546107bc90829061101e565b73ffffffffffffffffffffffffffffffffffffffff8316600081815260066020526040908190208390555190917fb591178570f4e1d7626a207cca83ebb390a8e1fe4a53e1585333b7d990e6da7f9161081d91858252602082015260400190565b60405180910390a25050565b6108316109f9565b60025473ffffffffffffffffffffffffffffffffffffffff9081169082160361085957600080fd5b7fffffffffffffffffffffffff111111111111111111111111111111111111111273ffffffffffffffffffffffffffffffffffffffff8216016108a3576108a03347610a7a565b50565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015260009073ffffffffffffffffffffffffffffffffffffffff8316906370a0823190602401602060405180830381865afa158015610910573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610934919061105d565b9050610941823383610b89565b5050565b61094d6109f9565b73ffffffffffffffffffffffffffffffffffffffff81166109f0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104a3565b6108a081610d1f565b60005473ffffffffffffffffffffffffffffffffffffffff1633146106bd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104a3565b6040805160008082526020820190925273ffffffffffffffffffffffffffffffffffffffff8416908390604051610ab19190611076565b60006040518083038185875af1925050503d8060008114610aee576040519150601f19603f3d011682016040523d82523d6000602084013e610af3565b606091505b5050905080610b84576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603460248201527f5472616e7366657248656c7065723a3a736166655472616e736665724554483a60448201527f20455448207472616e73666572206661696c656400000000000000000000000060648201526084016104a3565b505050565b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691610c209190611076565b6000604051808303816000865af19150503d8060008114610c5d576040519150601f19603f3d011682016040523d82523d6000602084013e610c62565b606091505b5091509150818015610c8c575080511580610c8c575080806020019051810190610c8c9190610ffc565b610d18576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602d60248201527f5472616e7366657248656c7065723a3a736166655472616e736665723a20747260448201527f616e73666572206661696c65640000000000000000000000000000000000000060648201526084016104a3565b5050505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6040805173ffffffffffffffffffffffffffffffffffffffff85811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd000000000000000000000000000000000000000000000000000000001790529151600092839290881691610e339190611076565b6000604051808303816000865af19150503d8060008114610e70576040519150601f19603f3d011682016040523d82523d6000602084013e610e75565b606091505b5091509150818015610e9f575080511580610e9f575080806020019051810190610e9f9190610ffc565b610f2b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603160248201527f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a20747260448201527f616e7366657246726f6d206661696c656400000000000000000000000000000060648201526084016104a3565b505050505050565b803573ffffffffffffffffffffffffffffffffffffffff81168114610f5757600080fd5b919050565b60008060008060808587031215610f7257600080fd5b610f7b85610f33565b9350610f8960208601610f33565b9250610f9760408601610f33565b9150610fa560608601610f33565b905092959194509250565b600060208284031215610fc257600080fd5b610fcb82610f33565b9392505050565b60008060408385031215610fe557600080fd5b610fee83610f33565b946020939093013593505050565b60006020828403121561100e57600080fd5b81518015158114610fcb57600080fd5b60008219821115611058577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500190565b60006020828403121561106f57600080fd5b5051919050565b6000825160005b81811015611097576020818601810151858301520161107d565b818111156110a6576000828501525b50919091019291505056fea26469706673582212201c1f7b1843d536768334b7f9236323e48a5d5b24f5cbda098179159320df144c64736f6c634300080e0033

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.