Source Code
Overview
ETH Balance
0 ETH
ETH Value
$0.00
Cross-Chain Transactions
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
FeeHook
Compiler Version
v0.8.26+commit.8a97fa7a
Optimization Enabled:
Yes with 1 runs
Other Settings:
cancun EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
import {IFeeHook} from "src/interfaces/utils/IFeeHook.sol";
import {IEverlongCore} from "src/interfaces/core/IEverlongCore.sol";
/**
* @title FeeHook
* @author Everlong Labs
* @notice Simple settable fee for MLVs
*/
contract FeeHook is IFeeHook {
uint256 fee;
IEverlongCore immutable public everlongCore;
error NotOwner(address caller);
constructor(uint256 _fee, address _everlongCore) {
fee = _fee;
everlongCore = IEverlongCore(_everlongCore);
}
function setFee(uint256 _fee) external {
if (msg.sender != everlongCore.owner()) revert NotOwner(msg.sender);
fee = _fee;
}
function calcFee(address caller, address token, uint amount, Action action) external view returns (uint256 feeInBP) {
return fee;
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
interface IFeeHook {
enum Action {
DEPOSIT,
MINT,
WITHDRAW,
REDEEM
}
function calcFee(address caller, address token, uint amount, Action action) external view returns (uint feeInBP);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
/**
* @title EverlongCore
* @author Everlong Labs
* @notice Single source of truth across all Everlong contracts for key administrative data
*/
interface IEverlongCore {
function owner() external view returns (address);
function feeReceiver() external view returns (address);
function priceFeed() external view returns (address);
function setFeeReceiver(address _feeReceiver) external;
}{
"remappings": [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"@openzeppelin-upgradeable/contracts/=lib/openzeppelin-contracts-upgradeable/contracts/",
"forge-std/=lib/forge-std/src/",
"@uniswap/v3-core/=lib/v3-core/",
"@uniswap/v3-periphery/=lib/v3-periphery/",
"@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
"ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
"halmos-cheatcodes/=lib/openzeppelin-contracts-upgradeable/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"v3-core/=lib/v3-core/contracts/",
"v3-periphery/=lib/v3-periphery/contracts/"
],
"optimizer": {
"enabled": true,
"runs": 1
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "cancun",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"},{"internalType":"address","name":"_everlongCore","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"NotOwner","type":"error"},{"inputs":[{"internalType":"address","name":"caller","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"enum IFeeHook.Action","name":"action","type":"uint8"}],"name":"calcFee","outputs":[{"internalType":"uint256","name":"feeInBP","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"everlongCore","outputs":[{"internalType":"contract IEverlongCore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a0604052348015600e575f80fd5b506040516102fd3803806102fd833981016040819052602b916040565b5f919091556001600160a01b03166080526078565b5f80604083850312156050575f80fd5b825160208401519092506001600160a01b0381168114606d575f80fd5b809150509250929050565b6080516102686100955f395f81816048015260bd01526102685ff3fe608060405234801561000f575f80fd5b506004361061003f575f3560e01c806321216ba314610043578063385d2ae21461008057806369fe0e2d146100a6575b5f80fd5b61006a7f000000000000000000000000000000000000000000000000000000000000000081565b604051610077919061017b565b60405180910390f35b61009861008e3660046101a6565b5f54949350505050565b604051908152602001610077565b6100b96100b43660046101f9565b6100bb565b005b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610117573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061013b9190610210565b6001600160a01b0316336001600160a01b031614610177573360405163245aecd360e01b815260040161016e919061017b565b60405180910390fd5b5f55565b6001600160a01b0391909116815260200190565b6001600160a01b03811681146101a3575f80fd5b50565b5f805f80608085870312156101b9575f80fd5b84356101c48161018f565b935060208501356101d48161018f565b9250604085013591506060850135600481106101ee575f80fd5b939692955090935050565b5f60208284031215610209575f80fd5b5035919050565b5f60208284031215610220575f80fd5b815161022b8161018f565b939250505056fea2646970667358221220618a8115880d5b38bcd614127dbf584816eb2d45a53b5b9eefa6dd150fdfdc9364736f6c634300081a00330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000776d3a1591e3f8b466b9cee9dd1d849c92b30ca5
Deployed Bytecode
0x608060405234801561000f575f80fd5b506004361061003f575f3560e01c806321216ba314610043578063385d2ae21461008057806369fe0e2d146100a6575b5f80fd5b61006a7f000000000000000000000000776d3a1591e3f8b466b9cee9dd1d849c92b30ca581565b604051610077919061017b565b60405180910390f35b61009861008e3660046101a6565b5f54949350505050565b604051908152602001610077565b6100b96100b43660046101f9565b6100bb565b005b7f000000000000000000000000776d3a1591e3f8b466b9cee9dd1d849c92b30ca56001600160a01b0316638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610117573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061013b9190610210565b6001600160a01b0316336001600160a01b031614610177573360405163245aecd360e01b815260040161016e919061017b565b60405180910390fd5b5f55565b6001600160a01b0391909116815260200190565b6001600160a01b03811681146101a3575f80fd5b50565b5f805f80608085870312156101b9575f80fd5b84356101c48161018f565b935060208501356101d48161018f565b9250604085013591506060850135600481106101ee575f80fd5b939692955090935050565b5f60208284031215610209575f80fd5b5035919050565b5f60208284031215610220575f80fd5b815161022b8161018f565b939250505056fea2646970667358221220618a8115880d5b38bcd614127dbf584816eb2d45a53b5b9eefa6dd150fdfdc9364736f6c634300081a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000776d3a1591e3f8b466b9cee9dd1d849c92b30ca5
-----Decoded View---------------
Arg [0] : _fee (uint256): 0
Arg [1] : _everlongCore (address): 0x776D3a1591E3F8b466B9Cee9DD1D849C92B30Ca5
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [1] : 000000000000000000000000776d3a1591e3f8b466b9cee9dd1d849c92b30ca5
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.