Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Redeem Fees | 19122623 | 366 days ago | IN | 0 ETH | 0.00070022 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
19122623 | 366 days ago | 0.32725 ETH | ||||
18131056 | 505 days ago | 0.00077 ETH | ||||
18131053 | 505 days ago | 0.00077 ETH | ||||
18115920 | 507 days ago | 0.00077 ETH | ||||
18101035 | 509 days ago | 0.00077 ETH | ||||
18093596 | 510 days ago | 0.00077 ETH | ||||
18091627 | 510 days ago | 0.00077 ETH | ||||
18091624 | 510 days ago | 0.00077 ETH | ||||
18091438 | 510 days ago | 0.00077 ETH | ||||
18086357 | 511 days ago | 0.00077 ETH | ||||
18061472 | 514 days ago | 0.00077 ETH | ||||
18060472 | 515 days ago | 0.00077 ETH | ||||
18060469 | 515 days ago | 0.00077 ETH | ||||
18054839 | 515 days ago | 0.00077 ETH | ||||
18051130 | 516 days ago | 0.00077 ETH | ||||
18050944 | 516 days ago | 0.00077 ETH | ||||
18049489 | 516 days ago | 0.00077 ETH | ||||
18046001 | 517 days ago | 0.00077 ETH | ||||
18037016 | 518 days ago | 0.00077 ETH | ||||
18036349 | 518 days ago | 0.00077 ETH | ||||
18035246 | 518 days ago | 0.00077 ETH | ||||
18034604 | 518 days ago | 0.00077 ETH | ||||
18033042 | 518 days ago | 0.00077 ETH | ||||
18032731 | 519 days ago | 0.00077 ETH | ||||
18032615 | 519 days ago | 0.00077 ETH |
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
Contract Source Code (Solidity Standard Json-Input format)
// 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 {} }
// 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); } }
// 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; }
// 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; } }
{ "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
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
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
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.