More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Token | 18572562 | 519 days ago | IN | 0 ETH | 0.00332362 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ElonMuskGrokStarshipWeb69
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.19; import {Owned} from "solmate/auth/Owned.sol"; import {ERC20} from "solmate/tokens/ERC20.sol"; import {SafeTransferLib} from "solmate/utils/SafeTransferLib.sol"; import {WETH as IWETH} from "solmate/tokens/WETH.sol"; import {IChad} from "./interfaces/IChad.sol"; import {IUniswapV2Router} from "./interfaces/IUniswapV2Router.sol"; import {ISwapRouter} from "@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol"; import {IQuoter} from "@uniswap/v3-periphery/contracts/interfaces/IQuoter.sol"; contract ElonMuskGrokStarshipWeb69 is Owned { using SafeTransferLib for ERC20; enum UniswapVersion { V2, V3 } struct IndexComponent { address token; uint8 weight; uint24 fee; UniswapVersion version; } struct TokenAmount { address token; uint256 amount; } event IndexComponentUpdated(address indexed token, uint8 weight); event TokenPurchased(address indexed token, uint256 amount); event TokenRedeemed(address indexed token, uint256 amount); IUniswapV2Router public immutable uniswapV2Router; ISwapRouter public immutable uniswapV3Router; /// @dev enable perfect granularity uint256 public constant MAX_BPS = 1_000_000_000 * 1e18; uint24 public immutable LOW_FEE = 3_000; uint24 public immutable HIGH_FEE = 10_000; address public constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address public constant GROK = 0x8390a1DA07E376ef7aDd4Be859BA74Fb83aA02D5; address public constant WEB = 0x2b81945875f892afF04AF0A298d35FB2cF848c7b; address public constant STARSHIP = 0x319bcF115e35C18035BF1a405fE3c40c8B24533E; bool public canUpdateWeights = true; address public index; uint256 public lastPurchase; // Current implementation mapping(address => IndexComponent) public components; mapping(address => bool) public hasToken; address[] public tokens; address[] public allTokens; constructor() Owned(msg.sender) { uniswapV2Router = IUniswapV2Router( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV3Router = ISwapRouter( 0xE592427A0AEce92De3Edee1F18E0157C05861564 ); components[GROK] = IndexComponent({ token: GROK, weight: 50, fee: 0, version: UniswapVersion.V2 }); components[STARSHIP] = IndexComponent({ token: STARSHIP, weight: 25, fee: 0, version: UniswapVersion.V2 }); components[WEB] = IndexComponent({ token: WEB, weight: 25, fee: 0, version: UniswapVersion.V2 }); tokens = [GROK, STARSHIP, WEB]; allTokens = [GROK, STARSHIP, WEB]; hasToken[GROK] = true; hasToken[STARSHIP] = true; hasToken[WEB] = true; ERC20(WETH).approve( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, type(uint256).max ); ERC20(WETH).approve( 0xE592427A0AEce92De3Edee1F18E0157C05861564, type(uint256).max ); lastPurchase = block.timestamp; } receive() external payable {} function _requireIsOwner() internal view { require(msg.sender == owner, "!owner"); } function setToken(address newIndex) external { _requireIsOwner(); index = newIndex; ERC20(IChad(index).uniswapV2Pair()).approve( address(uniswapV2Router), type(uint256).max ); } function setCanUpdateWeights(bool _canUpdateWeights) external { _requireIsOwner(); canUpdateWeights = _canUpdateWeights; } function elonBuying() external { _requireIsOwner(); uint256 wethBalance = ERC20(WETH).balanceOf(address(this)); uint256 etherBalance = address(this).balance; uint256 totalBalance = wethBalance + etherBalance; if (totalBalance == 0) { return; } uint256 managementFee = (totalBalance * 2) / 100; uint256 purchaseAmount = (totalBalance * 98) / 100; uint256 etherToWithdraw = managementFee - etherBalance; if (etherToWithdraw > 0) { IWETH(payable(WETH)).withdraw(etherToWithdraw); } (bool success, ) = address(owner).call{value: managementFee}(""); require(success); address token; uint256 ethAmount; IndexComponent memory component; for (uint8 i = 0; i < tokens.length; ) { token = tokens[i]; component = components[token]; ethAmount = (component.weight * purchaseAmount) / 100; if (component.version == UniswapVersion.V2) { _purchaseFromV2(token, ethAmount); } else { _purchaseFromV3(token, ethAmount, component.fee); } unchecked { i++; } } lastPurchase = block.timestamp; } function isERC20(address tokenAddress) internal returns (bool) { bytes memory payload = abi.encodeWithSignature("totalSupply()"); (bool success, bytes memory result) = tokenAddress.call(payload); return success && result.length > 0; } function updateWeights(IndexComponent[] calldata newComponents) external { _requireIsOwner(); uint8 totalWeight; for (uint8 i = 0; i < newComponents.length; ) { totalWeight += newComponents[i].weight; unchecked { i++; } } require(totalWeight == 100, "!valid"); for (uint i = 0; i < allTokens.length; ) { address token = allTokens[i]; delete components[token]; emit IndexComponentUpdated(token, 0); unchecked { i++; } } delete tokens; IndexComponent memory currentComponent; for (uint i = 0; i < newComponents.length; ) { currentComponent = newComponents[i]; require(isERC20(currentComponent.token), "Not ERC20"); components[currentComponent.token] = currentComponent; tokens.push(currentComponent.token); if (!hasToken[currentComponent.token]) { hasToken[currentComponent.token] = true; allTokens.push(currentComponent.token); } emit IndexComponentUpdated( currentComponent.token, currentComponent.weight ); unchecked { i++; } } } function redeem(uint256 amount) external { require(index != address(0)); require(amount > 0, "!tokens"); uint256 share = (amount * MAX_BPS) / ERC20(index).totalSupply(); IChad(index).burn(msg.sender, amount); address token; uint256 allocation; uint256 contractBalance; for (uint8 i = 0; i < allTokens.length; ) { token = allTokens[i]; contractBalance = ERC20(token).balanceOf(address(this)); if (contractBalance > 0) { allocation = (contractBalance * share) / MAX_BPS; ERC20(token).safeTransfer(msg.sender, allocation); emit TokenRedeemed(token, allocation); } unchecked { i++; } } if (lastPurchase != 0 && lastPurchase + 15 days < block.timestamp) { // anti-rug vector, if deployed dies or project stagnates the initial LP can be redeemed + all added liquidity address liquidityAddress = IChad(index).uniswapV2Pair(); uint256 liquidityBalance = ERC20(liquidityAddress).balanceOf( address(this) ); uint256 liquidityAllocation = (liquidityBalance * share) / MAX_BPS; if (liquidityAllocation > 0) { uniswapV2Router.removeLiquidity( WETH, index, liquidityAllocation, 0, 0, address(this), block.timestamp ); } uint256 chadRemoved = ERC20(index).balanceOf(address(this)); IChad(index).burn(address(this), chadRemoved); // anti-rug vector, if deployer dies or never updates the index - can redeem for weth uint256 wethBalance = ERC20(WETH).balanceOf(address(this)); uint256 wethAllocation = (wethBalance * share) / MAX_BPS; if (wethAllocation > 0) { ERC20(WETH).safeTransfer(msg.sender, wethAllocation); } } } function sellToken(address token) external { _requireIsOwner(); IndexComponent memory component = components[token]; uint256 tokenBalance = ERC20(token).balanceOf(address(this)); if (tokenBalance == 0) { return; } if (component.version == UniswapVersion.V2) { _sellToV2(token, tokenBalance); } else { _sellToV3(token, tokenBalance, component.fee); } // Update structures delete components[token]; hasToken[token] = false; _removeTokenFromArray(token); uint8 weightToRemove = component.weight; uint8 remainingTokens = uint8(tokens.length); if (remainingTokens > 0) { uint8 distributeWeight = weightToRemove / remainingTokens; for (uint8 i = 0; i < tokens.length; i++) { components[tokens[i]].weight += distributeWeight; } } } function redemptionAmounts() external view returns (TokenAmount[] memory) { TokenAmount[] memory tokenAmounts = new TokenAmount[](allTokens.length); for (uint8 i = 0; i < allTokens.length; ) { address token = allTokens[i]; tokenAmounts[i].token = token; tokenAmounts[i].amount = ERC20(token).balanceOf(address(this)); unchecked { i++; } } return tokenAmounts; } function currentTokenCount() external view returns (uint256) { return tokens.length; } function totalTokenCount() external view returns (uint256) { return allTokens.length; } function _removeTokenFromArray(address token) private { uint256 indexToRemove; bool found = false; for (uint256 i = 0; i < allTokens.length; i++) { if (allTokens[i] == token) { indexToRemove = i; found = true; break; } } require(found, "Token not found in allTokens"); if (indexToRemove < allTokens.length - 1) { allTokens[indexToRemove] = allTokens[allTokens.length - 1]; } allTokens.pop(); } function _sellToV2(address token, uint256 amount) internal { address[] memory path = new address[](2); path[0] = token; path[1] = WETH; ERC20(token).approve(address(uniswapV2Router), type(uint256).max); uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens( amount, 0, path, address(this), block.timestamp ); } function _sellToV3(address token, uint256 amount, uint24 fee) internal { ERC20(token).approve(address(uniswapV3Router), type(uint256).max); uniswapV3Router.exactInput( ISwapRouter.ExactInputParams({ path: abi.encodePacked(token, fee, WETH), recipient: address(this), deadline: block.timestamp, amountIn: amount, amountOutMinimum: 0 }) ); } function _purchaseFromV2(address token, uint256 amount) internal { address[] memory path = new address[](2); path[0] = WETH; path[1] = token; uint256 balanceBefore = ERC20(token).balanceOf(address(this)); uniswapV2Router.swapExactTokensForTokensSupportingFeeOnTransferTokens( amount, 0, path, address(this), block.timestamp ); uint256 balanceAfter = ERC20(token).balanceOf(address(this)); emit TokenPurchased(token, balanceAfter - balanceBefore); } function _purchaseFromV3( address token, uint256 amount, uint24 fee ) internal { uint256 balanceBefore = ERC20(token).balanceOf(address(this)); uniswapV3Router.exactInput( ISwapRouter.ExactInputParams({ path: abi.encodePacked(WETH, fee, token), recipient: address(this), deadline: block.timestamp, amountIn: amount, amountOutMinimum: 0 }) ); uint256 balanceAfter = ERC20(token).balanceOf(address(this)); emit TokenPurchased(token, balanceAfter - balanceBefore); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Simple single owner authorization mixin. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/auth/Owned.sol) abstract contract Owned { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event OwnershipTransferred(address indexed user, address indexed newOwner); /*////////////////////////////////////////////////////////////// OWNERSHIP STORAGE //////////////////////////////////////////////////////////////*/ address public owner; modifier onlyOwner() virtual { require(msg.sender == owner, "UNAUTHORIZED"); _; } /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(address _owner) { owner = _owner; emit OwnershipTransferred(address(0), _owner); } /*////////////////////////////////////////////////////////////// OWNERSHIP LOGIC //////////////////////////////////////////////////////////////*/ function transferOwnership(address newOwner) public virtual onlyOwner { owner = newOwner; emit OwnershipTransferred(msg.sender, newOwner); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import {ERC20} from "../tokens/ERC20.sol"; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. /// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. library SafeTransferLib { /*////////////////////////////////////////////////////////////// ETH OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferETH(address to, uint256 amount) internal { bool success; /// @solidity memory-safe-assembly assembly { // Transfer the ETH and store if it succeeded or not. success := call(gas(), to, amount, 0, 0, 0, 0) } require(success, "ETH_TRANSFER_FAILED"); } /*////////////////////////////////////////////////////////////// ERC20 OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferFrom( ERC20 token, address from, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "from" argument. mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) ) } require(success, "TRANSFER_FROM_FAILED"); } function safeTransfer( ERC20 token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "TRANSFER_FAILED"); } function safeApprove( ERC20 token, address to, uint256 amount ) internal { bool success; /// @solidity memory-safe-assembly assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Append and mask the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. Masking not required as it's a full 32 byte type. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "APPROVE_FAILED"); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import {ERC20} from "./ERC20.sol"; import {SafeTransferLib} from "../utils/SafeTransferLib.sol"; /// @notice Minimalist and modern Wrapped Ether implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/WETH.sol) /// @author Inspired by WETH9 (https://github.com/dapphub/ds-weth/blob/master/src/weth9.sol) contract WETH is ERC20("Wrapped Ether", "WETH", 18) { using SafeTransferLib for address; event Deposit(address indexed from, uint256 amount); event Withdrawal(address indexed to, uint256 amount); function deposit() public payable virtual { _mint(msg.sender, msg.value); emit Deposit(msg.sender, msg.value); } function withdraw(uint256 amount) public virtual { _burn(msg.sender, amount); emit Withdrawal(msg.sender, amount); msg.sender.safeTransferETH(amount); } receive() external payable virtual { deposit(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IChad { function burn(address from, uint256 amount) external; function uniswapV2Pair() external returns (address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IUniswapV2Router { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint256 amountADesired, uint256 amountBDesired, uint256 amountAMin, uint256 amountBMin, address to, uint256 deadline ) external returns (uint256 amountA, uint256 amountB, uint256 liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; pragma abicoder v2; import '@uniswap/v3-core/contracts/interfaces/callback/IUniswapV3SwapCallback.sol'; /// @title Router token swapping functionality /// @notice Functions for swapping tokens via Uniswap V3 interface ISwapRouter is IUniswapV3SwapCallback { struct ExactInputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; uint160 sqrtPriceLimitX96; } /// @notice Swaps `amountIn` of one token for as much as possible of another token /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata /// @return amountOut The amount of the received token function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); struct ExactInputParams { bytes path; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; } /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata /// @return amountOut The amount of the received token function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; uint160 sqrtPriceLimitX96; } /// @notice Swaps as little as possible of one token for `amountOut` of another token /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata /// @return amountIn The amount of the input token function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); struct ExactOutputParams { bytes path; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; } /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed) /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata /// @return amountIn The amount of the input token function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.7.5; pragma abicoder v2; /// @title Quoter Interface /// @notice Supports quoting the calculated amounts from exact input or exact output swaps /// @dev These functions are not marked view because they rely on calling non-view functions and reverting /// to compute the result. They are also not gas efficient and should not be called on-chain. interface IQuoter { /// @notice Returns the amount out received for a given exact input swap without executing the swap /// @param path The path of the swap, i.e. each token pair and the pool fee /// @param amountIn The amount of the first token to swap /// @return amountOut The amount of the last token that would be received function quoteExactInput(bytes memory path, uint256 amountIn) external returns (uint256 amountOut); /// @notice Returns the amount out received for a given exact input but for a swap of a single pool /// @param tokenIn The token being swapped in /// @param tokenOut The token being swapped out /// @param fee The fee of the token pool to consider for the pair /// @param amountIn The desired input amount /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap /// @return amountOut The amount of `tokenOut` that would be received function quoteExactInputSingle( address tokenIn, address tokenOut, uint24 fee, uint256 amountIn, uint160 sqrtPriceLimitX96 ) external returns (uint256 amountOut); /// @notice Returns the amount in required for a given exact output swap without executing the swap /// @param path The path of the swap, i.e. each token pair and the pool fee. Path must be provided in reverse order /// @param amountOut The amount of the last token to receive /// @return amountIn The amount of first token required to be paid function quoteExactOutput(bytes memory path, uint256 amountOut) external returns (uint256 amountIn); /// @notice Returns the amount in required to receive the given exact output amount but for a swap of a single pool /// @param tokenIn The token being swapped in /// @param tokenOut The token being swapped out /// @param fee The fee of the token pool to consider for the pair /// @param amountOut The desired output amount /// @param sqrtPriceLimitX96 The price limit of the pool that cannot be exceeded by the swap /// @return amountIn The amount required as the input for the swap in order to receive `amountOut` function quoteExactOutputSingle( address tokenIn, address tokenOut, uint24 fee, uint256 amountOut, uint160 sqrtPriceLimitX96 ) external returns (uint256 amountIn); }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity >=0.5.0; /// @title Callback for IUniswapV3PoolActions#swap /// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface interface IUniswapV3SwapCallback { /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap. /// @dev In the implementation you must pay the pool tokens owed for the swap. /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped. /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token0 to the pool. /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token1 to the pool. /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call function uniswapV3SwapCallback( int256 amount0Delta, int256 amount1Delta, bytes calldata data ) external; }
{ "remappings": [ "ds-test/=lib/forge-std/lib/ds-test/src/", "forge-std/=lib/forge-std/src/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint8","name":"weight","type":"uint8"}],"name":"IndexComponentUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenPurchased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokenRedeemed","type":"event"},{"inputs":[],"name":"GROK","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"HIGH_FEE","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LOW_FEE","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_BPS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STARSHIP","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WEB","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allTokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"canUpdateWeights","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"components","outputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint8","name":"weight","type":"uint8"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"enum ElonMuskGrokStarshipWeb69.UniswapVersion","name":"version","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"elonBuying","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"hasToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"index","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPurchase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redemptionAmounts","outputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"internalType":"struct ElonMuskGrokStarshipWeb69.TokenAmount[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"sellToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_canUpdateWeights","type":"bool"}],"name":"setCanUpdateWeights","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newIndex","type":"address"}],"name":"setToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Router","outputs":[{"internalType":"contract IUniswapV2Router","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"uniswapV3Router","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint8","name":"weight","type":"uint8"},{"internalType":"uint24","name":"fee","type":"uint24"},{"internalType":"enum ElonMuskGrokStarshipWeb69.UniswapVersion","name":"version","type":"uint8"}],"internalType":"struct ElonMuskGrokStarshipWeb69.IndexComponent[]","name":"newComponents","type":"tuple[]"}],"name":"updateWeights","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
610100604052610bb860c05261271060e0526000805460ff60a01b1916600160a01b1790553480156200003157600080fd5b50600080546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350737a250d5630b4cf539739df2c5dacb4c659f2488d608090815273e592427a0aece92de3edee1f18e0157c0586156460a052604080519182018152738390a1da07e376ef7add4be859ba74fb83aa02d582526032602083015260009082018190526060820152738390a1da07e376ef7add4be859ba74fb83aa02d56000526003602090815281517faf70234442c5361e4f4556b5d1e869faae127f571f06e2d3ea13297afb0bab56805492840151604085015162ffffff16600160a81b0262ffffff60a81b1960ff909216600160a01b026001600160a81b03199095166001600160a01b0394909416939093179390931792831682178155606084015190929091839160ff60c01b1990911663ffffffff60a81b1990911617600160c01b836001811115620001a657620001a6620006d2565b0217905550506040805160808101825273319bcf115e35c18035bf1a405fe3c40c8b24533e81526019602082015260009181018290529150606082015273319bcf115e35c18035bf1a405fe3c40c8b24533e6000526003602090815281517f1f31df82a61bb900b25de4c88997def90b99ddeafb2dcf9365f2384e0b0725bf805492840151604085015162ffffff16600160a81b0262ffffff60a81b1960ff909216600160a01b026001600160a81b03199095166001600160a01b0394909416939093179390931792831682178155606084015190929091839160ff60c01b1990911663ffffffff60a81b1990911617600160c01b836001811115620002b057620002b0620006d2565b0217905550506040805160808101825260008051602062002ff583398151915281526019602082015260009181018290529150606082015260008051602062002ff58339815191526000526003602090815281517fc5171fe4815ab5aff0ac7db2f679b61a02f8f0c234a8bf7603efcb26f52e9e63805492840151604085015162ffffff16600160a81b0262ffffff60a81b1960ff909216600160a01b026001600160a81b03199095166001600160a01b0394909416939093179390931792831682178155606084015190929091839160ff60c01b1990911663ffffffff60a81b1990911617600160c01b836001811115620003b057620003b0620006d2565b02179055505060408051606081018252738390a1da07e376ef7add4be859ba74fb83aa02d5815273319bcf115e35c18035bf1a405fe3c40c8b24533e602082015260008051602062002ff583398151915291810191909152620004199150600590600362000651565b5060408051606081018252738390a1da07e376ef7add4be859ba74fb83aa02d5815273319bcf115e35c18035bf1a405fe3c40c8b24533e602082015260008051602062002ff5833981519152918101919091526200047c90600690600362000651565b50600460208190527f6a8b2ce51a3443ed3c2bb40daa46f15254f4f735e2cd3c30a6fb2616394612598054600160ff1991821681179092557f9bae832d77ca324d34f6e447894fa1d757b493377a03030a48e39fad38d65928805482168317905560008051602062002ff58339815191526000527f322e62ae72d9a313913ff1f5466a44be48a400f85cd4d0ad5e28482e72bbcc578054909116909117905560405163095ea7b360e01b8152737a250d5630b4cf539739df2c5dacb4c659f2488d91810191909152600019602482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063095ea7b3906044016020604051808303816000875af11580156200058b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620005b19190620006e8565b5060405163095ea7b360e01b815273e592427a0aece92de3edee1f18e0157c058615646004820152600019602482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063095ea7b3906044016020604051808303816000875af115801562000620573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006469190620006e8565b504260025562000713565b828054828255906000526020600020908101928215620006a9579160200282015b82811115620006a957825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000672565b50620006b7929150620006bb565b5090565b5b80821115620006b75760008155600101620006bc565b634e487b7160e01b600052602160045260246000fd5b600060208284031215620006fb57600080fd5b815180151581146200070c57600080fd5b9392505050565b60805160a05160c05160e051612870620007856000396000610278015260006104b201526000818161030001528181611c1c01528181611f820152612015015260008181610244015281816106990152818161120401528181611a8201528181611e690152611eff01526128706000f3fe6080604052600436106101a05760003560e01c80636a08a86b116100ec578063b747aef11161008a578063f2fde38b11610064578063f2fde38b14610579578063f541ec6a14610599578063fd6c6a14146105b9578063fd967f47146105db57600080fd5b8063b747aef114610511578063db006a7514610539578063eab299531461055957600080fd5b80639bb0f599116100c65780639bb0f59914610470578063a7d4006d146104a0578063ad50a9f2146104d4578063ad5c4648146104e957600080fd5b80636a08a86b14610413578063764912ef1461043b5780638da5cb5b1461045057600080fd5b80632986c0e5116101595780634528f3ec116101335780634528f3ec1461038c5780634f64b2be146103a25780635f4614ae146103c2578063634282af146103f357600080fd5b80632986c0e5146102ce5780632c76d7a6146102ee5780633140acc91461032257600080fd5b806305efa057146101ac57806311b639d9146101f1578063144fa6d7146102105780631694505e146102325780631dbd04d81461026657806322e11b8e146102ae57600080fd5b366101a757005b600080fd5b3480156101b857600080fd5b506101d4738390a1da07e376ef7add4be859ba74fb83aa02d581565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101fd57600080fd5b506005545b6040519081526020016101e8565b34801561021c57600080fd5b5061023061022b3660046122bd565b6105fb565b005b34801561023e57600080fd5b506101d47f000000000000000000000000000000000000000000000000000000000000000081565b34801561027257600080fd5b5061029a7f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016101e8565b3480156102ba57600080fd5b506102306102c93660046122e1565b61071c565b3480156102da57600080fd5b506001546101d4906001600160a01b031681565b3480156102fa57600080fd5b506101d47f000000000000000000000000000000000000000000000000000000000000000081565b34801561032e57600080fd5b5061037c61033d3660046122bd565b6003602052600090815260409020546001600160a01b0381169060ff600160a01b820481169162ffffff600160a81b82041691600160c01b9091041684565b6040516101e8949392919061236c565b34801561039857600080fd5b5061020260025481565b3480156103ae57600080fd5b506101d46103bd3660046123bd565b610ac5565b3480156103ce57600080fd5b506000546103e390600160a01b900460ff1681565b60405190151581526020016101e8565b3480156103ff57600080fd5b506101d461040e3660046123bd565b610aef565b34801561041f57600080fd5b506101d4732b81945875f892aff04af0a298d35fb2cf848c7b81565b34801561044757600080fd5b50600654610202565b34801561045c57600080fd5b506000546101d4906001600160a01b031681565b34801561047c57600080fd5b506103e361048b3660046122bd565b60046020526000908152604090205460ff1681565b3480156104ac57600080fd5b5061029a7f000000000000000000000000000000000000000000000000000000000000000081565b3480156104e057600080fd5b50610230610aff565b3480156104f557600080fd5b506101d473c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561051d57600080fd5b506101d473319bcf115e35c18035bf1a405fe3c40c8b24533e81565b34801561054557600080fd5b506102306105543660046123bd565b610e04565b34801561056557600080fd5b506102306105743660046122bd565b611416565b34801561058557600080fd5b506102306105943660046122bd565b61165b565b3480156105a557600080fd5b506102306105b43660046123e4565b6116ef565b3480156105c557600080fd5b506105ce611715565b6040516101e89190612401565b3480156105e757600080fd5b506102026b033b2e3c9fd0803ce800000081565b610603611887565b600180546001600160a01b0319166001600160a01b038316908117909155604080516324dead2f60e11b815290516349bd5a5e9160048082019260209290919082900301816000875af115801561065e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106829190612459565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301526000196024830152919091169063095ea7b3906044016020604051808303816000875af11580156106f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107189190612476565b5050565b610724611887565b6000805b60ff81168311156107745783838260ff1681811061074857610748612493565b905060800201602001602081019061076091906124bf565b61076a90836124f0565b9150600101610728565b508060ff166064146107b65760405162461bcd60e51b8152602060048201526006602482015265085d985b1a5960d21b60448201526064015b60405180910390fd5b60005b600654811015610845576000600682815481106107d8576107d8612493565b6000918252602080832091909101546001600160a01b031680835260038252604080842080546001600160c81b031916905551928352925082917e6f3c11a03585d1b777f727ab55879672a0c73a67c94eddf39ee818afd0b110910160405180910390a2506001016107b9565b506108526005600061226e565b61087a6040805160808101825260008082526020820181905291810182905290606082015290565b60005b83811015610abe5784848281811061089757610897612493565b9050608002018036038101906108ad9190612534565b91506108bc82600001516118cc565b6108f45760405162461bcd60e51b815260206004820152600960248201526804e6f742045524332360bc1b60448201526064016107ad565b81516001600160a01b0390811660009081526003602090815260409182902085518154928701519387015162ffffff16600160a81b0262ffffff60a81b1960ff909516600160a01b026001600160a81b0319909416919095161791909117918216831781556060850151859391929091839160ff60c01b1990911663ffffffff60a81b1990911617600160c01b83600181111561099357610993612356565b02179055505082516005805460018101825560009182527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b03938416179055845190911681526004602052604090205460ff169050610a6e5781516001600160a01b0390811660009081526004602052604081208054600160ff19909116811790915584516006805492830181559092527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b031916919092161790555b815160208084015160405160ff90911681526001600160a01b03909216917e6f3c11a03585d1b777f727ab55879672a0c73a67c94eddf39ee818afd0b110910160405180910390a260010161087d565b5050505050565b60058181548110610ad557600080fd5b6000918252602090912001546001600160a01b0316905081565b60068181548110610ad557600080fd5b610b07611887565b6040516370a0823160e01b815230600482015260009073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190602401602060405180830381865afa158015610b59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7d91906125cb565b9050476000610b8c82846125e4565b905080600003610b9b57505050565b60006064610baa8360026125f7565b610bb49190612624565b905060006064610bc58460626125f7565b610bcf9190612624565b90506000610bdd8584612638565b90508015610c4b57604051632e1a7d4d60e01b81526004810182905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b158015610c3257600080fd5b505af1158015610c46573d6000803e3d6000fd5b505050505b600080546040516001600160a01b039091169085908381818185875af1925050503d8060008114610c98576040519150601f19603f3d011682016040523d82523d6000602084013e610c9d565b606091505b5050905080610cab57600080fd5b600080610cd66040805160808101825260008082526020820181905291810182905290606082015290565b60005b60055460ff82161015610df35760058160ff1681548110610cfc57610cfc612493565b60009182526020808320909101546001600160a01b039081168084526003835260409384902084516080810186528154938416815260ff600160a01b850481169582019590955262ffffff600160a81b85041695810195909552909750916060840191600160c01b9004166001811115610d7857610d78612356565b6001811115610d8957610d89612356565b815250509150606487836020015160ff16610da491906125f7565b610dae9190612624565b9250600082606001516001811115610dc857610dc8612356565b03610ddc57610dd78484611972565b610deb565b610deb84848460400151611bad565b600101610cd9565b505042600255505050505050505050565b6001546001600160a01b0316610e1957600080fd5b60008111610e535760405162461bcd60e51b815260206004820152600760248201526621746f6b656e7360c81b60448201526064016107ad565b600154604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015610e9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec191906125cb565b610ed76b033b2e3c9fd0803ce8000000846125f7565b610ee19190612624565b600154604051632770a7eb60e21b8152336004820152602481018590529192506001600160a01b031690639dc29fac90604401600060405180830381600087803b158015610f2e57600080fd5b505af1158015610f42573d6000803e3d6000fd5b50505050600080600080600090505b60065460ff821610156110775760068160ff1681548110610f7457610f74612493565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116945084906370a0823190602401602060405180830381865afa158015610fc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fec91906125cb565b9150811561106f576b033b2e3c9fd0803ce800000061100b86846125f7565b6110159190612624565b925061102b6001600160a01b0385163385611d40565b836001600160a01b03167fce4385affa8ad2cbec45b1660c6f6afcb691bf0a7a73ebda096ee1dfb670fe6f8460405161106691815260200190565b60405180910390a25b600101610f51565b50600254158015906110985750426002546213c68061109691906125e4565b105b15610abe57600154604080516324dead2f60e11b815290516000926001600160a01b0316916349bd5a5e916004808301926020929190829003018187875af11580156110e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110c9190612459565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611156573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117a91906125cb565b905060006b033b2e3c9fd0803ce800000061119588846125f7565b61119f9190612624565b9050801561127557600154604051635d5155ef60e11b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260048201526001600160a01b0391821660248201526044810183905260006064820181905260848201523060a48201524260c48201527f00000000000000000000000000000000000000000000000000000000000000009091169063baa2abde9060e40160408051808303816000875af115801561124e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611272919061264b565b50505b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156112be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e291906125cb565b600154604051632770a7eb60e21b8152306004820152602481018390529192506001600160a01b031690639dc29fac90604401600060405180830381600087803b15801561132f57600080fd5b505af1158015611343573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc291506370a0823190602401602060405180830381865afa158015611399573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bd91906125cb565b905060006b033b2e3c9fd0803ce80000006113d88b846125f7565b6113e29190612624565b905080156114095761140973c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23383611d40565b5050505050505050505050565b61141e611887565b6001600160a01b03808216600090815260036020908152604080832081516080810183528154958616815260ff600160a01b870481169482019490945262ffffff600160a81b8704169281019290925292939092916060840191600160c01b900416600181111561149157611491612356565b60018111156114a2576114a2612356565b9052506040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156114ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151391906125cb565b90508060000361152257505050565b60008260600151600181111561153a5761153a612356565b0361154e576115498382611dc7565b61155d565b61155d83828460400151611f6b565b6001600160a01b038316600090815260036020908152604080832080546001600160c81b031916905560049091529020805460ff1916905561159e836120f3565b602082015160055460ff811615610abe5760006115bb828461266f565b905060005b60055460ff8216101561165257816003600060058460ff16815481106115e8576115e8612493565b60009182526020808320909101546001600160a01b031683528201929092526040019020805460149061162790849060ff600160a01b909104166124f0565b92506101000a81548160ff021916908360ff160217905550808061164a90612691565b9150506115c0565b50505050505050565b6000546001600160a01b031633146116a45760405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b60448201526064016107ad565b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6116f7611887565b60008054911515600160a01b0260ff60a01b19909216919091179055565b60065460609060009067ffffffffffffffff8111156117365761173661250f565b60405190808252806020026020018201604052801561177b57816020015b60408051808201909152600080825260208201528152602001906001900390816117545790505b50905060005b60065460ff8216101561188157600060068260ff16815481106117a6576117a6612493565b9060005260206000200160009054906101000a90046001600160a01b0316905080838360ff16815181106117dc576117dc612493565b60209081029190910101516001600160a01b0391821690526040516370a0823160e01b8152306004820152908216906370a0823190602401602060405180830381865afa158015611831573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185591906125cb565b838360ff168151811061186a5761186a612493565b602090810291909101810151015250600101611781565b50919050565b6000546001600160a01b031633146118ca5760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b60448201526064016107ad565b565b60408051600481526024810182526020810180516001600160e01b03166318160ddd60e01b179052905160009190829081906001600160a01b038616906119149085906126d4565b6000604051808303816000865af19150503d8060008114611951576040519150601f19603f3d011682016040523d82523d6000602084013e611956565b606091505b5091509150818015611969575060008151115b95945050505050565b60408051600280825260608201835260009260208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816000815181106119bb576119bb612493565b60200260200101906001600160a01b031690816001600160a01b03168152505082816001815181106119ef576119ef612493565b6001600160a01b0392831660209182029290920101526040516370a0823160e01b81523060048201526000918516906370a0823190602401602060405180830381865afa158015611a44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6891906125cb565b604051635c11d79560e01b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635c11d79590611ac09086906000908790309042906004016126f0565b600060405180830381600087803b158015611ada57600080fd5b505af1158015611aee573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092506001600160a01b03871691506370a08231906024015b602060405180830381865afa158015611b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5e91906125cb565b90506001600160a01b0385167f55c18555197c6574627cf460c66073d10aa05d412468800b7b71feeaf82ea92d611b958484612638565b60405190815260200160405180910390a25050505050565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015611bf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c1891906125cb565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663c04b8d596040518060a0016040528073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28689604051602001611c7d93929190612761565b6040516020818303038152906040528152602001306001600160a01b0316815260200142815260200186815260200160008152506040518263ffffffff1660e01b8152600401611ccd919061279c565b6020604051808303816000875af1158015611cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d1091906125cb565b506040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401611b1d565b600060405163a9059cbb60e01b81526001600160a01b0384166004820152826024820152602060006044836000895af13d15601f3d1160016000511416171691505080611dc15760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b60448201526064016107ad565b50505050565b6040805160028082526060820183526000926020830190803683370190505090508281600081518110611dfc57611dfc612493565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281600181518110611e4457611e44612493565b6001600160a01b03928316602091820292909201015260405163095ea7b360e01b81527f00000000000000000000000000000000000000000000000000000000000000008216600482015260001960248201529084169063095ea7b3906044016020604051808303816000875af1158015611ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee79190612476565b50604051635c11d79560e01b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635c11d79590611f3d9085906000908690309042906004016126f0565b600060405180830381600087803b158015611f5757600080fd5b505af1158015611652573d6000803e3d6000fd5b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152600019602483015284169063095ea7b3906044016020604051808303816000875af1158015611fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fff9190612476565b506040805160a081019091526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063c04b8d599080612060878673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260c08501612761565b6040516020818303038152906040528152602001306001600160a01b0316815260200142815260200185815260200160008152506040518263ffffffff1660e01b81526004016120b0919061279c565b6020604051808303816000875af11580156120cf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc191906125cb565b600080805b60065481101561215757836001600160a01b03166006828154811061211f5761211f612493565b6000918252602090912001546001600160a01b0316036121455780925060019150612157565b8061214f8161280b565b9150506120f8565b50806121a55760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e206e6f7420666f756e6420696e20616c6c546f6b656e730000000060448201526064016107ad565b6006546121b490600190612638565b82101561223657600680546121cb90600190612638565b815481106121db576121db612493565b600091825260209091200154600680546001600160a01b03909216918490811061220757612207612493565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b600680548061224757612247612824565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b508054600082559060005260206000209081019061228c919061228f565b50565b5b808211156122a45760008155600101612290565b5090565b6001600160a01b038116811461228c57600080fd5b6000602082840312156122cf57600080fd5b81356122da816122a8565b9392505050565b600080602083850312156122f457600080fd5b823567ffffffffffffffff8082111561230c57600080fd5b818501915085601f83011261232057600080fd5b81358181111561232f57600080fd5b8660208260071b850101111561234457600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b038516815260ff8416602082015262ffffff8316604082015260808101600283106123ae57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b6000602082840312156123cf57600080fd5b5035919050565b801515811461228c57600080fd5b6000602082840312156123f657600080fd5b81356122da816123d6565b602080825282518282018190526000919060409081850190868401855b8281101561244c57815180516001600160a01b0316855286015186850152928401929085019060010161241e565b5091979650505050505050565b60006020828403121561246b57600080fd5b81516122da816122a8565b60006020828403121561248857600080fd5b81516122da816123d6565b634e487b7160e01b600052603260045260246000fd5b803560ff811681146124ba57600080fd5b919050565b6000602082840312156124d157600080fd5b6122da826124a9565b634e487b7160e01b600052601160045260246000fd5b60ff8181168382160190811115612509576125096124da565b92915050565b634e487b7160e01b600052604160045260246000fd5b8035600281106124ba57600080fd5b60006080828403121561254657600080fd5b6040516080810181811067ffffffffffffffff8211171561257757634e487b7160e01b600052604160045260246000fd5b6040528235612585816122a8565b8152612593602084016124a9565b6020820152604083013562ffffff811681146125ae57600080fd5b60408201526125bf60608401612525565b60608201529392505050565b6000602082840312156125dd57600080fd5b5051919050565b80820180821115612509576125096124da565b8082028115828204841417612509576125096124da565b634e487b7160e01b600052601260045260246000fd5b6000826126335761263361260e565b500490565b81810381811115612509576125096124da565b6000806040838503121561265e57600080fd5b505080516020909101519092909150565b600060ff8316806126825761268261260e565b8060ff84160491505092915050565b600060ff821660ff81036126a7576126a76124da565b60010192915050565b60005b838110156126cb5781810151838201526020016126b3565b50506000910152565b600082516126e68184602087016126b0565b9190910192915050565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156127405784516001600160a01b03168352938301939183019160010161271b565b50506001600160a01b03969096166060850152505050608001529392505050565b606093841b6bffffffffffffffffffffffff19908116825260e89390931b6001600160e81b0319166014820152921b166017820152602b0190565b602081526000825160a0602084015280518060c08501526127c48160e08601602085016126b0565b60018060a01b0360208601511660408501526040850151606085015260608501516080850152608085015160a085015260e0601f19601f8301168501019250505092915050565b60006001820161281d5761281d6124da565b5060010190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220cd970ebbe0b13990cd68efab644c70a2e091c15c384089151dc060167c7ff1c864736f6c634300081400330000000000000000000000002b81945875f892aff04af0a298d35fb2cf848c7b
Deployed Bytecode
0x6080604052600436106101a05760003560e01c80636a08a86b116100ec578063b747aef11161008a578063f2fde38b11610064578063f2fde38b14610579578063f541ec6a14610599578063fd6c6a14146105b9578063fd967f47146105db57600080fd5b8063b747aef114610511578063db006a7514610539578063eab299531461055957600080fd5b80639bb0f599116100c65780639bb0f59914610470578063a7d4006d146104a0578063ad50a9f2146104d4578063ad5c4648146104e957600080fd5b80636a08a86b14610413578063764912ef1461043b5780638da5cb5b1461045057600080fd5b80632986c0e5116101595780634528f3ec116101335780634528f3ec1461038c5780634f64b2be146103a25780635f4614ae146103c2578063634282af146103f357600080fd5b80632986c0e5146102ce5780632c76d7a6146102ee5780633140acc91461032257600080fd5b806305efa057146101ac57806311b639d9146101f1578063144fa6d7146102105780631694505e146102325780631dbd04d81461026657806322e11b8e146102ae57600080fd5b366101a757005b600080fd5b3480156101b857600080fd5b506101d4738390a1da07e376ef7add4be859ba74fb83aa02d581565b6040516001600160a01b0390911681526020015b60405180910390f35b3480156101fd57600080fd5b506005545b6040519081526020016101e8565b34801561021c57600080fd5b5061023061022b3660046122bd565b6105fb565b005b34801561023e57600080fd5b506101d47f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b34801561027257600080fd5b5061029a7f000000000000000000000000000000000000000000000000000000000000271081565b60405162ffffff90911681526020016101e8565b3480156102ba57600080fd5b506102306102c93660046122e1565b61071c565b3480156102da57600080fd5b506001546101d4906001600160a01b031681565b3480156102fa57600080fd5b506101d47f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156481565b34801561032e57600080fd5b5061037c61033d3660046122bd565b6003602052600090815260409020546001600160a01b0381169060ff600160a01b820481169162ffffff600160a81b82041691600160c01b9091041684565b6040516101e8949392919061236c565b34801561039857600080fd5b5061020260025481565b3480156103ae57600080fd5b506101d46103bd3660046123bd565b610ac5565b3480156103ce57600080fd5b506000546103e390600160a01b900460ff1681565b60405190151581526020016101e8565b3480156103ff57600080fd5b506101d461040e3660046123bd565b610aef565b34801561041f57600080fd5b506101d4732b81945875f892aff04af0a298d35fb2cf848c7b81565b34801561044757600080fd5b50600654610202565b34801561045c57600080fd5b506000546101d4906001600160a01b031681565b34801561047c57600080fd5b506103e361048b3660046122bd565b60046020526000908152604090205460ff1681565b3480156104ac57600080fd5b5061029a7f0000000000000000000000000000000000000000000000000000000000000bb881565b3480156104e057600080fd5b50610230610aff565b3480156104f557600080fd5b506101d473c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b34801561051d57600080fd5b506101d473319bcf115e35c18035bf1a405fe3c40c8b24533e81565b34801561054557600080fd5b506102306105543660046123bd565b610e04565b34801561056557600080fd5b506102306105743660046122bd565b611416565b34801561058557600080fd5b506102306105943660046122bd565b61165b565b3480156105a557600080fd5b506102306105b43660046123e4565b6116ef565b3480156105c557600080fd5b506105ce611715565b6040516101e89190612401565b3480156105e757600080fd5b506102026b033b2e3c9fd0803ce800000081565b610603611887565b600180546001600160a01b0319166001600160a01b038316908117909155604080516324dead2f60e11b815290516349bd5a5e9160048082019260209290919082900301816000875af115801561065e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106829190612459565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d811660048301526000196024830152919091169063095ea7b3906044016020604051808303816000875af11580156106f4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107189190612476565b5050565b610724611887565b6000805b60ff81168311156107745783838260ff1681811061074857610748612493565b905060800201602001602081019061076091906124bf565b61076a90836124f0565b9150600101610728565b508060ff166064146107b65760405162461bcd60e51b8152602060048201526006602482015265085d985b1a5960d21b60448201526064015b60405180910390fd5b60005b600654811015610845576000600682815481106107d8576107d8612493565b6000918252602080832091909101546001600160a01b031680835260038252604080842080546001600160c81b031916905551928352925082917e6f3c11a03585d1b777f727ab55879672a0c73a67c94eddf39ee818afd0b110910160405180910390a2506001016107b9565b506108526005600061226e565b61087a6040805160808101825260008082526020820181905291810182905290606082015290565b60005b83811015610abe5784848281811061089757610897612493565b9050608002018036038101906108ad9190612534565b91506108bc82600001516118cc565b6108f45760405162461bcd60e51b815260206004820152600960248201526804e6f742045524332360bc1b60448201526064016107ad565b81516001600160a01b0390811660009081526003602090815260409182902085518154928701519387015162ffffff16600160a81b0262ffffff60a81b1960ff909516600160a01b026001600160a81b0319909416919095161791909117918216831781556060850151859391929091839160ff60c01b1990911663ffffffff60a81b1990911617600160c01b83600181111561099357610993612356565b02179055505082516005805460018101825560009182527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00180546001600160a01b0319166001600160a01b03938416179055845190911681526004602052604090205460ff169050610a6e5781516001600160a01b0390811660009081526004602052604081208054600160ff19909116811790915584516006805492830181559092527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b031916919092161790555b815160208084015160405160ff90911681526001600160a01b03909216917e6f3c11a03585d1b777f727ab55879672a0c73a67c94eddf39ee818afd0b110910160405180910390a260010161087d565b5050505050565b60058181548110610ad557600080fd5b6000918252602090912001546001600160a01b0316905081565b60068181548110610ad557600080fd5b610b07611887565b6040516370a0823160e01b815230600482015260009073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190602401602060405180830381865afa158015610b59573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7d91906125cb565b9050476000610b8c82846125e4565b905080600003610b9b57505050565b60006064610baa8360026125f7565b610bb49190612624565b905060006064610bc58460626125f7565b610bcf9190612624565b90506000610bdd8584612638565b90508015610c4b57604051632e1a7d4d60e01b81526004810182905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d90602401600060405180830381600087803b158015610c3257600080fd5b505af1158015610c46573d6000803e3d6000fd5b505050505b600080546040516001600160a01b039091169085908381818185875af1925050503d8060008114610c98576040519150601f19603f3d011682016040523d82523d6000602084013e610c9d565b606091505b5050905080610cab57600080fd5b600080610cd66040805160808101825260008082526020820181905291810182905290606082015290565b60005b60055460ff82161015610df35760058160ff1681548110610cfc57610cfc612493565b60009182526020808320909101546001600160a01b039081168084526003835260409384902084516080810186528154938416815260ff600160a01b850481169582019590955262ffffff600160a81b85041695810195909552909750916060840191600160c01b9004166001811115610d7857610d78612356565b6001811115610d8957610d89612356565b815250509150606487836020015160ff16610da491906125f7565b610dae9190612624565b9250600082606001516001811115610dc857610dc8612356565b03610ddc57610dd78484611972565b610deb565b610deb84848460400151611bad565b600101610cd9565b505042600255505050505050505050565b6001546001600160a01b0316610e1957600080fd5b60008111610e535760405162461bcd60e51b815260206004820152600760248201526621746f6b656e7360c81b60448201526064016107ad565b600154604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015610e9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ec191906125cb565b610ed76b033b2e3c9fd0803ce8000000846125f7565b610ee19190612624565b600154604051632770a7eb60e21b8152336004820152602481018590529192506001600160a01b031690639dc29fac90604401600060405180830381600087803b158015610f2e57600080fd5b505af1158015610f42573d6000803e3d6000fd5b50505050600080600080600090505b60065460ff821610156110775760068160ff1681548110610f7457610f74612493565b6000918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116945084906370a0823190602401602060405180830381865afa158015610fc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fec91906125cb565b9150811561106f576b033b2e3c9fd0803ce800000061100b86846125f7565b6110159190612624565b925061102b6001600160a01b0385163385611d40565b836001600160a01b03167fce4385affa8ad2cbec45b1660c6f6afcb691bf0a7a73ebda096ee1dfb670fe6f8460405161106691815260200190565b60405180910390a25b600101610f51565b50600254158015906110985750426002546213c68061109691906125e4565b105b15610abe57600154604080516324dead2f60e11b815290516000926001600160a01b0316916349bd5a5e916004808301926020929190829003018187875af11580156110e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110c9190612459565b6040516370a0823160e01b81523060048201529091506000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611156573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061117a91906125cb565b905060006b033b2e3c9fd0803ce800000061119588846125f7565b61119f9190612624565b9050801561127557600154604051635d5155ef60e11b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260048201526001600160a01b0391821660248201526044810183905260006064820181905260848201523060a48201524260c48201527f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d9091169063baa2abde9060e40160408051808303816000875af115801561124e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611272919061264b565b50505b6001546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa1580156112be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112e291906125cb565b600154604051632770a7eb60e21b8152306004820152602481018390529192506001600160a01b031690639dc29fac90604401600060405180830381600087803b15801561132f57600080fd5b505af1158015611343573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc291506370a0823190602401602060405180830381865afa158015611399573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bd91906125cb565b905060006b033b2e3c9fd0803ce80000006113d88b846125f7565b6113e29190612624565b905080156114095761140973c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23383611d40565b5050505050505050505050565b61141e611887565b6001600160a01b03808216600090815260036020908152604080832081516080810183528154958616815260ff600160a01b870481169482019490945262ffffff600160a81b8704169281019290925292939092916060840191600160c01b900416600181111561149157611491612356565b60018111156114a2576114a2612356565b9052506040516370a0823160e01b81523060048201529091506000906001600160a01b038416906370a0823190602401602060405180830381865afa1580156114ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061151391906125cb565b90508060000361152257505050565b60008260600151600181111561153a5761153a612356565b0361154e576115498382611dc7565b61155d565b61155d83828460400151611f6b565b6001600160a01b038316600090815260036020908152604080832080546001600160c81b031916905560049091529020805460ff1916905561159e836120f3565b602082015160055460ff811615610abe5760006115bb828461266f565b905060005b60055460ff8216101561165257816003600060058460ff16815481106115e8576115e8612493565b60009182526020808320909101546001600160a01b031683528201929092526040019020805460149061162790849060ff600160a01b909104166124f0565b92506101000a81548160ff021916908360ff160217905550808061164a90612691565b9150506115c0565b50505050505050565b6000546001600160a01b031633146116a45760405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b60448201526064016107ad565b600080546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6116f7611887565b60008054911515600160a01b0260ff60a01b19909216919091179055565b60065460609060009067ffffffffffffffff8111156117365761173661250f565b60405190808252806020026020018201604052801561177b57816020015b60408051808201909152600080825260208201528152602001906001900390816117545790505b50905060005b60065460ff8216101561188157600060068260ff16815481106117a6576117a6612493565b9060005260206000200160009054906101000a90046001600160a01b0316905080838360ff16815181106117dc576117dc612493565b60209081029190910101516001600160a01b0391821690526040516370a0823160e01b8152306004820152908216906370a0823190602401602060405180830381865afa158015611831573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061185591906125cb565b838360ff168151811061186a5761186a612493565b602090810291909101810151015250600101611781565b50919050565b6000546001600160a01b031633146118ca5760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b60448201526064016107ad565b565b60408051600481526024810182526020810180516001600160e01b03166318160ddd60e01b179052905160009190829081906001600160a01b038616906119149085906126d4565b6000604051808303816000865af19150503d8060008114611951576040519150601f19603f3d011682016040523d82523d6000602084013e611956565b606091505b5091509150818015611969575060008151115b95945050505050565b60408051600280825260608201835260009260208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2816000815181106119bb576119bb612493565b60200260200101906001600160a01b031690816001600160a01b03168152505082816001815181106119ef576119ef612493565b6001600160a01b0392831660209182029290920101526040516370a0823160e01b81523060048201526000918516906370a0823190602401602060405180830381865afa158015611a44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a6891906125cb565b604051635c11d79560e01b81529091506001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d1690635c11d79590611ac09086906000908790309042906004016126f0565b600060405180830381600087803b158015611ada57600080fd5b505af1158015611aee573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092506001600160a01b03871691506370a08231906024015b602060405180830381865afa158015611b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b5e91906125cb565b90506001600160a01b0385167f55c18555197c6574627cf460c66073d10aa05d412468800b7b71feeaf82ea92d611b958484612638565b60405190815260200160405180910390a25050505050565b6040516370a0823160e01b81523060048201526000906001600160a01b038516906370a0823190602401602060405180830381865afa158015611bf4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c1891906125cb565b90507f000000000000000000000000e592427a0aece92de3edee1f18e0157c058615646001600160a01b031663c04b8d596040518060a0016040528073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc28689604051602001611c7d93929190612761565b6040516020818303038152906040528152602001306001600160a01b0316815260200142815260200186815260200160008152506040518263ffffffff1660e01b8152600401611ccd919061279c565b6020604051808303816000875af1158015611cec573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d1091906125cb565b506040516370a0823160e01b81523060048201526000906001600160a01b038616906370a0823190602401611b1d565b600060405163a9059cbb60e01b81526001600160a01b0384166004820152826024820152602060006044836000895af13d15601f3d1160016000511416171691505080611dc15760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b60448201526064016107ad565b50505050565b6040805160028082526060820183526000926020830190803683370190505090508281600081518110611dfc57611dfc612493565b60200260200101906001600160a01b031690816001600160a01b03168152505073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281600181518110611e4457611e44612493565b6001600160a01b03928316602091820292909201015260405163095ea7b360e01b81527f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d8216600482015260001960248201529084169063095ea7b3906044016020604051808303816000875af1158015611ec3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ee79190612476565b50604051635c11d79560e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d1690635c11d79590611f3d9085906000908690309042906004016126f0565b600060405180830381600087803b158015611f5757600080fd5b505af1158015611652573d6000803e3d6000fd5b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156481166004830152600019602483015284169063095ea7b3906044016020604051808303816000875af1158015611fdb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fff9190612476565b506040805160a081019091526001600160a01b037f000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564169063c04b8d599080612060878673c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260c08501612761565b6040516020818303038152906040528152602001306001600160a01b0316815260200142815260200185815260200160008152506040518263ffffffff1660e01b81526004016120b0919061279c565b6020604051808303816000875af11580156120cf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611dc191906125cb565b600080805b60065481101561215757836001600160a01b03166006828154811061211f5761211f612493565b6000918252602090912001546001600160a01b0316036121455780925060019150612157565b8061214f8161280b565b9150506120f8565b50806121a55760405162461bcd60e51b815260206004820152601c60248201527f546f6b656e206e6f7420666f756e6420696e20616c6c546f6b656e730000000060448201526064016107ad565b6006546121b490600190612638565b82101561223657600680546121cb90600190612638565b815481106121db576121db612493565b600091825260209091200154600680546001600160a01b03909216918490811061220757612207612493565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b600680548061224757612247612824565b600082815260209020810160001990810180546001600160a01b0319169055019055505050565b508054600082559060005260206000209081019061228c919061228f565b50565b5b808211156122a45760008155600101612290565b5090565b6001600160a01b038116811461228c57600080fd5b6000602082840312156122cf57600080fd5b81356122da816122a8565b9392505050565b600080602083850312156122f457600080fd5b823567ffffffffffffffff8082111561230c57600080fd5b818501915085601f83011261232057600080fd5b81358181111561232f57600080fd5b8660208260071b850101111561234457600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052602160045260246000fd5b6001600160a01b038516815260ff8416602082015262ffffff8316604082015260808101600283106123ae57634e487b7160e01b600052602160045260246000fd5b82606083015295945050505050565b6000602082840312156123cf57600080fd5b5035919050565b801515811461228c57600080fd5b6000602082840312156123f657600080fd5b81356122da816123d6565b602080825282518282018190526000919060409081850190868401855b8281101561244c57815180516001600160a01b0316855286015186850152928401929085019060010161241e565b5091979650505050505050565b60006020828403121561246b57600080fd5b81516122da816122a8565b60006020828403121561248857600080fd5b81516122da816123d6565b634e487b7160e01b600052603260045260246000fd5b803560ff811681146124ba57600080fd5b919050565b6000602082840312156124d157600080fd5b6122da826124a9565b634e487b7160e01b600052601160045260246000fd5b60ff8181168382160190811115612509576125096124da565b92915050565b634e487b7160e01b600052604160045260246000fd5b8035600281106124ba57600080fd5b60006080828403121561254657600080fd5b6040516080810181811067ffffffffffffffff8211171561257757634e487b7160e01b600052604160045260246000fd5b6040528235612585816122a8565b8152612593602084016124a9565b6020820152604083013562ffffff811681146125ae57600080fd5b60408201526125bf60608401612525565b60608201529392505050565b6000602082840312156125dd57600080fd5b5051919050565b80820180821115612509576125096124da565b8082028115828204841417612509576125096124da565b634e487b7160e01b600052601260045260246000fd5b6000826126335761263361260e565b500490565b81810381811115612509576125096124da565b6000806040838503121561265e57600080fd5b505080516020909101519092909150565b600060ff8316806126825761268261260e565b8060ff84160491505092915050565b600060ff821660ff81036126a7576126a76124da565b60010192915050565b60005b838110156126cb5781810151838201526020016126b3565b50506000910152565b600082516126e68184602087016126b0565b9190910192915050565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156127405784516001600160a01b03168352938301939183019160010161271b565b50506001600160a01b03969096166060850152505050608001529392505050565b606093841b6bffffffffffffffffffffffff19908116825260e89390931b6001600160e81b0319166014820152921b166017820152602b0190565b602081526000825160a0602084015280518060c08501526127c48160e08601602085016126b0565b60018060a01b0360208601511660408501526040850151606085015260608501516080850152608085015160a085015260e0601f19601f8301168501019250505092915050565b60006001820161281d5761281d6124da565b5060010190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220cd970ebbe0b13990cd68efab644c70a2e091c15c384089151dc060167c7ff1c864736f6c63430008140033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | 100.00% | $1,599.71 | 0.1841 | $294.47 |
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.