Overview
S Balance
0 S
S Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
4267992 | 3 days ago | Contract Creation | 0 S |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x93Fa4604...4eD36c7ef The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
PairFees
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import './interfaces/IERC20.sol'; // Pair Fees contract is used as a 1:1 pair relationship to split out fees, this ensures that the curve does not need to be modified for LP shares contract PairFees { address internal immutable pair; // The pair it is bonded to address internal immutable token0; // token0 of pair, saved localy and statically for gas optimization address internal immutable token1; // Token1 of pair, saved localy and statically for gas optimization uint256 public toStake0; uint256 public toStake1; constructor(address _token0, address _token1) { pair = msg.sender; token0 = _token0; token1 = _token1; } function _safeTransfer(address token,address to,uint256 value) internal { require(token.code.length > 0); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value)); require(success && (data.length == 0 || abi.decode(data, (bool)))); } // Allow the pair to transfer fees to users function claimFeesFor(address recipient, uint amount0, uint amount1) external { require(msg.sender == pair); if (amount0 > 0) _safeTransfer(token0, recipient, amount0); if (amount1 > 0) _safeTransfer(token1, recipient, amount1); } function processStakingFees(uint amount, bool isTokenZero) external { require(msg.sender == pair); if(amount > 0 && isTokenZero){ toStake0 += amount; } if(amount > 0 && !isTokenZero){ toStake1 += amount; } } function withdrawStakingFees(address recipient) external { require(msg.sender == pair); if (toStake0 > 0){ _safeTransfer(token0, recipient, toStake0); toStake0 = 0; } if (toStake1 > 0){ _safeTransfer(token1, recipient, toStake1); toStake1 = 0; } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; interface IERC20 { function totalSupply() external view returns (uint256); function transfer(address recipient, uint amount) external returns (bool); function decimals() external view returns (uint8); function symbol() external view returns (string memory); function balanceOf(address) external view returns (uint); function transferFrom(address sender, address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_token0","type":"address"},{"internalType":"address","name":"_token1","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount0","type":"uint256"},{"internalType":"uint256","name":"amount1","type":"uint256"}],"name":"claimFeesFor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"isTokenZero","type":"bool"}],"name":"processStakingFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toStake0","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toStake1","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"withdrawStakingFees","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063533cf5ce1461005c5780635b3c924814610071578063651d83f91461008c5780638d4dabff14610095578063f8518b89146100a8575b600080fd5b61006f61006a36600461039c565b6100bb565b005b61007a60015481565b60405190815260200160405180910390f35b61007a60005481565b61006f6100a33660046103dd565b610157565b61006f6100b636600461040d565b6101e4565b336001600160a01b037f0000000000000000000000003034b5c49332bb2663bddaacf6ad946d9c1d3a7d16146100f057600080fd5b8115610121576101217f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad388484610291565b8015610152576101527f000000000000000000000000763e2c06146aef0e11b13d05502f1152ee92969f8483610291565b505050565b336001600160a01b037f0000000000000000000000003034b5c49332bb2663bddaacf6ad946d9c1d3a7d161461018c57600080fd5b6000821180156101995750805b156101b557816000808282546101af919061042f565b90915550505b6000821180156101c3575080155b156101e05781600160008282546101da919061042f565b90915550505b5050565b336001600160a01b037f0000000000000000000000003034b5c49332bb2663bddaacf6ad946d9c1d3a7d161461021957600080fd5b600054156102535761024e7f000000000000000000000000039e2fb66102314ce7b64ce5ce3e5183bc94ad3882600054610291565b600080555b6001541561028e576102887f000000000000000000000000763e2c06146aef0e11b13d05502f1152ee92969f82600154610291565b60006001555b50565b6000836001600160a01b03163b116102a857600080fd5b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b17905291516000928392908716916103049190610455565b6000604051808303816000865af19150503d8060008114610341576040519150601f19603f3d011682016040523d82523d6000602084013e610346565b606091505b50915091508180156103705750805115806103705750808060200190518101906103709190610490565b61037957600080fd5b5050505050565b80356001600160a01b038116811461039757600080fd5b919050565b6000806000606084860312156103b157600080fd5b6103ba84610380565b95602085013595506040909401359392505050565b801515811461028e57600080fd5b600080604083850312156103f057600080fd5b823591506020830135610402816103cf565b809150509250929050565b60006020828403121561041f57600080fd5b61042882610380565b9392505050565b6000821982111561045057634e487b7160e01b600052601160045260246000fd5b500190565b6000825160005b81811015610476576020818601810151858301520161045c565b81811115610485576000828501525b509190910192915050565b6000602082840312156104a257600080fd5b8151610428816103cf56fea2646970667358221220bc7b7ba3ed402e2260b246b969b2950543e1b823ed680664b9cd4f6bee8131dd64736f6c634300080d0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.