ETH Price: $3,260.96 (+2.36%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Redeem Fees191226232024-01-30 23:32:47366 days ago1706657567IN
0xf2A2bE92...39eFbD66C
0 ETH0.0007002223.09893011

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block
From
To
191226232024-01-30 23:32:47366 days ago1706657567
0xf2A2bE92...39eFbD66C
0.32725 ETH
181310562023-09-14 0:49:47505 days ago1694652587
0xf2A2bE92...39eFbD66C
0.00077 ETH
181310532023-09-14 0:49:11505 days ago1694652551
0xf2A2bE92...39eFbD66C
0.00077 ETH
181159202023-09-11 21:53:47507 days ago1694469227
0xf2A2bE92...39eFbD66C
0.00077 ETH
181010352023-09-09 19:51:59509 days ago1694289119
0xf2A2bE92...39eFbD66C
0.00077 ETH
180935962023-09-08 18:51:11510 days ago1694199071
0xf2A2bE92...39eFbD66C
0.00077 ETH
180916272023-09-08 12:14:11510 days ago1694175251
0xf2A2bE92...39eFbD66C
0.00077 ETH
180916242023-09-08 12:13:35510 days ago1694175215
0xf2A2bE92...39eFbD66C
0.00077 ETH
180914382023-09-08 11:35:59510 days ago1694172959
0xf2A2bE92...39eFbD66C
0.00077 ETH
180863572023-09-07 18:32:35511 days ago1694111555
0xf2A2bE92...39eFbD66C
0.00077 ETH
180614722023-09-04 6:58:11514 days ago1693810691
0xf2A2bE92...39eFbD66C
0.00077 ETH
180604722023-09-04 3:36:35515 days ago1693798595
0xf2A2bE92...39eFbD66C
0.00077 ETH
180604692023-09-04 3:35:59515 days ago1693798559
0xf2A2bE92...39eFbD66C
0.00077 ETH
180548392023-09-03 8:40:23515 days ago1693730423
0xf2A2bE92...39eFbD66C
0.00077 ETH
180511302023-09-02 20:12:59516 days ago1693685579
0xf2A2bE92...39eFbD66C
0.00077 ETH
180509442023-09-02 19:35:35516 days ago1693683335
0xf2A2bE92...39eFbD66C
0.00077 ETH
180494892023-09-02 14:40:47516 days ago1693665647
0xf2A2bE92...39eFbD66C
0.00077 ETH
180460012023-09-02 2:56:11517 days ago1693623371
0xf2A2bE92...39eFbD66C
0.00077 ETH
180370162023-08-31 20:43:47518 days ago1693514627
0xf2A2bE92...39eFbD66C
0.00077 ETH
180363492023-08-31 18:28:23518 days ago1693506503
0xf2A2bE92...39eFbD66C
0.00077 ETH
180352462023-08-31 14:46:35518 days ago1693493195
0xf2A2bE92...39eFbD66C
0.00077 ETH
180346042023-08-31 12:37:59518 days ago1693485479
0xf2A2bE92...39eFbD66C
0.00077 ETH
180330422023-08-31 7:24:23518 days ago1693466663
0xf2A2bE92...39eFbD66C
0.00077 ETH
180327312023-08-31 6:21:35519 days ago1693462895
0xf2A2bE92...39eFbD66C
0.00077 ETH
180326152023-08-31 5:58:11519 days ago1693461491
0xf2A2bE92...39eFbD66C
0.00077 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FeeManager

Compiler Version
v0.8.17+commit.8df45f5f

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 4 : FeeManager.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;

import "@openzeppelin-contracts/contracts/access/Ownable.sol";

import "../interfaces/IFeeManager.sol";

/**
 * @title FeeManager
 * @dev A fee manager contract designed to handle fees within the box
 */
contract FeeManager is IFeeManager, Ownable {
    uint256 public fee;
    uint256 public commissionBPS;

    /**
     * @dev Sets initial values for {fee} and {commissionBPS}.
     * @param _fee a flat fee, denominated in NATIVE, for transactions going through the box
     * @param _commissionBPS a bp fee, denominated in NATIVE, for transactions going through the box
     */
    constructor(uint256 _fee, uint256 _commissionBPS) {
        fee = _fee;
        commissionBPS = _commissionBPS;
    }

    /**
     * @dev allows owner to update the values for {fee} and {commissionBPS}.
     * @param _fee a flat fee, denominated in native, for transactions going through the box
     * @param _commissionBPS a bp fee, denominated in native, for transactions going through the box
     */
    function setFees(uint256 _fee, uint256 _commissionBPS) external onlyOwner {
        fee = _fee;
        commissionBPS = _commissionBPS;
    }

    /**
     * @dev calculates the bp fee on a transaction
     * @param amountIn The amount of native or erc20 being transferred.
     * @param tokenIn The address of the token being transferred, zero address for native currency.
     */
    function _calculateCommission(uint256 amountIn, address tokenIn) private view returns (uint256) {
        return commissionBPS == 0 || tokenIn != address(0) ? 0 : (amountIn * commissionBPS / 100_00);
    }

    /**
     * @dev calculates flat fee and bp fee for transaction, returns a tuple for both values
     * @param amountIn The amount of native or erc20 being transferred.
     * @param tokenIn The address of the token being transferred, zero address for native currency.
     */
    function calculateFees(uint256 amountIn, address tokenIn)
        external
        view
        returns (uint256 fees, uint256 commission)
    {
        return (fee, _calculateCommission(amountIn, tokenIn));
    }

    /**
     * @dev allows controller of feemanager to redeem fees
     */
    function redeemFees() external onlyOwner {
        (bool success,) = payable(msg.sender).call{value: address(this).balance}("");
        if (!success) {
            revert WithdrawFailed();
        }
    }

    receive() external payable {}
}

File 2 of 4 : 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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        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 3 of 4 : IFeeManager.sol
// SPDX-License-Identifier: BUSL-1.1
pragma solidity 0.8.17;

interface IFeeManager {
    error WithdrawFailed();

    function setFees(uint256 _fee, uint256 _commissionBPS) external;

    function calculateFees(uint256 amountIn, address tokenIn) external view returns (uint256 fee, uint256 commission);

    function redeemFees() external;
}

File 4 of 4 : 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;
    }
}

