Overview
S Balance
S Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Add Ichi | 3684622 | 30 days ago | IN | 0 S | 0.00038132 |
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"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; // Helper contract for normal liquidity withdrawal contract Blacksail_SwapX_QoL is Ownable { using SafeERC20 for IERC20; event WithdrawLiquidity( address indexed token0, uint256 amount0, address indexed token1, uint256 amount1, address indexed to ); event AddLiquidity( address indexed tokenIn, uint256 amountIn, address indexed tokenOut, uint256 amountOut, address indexed to ); address[] public allowed; constructor() Ownable(msg.sender) {} /** * @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); } /** * @dev Adds liquidity to an ICHI vault by depositing the specified amount of tokens. * @param ichiVault The address of the ICHI vault to which liquidity will be added. * @param _amount The amount of deposit tokens to be added as liquidity. * * Requirements: * - `_amount` must not exceed the caller's balance of the deposit token. * - Caller must approve this contract to transfer `_amount` of the deposit token on their behalf. * * Functionality: * - Determines the deposit token and the side (0 or 1) based on the vault configuration. * - Transfers `_amount` of the deposit token from the caller to this contract. * - Based on the side, deposits the `_amount` into the appropriate side of the ICHI vault. * - Emits an `AddLiquidity` event upon successful deposit. * * Emits: * - {AddLiquidity} event indicating the details of the liquidity added. */ function addLiquidity(address ichiVault, uint256 _amount) external { (address depositToken, uint side) = getIchiDepositToken(ichiVault); require( _amount <= IERC20(depositToken).balanceOf(msg.sender), "Exceeds balance" ); IERC20(depositToken).transferFrom(msg.sender, address(this), _amount); uint256 shares; IERC20(depositToken).approve(ichiVault, _amount); if (side == 0) { shares = IICHIVault(ichiVault).deposit(_amount, 0, msg.sender); } if (side == 1) { shares = IICHIVault(ichiVault).deposit(0, _amount, msg.sender); } emit AddLiquidity(depositToken, _amount, ichiVault, shares, msg.sender); } /** * @dev Retrieves the eligible deposit token and its corresponding side for a given ICHI vault. * @param ichiVault The address of the ICHI vault. * @return The address of the eligible deposit token and the side (0 for token0, 1 for token1). * * Functionality: * - Checks if `token0` or `token1` is allowed for deposits in the specified ICHI vault. * - Returns the address of the eligible token and its associated side (0 for token0, 1 for token1). * - Reverts if both `token0` and `token1` are eligible, as this is considered invalid behavior. * * Requirements: * - The ICHI vault must allow exactly one token (`token0` or `token1`) for deposits. * * Reverts: * - If both `token0` and `token1` are eligible, with the message "!eligible". */ function getIchiDepositToken( address ichiVault ) public view returns (address, uint) { bool tok0 = IICHIVault(ichiVault).allowToken0(); bool tok1 = IICHIVault(ichiVault).allowToken1(); if (tok0 && !tok1) { return (IICHIVault(ichiVault).token0(), 0); } if (tok1 && !tok0) { return (IICHIVault(ichiVault).token1(), 1); } if (tok0 && tok1) { revert("!eliglble"); } } function algebraSwapCallback( int256 amount0Delta, int256 amount1Delta, bytes calldata data ) external { bool found; address ichi; for (uint256 i; i < allowed.length; i++) { if (msg.sender == allowed[i]) { found = true; ichi = msg.sender; break; } } if (!found) { revert("Unauthorized callback"); } (address depositToken, ) = getIchiDepositToken(ichi); if (amount0Delta > 0) { IERC20(depositToken).safeTransfer( msg.sender, uint256(amount0Delta) ); } else if (amount1Delta > 0) { IERC20(depositToken).safeTransfer( msg.sender, uint256(amount1Delta) ); } } function addIchi(address[] memory ichis) external onlyOwner { for (uint256 i; i < ichis.length; i++) { allowed.push(ichis[i]); } } function removeIchi(address ichi) external onlyOwner { uint256 length = allowed.length; for (uint256 i = 0; i < length; i++) { if (allowed[i] == ichi) { allowed[i] = allowed[length - 1]; allowed.pop(); return; } } revert("ICHI not found"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../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. * * The initial owner is set to the address provided by the deployer. 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; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @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 { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @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 { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _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: MIT // OpenZeppelin Contracts (last updated v5.1.0) (interfaces/IERC1363.sol) pragma solidity ^0.8.20; import {IERC20} from "./IERC20.sol"; import {IERC165} from "./IERC165.sol"; /** * @title IERC1363 * @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363]. * * Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract * after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction. */ interface IERC1363 is IERC20, IERC165 { /* * Note: the ERC-165 identifier for this interface is 0xb0202a11. * 0xb0202a11 === * bytes4(keccak256('transferAndCall(address,uint256)')) ^ * bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^ * bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^ * bytes4(keccak256('approveAndCall(address,uint256)')) ^ * bytes4(keccak256('approveAndCall(address,uint256,bytes)')) */ /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from the caller's account to `to` * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism * and then calls {IERC1363Receiver-onTransferReceived} on `to`. * @param from The address which you want to send tokens from. * @param to The address which you want to transfer to. * @param value The amount of tokens to be transferred. * @param data Additional data with no specified format, sent in call to `to`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value) external returns (bool); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`. * @param spender The address which will spend the funds. * @param value The amount of tokens to be spent. * @param data Additional data with no specified format, sent in call to `spender`. * @return A boolean value indicating whether the operation succeeded unless throwing. */ function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../token/ERC20/IERC20.sol";
// 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: MIT // OpenZeppelin Contracts (last updated v5.1.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; import {IERC1363} from "../../../interfaces/IERC1363.sol"; import {Address} from "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC-20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { /** * @dev An operation with an ERC-20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. * * IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client" * smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using * this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract * that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. * * NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function * only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being * set here. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { safeTransfer(token, to, value); } else if (!token.transferAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target * has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * Reverts if the returned value is other than `true`. */ function transferFromAndCallRelaxed( IERC1363 token, address from, address to, uint256 value, bytes memory data ) internal { if (to.code.length == 0) { safeTransferFrom(token, from, to, value); } else if (!token.transferFromAndCall(from, to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no * code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when * targeting contracts. * * NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}. * Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall} * once without retrying, and relies on the returned value to be true. * * Reverts if the returned value is other than `true`. */ function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal { if (to.code.length == 0) { forceApprove(token, to, value); } else if (!token.approveAndCall(to, value, data)) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements. */ function _callOptionalReturn(IERC20 token, bytes memory data) private { uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) // bubble errors if iszero(success) { let ptr := mload(0x40) returndatacopy(ptr, 0, returndatasize()) revert(ptr, returndatasize()) } returnSize := returndatasize() returnValue := mload(0) } if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { bool success; uint256 returnSize; uint256 returnValue; assembly ("memory-safe") { success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20) returnSize := returndatasize() returnValue := mload(0) } return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Address.sol) pragma solidity ^0.8.20; import {Errors} from "./Errors.sol"; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert Errors.InsufficientBalance(address(this).balance, amount); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert Errors.FailedCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {Errors.FailedCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert Errors.InsufficientBalance(address(this).balance, value); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {Errors.FailedCall}) in case * of an unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {Errors.FailedCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {Errors.FailedCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly ("memory-safe") { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert Errors.FailedCall(); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/Errors.sol) pragma solidity ^0.8.20; /** * @dev Collection of common custom errors used in multiple contracts * * IMPORTANT: Backwards compatibility is not guaranteed in future versions of the library. * It is recommended to avoid relying on the error API for critical functionality. * * _Available since v5.1._ */ library Errors { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error InsufficientBalance(uint256 balance, uint256 needed); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedCall(); /** * @dev The deployment failed. */ error FailedDeployment(); /** * @dev A necessary precompile is missing. */ error MissingPrecompile(address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.1.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC-165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[ERC]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view 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"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"tokenIn","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":true,"internalType":"address","name":"tokenOut","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"AddLiquidity","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"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":"ichis","type":"address[]"}],"name":"addIchi","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ichiVault","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"addLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"int256","name":"amount0Delta","type":"int256"},{"internalType":"int256","name":"amount1Delta","type":"int256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"algebraSwapCallback","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allowed","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ichiVault","type":"address"}],"name":"getIchiDepositToken","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"ichi","type":"address"}],"name":"removeIchi","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"ichiVault","type":"address"}],"name":"removeLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080806040523461007a5733156100645760008054336001600160a01b03198216811783556040519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3610ebb90816100808239f35b631e4fbdf760e01b815260006004820152602490fd5b600080fdfe6040608081526004908136101561001557600080fd5b600091823560e01c8063214296e8146109c55780632c8958f61461089257806351629c9d146108655780635668870014610575578063715018a61461051b5780638da5cb5b146104f3578063976c2bb7146104a7578063d798f86e1461025e578063ebfeaa20146101185763f2fde38b1461008f57600080fd5b34610114576020366003190112610114576100a8610a52565b906100b1610aa5565b6001600160a01b039182169283156100fe57505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b5082903461025a576020918260031936011261025757813567ffffffffffffffff93848211610114573660238301121561011457818401359485116102445760059185831b96519561016c83890188610a6d565b86528186016024809883010191368311610240578801905b82821061021d57505050610196610aa5565b825b85518110156102195760018060a01b038282851b880101511660018054906801000000000000000082101561020757916101de828461020296956101fd95019055610a05565b90919082549060031b9160018060a01b03809116831b921b1916179055565b610ce0565b610198565b634e487b7160e01b8752604188528987fd5b8380f35b81356001600160a01b038116810361023c578152908301908301610184565b8680fd5b8580fd5b634e487b7160e01b835260418452602483fd5b80fd5b5080fd5b50903461011457602090816003193601126104a3576001600160a01b039182610285610a52565b1691805193630dfe168160e01b855282858781875afa9485156103cd578795610484575b50815163d21220a760e01b81529583878281885afa96871561047a57889761044b575b5082516370a0823160e01b81523382820152908482602481895afa91821561044157899261040e575b5083516323b872dd60e01b8152338282019081523060208201526040810184905286908290819060600103818d8b5af1801561040457916044918694936103d7575b508a84519889948593627b8a6760e11b85528401523360248401525af180156103cd5787938891610399575b835194855284015233958116941692507f5d6102171d38f5a0418b7f4b7affa937788ec4c74960ea0f04c6c4d5c8f85ba891a480f35b9350508184813d83116103c6575b6103b18183610a6d565b8101031261023c578351938301518493610363565b503d6103a7565b82513d89823e3d90fd5b6103f690883d8a116103fd575b6103ee8183610a6d565b810190610af0565b5038610337565b503d6103e4565b85513d8c823e3d90fd5b9091508481813d831161043a575b6104268183610a6d565b81010312610436575190386102f5565b8880fd5b503d61041c565b84513d8b823e3d90fd5b61046c919750843d8611610473575b6104648183610a6d565b810190610ad1565b95386102cc565b503d61045a565b83513d8a823e3d90fd5b61049c919550833d8511610473576104648183610a6d565b93386102a9565b8380fd5b50503461025a57602036600319011261025a576104ef906104ce6104c9610a52565b610b08565b91516001600160a01b03909116815260208101919091529081906040820190565b0390f35b50503461025a578160031936011261025a57905490516001600160a01b039091168152602090f35b8334610257578060031936011261025757610534610aa5565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461011457816003193601126101145761058e610a52565b916024359161059c84610b08565b83516370a0823160e01b815233848201526001600160a01b039283169492919060209081816024818a5afa908115610404578a91610838575b5087116108045783516323b872dd60e01b8152338682019081523060208201526040810189905282908290819060600103818d8b5af18015610404576107e7575b50835163095ea7b360e01b81526001600160a01b038916868201908152602081018990528a9391908390829081900360400181878c5af180156107dd576107c0575b50801561074c575b60011461069b575b7fb43a337f0fe94ef11751a039d0524b95e0cf3e41c1edd5c2e798133995751edb9450835196875286015233951693a480f35b905087835194638dbdbe6d60e01b865285015285602485015233604485015280846064818b868c165af1801561047a5788906106fb575b7fb43a337f0fe94ef11751a039d0524b95e0cf3e41c1edd5c2e798133995751edb945090610668565b508084813d8311610745575b6107118183610a6d565b81010312610741577fb43a337f0fe94ef11751a039d0524b95e0cf3e41c1edd5c2e798133995751edb93516106d2565b8780fd5b503d610707565b8451638dbdbe6d60e01b8152868101899052602481018b905233604482015290925081816064818d8d89165af18015610404578a9061078e575b929050610660565b508181813d83116107b9575b6107a48183610a6d565b810103126107b55760019051610786565b8980fd5b503d61079a565b6107d690833d85116103fd576103ee8183610a6d565b5038610658565b86513d8d823e3d90fd5b6107fd90823d84116103fd576103ee8183610a6d565b5038610616565b8460649185519162461bcd60e51b8352820152600f60248201526e457863656564732062616c616e636560881b6044820152fd5b90508181813d831161085e575b61084f8183610a6d565b810103126107b55751386105d5565b503d610845565b83346102575760203660031901126102575761088f610882610a52565b61088a610aa5565b610da4565b80f35b509034610114576060366003190112610114578135906024359260443567ffffffffffffffff80821161023c573660238301121561023c578183013590811161023c57369101602401116109c157849185928660018054915b828110610982575b5050501561094757505061090690610b08565b509183821315610925575061088f9133906001600160a01b0316610d05565b905082811361093357505080f35b61088f9133906001600160a01b0316610d05565b906020606492519162461bcd60e51b83528201526015602482015274556e617574686f72697a65642063616c6c6261636b60581b6044820152fd5b61098b81610a05565b90543360039290921b1c6001600160a01b0316146109b1576109ac90610ce0565b6108eb565b50339550915038905080806108f3565b8480fd5b503461011457602036600319011261011457359160015483101561025757506109ef602092610a05565b905491519160018060a01b039160031b1c168152f35b600154811015610a3c5760016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60190600090565b634e487b7160e01b600052603260045260246000fd5b600435906001600160a01b0382168203610a6857565b600080fd5b90601f8019910116810190811067ffffffffffffffff821117610a8f57604052565b634e487b7160e01b600052604160045260246000fd5b6000546001600160a01b03163303610ab957565b60405163118cdaa760e01b8152336004820152602490fd5b90816020910312610a6857516001600160a01b0381168103610a685790565b90816020910312610a6857518015158103610a685790565b60408051631fde87bb60e21b81526000938493909260209290916001600160a01b0316858483600481855afa928315610cd4578193610cb5575b50835162df906d60e61b8152918583600481845afa928315610cab578293610c8c575b508380610c84575b610c29578280610c21575b610bc457505081610bbc575b50610b8d575050565b60649250519062461bcd60e51b82526004820152600960248201526821656c69676c626c6560b81b6044820152fd5b905038610b84565b845163d21220a760e01b81529698509396509284925085915060049082905afa938415610c17575092610bfa575b505090600190565b610c109250803d10610473576104648183610a6d565b3880610bf2565b51903d90823e3d90fd5b508315610b78565b9150965082849395965060049492505193848092630dfe168160e01b82525afa928315610c7b57508492610c5e575b50509190565b610c749250803d10610473576104648183610a6d565b3880610c58565b513d86823e3d90fd5b508215610b6d565b610ca4919350863d88116103fd576103ee8183610a6d565b9138610b65565b85513d84823e3d90fd5b610ccd919350853d87116103fd576103ee8183610a6d565b9138610b42565b508351903d90823e3d90fd5b6000198114610cef5760010190565b634e487b7160e01b600052601160045260246000fd5b60405163a9059cbb60e01b60208083019182526001600160a01b039490941660248301526044808301959095529381529092600091610d45606482610a6d565b519082855af115610d98576000513d610d8f57506001600160a01b0381163b155b610d6d5750565b604051635274afe760e01b81526001600160a01b039091166004820152602490fd5b60011415610d66565b6040513d6000823e3d90fd5b60019081549160005b838110610dea5760405162461bcd60e51b815260206004820152600e60248201526d1250d212481b9bdd08199bdd5b9960921b6044820152606490fd5b610df381610a05565b90546003916001600160a01b039190831b1c811685821614610e1f575050610e1a90610ce0565b610dad565b9293509360001991828201918211610cef576101de84610e41610e4e94610a05565b905490891b1c1691610a05565b82548015610e6f570192610e6184610a05565b81939154921b1b1916905555565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220b0ff1c761f77518d613937ca8f754f7e12c4f02fa2a893acfb0ec7dfafe69a0a64736f6c63430008140033
Deployed Bytecode
0x6040608081526004908136101561001557600080fd5b600091823560e01c8063214296e8146109c55780632c8958f61461089257806351629c9d146108655780635668870014610575578063715018a61461051b5780638da5cb5b146104f3578063976c2bb7146104a7578063d798f86e1461025e578063ebfeaa20146101185763f2fde38b1461008f57600080fd5b34610114576020366003190112610114576100a8610a52565b906100b1610aa5565b6001600160a01b039182169283156100fe57505082546001600160a01b0319811683178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b5082903461025a576020918260031936011261025757813567ffffffffffffffff93848211610114573660238301121561011457818401359485116102445760059185831b96519561016c83890188610a6d565b86528186016024809883010191368311610240578801905b82821061021d57505050610196610aa5565b825b85518110156102195760018060a01b038282851b880101511660018054906801000000000000000082101561020757916101de828461020296956101fd95019055610a05565b90919082549060031b9160018060a01b03809116831b921b1916179055565b610ce0565b610198565b634e487b7160e01b8752604188528987fd5b8380f35b81356001600160a01b038116810361023c578152908301908301610184565b8680fd5b8580fd5b634e487b7160e01b835260418452602483fd5b80fd5b5080fd5b50903461011457602090816003193601126104a3576001600160a01b039182610285610a52565b1691805193630dfe168160e01b855282858781875afa9485156103cd578795610484575b50815163d21220a760e01b81529583878281885afa96871561047a57889761044b575b5082516370a0823160e01b81523382820152908482602481895afa91821561044157899261040e575b5083516323b872dd60e01b8152338282019081523060208201526040810184905286908290819060600103818d8b5af1801561040457916044918694936103d7575b508a84519889948593627b8a6760e11b85528401523360248401525af180156103cd5787938891610399575b835194855284015233958116941692507f5d6102171d38f5a0418b7f4b7affa937788ec4c74960ea0f04c6c4d5c8f85ba891a480f35b9350508184813d83116103c6575b6103b18183610a6d565b8101031261023c578351938301518493610363565b503d6103a7565b82513d89823e3d90fd5b6103f690883d8a116103fd575b6103ee8183610a6d565b810190610af0565b5038610337565b503d6103e4565b85513d8c823e3d90fd5b9091508481813d831161043a575b6104268183610a6d565b81010312610436575190386102f5565b8880fd5b503d61041c565b84513d8b823e3d90fd5b61046c919750843d8611610473575b6104648183610a6d565b810190610ad1565b95386102cc565b503d61045a565b83513d8a823e3d90fd5b61049c919550833d8511610473576104648183610a6d565b93386102a9565b8380fd5b50503461025a57602036600319011261025a576104ef906104ce6104c9610a52565b610b08565b91516001600160a01b03909116815260208101919091529081906040820190565b0390f35b50503461025a578160031936011261025a57905490516001600160a01b039091168152602090f35b8334610257578060031936011261025757610534610aa5565b80546001600160a01b03198116825581906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461011457816003193601126101145761058e610a52565b916024359161059c84610b08565b83516370a0823160e01b815233848201526001600160a01b039283169492919060209081816024818a5afa908115610404578a91610838575b5087116108045783516323b872dd60e01b8152338682019081523060208201526040810189905282908290819060600103818d8b5af18015610404576107e7575b50835163095ea7b360e01b81526001600160a01b038916868201908152602081018990528a9391908390829081900360400181878c5af180156107dd576107c0575b50801561074c575b60011461069b575b7fb43a337f0fe94ef11751a039d0524b95e0cf3e41c1edd5c2e798133995751edb9450835196875286015233951693a480f35b905087835194638dbdbe6d60e01b865285015285602485015233604485015280846064818b868c165af1801561047a5788906106fb575b7fb43a337f0fe94ef11751a039d0524b95e0cf3e41c1edd5c2e798133995751edb945090610668565b508084813d8311610745575b6107118183610a6d565b81010312610741577fb43a337f0fe94ef11751a039d0524b95e0cf3e41c1edd5c2e798133995751edb93516106d2565b8780fd5b503d610707565b8451638dbdbe6d60e01b8152868101899052602481018b905233604482015290925081816064818d8d89165af18015610404578a9061078e575b929050610660565b508181813d83116107b9575b6107a48183610a6d565b810103126107b55760019051610786565b8980fd5b503d61079a565b6107d690833d85116103fd576103ee8183610a6d565b5038610658565b86513d8d823e3d90fd5b6107fd90823d84116103fd576103ee8183610a6d565b5038610616565b8460649185519162461bcd60e51b8352820152600f60248201526e457863656564732062616c616e636560881b6044820152fd5b90508181813d831161085e575b61084f8183610a6d565b810103126107b55751386105d5565b503d610845565b83346102575760203660031901126102575761088f610882610a52565b61088a610aa5565b610da4565b80f35b509034610114576060366003190112610114578135906024359260443567ffffffffffffffff80821161023c573660238301121561023c578183013590811161023c57369101602401116109c157849185928660018054915b828110610982575b5050501561094757505061090690610b08565b509183821315610925575061088f9133906001600160a01b0316610d05565b905082811361093357505080f35b61088f9133906001600160a01b0316610d05565b906020606492519162461bcd60e51b83528201526015602482015274556e617574686f72697a65642063616c6c6261636b60581b6044820152fd5b61098b81610a05565b90543360039290921b1c6001600160a01b0316146109b1576109ac90610ce0565b6108eb565b50339550915038905080806108f3565b8480fd5b503461011457602036600319011261011457359160015483101561025757506109ef602092610a05565b905491519160018060a01b039160031b1c168152f35b600154811015610a3c5760016000527fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf60190600090565b634e487b7160e01b600052603260045260246000fd5b600435906001600160a01b0382168203610a6857565b600080fd5b90601f8019910116810190811067ffffffffffffffff821117610a8f57604052565b634e487b7160e01b600052604160045260246000fd5b6000546001600160a01b03163303610ab957565b60405163118cdaa760e01b8152336004820152602490fd5b90816020910312610a6857516001600160a01b0381168103610a685790565b90816020910312610a6857518015158103610a685790565b60408051631fde87bb60e21b81526000938493909260209290916001600160a01b0316858483600481855afa928315610cd4578193610cb5575b50835162df906d60e61b8152918583600481845afa928315610cab578293610c8c575b508380610c84575b610c29578280610c21575b610bc457505081610bbc575b50610b8d575050565b60649250519062461bcd60e51b82526004820152600960248201526821656c69676c626c6560b81b6044820152fd5b905038610b84565b845163d21220a760e01b81529698509396509284925085915060049082905afa938415610c17575092610bfa575b505090600190565b610c109250803d10610473576104648183610a6d565b3880610bf2565b51903d90823e3d90fd5b508315610b78565b9150965082849395965060049492505193848092630dfe168160e01b82525afa928315610c7b57508492610c5e575b50509190565b610c749250803d10610473576104648183610a6d565b3880610c58565b513d86823e3d90fd5b508215610b6d565b610ca4919350863d88116103fd576103ee8183610a6d565b9138610b65565b85513d84823e3d90fd5b610ccd919350853d87116103fd576103ee8183610a6d565b9138610b42565b508351903d90823e3d90fd5b6000198114610cef5760010190565b634e487b7160e01b600052601160045260246000fd5b60405163a9059cbb60e01b60208083019182526001600160a01b039490941660248301526044808301959095529381529092600091610d45606482610a6d565b519082855af115610d98576000513d610d8f57506001600160a01b0381163b155b610d6d5750565b604051635274afe760e01b81526001600160a01b039091166004820152602490fd5b60011415610d66565b6040513d6000823e3d90fd5b60019081549160005b838110610dea5760405162461bcd60e51b815260206004820152600e60248201526d1250d212481b9bdd08199bdd5b9960921b6044820152606490fd5b610df381610a05565b90546003916001600160a01b039190831b1c811685821614610e1f575050610e1a90610ce0565b610dad565b9293509360001991828201918211610cef576101de84610e41610e4e94610a05565b905490891b1c1691610a05565b82548015610e6f570192610e6184610a05565b81939154921b1b1916905555565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220b0ff1c761f77518d613937ca8f754f7e12c4f02fa2a893acfb0ec7dfafe69a0a64736f6c63430008140033
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.