Overview
ETH Balance
0 ETH
Eth Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 35 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Redeem | 18107138 | 346 days ago | IN | 0 ETH | 0.00166026 | ||||
Transfer Ownersh... | 18046649 | 355 days ago | IN | 0 ETH | 0.00036386 | ||||
Transfer | 18043083 | 355 days ago | IN | 0.5 ETH | 0.00085519 | ||||
Enter New Paradi... | 18043036 | 355 days ago | IN | 0 ETH | 0.00561777 | ||||
Enter New Paradi... | 18039174 | 356 days ago | IN | 0 ETH | 0.0020093 | ||||
Enter New Paradi... | 18037754 | 356 days ago | IN | 0 ETH | 0.00321054 | ||||
Enter New Paradi... | 18035095 | 357 days ago | IN | 0 ETH | 0.01850857 | ||||
Enter New Paradi... | 18031424 | 357 days ago | IN | 0 ETH | 0.0078703 | ||||
Enter New Paradi... | 18030292 | 357 days ago | IN | 0 ETH | 0.01141676 | ||||
Enter New Paradi... | 18030008 | 357 days ago | IN | 0 ETH | 0.02032465 | ||||
Enter New Paradi... | 18028778 | 357 days ago | IN | 0 ETH | 0.02844712 | ||||
Enter New Paradi... | 18025640 | 358 days ago | IN | 0 ETH | 0.01165007 | ||||
Enter New Paradi... | 18024885 | 358 days ago | IN | 0 ETH | 0.01038857 | ||||
Enter New Paradi... | 18024584 | 358 days ago | IN | 0 ETH | 0.01093336 | ||||
Enter New Paradi... | 18023732 | 358 days ago | IN | 0 ETH | 0.01154196 | ||||
Enter New Paradi... | 18023024 | 358 days ago | IN | 0 ETH | 0.01706131 | ||||
Enter New Paradi... | 18021835 | 358 days ago | IN | 0 ETH | 0.02921972 | ||||
Enter New Paradi... | 18021646 | 358 days ago | IN | 0 ETH | 0.0369057 | ||||
Enter New Paradi... | 18021386 | 358 days ago | IN | 0 ETH | 0.04207581 | ||||
Enter New Paradi... | 18017143 | 359 days ago | IN | 0 ETH | 0.01221275 | ||||
Enter New Paradi... | 18016106 | 359 days ago | IN | 0 ETH | 0.02101945 | ||||
Enter New Paradi... | 18015565 | 359 days ago | IN | 0 ETH | 0.02292016 | ||||
Enter New Paradi... | 18015379 | 359 days ago | IN | 0 ETH | 0.02354832 | ||||
Enter New Paradi... | 18015376 | 359 days ago | IN | 0 ETH | 0.02449601 | ||||
Enter New Paradi... | 18015373 | 359 days ago | IN | 0 ETH | 0.02504116 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
19450440 | 158 days ago | 0.02908644 ETH | ||||
19450440 | 158 days ago | 0.02908644 ETH | ||||
19450396 | 158 days ago | 0.05885636 ETH | ||||
19450396 | 158 days ago | 0.05885636 ETH | ||||
19450393 | 158 days ago | 0.05905567 ETH | ||||
19450393 | 158 days ago | 0.05905567 ETH | ||||
19450390 | 158 days ago | 0.0592574 ETH | ||||
19450390 | 158 days ago | 0.0592574 ETH | ||||
19450388 | 158 days ago | 0.05946016 ETH | ||||
19450388 | 158 days ago | 0.05946016 ETH | ||||
19450379 | 158 days ago | 0.07325264 ETH | ||||
19450379 | 158 days ago | 0.07325264 ETH | ||||
19450309 | 158 days ago | 0.00931367 ETH | ||||
19450309 | 158 days ago | 0.00931367 ETH | ||||
18874513 | 239 days ago | 0.03167164 ETH | ||||
18874513 | 239 days ago | 0.03167164 ETH | ||||
18874485 | 239 days ago | 0.00295188 ETH | ||||
18874485 | 239 days ago | 0.00295188 ETH | ||||
18766542 | 254 days ago | 0.03879333 ETH | ||||
18766542 | 254 days ago | 0.03879333 ETH | ||||
18677839 | 266 days ago | 0.03518475 ETH | ||||
18677839 | 266 days ago | 0.03518475 ETH | ||||
18544475 | 285 days ago | 0.02439645 ETH | ||||
18544475 | 285 days ago | 0.02439645 ETH | ||||
18487019 | 293 days ago | 0.01527598 ETH |
Loading...
Loading
Contract Name:
Index
Compiler Version
v0.8.21+commit.d9974bed
Optimization Enabled:
Yes with 200 runs
Other Settings:
shanghai EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; 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/interfaces/ISwapRouter.sol"; import {IQuoter} from "@uniswap/v3-periphery/interfaces/IQuoter.sol"; contract Index 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 SetChad(address indexed chad); 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 OX = 0x78a0A62Fba6Fb21A83FE8a3433d44C73a4017A6f; address public constant RLB = 0x046EeE2cc3188071C02BfC1745A6b17c656e3f3d; address public constant DMT = 0x0B7f0e51Cd1739D6C96982D55aD8fA634dd43A9C; address public constant BITCOIN = 0x72e4f9F808C49A2a61dE9C5896298920Dc4EEEa9; address public constant UNIBOT = 0xf819d9Cb1c2A819Fd991781A822dE3ca8607c3C9; bool public canUpdateWeights = true; address public chad; address public timelock; uint256 public lastPurchase; // Current implementation mapping(address => IndexComponent) public components; mapping(address => bool) public hasToken; address[] public tokens; address[] public allTokens; constructor(address routerAddressV2, address routerAddressV3, address timelockAddress) Owned(msg.sender) { uniswapV2Router = IUniswapV2Router(routerAddressV2); uniswapV3Router = ISwapRouter(routerAddressV3); timelock = timelockAddress; components[OX] = IndexComponent({token: OX, weight: 25, fee: HIGH_FEE, version: UniswapVersion.V3}); components[RLB] = IndexComponent({token: RLB, weight: 25, fee: LOW_FEE, version: UniswapVersion.V3}); components[DMT] = IndexComponent({token: DMT, weight: 10, fee: LOW_FEE, version: UniswapVersion.V3}); components[BITCOIN] = IndexComponent({token: BITCOIN, weight: 20, fee: 0, version: UniswapVersion.V2}); components[UNIBOT] = IndexComponent({token: UNIBOT, weight: 20, fee: 0, version: UniswapVersion.V2}); tokens = [OX, RLB, DMT, BITCOIN, UNIBOT]; allTokens = [OX, RLB, DMT, BITCOIN, UNIBOT]; hasToken[OX] = true; hasToken[RLB] = true; hasToken[DMT] = true; hasToken[BITCOIN] = true; hasToken[UNIBOT] = true; ERC20(WETH).approve(routerAddressV2, type(uint256).max); ERC20(WETH).approve(routerAddressV3, type(uint256).max); lastPurchase = block.timestamp; } receive() external payable {} function _requireIsOwner() internal view { require(msg.sender == owner, "!owner"); } function setChad(address newChad) external { _requireIsOwner(); chad = newChad; ERC20(IChad(chad).uniswapV2Pair()).approve(address(uniswapV2Router), type(uint256).max); emit SetChad(newChad); } function enterNewParadigm() 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; } /// @dev cannot update weights without using timelock as an anti rug measure function updateWeights(IndexComponent[] calldata newComponents) external { require(timelock != address(0) && msg.sender == timelock, "!timelock"); 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]; 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(chad != address(0)); require(amount > 0, "!tokens"); uint256 share = (amount * MAX_BPS) / ERC20(chad).totalSupply(); IChad(chad).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(chad).uniswapV2Pair(); uint256 liquidityBalance = ERC20(liquidityAddress).balanceOf(address(this)); uint256 liquidityAllocation = (liquidityBalance * share) / MAX_BPS; if (liquidityAllocation > 0) { uniswapV2Router.removeLiquidity(WETH, chad, liquidityAllocation, 0, 0, address(this), block.timestamp); } uint256 chadRemoved = ERC20(chad).balanceOf(address(this)); IChad(chad).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 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 _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/", "@uniswap/v3-core/=lib/v3-core/", "@uniswap/v3-periphery/=lib/v3-periphery/contracts/", "v3-core/=lib/v3-core/", "v3-periphery/=lib/v3-periphery/contracts/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "shanghai", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"routerAddressV2","type":"address"},{"internalType":"address","name":"routerAddressV3","type":"address"},{"internalType":"address","name":"timelockAddress","type":"address"}],"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":"chad","type":"address"}],"name":"SetChad","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":"BITCOIN","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DMT","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":"OX","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RLB","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UNIBOT","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":[],"name":"chad","outputs":[{"internalType":"address","name":"","type":"address"}],"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 Index.UniswapVersion","name":"version","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentTokenCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enterNewParadigm","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":"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 Index.TokenAmount[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newChad","type":"address"}],"name":"setChad","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timelock","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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 Index.UniswapVersion","name":"version","type":"uint8"}],"internalType":"struct Index.IndexComponent[]","name":"newComponents","type":"tuple[]"}],"name":"updateWeights","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
610100604052610bb860c05261271060e0525f805460ff60a01b1916600160a01b1790553480156200002f575f80fd5b5060405162002a3c38038062002a3c8339810160408190526200005291620009c4565b5f80546001600160a01b031916339081178255604051909182917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b03838116608090815283821660a052600280546001600160a01b031916928416929092179091556040805191820181527378a0a62fba6fb21a83fe8a3433d44c73a4017a6f82526019602083015260e05162ffffff169082015260608101600190527378a0a62fba6fb21a83fe8a3433d44c73a4017a6f5f526004602090815281517f3550bea3adb46cf3eaad8aa9b66f45e26850b67bb2e0106ab5a74804b5db009d805492840151604085015162ffffff16600160a81b0262ffffff60a81b1960ff909216600160a01b026001600160a81b03199095166001600160a01b0394909416939093179390931792831682178155606084015190929091839160ff60c01b1990911663ffffffff60a81b1990911617600160c01b836001811115620001c757620001c762000a0b565b0217905550506040805160808101825273046eee2cc3188071c02bfc1745a6b17c656e3f3d81526019602082015260c05162ffffff16918101919091529050606081016001905273046eee2cc3188071c02bfc1745a6b17c656e3f3d5f526004602090815281517f04f2848f960017f45f3478dc1312fa9ed7ae99cb41f37e5420b1cb1570bdc5c1805492840151604085015162ffffff16600160a81b0262ffffff60a81b1960ff909216600160a01b026001600160a81b03199095166001600160a01b0394909416939093179390931792831682178155606084015190929091839160ff60c01b1990911663ffffffff60a81b1990911617600160c01b836001811115620002da57620002da62000a0b565b02179055505060408051608081018252730b7f0e51cd1739d6c96982d55ad8fa634dd43a9c8152600a602082015260c05162ffffff169181019190915290506060810160019052730b7f0e51cd1739d6c96982d55ad8fa634dd43a9c5f526004602090815281517fb45f1f8456a9cc874e908cf7b6bddf59c8c4353ecdf7d5d7542e67b8ca04dbbc805492840151604085015162ffffff16600160a81b0262ffffff60a81b1960ff909216600160a01b026001600160a81b03199095166001600160a01b0394909416939093179390931792831682178155606084015190929091839160ff60c01b1990911663ffffffff60a81b1990911617600160c01b836001811115620003ed57620003ed62000a0b565b021790555050604080516080810182527372e4f9f808c49a2a61de9c5896298920dc4eeea98152601460208201525f918101829052915060608201527372e4f9f808c49a2a61de9c5896298920dc4eeea95f526004602090815281517f523bfc370ed3280b9a3a553caa593a13d2d2e5ecce04b2077b2896a53950933d805492840151604085015162ffffff16600160a81b0262ffffff60a81b1960ff909216600160a01b026001600160a81b03199095166001600160a01b0394909416939093179390931792831682178155606084015190929091839160ff60c01b1990911663ffffffff60a81b1990911617600160c01b836001811115620004f557620004f562000a0b565b021790555050604080516080810182525f8051602062002a1c8339815191528152601460208201525f918101829052915060608201525f8051602062002a1c8339815191525f526004602090815281517faa5dac11db67b9ac875bbd34877ee53d91dc01afc321c831f27ec1ea755ea8b0805492840151604085015162ffffff16600160a81b0262ffffff60a81b1960ff909216600160a01b026001600160a81b03199095166001600160a01b0394909416939093179390931792831682178155606084015190929091839160ff60c01b1990911663ffffffff60a81b1990911617600160c01b836001811115620005f157620005f162000a0b565b0217905550506040805160a0810182527378a0a62fba6fb21a83fe8a3433d44c73a4017a6f815273046eee2cc3188071c02bfc1745a6b17c656e3f3d6020820152730b7f0e51cd1739d6c96982d55ad8fa634dd43a9c918101919091527372e4f9f808c49a2a61de9c5896298920dc4eeea960608201525f8051602062002a1c83398151915260808201526200068d915060069060056200092a565b506040805160a0810182527378a0a62fba6fb21a83fe8a3433d44c73a4017a6f815273046eee2cc3188071c02bfc1745a6b17c656e3f3d6020820152730b7f0e51cd1739d6c96982d55ad8fa634dd43a9c918101919091527372e4f9f808c49a2a61de9c5896298920dc4eeea960608201525f8051602062002a1c8339815191526080820152620007239060079060056200092a565b5060056020527f3e605e6db342f148e6bd1a0f5941c2651f777db236b10e30ab18744a99c4312c8054600160ff1991821681179092557fcbac8fa93be6b0b64fd4dc5ebcb645c6fcaec33ddeecf07108df055f4e30f73180548216831790557fc2b67d9619e9547704e1c052af24ec8f2c56a719f3a1c989f6c0cd1f62c2655980548216831790557f5e952c7854661237a44566ed3e5bbb11393478568e38a582f34d646a24b8e6aa80548216831790555f8051602062002a1c8339815191525f527f64ed23314ab48118d494d169b71b02cada8bde8b8fa7c0c796447fd0eb82a19f8054909116909117905560405163095ea7b360e01b81526001600160a01b03841660048201525f19602482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063095ea7b3906044016020604051808303815f875af11580156200086f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062000895919062000a1f565b5060405163095ea7b360e01b81526001600160a01b03831660048201525f19602482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc29063095ea7b3906044016020604051808303815f875af1158015620008f5573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906200091b919062000a1f565b5050426003555062000a479050565b828054828255905f5260205f2090810192821562000980579160200282015b828111156200098057825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000949565b506200098e92915062000992565b5090565b5b808211156200098e575f815560010162000993565b80516001600160a01b0381168114620009bf575f80fd5b919050565b5f805f60608486031215620009d7575f80fd5b620009e284620009a8565b9250620009f260208501620009a8565b915062000a0260408501620009a8565b90509250925092565b634e487b7160e01b5f52602160045260245ffd5b5f6020828403121562000a30575f80fd5b8151801515811462000a40575f80fd5b9392505050565b60805160a05160c05160e051611f8562000a975f395f61025201525f6104aa01525f81816102b8015261199001525f818161020701528181610d8a0152818161122401526117710152611f855ff3fe6080604052600436106101b2575f3560e01c80638da5cb5b116100e7578063db006a7511610087578063f2fde38b11610062578063f2fde38b14610596578063fcad2ab4146105b5578063fd6c6a14146105dc578063fd967f47146105fd575f80fd5b8063db006a7514610531578063e279085314610550578063ef8d03da14610577575f80fd5b8063a7d4006d116100c2578063a7d4006d14610499578063ad5c4648146104cc578063b6661b71146104f3578063d33219b414610512575f80fd5b80638da5cb5b146104265780639bb0f599146104445780639e05002314610472575f80fd5b8063384392f2116101525780635f4614ae1161012d5780635f4614ae1461039d578063634282af146103cc5780636b35f578146103eb578063764912ef14610412575f80fd5b8063384392f2146103425780634528f3ec146103695780634f64b2be1461037e575f80fd5b80631dbd04d81161018d5780631dbd04d81461024157806322e11b8e146102885780632c76d7a6146102a75780633140acc9146102da575f80fd5b806311b639d9146101bd5780631281e8ff146101e05780631694505e146101f6575f80fd5b366101b957005b5f80fd5b3480156101c8575f80fd5b506006545b6040519081526020015b60405180910390f35b3480156101eb575f80fd5b506101f461061c565b005b348015610201575f80fd5b506102297f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016101d7565b34801561024c575f80fd5b506102747f000000000000000000000000000000000000000000000000000000000000000081565b60405162ffffff90911681526020016101d7565b348015610293575f80fd5b506101f46102a2366004611aeb565b61090b565b3480156102b2575f80fd5b506102297f000000000000000000000000000000000000000000000000000000000000000081565b3480156102e5575f80fd5b506103326102f4366004611b6e565b60046020525f90815260409020546001600160a01b0381169060ff600160a01b820481169162ffffff600160a81b82041691600160c01b9091041684565b6040516101d79493929190611ba4565b34801561034d575f80fd5b50610229730b7f0e51cd1739d6c96982d55ad8fa634dd43a9c81565b348015610374575f80fd5b506101cd60035481565b348015610389575f80fd5b50610229610398366004611bf3565b610cb8565b3480156103a8575f80fd5b505f546103bc90600160a01b900460ff1681565b60405190151581526020016101d7565b3480156103d7575f80fd5b506102296103e6366004611bf3565b610ce0565b3480156103f6575f80fd5b5061022973046eee2cc3188071c02bfc1745a6b17c656e3f3d81565b34801561041d575f80fd5b506007546101cd565b348015610431575f80fd5b505f54610229906001600160a01b031681565b34801561044f575f80fd5b506103bc61045e366004611b6e565b60056020525f908152604090205460ff1681565b34801561047d575f80fd5b506102297372e4f9f808c49a2a61de9c5896298920dc4eeea981565b3480156104a4575f80fd5b506102747f000000000000000000000000000000000000000000000000000000000000000081565b3480156104d7575f80fd5b5061022973c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156104fe575f80fd5b506101f461050d366004611b6e565b610cef565b34801561051d575f80fd5b50600254610229906001600160a01b031681565b34801561053c575f80fd5b506101f461054b366004611bf3565b610e3c565b34801561055b575f80fd5b506102297378a0a62fba6fb21a83fe8a3433d44c73a4017a6f81565b348015610582575f80fd5b50600154610229906001600160a01b031681565b3480156105a1575f80fd5b506101f46105b0366004611b6e565b611427565b3480156105c0575f80fd5b5061022973f819d9cb1c2a819fd991781a822de3ca8607c3c981565b3480156105e7575f80fd5b506105f06114b9565b6040516101d79190611c0a565b348015610608575f80fd5b506101cd6b033b2e3c9fd0803ce800000081565b610624611622565b6040516370a0823160e01b81523060048201525f9073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190602401602060405180830381865afa158015610673573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106979190611c61565b9050475f6106a58284611c8c565b9050805f036106b357505050565b5f60646106c1836002611ca5565b6106cb9190611cbc565b90505f60646106db846062611ca5565b6106e59190611cbc565b90505f6106f28584611cdb565b9050801561075b57604051632e1a7d4d60e01b81526004810182905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d906024015f604051808303815f87803b158015610744575f80fd5b505af1158015610756573d5f803e3d5ffd5b505050505b5f80546040516001600160a01b039091169085908381818185875af1925050503d805f81146107a5576040519150601f19603f3d011682016040523d82523d5f602084013e6107aa565b606091505b50509050806107b7575f80fd5b5f806107e0604080516080810182525f8082526020820181905291810182905290606082015290565b5f5b60065460ff821610156108fa5760068160ff168154811061080557610805611cee565b5f9182526020808320909101546001600160a01b039081168084526004835260409384902084516080810186528154938416815260ff600160a01b850481169582019590955262ffffff600160a81b85041695810195909552909750916060840191600160c01b900416600181111561088057610880611b90565b600181111561089157610891611b90565b815250509150606487836020015160ff166108ac9190611ca5565b6108b69190611cbc565b92505f826060015160018111156108cf576108cf611b90565b036108e3576108de8484611666565b6108f2565b6108f284848460400151611893565b6001016107e2565b505042600355505050505050505050565b6002546001600160a01b03161580159061092f57506002546001600160a01b031633145b61096c5760405162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b60448201526064015b60405180910390fd5b5f805b60ff81168311156109bb5783838260ff1681811061098f5761098f611cee565b90506080020160200160208101906109a79190611d17565b6109b19083611d30565b915060010161096f565b508060ff166064146109f85760405162461bcd60e51b8152602060048201526006602482015265085d985b1a5960d21b6044820152606401610963565b5f5b600754811015610a84575f60078281548110610a1857610a18611cee565b5f918252602080832091909101546001600160a01b031680835260048252604080842080546001600160c81b031916905551928352925082917e6f3c11a03585d1b777f727ab55879672a0c73a67c94eddf39ee818afd0b110910160405180910390a2506001016109fa565b50610a9060065f611ab5565b610ab7604080516080810182525f8082526020820181905291810182905290606082015290565b5f5b83811015610cb157848482818110610ad357610ad3611cee565b905060800201803603810190610ae99190611d6b565b80516001600160a01b039081165f9081526004602090815260409182902084518154928601519386015162ffffff16600160a81b0262ffffff60a81b1960ff909516600160a01b026001600160a81b0319909416919095161791909117918216831781556060840151939550859390929091839160ff60c01b191663ffffffff60a81b1990911617600160c01b836001811115610b8857610b88611b90565b0217905550508251600680546001810182555f9182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b03938416179055845190911681526005602052604090205460ff169050610c615781516001600160a01b039081165f9081526005602052604081208054600160ff19909116811790915584516007805492830181559092527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b031916919092161790555b815160208084015160405160ff90911681526001600160a01b03909216917e6f3c11a03585d1b777f727ab55879672a0c73a67c94eddf39ee818afd0b110910160405180910390a2600101610ab9565b5050505050565b60068181548110610cc7575f80fd5b5f918252602090912001546001600160a01b0316905081565b60078181548110610cc7575f80fd5b610cf7611622565b600180546001600160a01b0319166001600160a01b038316908117909155604080516324dead2f60e11b815290516349bd5a5e9160048082019260209290919082900301815f875af1158015610d4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d739190611dfd565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811660048301525f196024830152919091169063095ea7b3906044016020604051808303815f875af1158015610de1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e059190611e18565b506040516001600160a01b038216907fe8ee9c9c4af332001bcfe7aa3849d34276169c2af12c46eab14142ba2220bb58905f90a250565b6001546001600160a01b0316610e50575f80fd5b5f8111610e895760405162461bcd60e51b815260206004820152600760248201526621746f6b656e7360c81b6044820152606401610963565b600154604080516318160ddd60e01b815290515f926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015610ed0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ef49190611c61565b610f0a6b033b2e3c9fd0803ce800000084611ca5565b610f149190611cbc565b600154604051632770a7eb60e21b8152336004820152602481018590529192506001600160a01b031690639dc29fac906044015f604051808303815f87803b158015610f5e575f80fd5b505af1158015610f70573d5f803e3d5ffd5b505050505f805f805f90505b60075460ff8216101561109f5760078160ff1681548110610f9f57610f9f611cee565b5f918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116945084906370a0823190602401602060405180830381865afa158015610ff0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110149190611c61565b91508115611097576b033b2e3c9fd0803ce80000006110338684611ca5565b61103d9190611cbc565b92506110536001600160a01b0385163385611a32565b836001600160a01b03167fce4385affa8ad2cbec45b1660c6f6afcb691bf0a7a73ebda096ee1dfb670fe6f8460405161108e91815260200190565b60405180910390a25b600101610f7c565b50600354158015906110c05750426003546213c6806110be9190611c8c565b105b15610cb157600154604080516324dead2f60e11b815290515f926001600160a01b0316916349bd5a5e916004808301926020929190829003018187875af115801561110d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111319190611dfd565b6040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa158015611178573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061119c9190611c61565b90505f6b033b2e3c9fd0803ce80000006111b68884611ca5565b6111c09190611cbc565b9050801561129257600154604051635d5155ef60e11b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260048201526001600160a01b039182166024820152604481018390525f6064820181905260848201523060a48201524260c48201527f00000000000000000000000000000000000000000000000000000000000000009091169063baa2abde9060e40160408051808303815f875af115801561126b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061128f9190611e37565b50505b6001546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa1580156112d8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112fc9190611c61565b600154604051632770a7eb60e21b8152306004820152602481018390529192506001600160a01b031690639dc29fac906044015f604051808303815f87803b158015611346575f80fd5b505af1158015611358573d5f803e3d5ffd5b50506040516370a0823160e01b81523060048201525f925073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc291506370a0823190602401602060405180830381865afa1580156113ab573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113cf9190611c61565b90505f6b033b2e3c9fd0803ce80000006113e98b84611ca5565b6113f39190611cbc565b9050801561141a5761141a73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23383611a32565b5050505050505050505050565b5f546001600160a01b0316331461146f5760405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b6044820152606401610963565b5f80546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6007546060905f9067ffffffffffffffff8111156114d9576114d9611d49565b60405190808252806020026020018201604052801561151d57816020015b604080518082019091525f80825260208201528152602001906001900390816114f75790505b5090505f5b60075460ff8216101561161c575f60078260ff168154811061154657611546611cee565b905f5260205f20015f9054906101000a90046001600160a01b0316905080838360ff168151811061157957611579611cee565b60209081029190910101516001600160a01b0391821690526040516370a0823160e01b8152306004820152908216906370a0823190602401602060405180830381865afa1580156115cc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115f09190611c61565b838360ff168151811061160557611605611cee565b602090810291909101810151015250600101611522565b50919050565b5f546001600160a01b031633146116645760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b6044820152606401610963565b565b6040805160028082526060820183525f9260208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2815f815181106116ad576116ad611cee565b60200260200101906001600160a01b031690816001600160a01b03168152505082816001815181106116e1576116e1611cee565b6001600160a01b0392831660209182029290920101526040516370a0823160e01b81523060048201525f918516906370a0823190602401602060405180830381865afa158015611733573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117579190611c61565b604051635c11d79560e01b81529091506001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635c11d795906117ae9086905f90879030904290600401611e59565b5f604051808303815f87803b1580156117c5575f80fd5b505af11580156117d7573d5f803e3d5ffd5b50506040516370a0823160e01b81523060048201525f92506001600160a01b03871691506370a08231906024015b602060405180830381865afa158015611820573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118449190611c61565b90506001600160a01b0385167f55c18555197c6574627cf460c66073d10aa05d412468800b7b71feeaf82ea92d61187b8484611cdb565b60405190815260200160405180910390a25050505050565b6040516370a0823160e01b81523060048201525f906001600160a01b038516906370a0823190602401602060405180830381865afa1580156118d7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118fb9190611c61565b6040805160a081018252736015551cd911ff4685072e2793f56c841e3ab66160611b60c08201526001600160e81b031960e886901b1660d4820152606087811b6bffffffffffffffffffffffff191660d7830152825180830360cb01815260eb830184528252306020830152428284015281018690525f6080820152905163c04b8d5960e01b81529192506001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169163c04b8d59916119c391600401611ec8565b6020604051808303815f875af11580156119df573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a039190611c61565b506040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401611805565b5f60405163a9059cbb60e01b81526001600160a01b038416600482015282602482015260205f6044835f895af13d15601f3d1160015f511416171691505080611aaf5760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606401610963565b50505050565b5080545f8255905f5260205f2090810190611ad09190611ad3565b50565b5b80821115611ae7575f8155600101611ad4565b5090565b5f8060208385031215611afc575f80fd5b823567ffffffffffffffff80821115611b13575f80fd5b818501915085601f830112611b26575f80fd5b813581811115611b34575f80fd5b8660208260071b8501011115611b48575f80fd5b60209290920196919550909350505050565b6001600160a01b0381168114611ad0575f80fd5b5f60208284031215611b7e575f80fd5b8135611b8981611b5a565b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b038516815260ff8416602082015262ffffff831660408201526080810160028310611be457634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f60208284031215611c03575f80fd5b5035919050565b602080825282518282018190525f919060409081850190868401855b82811015611c5457815180516001600160a01b03168552860151868501529284019290850190600101611c26565b5091979650505050505050565b5f60208284031215611c71575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611c9f57611c9f611c78565b92915050565b8082028115828204841417611c9f57611c9f611c78565b5f82611cd657634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115611c9f57611c9f611c78565b634e487b7160e01b5f52603260045260245ffd5b803560ff81168114611d12575f80fd5b919050565b5f60208284031215611d27575f80fd5b611b8982611d02565b60ff8181168382160190811115611c9f57611c9f611c78565b634e487b7160e01b5f52604160045260245ffd5b803560028110611d12575f80fd5b5f60808284031215611d7b575f80fd5b6040516080810181811067ffffffffffffffff82111715611daa57634e487b7160e01b5f52604160045260245ffd5b6040528235611db881611b5a565b8152611dc660208401611d02565b6020820152604083013562ffffff81168114611de0575f80fd5b6040820152611df160608401611d5d565b60608201529392505050565b5f60208284031215611e0d575f80fd5b8151611b8981611b5a565b5f60208284031215611e28575f80fd5b81518015158114611b89575f80fd5b5f8060408385031215611e48575f80fd5b505080516020909101519092909150565b5f60a082018783526020878185015260a0604085015281875180845260c08601915082890193505f5b81811015611ea75784516001600160a01b031683529383019391830191600101611e82565b50506001600160a01b03969096166060850152505050608001529392505050565b5f6020808352835160a08285015280518060c08601525f5b81811015611efc5782810184015186820160e001528301611ee0565b505f60e08287010152918501516001600160a01b0381166040860152916040860151606086015260608601516080860152608086015160a086015260e0601f19601f83011686010193505050509291505056fea2646970667358221220bb74fe047f2024bce021b528d77057bf1b1d775cd77f187520c53101d27cb80264736f6c63430008150033000000000000000000000000f819d9cb1c2a819fd991781a822de3ca8607c3c90000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000e592427a0aece92de3edee1f18e0157c058615640000000000000000000000006d85fba94a34496cbc0fa4acbdabb5b575f7cb82
Deployed Bytecode
0x6080604052600436106101b2575f3560e01c80638da5cb5b116100e7578063db006a7511610087578063f2fde38b11610062578063f2fde38b14610596578063fcad2ab4146105b5578063fd6c6a14146105dc578063fd967f47146105fd575f80fd5b8063db006a7514610531578063e279085314610550578063ef8d03da14610577575f80fd5b8063a7d4006d116100c2578063a7d4006d14610499578063ad5c4648146104cc578063b6661b71146104f3578063d33219b414610512575f80fd5b80638da5cb5b146104265780639bb0f599146104445780639e05002314610472575f80fd5b8063384392f2116101525780635f4614ae1161012d5780635f4614ae1461039d578063634282af146103cc5780636b35f578146103eb578063764912ef14610412575f80fd5b8063384392f2146103425780634528f3ec146103695780634f64b2be1461037e575f80fd5b80631dbd04d81161018d5780631dbd04d81461024157806322e11b8e146102885780632c76d7a6146102a75780633140acc9146102da575f80fd5b806311b639d9146101bd5780631281e8ff146101e05780631694505e146101f6575f80fd5b366101b957005b5f80fd5b3480156101c8575f80fd5b506006545b6040519081526020015b60405180910390f35b3480156101eb575f80fd5b506101f461061c565b005b348015610201575f80fd5b506102297f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d81565b6040516001600160a01b0390911681526020016101d7565b34801561024c575f80fd5b506102747f000000000000000000000000000000000000000000000000000000000000271081565b60405162ffffff90911681526020016101d7565b348015610293575f80fd5b506101f46102a2366004611aeb565b61090b565b3480156102b2575f80fd5b506102297f000000000000000000000000e592427a0aece92de3edee1f18e0157c0586156481565b3480156102e5575f80fd5b506103326102f4366004611b6e565b60046020525f90815260409020546001600160a01b0381169060ff600160a01b820481169162ffffff600160a81b82041691600160c01b9091041684565b6040516101d79493929190611ba4565b34801561034d575f80fd5b50610229730b7f0e51cd1739d6c96982d55ad8fa634dd43a9c81565b348015610374575f80fd5b506101cd60035481565b348015610389575f80fd5b50610229610398366004611bf3565b610cb8565b3480156103a8575f80fd5b505f546103bc90600160a01b900460ff1681565b60405190151581526020016101d7565b3480156103d7575f80fd5b506102296103e6366004611bf3565b610ce0565b3480156103f6575f80fd5b5061022973046eee2cc3188071c02bfc1745a6b17c656e3f3d81565b34801561041d575f80fd5b506007546101cd565b348015610431575f80fd5b505f54610229906001600160a01b031681565b34801561044f575f80fd5b506103bc61045e366004611b6e565b60056020525f908152604090205460ff1681565b34801561047d575f80fd5b506102297372e4f9f808c49a2a61de9c5896298920dc4eeea981565b3480156104a4575f80fd5b506102747f0000000000000000000000000000000000000000000000000000000000000bb881565b3480156104d7575f80fd5b5061022973c02aaa39b223fe8d0a0e5c4f27ead9083c756cc281565b3480156104fe575f80fd5b506101f461050d366004611b6e565b610cef565b34801561051d575f80fd5b50600254610229906001600160a01b031681565b34801561053c575f80fd5b506101f461054b366004611bf3565b610e3c565b34801561055b575f80fd5b506102297378a0a62fba6fb21a83fe8a3433d44c73a4017a6f81565b348015610582575f80fd5b50600154610229906001600160a01b031681565b3480156105a1575f80fd5b506101f46105b0366004611b6e565b611427565b3480156105c0575f80fd5b5061022973f819d9cb1c2a819fd991781a822de3ca8607c3c981565b3480156105e7575f80fd5b506105f06114b9565b6040516101d79190611c0a565b348015610608575f80fd5b506101cd6b033b2e3c9fd0803ce800000081565b610624611622565b6040516370a0823160e01b81523060048201525f9073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2906370a0823190602401602060405180830381865afa158015610673573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106979190611c61565b9050475f6106a58284611c8c565b9050805f036106b357505050565b5f60646106c1836002611ca5565b6106cb9190611cbc565b90505f60646106db846062611ca5565b6106e59190611cbc565b90505f6106f28584611cdb565b9050801561075b57604051632e1a7d4d60e01b81526004810182905273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc290632e1a7d4d906024015f604051808303815f87803b158015610744575f80fd5b505af1158015610756573d5f803e3d5ffd5b505050505b5f80546040516001600160a01b039091169085908381818185875af1925050503d805f81146107a5576040519150601f19603f3d011682016040523d82523d5f602084013e6107aa565b606091505b50509050806107b7575f80fd5b5f806107e0604080516080810182525f8082526020820181905291810182905290606082015290565b5f5b60065460ff821610156108fa5760068160ff168154811061080557610805611cee565b5f9182526020808320909101546001600160a01b039081168084526004835260409384902084516080810186528154938416815260ff600160a01b850481169582019590955262ffffff600160a81b85041695810195909552909750916060840191600160c01b900416600181111561088057610880611b90565b600181111561089157610891611b90565b815250509150606487836020015160ff166108ac9190611ca5565b6108b69190611cbc565b92505f826060015160018111156108cf576108cf611b90565b036108e3576108de8484611666565b6108f2565b6108f284848460400151611893565b6001016107e2565b505042600355505050505050505050565b6002546001600160a01b03161580159061092f57506002546001600160a01b031633145b61096c5760405162461bcd60e51b81526020600482015260096024820152682174696d656c6f636b60b81b60448201526064015b60405180910390fd5b5f805b60ff81168311156109bb5783838260ff1681811061098f5761098f611cee565b90506080020160200160208101906109a79190611d17565b6109b19083611d30565b915060010161096f565b508060ff166064146109f85760405162461bcd60e51b8152602060048201526006602482015265085d985b1a5960d21b6044820152606401610963565b5f5b600754811015610a84575f60078281548110610a1857610a18611cee565b5f918252602080832091909101546001600160a01b031680835260048252604080842080546001600160c81b031916905551928352925082917e6f3c11a03585d1b777f727ab55879672a0c73a67c94eddf39ee818afd0b110910160405180910390a2506001016109fa565b50610a9060065f611ab5565b610ab7604080516080810182525f8082526020820181905291810182905290606082015290565b5f5b83811015610cb157848482818110610ad357610ad3611cee565b905060800201803603810190610ae99190611d6b565b80516001600160a01b039081165f9081526004602090815260409182902084518154928601519386015162ffffff16600160a81b0262ffffff60a81b1960ff909516600160a01b026001600160a81b0319909416919095161791909117918216831781556060840151939550859390929091839160ff60c01b191663ffffffff60a81b1990911617600160c01b836001811115610b8857610b88611b90565b0217905550508251600680546001810182555f9182527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b0319166001600160a01b03938416179055845190911681526005602052604090205460ff169050610c615781516001600160a01b039081165f9081526005602052604081208054600160ff19909116811790915584516007805492830181559092527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b031916919092161790555b815160208084015160405160ff90911681526001600160a01b03909216917e6f3c11a03585d1b777f727ab55879672a0c73a67c94eddf39ee818afd0b110910160405180910390a2600101610ab9565b5050505050565b60068181548110610cc7575f80fd5b5f918252602090912001546001600160a01b0316905081565b60078181548110610cc7575f80fd5b610cf7611622565b600180546001600160a01b0319166001600160a01b038316908117909155604080516324dead2f60e11b815290516349bd5a5e9160048082019260209290919082900301815f875af1158015610d4f573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d739190611dfd565b60405163095ea7b360e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d811660048301525f196024830152919091169063095ea7b3906044016020604051808303815f875af1158015610de1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e059190611e18565b506040516001600160a01b038216907fe8ee9c9c4af332001bcfe7aa3849d34276169c2af12c46eab14142ba2220bb58905f90a250565b6001546001600160a01b0316610e50575f80fd5b5f8111610e895760405162461bcd60e51b815260206004820152600760248201526621746f6b656e7360c81b6044820152606401610963565b600154604080516318160ddd60e01b815290515f926001600160a01b0316916318160ddd9160048083019260209291908290030181865afa158015610ed0573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ef49190611c61565b610f0a6b033b2e3c9fd0803ce800000084611ca5565b610f149190611cbc565b600154604051632770a7eb60e21b8152336004820152602481018590529192506001600160a01b031690639dc29fac906044015f604051808303815f87803b158015610f5e575f80fd5b505af1158015610f70573d5f803e3d5ffd5b505050505f805f805f90505b60075460ff8216101561109f5760078160ff1681548110610f9f57610f9f611cee565b5f918252602090912001546040516370a0823160e01b81523060048201526001600160a01b03909116945084906370a0823190602401602060405180830381865afa158015610ff0573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906110149190611c61565b91508115611097576b033b2e3c9fd0803ce80000006110338684611ca5565b61103d9190611cbc565b92506110536001600160a01b0385163385611a32565b836001600160a01b03167fce4385affa8ad2cbec45b1660c6f6afcb691bf0a7a73ebda096ee1dfb670fe6f8460405161108e91815260200190565b60405180910390a25b600101610f7c565b50600354158015906110c05750426003546213c6806110be9190611c8c565b105b15610cb157600154604080516324dead2f60e11b815290515f926001600160a01b0316916349bd5a5e916004808301926020929190829003018187875af115801561110d573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906111319190611dfd565b6040516370a0823160e01b81523060048201529091505f906001600160a01b038316906370a0823190602401602060405180830381865afa158015611178573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061119c9190611c61565b90505f6b033b2e3c9fd0803ce80000006111b68884611ca5565b6111c09190611cbc565b9050801561129257600154604051635d5155ef60e11b815273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260048201526001600160a01b039182166024820152604481018390525f6064820181905260848201523060a48201524260c48201527f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d9091169063baa2abde9060e40160408051808303815f875af115801561126b573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061128f9190611e37565b50505b6001546040516370a0823160e01b81523060048201525f916001600160a01b0316906370a0823190602401602060405180830381865afa1580156112d8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112fc9190611c61565b600154604051632770a7eb60e21b8152306004820152602481018390529192506001600160a01b031690639dc29fac906044015f604051808303815f87803b158015611346575f80fd5b505af1158015611358573d5f803e3d5ffd5b50506040516370a0823160e01b81523060048201525f925073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc291506370a0823190602401602060405180830381865afa1580156113ab573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906113cf9190611c61565b90505f6b033b2e3c9fd0803ce80000006113e98b84611ca5565b6113f39190611cbc565b9050801561141a5761141a73c02aaa39b223fe8d0a0e5c4f27ead9083c756cc23383611a32565b5050505050505050505050565b5f546001600160a01b0316331461146f5760405162461bcd60e51b815260206004820152600c60248201526b15539055551213d49256915160a21b6044820152606401610963565b5f80546001600160a01b0319166001600160a01b0383169081178255604051909133917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a350565b6007546060905f9067ffffffffffffffff8111156114d9576114d9611d49565b60405190808252806020026020018201604052801561151d57816020015b604080518082019091525f80825260208201528152602001906001900390816114f75790505b5090505f5b60075460ff8216101561161c575f60078260ff168154811061154657611546611cee565b905f5260205f20015f9054906101000a90046001600160a01b0316905080838360ff168151811061157957611579611cee565b60209081029190910101516001600160a01b0391821690526040516370a0823160e01b8152306004820152908216906370a0823190602401602060405180830381865afa1580156115cc573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115f09190611c61565b838360ff168151811061160557611605611cee565b602090810291909101810151015250600101611522565b50919050565b5f546001600160a01b031633146116645760405162461bcd60e51b815260206004820152600660248201526510b7bbb732b960d11b6044820152606401610963565b565b6040805160028082526060820183525f9260208301908036833701905050905073c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2815f815181106116ad576116ad611cee565b60200260200101906001600160a01b031690816001600160a01b03168152505082816001815181106116e1576116e1611cee565b6001600160a01b0392831660209182029290920101526040516370a0823160e01b81523060048201525f918516906370a0823190602401602060405180830381865afa158015611733573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906117579190611c61565b604051635c11d79560e01b81529091506001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d1690635c11d795906117ae9086905f90879030904290600401611e59565b5f604051808303815f87803b1580156117c5575f80fd5b505af11580156117d7573d5f803e3d5ffd5b50506040516370a0823160e01b81523060048201525f92506001600160a01b03871691506370a08231906024015b602060405180830381865afa158015611820573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118449190611c61565b90506001600160a01b0385167f55c18555197c6574627cf460c66073d10aa05d412468800b7b71feeaf82ea92d61187b8484611cdb565b60405190815260200160405180910390a25050505050565b6040516370a0823160e01b81523060048201525f906001600160a01b038516906370a0823190602401602060405180830381865afa1580156118d7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118fb9190611c61565b6040805160a081018252736015551cd911ff4685072e2793f56c841e3ab66160611b60c08201526001600160e81b031960e886901b1660d4820152606087811b6bffffffffffffffffffffffff191660d7830152825180830360cb01815260eb830184528252306020830152428284015281018690525f6080820152905163c04b8d5960e01b81529192506001600160a01b037f000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564169163c04b8d59916119c391600401611ec8565b6020604051808303815f875af11580156119df573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611a039190611c61565b506040516370a0823160e01b81523060048201525f906001600160a01b038616906370a0823190602401611805565b5f60405163a9059cbb60e01b81526001600160a01b038416600482015282602482015260205f6044835f895af13d15601f3d1160015f511416171691505080611aaf5760405162461bcd60e51b815260206004820152600f60248201526e1514905394d1915497d19052531151608a1b6044820152606401610963565b50505050565b5080545f8255905f5260205f2090810190611ad09190611ad3565b50565b5b80821115611ae7575f8155600101611ad4565b5090565b5f8060208385031215611afc575f80fd5b823567ffffffffffffffff80821115611b13575f80fd5b818501915085601f830112611b26575f80fd5b813581811115611b34575f80fd5b8660208260071b8501011115611b48575f80fd5b60209290920196919550909350505050565b6001600160a01b0381168114611ad0575f80fd5b5f60208284031215611b7e575f80fd5b8135611b8981611b5a565b9392505050565b634e487b7160e01b5f52602160045260245ffd5b6001600160a01b038516815260ff8416602082015262ffffff831660408201526080810160028310611be457634e487b7160e01b5f52602160045260245ffd5b82606083015295945050505050565b5f60208284031215611c03575f80fd5b5035919050565b602080825282518282018190525f919060409081850190868401855b82811015611c5457815180516001600160a01b03168552860151868501529284019290850190600101611c26565b5091979650505050505050565b5f60208284031215611c71575f80fd5b5051919050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115611c9f57611c9f611c78565b92915050565b8082028115828204841417611c9f57611c9f611c78565b5f82611cd657634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115611c9f57611c9f611c78565b634e487b7160e01b5f52603260045260245ffd5b803560ff81168114611d12575f80fd5b919050565b5f60208284031215611d27575f80fd5b611b8982611d02565b60ff8181168382160190811115611c9f57611c9f611c78565b634e487b7160e01b5f52604160045260245ffd5b803560028110611d12575f80fd5b5f60808284031215611d7b575f80fd5b6040516080810181811067ffffffffffffffff82111715611daa57634e487b7160e01b5f52604160045260245ffd5b6040528235611db881611b5a565b8152611dc660208401611d02565b6020820152604083013562ffffff81168114611de0575f80fd5b6040820152611df160608401611d5d565b60608201529392505050565b5f60208284031215611e0d575f80fd5b8151611b8981611b5a565b5f60208284031215611e28575f80fd5b81518015158114611b89575f80fd5b5f8060408385031215611e48575f80fd5b505080516020909101519092909150565b5f60a082018783526020878185015260a0604085015281875180845260c08601915082890193505f5b81811015611ea75784516001600160a01b031683529383019391830191600101611e82565b50506001600160a01b03969096166060850152505050608001529392505050565b5f6020808352835160a08285015280518060c08601525f5b81811015611efc5782810184015186820160e001528301611ee0565b505f60e08287010152918501516001600160a01b0381166040860152916040860151606086015260608601516080860152608086015160a086015260e0601f19601f83011686010193505050509291505056fea2646970667358221220bb74fe047f2024bce021b528d77057bf1b1d775cd77f187520c53101d27cb80264736f6c63430008150033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d000000000000000000000000e592427a0aece92de3edee1f18e0157c058615640000000000000000000000006d85fba94a34496cbc0fa4acbdabb5b575f7cb82
-----Decoded View---------------
Arg [0] : routerAddressV2 (address): 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
Arg [1] : routerAddressV3 (address): 0xE592427A0AEce92De3Edee1F18E0157C05861564
Arg [2] : timelockAddress (address): 0x6d85fba94A34496cbC0fA4acbDaBB5B575F7Cb82
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Arg [1] : 000000000000000000000000e592427a0aece92de3edee1f18e0157c05861564
Arg [2] : 0000000000000000000000006d85fba94a34496cbc0fa4acbdabb5b575f7cb82
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ 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.