Settings
{
  "remappings": [
    "@openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "@uniswap/v3-core/=lib/v3-core/",
    "@uniswap/v3-periphery/=lib/v3-periphery/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/contracts/",
    "solmate/=lib/solmate/src/",
    "v3-core/=lib/v3-core/",
    "v3-periphery/=lib/v3-periphery/contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"uint256","name":"_commissionBPS","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WithdrawFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"inputs":[{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"}],"name":"calculateFees","outputs":[{"internalType":"uint256","name":"fees","type":"uint256"},{"internalType":"uint256","name":"commission","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"commissionBPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"redeemFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"uint256","name":"_commissionBPS","type":"uint256"}],"name":"setFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b5060405161058438038061058483398101604081905261002f91610096565b61003833610046565b6001919091556002556100ba565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156100a957600080fd5b505080516020909101519092909150565b6104bb806100c96000396000f3fe60806040526004361061007f5760003560e01c80638da5cb5b1161004e5780638da5cb5b14610111578063ddca3f4314610139578063e186dc341461015d578063f2fde38b1461017357600080fd5b80630b78f9c01461008b5780633a047bb3146100ad5780633f992d00146100c2578063715018a6146100fc57600080fd5b3661008657005b600080fd5b34801561009757600080fd5b506100ab6100a63660046103b9565b610193565b005b3480156100b957600080fd5b506100ab6101a6565b3480156100ce57600080fd5b506100e26100dd3660046103f7565b61021a565b604080519283526020830191909152015b60405180910390f35b34801561010857600080fd5b506100ab610235565b34801561011d57600080fd5b506000546040516001600160a01b0390911681526020016100f3565b34801561014557600080fd5b5061014f60015481565b6040519081526020016100f3565b34801561016957600080fd5b5061014f60025481565b34801561017f57600080fd5b506100ab61018e366004610423565b610249565b61019b6102c4565b600191909155600255565b6101ae6102c4565b604051600090339047908381818185875af1925050503d80600081146101f0576040519150601f19603f3d011682016040523d82523d6000602084013e6101f5565b606091505b505090508061021757604051631d42c86760e21b815260040160405180910390fd5b50565b60008060015461022a858561031e565b915091509250929050565b61023d6102c4565b6102476000610369565b565b6102516102c4565b6001600160a01b0381166102bb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61021781610369565b6000546001600160a01b031633146102475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102b2565b60006002546000148061033957506001600160a01b03821615155b61035d576127106002548461034e919061043e565b6103589190610463565b610360565b60005b90505b92915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156103cc57600080fd5b50508035926020909101359150565b80356001600160a01b03811681146103f257600080fd5b919050565b6000806040838503121561040a57600080fd5b8235915061041a602084016103db565b90509250929050565b60006020828403121561043557600080fd5b610360826103db565b808202811582820484141761036357634e487b7160e01b600052601160045260246000fd5b60008261048057634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212206c8c7bda9c3b5efd8193d5e2b0d468a257435b6edf8e552d7c6119df9897219064736f6c634300081100330000000000000000000000000000000000000000000000000002bc4f987a20000000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061007f5760003560e01c80638da5cb5b1161004e5780638da5cb5b14610111578063ddca3f4314610139578063e186dc341461015d578063f2fde38b1461017357600080fd5b80630b78f9c01461008b5780633a047bb3146100ad5780633f992d00146100c2578063715018a6146100fc57600080fd5b3661008657005b600080fd5b34801561009757600080fd5b506100ab6100a63660046103b9565b610193565b005b3480156100b957600080fd5b506100ab6101a6565b3480156100ce57600080fd5b506100e26100dd3660046103f7565b61021a565b604080519283526020830191909152015b60405180910390f35b34801561010857600080fd5b506100ab610235565b34801561011d57600080fd5b506000546040516001600160a01b0390911681526020016100f3565b34801561014557600080fd5b5061014f60015481565b6040519081526020016100f3565b34801561016957600080fd5b5061014f60025481565b34801561017f57600080fd5b506100ab61018e366004610423565b610249565b61019b6102c4565b600191909155600255565b6101ae6102c4565b604051600090339047908381818185875af1925050503d80600081146101f0576040519150601f19603f3d011682016040523d82523d6000602084013e6101f5565b606091505b505090508061021757604051631d42c86760e21b815260040160405180910390fd5b50565b60008060015461022a858561031e565b915091509250929050565b61023d6102c4565b6102476000610369565b565b6102516102c4565b6001600160a01b0381166102bb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b61021781610369565b6000546001600160a01b031633146102475760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102b2565b60006002546000148061033957506001600160a01b03821615155b61035d576127106002548461034e919061043e565b6103589190610463565b610360565b60005b90505b92915050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080604083850312156103cc57600080fd5b50508035926020909101359150565b80356001600160a01b03811681146103f257600080fd5b919050565b6000806040838503121561040a57600080fd5b8235915061041a602084016103db565b90509250929050565b60006020828403121561043557600080fd5b610360826103db565b808202811582820484141761036357634e487b7160e01b600052601160045260246000fd5b60008261048057634e487b7160e01b600052601260045260246000fd5b50049056fea26469706673582212206c8c7bda9c3b5efd8193d5e2b0d468a257435b6edf8e552d7c6119df9897219064736f6c63430008110033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

0000000000000000000000000000000000000000000000000002bc4f987a20000000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _fee (uint256): 770000000000000
Arg [1] : _commissionBPS (uint256): 0

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000002bc4f987a2000
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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