Overview
S Balance
0 S
S Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 38 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Remove Liquidity | 5857917 | 47 hrs ago | IN | 0 S | 0.03141831 | ||||
Remove Liquidity | 5503078 | 5 days ago | IN | 0 S | 0.03129672 | ||||
Remove Liquidity | 5238256 | 7 days ago | IN | 0 S | 0.03522711 | ||||
Remove Liquidity | 4977897 | 9 days ago | IN | 0 S | 0.03062892 | ||||
Remove Liquidity | 4839555 | 10 days ago | IN | 0 S | 0.04092847 | ||||
Remove Liquidity | 4769360 | 10 days ago | IN | 0 S | 0.03280112 | ||||
Remove Liquidity | 4507961 | 12 days ago | IN | 0 S | 0.03566099 | ||||
Remove Liquidity | 4436258 | 13 days ago | IN | 0 S | 0.02614331 | ||||
Remove Liquidity | 4403929 | 13 days ago | IN | 0 S | 0.03085368 | ||||
Remove Liquidity | 4337344 | 14 days ago | IN | 0 S | 0.07426009 | ||||
Remove Liquidity | 4314703 | 14 days ago | IN | 0 S | 0.02629384 | ||||
Remove Liquidity | 4186571 | 15 days ago | IN | 0 S | 0.05899968 | ||||
Remove Liquidity | 4158593 | 15 days ago | IN | 0 S | 0.07092272 | ||||
Remove Liquidity | 4151177 | 15 days ago | IN | 0 S | 0.07605868 | ||||
Remove Liquidity | 4102107 | 15 days ago | IN | 0 S | 0.01599792 | ||||
Remove Liquidity | 4081818 | 16 days ago | IN | 0 S | 0.01896754 | ||||
Remove Liquidity | 4081367 | 16 days ago | IN | 0 S | 0.11644795 | ||||
Remove Liquidity | 4081323 | 16 days ago | IN | 0 S | 0.11644795 | ||||
Remove Liquidity | 4079752 | 16 days ago | IN | 0 S | 0.11644795 | ||||
Remove Liquidity | 4073985 | 16 days ago | IN | 0 S | 0.02159232 | ||||
Remove Liquidity | 4052346 | 16 days ago | IN | 0 S | 0.02003769 | ||||
Remove Liquidity | 3933095 | 17 days ago | IN | 0 S | 0.01745898 | ||||
Remove Liquidity | 3929432 | 17 days ago | IN | 0 S | 0.01750683 | ||||
Remove Liquidity | 3876739 | 17 days ago | IN | 0 S | 0.00374108 | ||||
Remove Liquidity | 3756524 | 18 days ago | IN | 0 S | 0.0032252 |
Loading...
Loading
Contract Name:
Blacksail_SwapX_QoL
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.20; import '../interfacing/ichi/IICHIVault.sol'; import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; // Helper contract for normal liquidity withdrawal contract Blacksail_SwapX_QoL { event WithdrawLiquidity(address indexed token0, uint256 amount0, address indexed token1, uint256 amount1, address indexed to); constructor() {} /** * @notice Allows users to withdraw their liquidity from an ICHI vault without relying on the native platform's UI. * @dev This function is designed to provide a streamlined withdrawal process, especially for users who are * not staked in the platform's gauge and therefore cannot withdraw liquidity directly via the native UI. * It transfers the user's full LP token balance to the vault, withdrawing the corresponding amounts * of Token0 and Token1 back to the user. * @param ichiVault The address of the ICHI vault from which liquidity will be withdrawn. * * Emits a {WithdrawLiquidity} event with the withdrawn token amounts and recipient details. */ function removeLiquidity(address ichiVault) external { uint256 amount0; uint256 amount1; address token0 = IICHIVault(ichiVault).token0(); address token1 = IICHIVault(ichiVault).token1(); uint256 liquidity = IERC20(ichiVault).balanceOf(msg.sender); IERC20(ichiVault).transferFrom(msg.sender, address(this), liquidity); (amount0, amount1) = IICHIVault(ichiVault).withdraw(liquidity, msg.sender); emit WithdrawLiquidity(token0, amount0, token1, amount1, msg.sender); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-20 standard as defined in the ERC. */ 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 value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` 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 value) external returns (bool); }
// SPDX-License-Identifier: Unlicense pragma solidity >=0.5.0; import { IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IICHIVault is IERC20 { function ichiVaultFactory() external view returns (address); function pool() external view returns (address); function token0() external view returns (address); function allowToken0() external view returns (bool); function token1() external view returns (address); function allowToken1() external view returns (bool); function fee() external view returns (uint24); function tickSpacing() external view returns (int24); function affiliate() external view returns (address); function baseLower() external view returns (int24); function baseUpper() external view returns (int24); function limitLower() external view returns (int24); function limitUpper() external view returns (int24); function deposit0Max() external view returns (uint256); function deposit1Max() external view returns (uint256); function maxTotalSupply() external view returns (uint256); function hysteresis() external view returns (uint256); function getTotalAmounts() external view returns (uint256, uint256); function deposit(uint256, uint256, address) external returns (uint256); function withdraw(uint256, address) external returns (uint256, uint256); function rebalance( int24 _baseLower, int24 _baseUpper, int24 _limitLower, int24 _limitUpper, int256 swapQuantity ) external; function setDepositMax(uint256 _deposit0Max, uint256 _deposit1Max) external; function setAffiliate(address _affiliate) external; event DeployICHIVault( address indexed sender, address indexed pool, bool allowToken0, bool allowToken1, address owner, uint256 twapPeriod ); event SetTwapPeriod(address sender, uint32 newTwapPeriod); event Deposit(address indexed sender, address indexed to, uint256 shares, uint256 amount0, uint256 amount1); event Withdraw(address indexed sender, address indexed to, uint256 shares, uint256 amount0, uint256 amount1); event Rebalance( int24 tick, uint256 totalAmount0, uint256 totalAmount1, uint256 feeAmount0, uint256 feeAmount1, uint256 totalSupply ); event MaxTotalSupply(address indexed sender, uint256 maxTotalSupply); event Hysteresis(address indexed sender, uint256 hysteresis); event DepositMax(address indexed sender, uint256 deposit0Max, uint256 deposit1Max); event Affiliate(address indexed sender, address affiliate); }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "paris", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token0","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount0","type":"uint256"},{"indexed":true,"internalType":"address","name":"token1","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount1","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"WithdrawLiquidity","type":"event"},{"inputs":[{"internalType":"address","name":"ichiVault","type":"address"}],"name":"removeLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080806040523461001657610315908161001c8239f35b600080fdfe60806040908082526004908136101561001757600080fd5b600092833560e01c63d798f86e1461002e57600080fd5b3461027f5760208060031936011261027b5783356001600160a01b03818116939184900361018b57630dfe168160e01b855282858781875afa94851561019657879561025c575b50815163d21220a760e01b81529583878281885afa968715610252578897610223575b5082516370a0823160e01b81523382820152908482602481895afa9182156102195789926101ea575b5083516323b872dd60e01b815233828201523060248201526044810183905285816064818d8b5af180156101e05790859392916101a0575b506044908a84519889948593627b8a6760e11b85528401523360248401525af18015610196578793889161015e575b835194855284015233958116941692507f5d6102171d38f5a0418b7f4b7affa937788ec4c74960ea0f04c6c4d5c8f85ba891a480f35b9350508184813d831161018f575b6101768183610283565b8101031261018b578351938301518493610128565b8680fd5b503d61016c565b82513d89823e3d90fd5b9092508581813d83116101d9575b6101b88183610283565b810103126101d55751801515036101d1578391386100f9565b8880fd5b8980fd5b503d6101ae565b85513d8c823e3d90fd5b9091508481813d8311610212575b6102028183610283565b810103126101d1575190386100c1565b503d6101f8565b84513d8b823e3d90fd5b610244919750843d861161024b575b61023c8183610283565b8101906102bb565b9538610098565b503d610232565b83513d8a823e3d90fd5b610274919550833d851161024b5761023c8183610283565b9338610075565b8480fd5b8380fd5b90601f8019910116810190811067ffffffffffffffff8211176102a557604052565b634e487b7160e01b600052604160045260246000fd5b908160209103126102da57516001600160a01b03811681036102da5790565b600080fdfea2646970667358221220ba4f1beca4b0178cec58b158622768a79a7fad822376cdb624bffb370cc7acb464736f6c63430008140033
Deployed Bytecode
0x60806040908082526004908136101561001757600080fd5b600092833560e01c63d798f86e1461002e57600080fd5b3461027f5760208060031936011261027b5783356001600160a01b03818116939184900361018b57630dfe168160e01b855282858781875afa94851561019657879561025c575b50815163d21220a760e01b81529583878281885afa968715610252578897610223575b5082516370a0823160e01b81523382820152908482602481895afa9182156102195789926101ea575b5083516323b872dd60e01b815233828201523060248201526044810183905285816064818d8b5af180156101e05790859392916101a0575b506044908a84519889948593627b8a6760e11b85528401523360248401525af18015610196578793889161015e575b835194855284015233958116941692507f5d6102171d38f5a0418b7f4b7affa937788ec4c74960ea0f04c6c4d5c8f85ba891a480f35b9350508184813d831161018f575b6101768183610283565b8101031261018b578351938301518493610128565b8680fd5b503d61016c565b82513d89823e3d90fd5b9092508581813d83116101d9575b6101b88183610283565b810103126101d55751801515036101d1578391386100f9565b8880fd5b8980fd5b503d6101ae565b85513d8c823e3d90fd5b9091508481813d8311610212575b6102028183610283565b810103126101d1575190386100c1565b503d6101f8565b84513d8b823e3d90fd5b610244919750843d861161024b575b61023c8183610283565b8101906102bb565b9538610098565b503d610232565b83513d8a823e3d90fd5b610274919550833d851161024b5761023c8183610283565b9338610075565b8480fd5b8380fd5b90601f8019910116810190811067ffffffffffffffff8211176102a557604052565b634e487b7160e01b600052604160045260246000fd5b908160209103126102da57516001600160a01b03811681036102da5790565b600080fdfea2646970667358221220ba4f1beca4b0178cec58b158622768a79a7fad822376cdb624bffb370cc7acb464736f6c63430008140033
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.