Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Emergency Withdr... | 20028429 | 291 days ago | IN | 0 ETH | 0.00087866 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
LaunchBridge
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.15; import { UUPSUpgradeable } from "@openzeppelin/contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol"; import { Ownable2StepUpgradeable } from "@openzeppelin/contracts-upgradeable/access/Ownable2StepUpgradeable.sol"; import { PausableUpgradeable } from "@openzeppelin/contracts-upgradeable/security/PausableUpgradeable.sol"; import { IERC20 } from "@openzeppelin/contracts/interfaces/IERC20.sol"; import { IERC20Permit } from "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol"; import { Predeploys } from "src/libraries/Predeploys.sol"; interface ILido is IERC20, IERC20Permit { function submit(address user) external payable; } interface IDAI is IERC20 { function permit( address holder, address spender, uint256 nonce, uint256 expiry, bool allowed, uint8 v, bytes32 r, bytes32 s ) external; function nonces(address user) external view returns (uint256); } interface IUSDC is IERC20, IERC20Permit { function transferWithAuthorization(address, address, uint256, uint256, uint256, bytes32, uint8, bytes32, bytes32) external; } interface IUSDT { function transfer(address to, uint256 amount) external; function transferFrom(address from, address to, uint256 amount) external; function approve(address spender, uint256 amount) external; function basisPointsRate() external view returns (uint256); function balanceOf(address) external view returns (uint256); } interface IDsrManager { function join(address dst, uint256 wad) external; function exit(address dst, uint256 wad) external; function exitAll(address dst) external; function daiBalance(address usr) external returns (uint256 wad); function pot() external view returns (address); function pieOf(address) external view returns (uint256); } interface IDssPsm { function sellGem(address usr, uint256 gemAmt) external; function buyGem(address usr, uint256 gemAmt) external; function dai() external view returns (address); function gemJoin() external view returns (address); function tin() external view returns (uint256); function tout() external view returns (uint256); } interface IPot { function chi() external view returns (uint256); function rho() external view returns (uint256); function dsr() external view returns (uint256); } interface IMainnetBridge { function bridgeETHTo(address _to, uint32 _minGasLimit, bytes calldata _extraData) external payable; function bridgeERC20To(address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _minGasLimit, bytes calldata _extraData) external payable; } interface ICurve3Pool { function exchange(int128 i, int128 j, uint256 dx, uint256 min_dy) external; } contract LaunchBridge is UUPSUpgradeable, Ownable2StepUpgradeable, PausableUpgradeable { mapping(address => uint256) public ethShares; uint256 public totalETHShares; mapping(address => uint256) public usdShares; uint256 public totalUSDShares; mapping(address => bool) public transitioned; bool public isTransitionEnabled; address public staker; IMainnetBridge internal _mainnetBridge; uint256 constant EMERGENCY_WITHDRAW_TIMESTAMP = 1717200000; // June 1, 2024 ILido public constant LIDO = ILido(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84); IUSDC public constant USDC = IUSDC(0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48); IUSDT public constant USDT = IUSDT(0xdAC17F958D2ee523a2206206994597C13D831ec7); IDsrManager public constant DSR_MANAGER = IDsrManager(0x373238337Bfe1146fb49989fc222523f83081dDb); IDssPsm public constant PSM = IDssPsm(0x89B78CfA322F6C5dE0aBcEecab66Aee45393cC5A); ICurve3Pool public constant CURVE_3POOL = ICurve3Pool(0xbEbc44782C7dB0a1A60Cb6fe97d0b483032FF1C7); IDAI public constant DAI = IDAI(0x6B175474E89094C44Da98b954EedeAC495271d0F); uint256 internal constant _BASIS_POINTS = 10_000; address internal constant _INITIAL_TOKEN_HOLDER = 0x000000000000000000000000000000000000dEaD; uint256 internal constant _USD_DECIMALS = 6; uint256 internal constant _WAD_DECIMALS = 18; int128 internal constant _CURVE_USDT_INDEX = 2; int128 internal constant _CURVE_DAI_INDEX = 0; uint256 internal constant _WAD = 10 ** 18; uint256 internal constant _RAY = 10 ** 27; uint256 internal constant _INITIAL_DEPOSIT_AMOUNT = 1000; event ETHDeposited(address indexed user, uint256 shares, uint256 amount); event USDDeposited(address indexed user, uint256 shares, uint256 amount, uint256 daiAmount); event Withdraw(address indexed user, uint256 ethAmount, uint256 stETHAmount, uint256 daiAmount); error CallerIsNotStaker(); error TransitionNotEnabled(); error TransitionIsEnabled(); error UserAlreadyTransitioned(); error InsufficientFunds(); error BridgeIsNotSet(); error ZeroDeposit(); error ZeroSharesIssued(); error SharesNotInitiated(); error InvalidRecipientSignature(); error InvalidRecipient(); error OnlyEOA(); modifier onlyEOA() { if (msg.sender != tx.origin) { revert OnlyEOA(); } _; } constructor() { _disableInitializers(); } function initialize(address _staker) external initializer { __UUPSUpgradeable_init(); __Ownable2Step_init(); __Pausable_init(); _pause(); staker = _staker; USDC.approve(PSM.gemJoin(), type(uint256).max); USDT.approve(address(CURVE_3POOL), type(uint256).max); DAI.approve(address(DSR_MANAGER), type(uint256).max); } function _authorizeUpgrade(address target) internal override onlyOwner {} /** * @notice Pause deposits to the bridge (admin only) */ function pause() external onlyOwner { _pause(); } /** * @notice Unpause deposits to the bridge (admin only) */ function unpause() external onlyOwner { if (totalETHShares == 0 && totalUSDShares == 0) { revert SharesNotInitiated(); } if (isTransitionEnabled) { revert TransitionIsEnabled(); } _unpause(); } /** * @notice Set approved staker (admin only) * @param _staker New staker address */ function setStaker(address _staker) public onlyOwner { staker = _staker; } /** * @notice Open bridge to accept deposits; accept initial ETH and DAI deposit to initiate the shares accounting (admin only) * @param from Initial depositor * @param nonce Permit signature nonce * @param v Permit signature v parameter * @param r Permit signature r parameter * @param s Permit signature s parameter */ function open(address from, uint256 nonce, uint8 v, bytes32 r, bytes32 s) external payable onlyOwner { DAI.permit( from, address(this), nonce, type(uint256).max, true, v, r, s ); DAI.transferFrom( from, address(this), _INITIAL_DEPOSIT_AMOUNT ); uint256 ethBalance = address(this).balance; uint256 daiBalance = DAI.balanceOf(address(this)); assert(totalETHShares == 0 && totalUSDShares == 0); assert(ethBalance >= _INITIAL_DEPOSIT_AMOUNT && daiBalance >= _INITIAL_DEPOSIT_AMOUNT); _mintETHShares(_INITIAL_TOKEN_HOLDER, ethBalance); _mintUSDShares(_INITIAL_TOKEN_HOLDER, daiBalance); _unpause(); } /** * @notice Wrapper to get mainnet bridge */ function getMainnetBridge() public view returns (IMainnetBridge mainnetBridge) { mainnetBridge = _mainnetBridge; if (address(mainnetBridge) == address(0)) { revert BridgeIsNotSet(); } } /** * @notice Wrapper to set mainnet bridge */ function _setMainnetBridge(address mainnetBridge) internal { assert(mainnetBridge.code.length > 0); _mainnetBridge = IMainnetBridge(mainnetBridge); } /** * @notice Get the user balance in ETH and USD pool * @dev Does not update DSR yield * @param user User address * @return ethBalance User's ETH balance, usdBalance User's USD balance */ function balanceOf(address user) external view returns (uint256 ethBalance, uint256 usdBalance) { ethBalance = _ethByShares(ethShares[user]); usdBalance = _usdBySharesNoUpdate(usdShares[user]); } /** * @notice Get the current ETH pool balance * @return Pooled ETH balance between buffered balance and deposited Lido balance */ function totalETHBalance() public view returns (uint256) { return address(this).balance + LIDO.balanceOf(address(this)); } /** * @notice Get the current USD pool balance * @dev Does not update DSR yield * @return Pooled USD balance between buffered balance and deposited DSR balance */ function totalUSDBalanceNoUpdate() public view returns (uint256) { IPot pot = IPot(DSR_MANAGER.pot()); uint256 chi = _rmul(_rpow(pot.dsr(), block.timestamp - pot.rho(), _RAY), pot.chi()); return DAI.balanceOf(address(this)) + _rmul(DSR_MANAGER.pieOf(address(this)), chi); } /** * @notice Get the current USD pool balance * @return Pooled USD balance between buffered balance and deposited DSR balance */ function totalUSDBalance() public returns (uint256) { return DAI.balanceOf(address(this)) + DSR_MANAGER.daiBalance(address(this)); } /*///////////////////////// DEPOSITS /////////////////////////*/ receive() external payable { depositETH(); } /** * @notice Deposit ETH to the ETH pool */ function depositETH() public payable { if (msg.value == 0) { revert ZeroDeposit(); } _recordDepositETHAfterTransfer(msg.value); } /** * @notice Deposit StETH to the ETH pool * @param stETHAmount Amount to deposit in StETH (wad) */ function depositStETH(uint256 stETHAmount) public { if (stETHAmount == 0) { revert ZeroDeposit(); } _recordDepositETHBeforeTransfer(stETHAmount); LIDO.transferFrom(msg.sender, address(this), stETHAmount); } /** * @notice Deposit StETH to the ETH pool with a permit signature * @param stETHAmount Amount to deposit in StETH (wad) * @param allowance Allowance amount * @param deadline Permit signature deadline * @param v Permit signature v parameter * @param r Permit signature r parameter * @param s Permit signature s parameter */ function depositStETHWithPermit(uint256 stETHAmount, uint256 allowance, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external { LIDO.permit(msg.sender, address(this), allowance, deadline, v, r, s); depositStETH(stETHAmount); } /** * @notice Deposit USDC to the USD pool * @dev USDC is converted to DAI using Maker DssPsm * @param usdcAmount Amount to deposit in USDC */ function depositUSDC(uint256 usdcAmount) public { if (usdcAmount == 0) { revert ZeroDeposit(); } uint256 wadAmount = _usdToWad(usdcAmount); uint256 conversionFee = PSM.tin() * wadAmount / _WAD; _recordDepositUSDBeforeTransfer(wadAmount, wadAmount - conversionFee); USDC.transferFrom(msg.sender, address(this), usdcAmount); /* Convert USDC to DAI through MakerDAO Peg Stability Mechanism. */ PSM.sellGem(address(this), usdcAmount); } /** * @notice Deposit USDC to the USD pool with a permit signature * @dev USDC is converted to DAI using Maker DssPsm * @param usdcAmount Amount to deposit in USDC (usd) * @param allowance Allowance amount * @param deadline Permit signature deadline timestamp * @param v Permit signature v parameter * @param r Permit signature r parameter * @param s Permit signature s parameter */ function depositUSDCWithPermit(uint256 usdcAmount, uint256 allowance, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external { USDC.permit(msg.sender, address(this), allowance, deadline, v, r, s); depositUSDC(usdcAmount); } /** * @notice Deposit DAI to the USD pool * @param daiAmount Amount to deposit in DAI (wad) */ function depositDAI(uint256 daiAmount) public { if (daiAmount == 0) { revert ZeroDeposit(); } _recordDepositUSDBeforeTransfer(daiAmount, daiAmount); DAI.transferFrom(msg.sender, address(this), daiAmount); } /** * @notice Deposit DAI to the USD pool with a permit signature * @param daiAmount Amount to deposit in DAI (wad) * @param nonce Permit signature nonce * @param expiry Permit signature expiry timestamp * @param v Permit signature v parameter * @param r Permit signature r parameter * @param s Permit signature s parameter */ function depositDAIWithPermit(uint256 daiAmount, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external { DAI.permit(msg.sender, address(this), nonce, expiry, true, v, r, s); depositDAI(daiAmount); } /** * @notice Deposit USDT to the USD pool * @dev USDT is converted to DAI using Curve 3Pool * @param usdtAmount Amount to deposit in USDT (usd) * @param minDAIAmount Minimum DAI amount to accept when exchanging through Curve (wad) */ function depositUSDT(uint256 usdtAmount, uint256 minDAIAmount) external { if (usdtAmount == 0) { revert ZeroDeposit(); } uint256 usdtBalance = USDT.balanceOf(address(this)); USDT.transferFrom(msg.sender, address(this), usdtAmount); uint256 receivedUSDT = USDT.balanceOf(address(this)) - usdtBalance; /* Exchange USDT to DAI through the Curve 3Pool. */ uint256 daiBalance = DAI.balanceOf(address(this)); CURVE_3POOL.exchange( _CURVE_USDT_INDEX, _CURVE_DAI_INDEX, receivedUSDT, minDAIAmount ); /* The amount of DAI received in the exchange is uncertain due to slippage, so we must record the deposit after the exchange. */ uint256 receivedDAI = DAI.balanceOf(address(this)) - daiBalance; _recordDepositUSDAfterTransfer(_usdToWad(usdtAmount), receivedDAI); } /** * @notice Mint new ETH shares from new deposit before deposit has been made * @param amount Amount deposited in ETH */ function _recordDepositETHBeforeTransfer(uint256 amount) internal { _recordDepositETH(amount, false); } /** * @notice Mint new ETH shares from new deposit after deposit has been made * @param amount Amount deposited in ETH */ function _recordDepositETHAfterTransfer(uint256 amount) internal { _recordDepositETH(amount, true); } /** * @notice Mint new USD shares from new deposit before deposit has been made * @param depositedAmount Amount deposited in USD (wad) * @param daiAmount Amount of DAI obtained after conversion (wad) */ function _recordDepositUSDBeforeTransfer(uint256 depositedAmount, uint256 daiAmount) internal { _recordDepositUSD(depositedAmount, daiAmount, false); } /** * @notice Mint new USD shares from new deposit after deposit has been made * @param depositedAmount Amount deposited in USD (wad) * @param daiAmount Amount of DAI obtained after conversion (wad) */ function _recordDepositUSDAfterTransfer(uint256 depositedAmount, uint256 daiAmount) internal { _recordDepositUSD(depositedAmount, daiAmount, true); } /** * @notice Mint new ETH shares from new deposit * @param depositedAmount Amount deposited in ETH (wad) * @param alreadyDeposited The amount has already been deposited to the contract */ function _recordDepositETH(uint256 depositedAmount, bool alreadyDeposited) internal whenNotPaused { uint256 _totalETHBalance = totalETHBalance(); if (alreadyDeposited) { _totalETHBalance = _totalETHBalance - depositedAmount; } uint256 sharesToIssue = depositedAmount * totalETHShares / _totalETHBalance; if (sharesToIssue == 0) { revert ZeroSharesIssued(); } _mintETHShares(msg.sender, sharesToIssue); emit ETHDeposited(msg.sender, sharesToIssue, depositedAmount); } /** * @notice Mint new USD shares from new deposit * @param depositedAmount Amount deposited in USD (wad) * @param daiAmount Amount of DAI obtained after conversion (wad) * @param alreadyDeposited The amount has already been deposited to the contract */ function _recordDepositUSD(uint256 depositedAmount, uint256 daiAmount, bool alreadyDeposited) internal whenNotPaused { uint256 _totalUSDBalance = totalUSDBalance(); if (alreadyDeposited) { _totalUSDBalance = _totalUSDBalance - daiAmount; } uint256 sharesToIssue = daiAmount * totalUSDShares / _totalUSDBalance; // user only gets shares for the obtained DAI if (sharesToIssue == 0) { revert ZeroSharesIssued(); } _mintUSDShares(msg.sender, sharesToIssue); emit USDDeposited(msg.sender, sharesToIssue, depositedAmount, daiAmount); } /** * @notice Mint ETH shares * @param user User address * @param shares Number of ETH shares to mint */ function _mintETHShares(address user, uint256 shares) internal { ethShares[user] += shares; totalETHShares += shares; } /** * @notice Mint USD shares * @param user User address * @param shares Number of USD shares to mint */ function _mintUSDShares(address user, uint256 shares) internal { usdShares[user] += shares; totalUSDShares += shares; } /** * @notice Burn ETH shares * @param user User address * @param shares Number of ETH shares to burn */ function _burnETHShares(address user, uint256 shares) internal { ethShares[user] -= shares; totalETHShares -= shares; } /** * @notice Burn USD shares * @param user User address * @param shares Number of USD shares to burn */ function _burnUSDShares(address user, uint256 shares) internal { usdShares[user] -= shares; totalUSDShares -= shares; } /*///////////////////////// STAKING /////////////////////////*/ /** * @notice Stake pooled ETH funds by submiting ETH to Lido * @param amount Amount in ETH to stake (wad) */ function stakeETH(uint256 amount) external { if (msg.sender != staker) { revert CallerIsNotStaker(); } if (amount > address(this).balance) { revert InsufficientFunds(); } LIDO.submit{value: amount}(address(0)); } /** * @notice Stake pooled USD funds by depositing DAI into the Maker DSR * @param amount Amount in DAI to stake (usd) */ function stakeUSD(uint256 amount) external { if (msg.sender != staker) { revert CallerIsNotStaker(); } if (amount > DAI.balanceOf(address(this))) { revert InsufficientFunds(); } DSR_MANAGER.join(address(this), amount); } /*///////////////////////// TRANSITION /////////////////////////*/ /** * @notice Start the transition to the mainnet bridge (admin only) * @param mainnetBridge Mainnet bridge address */ function enableTransition(address mainnetBridge) external onlyOwner { if (isTransitionEnabled) { revert TransitionIsEnabled(); } _pause(); _setMainnetBridge(mainnetBridge); isTransitionEnabled = true; LIDO.approve(mainnetBridge, type(uint256).max); DAI.approve(mainnetBridge, type(uint256).max); } /** * @notice Transition the caller's portion of the pooled funds to the mainnet bridge */ // NB: This function is now responsible for moving the assets to the new bridge, // this was before in the `_moveETH`-related functionality. function transition(uint32 minGasLimit) external onlyEOA { _transition(msg.sender, msg.sender, minGasLimit); } /** * @notice Transition the caller's portion of the pooled funds to the mainnet bridge */ // NB: This function is now responsible for moving the assets to the new bridge, // this was before in the `_moveETH`-related functionality. function transition(address recipient, uint8 v, bytes32 r, bytes32 s, uint32 minGasLimit) external { address user = msg.sender; { if (recipient == address(0)) { revert InvalidRecipient(); } /// Verify signature of the recipient address by the recipient address. /// This is just a safety check for the user that they own the wallet /// they are sending funds to. bytes memory prefix = "\x19Ethereum Signed Message:\n32"; bytes32 prefixedHashMessage = keccak256(abi.encodePacked(prefix, recipient)); address signer = ecrecover(prefixedHashMessage, v, r, s); if (signer != recipient) { revert InvalidRecipientSignature(); } } _transition(msg.sender, recipient, minGasLimit); } /** * @notice Transition the caller's portion of the pooled funds to the mainnet bridge */ // NB: This function is now responsible for moving the assets to the new bridge, // this was before in the `_moveETH`-related functionality. function _transition(address user, address recipient, uint32 minGasLimit) internal { if (!isTransitionEnabled) { revert TransitionNotEnabled(); } if (transitioned[user]) { revert UserAlreadyTransitioned(); } transitioned[user] = true; (uint ethAmountToMove, uint stETHAmountToMove) = _moveETH(user); uint daiAmountToMove = _moveUSD(user); IMainnetBridge mainnetBridge = getMainnetBridge(); if (ethAmountToMove > 0) { mainnetBridge.bridgeETHTo{value: ethAmountToMove}(recipient, minGasLimit, bytes("")); } if (stETHAmountToMove > 0) { mainnetBridge.bridgeERC20To(address(LIDO), address(0), recipient, stETHAmountToMove, minGasLimit, hex""); } if (daiAmountToMove > 0) { mainnetBridge.bridgeERC20To(address(DAI), Predeploys.USDB, recipient, daiAmountToMove, minGasLimit, hex""); } } /// In the event multisig keys are lost, users can reclaim their funds after the contract /// has expired. function emergencyWithdraw() external { require(block.timestamp > EMERGENCY_WITHDRAW_TIMESTAMP, "Emergency timestamp not reached"); _withdraw(); } function _withdraw() internal { (uint ethAmountToMove, uint stETHAmountToMove) = _moveETH(msg.sender); uint daiAmountToMove = _moveUSD(msg.sender); if (stETHAmountToMove > 0) { LIDO.transfer(msg.sender, stETHAmountToMove); } if (daiAmountToMove > 0) { DAI.transfer(msg.sender, daiAmountToMove); } if (ethAmountToMove > 0) { payable(msg.sender).transfer(ethAmountToMove); } emit Withdraw(msg.sender, ethAmountToMove, stETHAmountToMove, daiAmountToMove); } /** * @notice Move user's portion of pooled ETH by the amount of shares * @param user User address */ // NB: This function was refactored to return the assets it'd move around, and // the caller is responsible for executing the actual transfer. function _moveETH(address user) internal returns (uint ethAmountToMove, uint stETHAmountToMove) { uint256 userETHShares = ethShares[user]; if (userETHShares > 0) { ethAmountToMove = _ethByShares(userETHShares); _burnETHShares(user, userETHShares); /* If there are insufficient ETH funds in the bridge to cover the user's share, then we need to start moving StETH. */ uint256 contractETHBalance = address(this).balance; if (ethAmountToMove > contractETHBalance) { stETHAmountToMove = ethAmountToMove - contractETHBalance; ethAmountToMove = contractETHBalance; } } } /** * @notice Move user's portion of pooled USD by the amount of shares * @param user User address */ function _moveUSD(address user) internal returns (uint daiAmountToMove) { uint256 userUSDShares = usdShares[user]; if (userUSDShares > 0) { daiAmountToMove = _usdByShares(userUSDShares); _burnUSDShares(user, userUSDShares); /* If there are insufficient DAI funds in the bridge to cover the user's share, then we need to start withdrawing DAI from the DSR. */ uint256 contractDAIBalance = DAI.balanceOf(address(this)); if (daiAmountToMove > contractDAIBalance) { DSR_MANAGER.exit(address(this), daiAmountToMove - contractDAIBalance); } } } /*///////////////////////// HELPERS /////////////////////////*/ /** * @notice Convert ETH to equivalent shares * @param shares Number of ETH shares * @return Amount of ETH */ function _ethByShares(uint256 shares) internal view returns (uint256) { return shares * totalETHBalance() / totalETHShares; } /** * @notice Current shares to equivalent USD * @dev Does not update DSR yield * @param shares Number of USD shares * @return Amount of USD */ function _usdBySharesNoUpdate(uint256 shares) internal view returns (uint256) { return shares * totalUSDBalanceNoUpdate() / totalUSDShares; } /** * @notice Current shares to equivalent USD * @param shares Number of USD shares * @return Amount of USD */ function _usdByShares(uint256 shares) internal returns (uint256) { return shares * totalUSDBalance() / totalUSDShares; } /** * @notice Convert from wad (18 decimals) to USD (6 decimals) denomination * @param wad Amount in wad * @return Amount in USD */ function _wadToUSD(uint256 wad) internal pure returns (uint256) { return wad / (10**(_WAD_DECIMALS - _USD_DECIMALS)); } /** * @notice Convert from USD (6 decimals) to wad (18 decimals) denomination * @param usd Amount in USD * @return Amount in wad */ function _usdToWad(uint256 usd) internal pure returns (uint256) { return usd * (10**(_WAD_DECIMALS - _USD_DECIMALS)); } /** * @dev Based on _rpow from MakerDAO pot.sol contract (https://github.com/makerdao/dss/blob/fa4f6630afb0624d04a003e920b0d71a00331d98/src/pot.sol#L87-L105) */ function _rpow(uint x, uint n, uint base) internal pure returns (uint z) { assembly { switch x case 0 {switch n case 0 {z := base} default {z := 0}} default { switch mod(n, 2) case 0 { z := base } default { z := x } let half := div(base, 2) // for rounding. for { n := div(n, 2) } n { n := div(n,2) } { let xx := mul(x, x) if iszero(eq(div(xx, x), x)) { revert(0,0) } let xxRound := add(xx, half) if lt(xxRound, xx) { revert(0,0) } x := div(xxRound, base) if mod(n,2) { let zx := mul(z, x) if and(iszero(iszero(x)), iszero(eq(div(zx, x), z))) { revert(0,0) } let zxRound := add(zx, half) if lt(zxRound, zx) { revert(0,0) } z := div(zxRound, base) } } } } } /** * @dev Based on _rmul in MakerDAO pot.sol contract (https://github.com/makerdao/dss/blob/fa4f6630afb0624d04a003e920b0d71a00331d98/src/pot.sol#L109-L111) */ function _rmul(uint x, uint y) internal pure returns (uint z) { z = x * y / _RAY; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/UUPSUpgradeable.sol) pragma solidity ^0.8.0; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../ERC1967/ERC1967UpgradeUpgradeable.sol"; import "./Initializable.sol"; /** * @dev An upgradeability mechanism designed for UUPS proxies. The functions included here can perform an upgrade of an * {ERC1967Proxy}, when this contract is set as the implementation behind such a proxy. * * A security mechanism ensures that an upgrade does not turn off upgradeability accidentally, although this risk is * reinstated if the upgrade retains upgradeability but removes the security mechanism, e.g. by replacing * `UUPSUpgradeable` with a custom implementation of upgrades. * * The {_authorizeUpgrade} function must be overridden to include access restriction to the upgrade mechanism. * * _Available since v4.1._ */ abstract contract UUPSUpgradeable is Initializable, IERC1822ProxiableUpgradeable, ERC1967UpgradeUpgradeable { function __UUPSUpgradeable_init() internal onlyInitializing { } function __UUPSUpgradeable_init_unchained() internal onlyInitializing { } /// @custom:oz-upgrades-unsafe-allow state-variable-immutable state-variable-assignment address private immutable __self = address(this); /** * @dev Check that the execution is being performed through a delegatecall call and that the execution context is * a proxy contract with an implementation (as defined in ERC1967) pointing to self. This should only be the case * for UUPS and transparent proxies that are using the current contract as their implementation. Execution of a * function through ERC1167 minimal proxies (clones) would not normally pass this test, but is not guaranteed to * fail. */ modifier onlyProxy() { require(address(this) != __self, "Function must be called through delegatecall"); require(_getImplementation() == __self, "Function must be called through active proxy"); _; } /** * @dev Check that the execution is not being performed through a delegate call. This allows a function to be * callable on the implementing contract but not through proxies. */ modifier notDelegated() { require(address(this) == __self, "UUPSUpgradeable: must not be called through delegatecall"); _; } /** * @dev Implementation of the ERC1822 {proxiableUUID} function. This returns the storage slot used by the * implementation. It is used to validate the implementation's compatibility when performing an upgrade. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. This is guaranteed by the `notDelegated` modifier. */ function proxiableUUID() external view virtual override notDelegated returns (bytes32) { return _IMPLEMENTATION_SLOT; } /** * @dev Upgrade the implementation of the proxy to `newImplementation`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeTo(address newImplementation) public virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, new bytes(0), false); } /** * @dev Upgrade the implementation of the proxy to `newImplementation`, and subsequently execute the function call * encoded in `data`. * * Calls {_authorizeUpgrade}. * * Emits an {Upgraded} event. * * @custom:oz-upgrades-unsafe-allow-reachable delegatecall */ function upgradeToAndCall(address newImplementation, bytes memory data) public payable virtual onlyProxy { _authorizeUpgrade(newImplementation); _upgradeToAndCallUUPS(newImplementation, data, true); } /** * @dev Function that should revert when `msg.sender` is not authorized to upgrade the contract. Called by * {upgradeTo} and {upgradeToAndCall}. * * Normally, this function will use an xref:access.adoc[access control] modifier such as {Ownable-onlyOwner}. * * ```solidity * function _authorizeUpgrade(address) internal override onlyOwner {} * ``` */ function _authorizeUpgrade(address newImplementation) internal virtual; /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable2Step.sol) pragma solidity ^0.8.0; import "./OwnableUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership} and {acceptOwnership}. * * This module is used through inheritance. It will make available all functions * from parent (Ownable). */ abstract contract Ownable2StepUpgradeable is Initializable, OwnableUpgradeable { function __Ownable2Step_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable2Step_init_unchained() internal onlyInitializing { } address private _pendingOwner; event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner); /** * @dev Returns the address of the pending owner. */ function pendingOwner() public view virtual returns (address) { return _pendingOwner; } /** * @dev Starts the ownership transfer of the contract to a new account. Replaces the pending transfer if there is one. * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual override onlyOwner { _pendingOwner = newOwner; emit OwnershipTransferStarted(owner(), newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`) and deletes any pending owner. * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual override { delete _pendingOwner; super._transferOwnership(newOwner); } /** * @dev The new owner accepts the ownership transfer. */ function acceptOwnership() public virtual { address sender = _msgSender(); require(pendingOwner() == sender, "Ownable2Step: caller is not the new owner"); _transferOwnership(sender); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: BSL 1.1 - Copyright 2024 MetaLayer Labs Ltd. pragma solidity ^0.8.0; /// @title Predeploys /// @notice Contains constant addresses for contracts that are pre-deployed to the L2 system. library Predeploys { /// @notice Address of the L2ToL1MessagePasser predeploy. address internal constant L2_TO_L1_MESSAGE_PASSER = 0x4200000000000000000000000000000000000016; /// @notice Address of the L2CrossDomainMessenger predeploy. address internal constant L2_CROSS_DOMAIN_MESSENGER = 0x4200000000000000000000000000000000000007; /// @notice Address of the L2StandardBridge predeploy. address internal constant L2_STANDARD_BRIDGE = 0x4200000000000000000000000000000000000010; /// @notice Address of the L2ERC721Bridge predeploy. address internal constant L2_ERC721_BRIDGE = 0x4200000000000000000000000000000000000014; //// @notice Address of the SequencerFeeWallet predeploy. address internal constant SEQUENCER_FEE_WALLET = 0x4200000000000000000000000000000000000011; /// @notice Address of the OptimismMintableERC20Factory predeploy. address internal constant OPTIMISM_MINTABLE_ERC20_FACTORY = 0x4200000000000000000000000000000000000012; /// @notice Address of the OptimismMintableERC721Factory predeploy. address internal constant OPTIMISM_MINTABLE_ERC721_FACTORY = 0x4200000000000000000000000000000000000017; /// @notice Address of the L1Block predeploy. address internal constant L1_BLOCK_ATTRIBUTES = 0x4200000000000000000000000000000000000015; /// @notice Address of the GasPriceOracle predeploy. Includes fee information /// and helpers for computing the L1 portion of the transaction fee. address internal constant GAS_PRICE_ORACLE = 0x420000000000000000000000000000000000000F; /// @custom:legacy /// @notice Address of the L1MessageSender predeploy. Deprecated. Use L2CrossDomainMessenger /// or access tx.origin (or msg.sender) in a L1 to L2 transaction instead. address internal constant L1_MESSAGE_SENDER = 0x4200000000000000000000000000000000000001; /// @custom:legacy /// @notice Address of the DeployerWhitelist predeploy. No longer active. address internal constant DEPLOYER_WHITELIST = 0x4200000000000000000000000000000000000002; /// @custom:legacy /// @notice Address of the LegacyERC20ETH predeploy. Deprecated. Balances are migrated to the /// state trie as of the Bedrock upgrade. Contract has been locked and write functions /// can no longer be accessed. address internal constant LEGACY_ERC20_ETH = 0xDeadDeAddeAddEAddeadDEaDDEAdDeaDDeAD0000; /// @custom:legacy /// @notice Address of the L1BlockNumber predeploy. Deprecated. Use the L1Block predeploy /// instead, which exposes more information about the L1 state. address internal constant L1_BLOCK_NUMBER = 0x4200000000000000000000000000000000000013; /// @custom:legacy /// @notice Address of the LegacyMessagePasser predeploy. Deprecate. Use the updated /// L2ToL1MessagePasser contract instead. address internal constant LEGACY_MESSAGE_PASSER = 0x4200000000000000000000000000000000000000; /// @notice Address of the ProxyAdmin predeploy. address internal constant PROXY_ADMIN = 0x4200000000000000000000000000000000000018; /// @notice Address of the BaseFeeVault predeploy. address internal constant BASE_FEE_VAULT = 0x4200000000000000000000000000000000000019; /// @notice Address of the L1FeeVault predeploy. address internal constant L1_FEE_VAULT = 0x420000000000000000000000000000000000001A; /// @notice Address of the GovernanceToken predeploy. address internal constant GOVERNANCE_TOKEN = 0x4200000000000000000000000000000000000042; /// @notice Address of the SchemaRegistry predeploy. address internal constant SCHEMA_REGISTRY = 0x4200000000000000000000000000000000000020; /// @notice Address of the EAS predeploy. address internal constant EAS = 0x4200000000000000000000000000000000000021; /// @notice Address of the Shares predeploy. address internal constant SHARES = 0x4300000000000000000000000000000000000000; /// @notice Address of the Gas predeploy. address internal constant GAS = 0x4300000000000000000000000000000000000001; /// @notice Address of the Blast predeploy. address internal constant BLAST = 0x4300000000000000000000000000000000000002; /// @notice Address of the USDB predeploy. address internal constant USDB = 0x4300000000000000000000000000000000000003; /// @notice Address of the WETH predeploy. address internal constant WETH_REBASING = 0x4300000000000000000000000000000000000004; /// @notice Address of the L2BlastBridge predeploy. address internal constant L2_BLAST_BRIDGE = 0x4300000000000000000000000000000000000005; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (interfaces/draft-IERC1822.sol) pragma solidity ^0.8.0; /** * @dev ERC1822: Universal Upgradeable Proxy Standard (UUPS) documents a method for upgradeability through a simplified * proxy whose upgrades are fully controlled by the current implementation. */ interface IERC1822ProxiableUpgradeable { /** * @dev Returns the storage slot that the proxiable contract assumes is being used to store the implementation * address. * * IMPORTANT: A proxy pointing at a proxiable contract should not be considered proxiable itself, because this risks * bricking a proxy that upgrades to it, by delegating to itself until out of gas. Thus it is critical that this * function revert if invoked through a proxy. */ function proxiableUUID() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/ERC1967/ERC1967Upgrade.sol) pragma solidity ^0.8.2; import "../beacon/IBeaconUpgradeable.sol"; import "../../interfaces/IERC1967Upgradeable.sol"; import "../../interfaces/draft-IERC1822Upgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/StorageSlotUpgradeable.sol"; import "../utils/Initializable.sol"; /** * @dev This abstract contract provides getters and event emitting update functions for * https://eips.ethereum.org/EIPS/eip-1967[EIP1967] slots. * * _Available since v4.1._ */ abstract contract ERC1967UpgradeUpgradeable is Initializable, IERC1967Upgradeable { function __ERC1967Upgrade_init() internal onlyInitializing { } function __ERC1967Upgrade_init_unchained() internal onlyInitializing { } // This is the keccak-256 hash of "eip1967.proxy.rollback" subtracted by 1 bytes32 private constant _ROLLBACK_SLOT = 0x4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd9143; /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation address. */ function _getImplementation() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; } /** * @dev Stores a new address in the EIP1967 implementation slot. */ function _setImplementation(address newImplementation) private { require(AddressUpgradeable.isContract(newImplementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; } /** * @dev Perform implementation upgrade * * Emits an {Upgraded} event. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Perform implementation upgrade with additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCall(address newImplementation, bytes memory data, bool forceCall) internal { _upgradeTo(newImplementation); if (data.length > 0 || forceCall) { AddressUpgradeable.functionDelegateCall(newImplementation, data); } } /** * @dev Perform implementation upgrade with security checks for UUPS proxies, and additional setup call. * * Emits an {Upgraded} event. */ function _upgradeToAndCallUUPS(address newImplementation, bytes memory data, bool forceCall) internal { // Upgrades from old implementations will perform a rollback test. This test requires the new // implementation to upgrade back to the old, non-ERC1822 compliant, implementation. Removing // this special case will break upgrade paths from old UUPS implementation to new ones. if (StorageSlotUpgradeable.getBooleanSlot(_ROLLBACK_SLOT).value) { _setImplementation(newImplementation); } else { try IERC1822ProxiableUpgradeable(newImplementation).proxiableUUID() returns (bytes32 slot) { require(slot == _IMPLEMENTATION_SLOT, "ERC1967Upgrade: unsupported proxiableUUID"); } catch { revert("ERC1967Upgrade: new implementation is not UUPS"); } _upgradeToAndCall(newImplementation, data, forceCall); } } /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Returns the current admin. */ function _getAdmin() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } /** * @dev Stores a new address in the EIP1967 admin slot. */ function _setAdmin(address newAdmin) private { require(newAdmin != address(0), "ERC1967: new admin is the zero address"); StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } /** * @dev Changes the admin of the proxy. * * Emits an {AdminChanged} event. */ function _changeAdmin(address newAdmin) internal { emit AdminChanged(_getAdmin(), newAdmin); _setAdmin(newAdmin); } /** * @dev The storage slot of the UpgradeableBeacon contract which defines the implementation for this proxy. * This is bytes32(uint256(keccak256('eip1967.proxy.beacon')) - 1)) and is validated in the constructor. */ bytes32 internal constant _BEACON_SLOT = 0xa3f0ad74e5423aebfd80d3ef4346578335a9a72aeaee59ff6cb3582b35133d50; /** * @dev Returns the current beacon. */ function _getBeacon() internal view returns (address) { return StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value; } /** * @dev Stores a new beacon in the EIP1967 beacon slot. */ function _setBeacon(address newBeacon) private { require(AddressUpgradeable.isContract(newBeacon), "ERC1967: new beacon is not a contract"); require( AddressUpgradeable.isContract(IBeaconUpgradeable(newBeacon).implementation()), "ERC1967: beacon implementation is not a contract" ); StorageSlotUpgradeable.getAddressSlot(_BEACON_SLOT).value = newBeacon; } /** * @dev Perform beacon upgrade with additional setup call. Note: This upgrades the address of the beacon, it does * not upgrade the implementation contained in the beacon (see {UpgradeableBeacon-_setImplementation} for that). * * Emits a {BeaconUpgraded} event. */ function _upgradeBeaconToAndCall(address newBeacon, bytes memory data, bool forceCall) internal { _setBeacon(newBeacon); emit BeaconUpgraded(newBeacon); if (data.length > 0 || forceCall) { AddressUpgradeable.functionDelegateCall(IBeaconUpgradeable(newBeacon).implementation(), data); } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that functions marked with `initializer` can be nested in the context of a * constructor. * * Emits an {Initialized} event. */ modifier initializer() { bool isTopLevelCall = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 1; if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: setting the version to 255 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint8 version) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { require(!_initializing, "Initializable: contract is initializing"); if (_initialized != type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint8) { return _initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _initializing; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/beacon/IBeacon.sol) pragma solidity ^0.8.0; /** * @dev This is the interface that {BeaconProxy} expects of its beacon. */ interface IBeaconUpgradeable { /** * @dev Must return an address that can be used as a delegate call target. * * {BeaconProxy} will check that this address is a contract. */ function implementation() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (interfaces/IERC1967.sol) pragma solidity ^0.8.0; /** * @dev ERC-1967: Proxy Storage Slots. This interface contains the events defined in the ERC. * * _Available since v4.8.3._ */ interface IERC1967Upgradeable { /** * @dev Emitted when the implementation is upgraded. */ event Upgraded(address indexed implementation); /** * @dev Emitted when the admin account has changed. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Emitted when the beacon is changed. */ event BeaconUpgraded(address indexed beacon); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * * Furthermore, `isContract` will also return true if the target contract within * the same transaction is already scheduled for destruction by `SELFDESTRUCT`, * which only has an effect at the end of a transaction. * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.0/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.9.0) (utils/StorageSlot.sol) // This file was procedurally generated from scripts/generate/templates/StorageSlot.js. pragma solidity ^0.8.0; /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ```solidity * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, `uint256`._ * _Available since v4.9 for `string`, `bytes`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } struct StringSlot { string value; } struct BytesSlot { bytes value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` with member `value` located at `slot`. */ function getStringSlot(bytes32 slot) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `StringSlot` representation of the string storage pointer `store`. */ function getStringSlot(string storage store) internal pure returns (StringSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } /** * @dev Returns an `BytesSlot` with member `value` located at `slot`. */ function getBytesSlot(bytes32 slot) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := slot } } /** * @dev Returns an `BytesSlot` representation of the bytes storage pointer `store`. */ function getBytesSlot(bytes storage store) internal pure returns (BytesSlot storage r) { /// @solidity memory-safe-assembly assembly { r.slot := store.slot } } }
{ "remappings": [ "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/", "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "@rari-capital/solmate/=lib/solmate/", "@cwia/=lib/clones-with-immutable-args/src/", "forge-std/=lib/forge-std/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "safe-contracts/=lib/safe-contracts/contracts/", "clones-with-immutable-args/=lib/clones-with-immutable-args/src/", "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/", "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/", "openzeppelin-contracts/=lib/openzeppelin-contracts/", "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/", "solmate/=lib/solmate/src/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none" }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"BridgeIsNotSet","type":"error"},{"inputs":[],"name":"CallerIsNotStaker","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidRecipient","type":"error"},{"inputs":[],"name":"InvalidRecipientSignature","type":"error"},{"inputs":[],"name":"OnlyEOA","type":"error"},{"inputs":[],"name":"SharesNotInitiated","type":"error"},{"inputs":[],"name":"TransitionIsEnabled","type":"error"},{"inputs":[],"name":"TransitionNotEnabled","type":"error"},{"inputs":[],"name":"UserAlreadyTransitioned","type":"error"},{"inputs":[],"name":"ZeroDeposit","type":"error"},{"inputs":[],"name":"ZeroSharesIssued","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"beacon","type":"address"}],"name":"BeaconUpgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ETHDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"daiAmount","type":"uint256"}],"name":"USDDeposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stETHAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"daiAmount","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"CURVE_3POOL","outputs":[{"internalType":"contract ICurve3Pool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DAI","outputs":[{"internalType":"contract IDAI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DSR_MANAGER","outputs":[{"internalType":"contract IDsrManager","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIDO","outputs":[{"internalType":"contract ILido","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PSM","outputs":[{"internalType":"contract IDssPsm","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDC","outputs":[{"internalType":"contract IUSDC","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"USDT","outputs":[{"internalType":"contract IUSDT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"ethBalance","type":"uint256"},{"internalType":"uint256","name":"usdBalance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"daiAmount","type":"uint256"}],"name":"depositDAI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"daiAmount","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"depositDAIWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"depositETH","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stETHAmount","type":"uint256"}],"name":"depositStETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"stETHAmount","type":"uint256"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"depositStETHWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdcAmount","type":"uint256"}],"name":"depositUSDC","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdcAmount","type":"uint256"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"depositUSDCWithPermit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"usdtAmount","type":"uint256"},{"internalType":"uint256","name":"minDAIAmount","type":"uint256"}],"name":"depositUSDT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emergencyWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"mainnetBridge","type":"address"}],"name":"enableTransition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"ethShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMainnetBridge","outputs":[{"internalType":"contract IMainnetBridge","name":"mainnetBridge","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isTransitionEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"open","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_staker","type":"address"}],"name":"setStaker","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"stakeUSD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"staker","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalETHBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalETHShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUSDBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalUSDBalanceNoUpdate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalUSDShares","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":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint32","name":"minGasLimit","type":"uint32"}],"name":"transition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"minGasLimit","type":"uint32"}],"name":"transition","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"transitioned","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"usdShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a0604052306080523480156200001557600080fd5b506200002062000026565b620000e7565b600054610100900460ff1615620000935760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811614620000e5576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051613a406200011f6000396000818161100701528181611050015281816111540152818161119401526112230152613a406000f3fe60806040526004361061028c5760003560e01c806379ba50971161015a578063c54e44eb116100c1578063ebf73de11161007a578063ebf73de1146107de578063f212af83146107f1578063f2fde38b14610811578063f6326fb314610831578063f688bcfb14610839578063fef2acae1461085957600080fd5b8063c54e44eb14610719578063db2e21bc14610741578063dc42e46314610756578063e0bab4c41461077e578063e30c3978146107a0578063e50751ea146107be57600080fd5b8063a32c40c411610113578063a32c40c414610656578063a3b2ef5414610676578063ab4e5c471461068b578063af0374ea146106b9578063ba1f77e8146106d9578063c4d66de8146106f957600080fd5b806379ba50971461059e5780638456cb59146105b357806389a30271146105c85780638b21f170146105f05780638da5cb5b14610618578063a29a43bb1461063657600080fd5b806352d1902d116101fe57806360304c25116101b757806360304c25146104ed57806362e5a482146105045780636ecc20da1461051f57806370a082311461053f578063715018a61461057457806379408c431461058957600080fd5b806352d1902d14610415578063563618421461042a5780635c975abb1461044a5780635cc62e651461046e5780635dac9ed71461049f5780635ebaf1db146104c757600080fd5b80633265aead116102505780633265aead14610376578063365833e1146103965780633659cfe6146103b65780633f4ba83a146103d657806341d19156146103eb5780634f1ef2861461040257600080fd5b806309b48367146102a05780630a553dcb146102c05780630d9d35ef146102e05780631a66371a146103215780632b5445dd1461033657600080fd5b3661029b5761029961086e565b005b600080fd5b3480156102ac57600080fd5b506102996102bb36600461328f565b61089a565b3480156102cc57600080fd5b506102996102db3660046132e0565b610920565b3480156102ec57600080fd5b5061030e6102fb366004613317565b61012f6020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561032d57600080fd5b5061030e610c29565b34801561034257600080fd5b5061035e73bebc44782c7db0a1a60cb6fe97d0b483032ff1c781565b6040516001600160a01b039091168152602001610318565b34801561038257600080fd5b50610299610391366004613334565b610ef1565b3480156103a257600080fd5b506102996103b1366004613334565b610f9d565b3480156103c257600080fd5b506102996103d1366004613317565b610ffd565b3480156103e257600080fd5b506102996110e5565b3480156103f757600080fd5b5061030e6101305481565b610299610410366004613363565b61114a565b34801561042157600080fd5b5061030e611216565b34801561043657600080fd5b50610299610445366004613334565b6112ca565b34801561045657600080fd5b5060fb5460ff165b6040519015158152602001610318565b34801561047a57600080fd5b5061045e610489366004613317565b6101316020526000908152604090205460ff1681565b3480156104ab57600080fd5b5061035e7389b78cfa322f6c5de0abceecab66aee45393cc5a81565b3480156104d357600080fd5b506101325461035e9061010090046001600160a01b031681565b3480156104f957600080fd5b5061030e61012e5481565b34801561051057600080fd5b506101325461045e9060ff1681565b34801561052b57600080fd5b5061029961053a366004613334565b6113f6565b34801561054b57600080fd5b5061055f61055a366004613317565b6114aa565b60408051928352602083019190915201610318565b34801561058057600080fd5b506102996114fc565b34801561059557600080fd5b5061030e61150e565b3480156105aa57600080fd5b50610299611602565b3480156105bf57600080fd5b50610299611679565b3480156105d457600080fd5b5061035e73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b3480156105fc57600080fd5b5061035e73ae7ab96520de3a18e5e111b5eaab095312d7fe8481565b34801561062457600080fd5b506097546001600160a01b031661035e565b34801561064257600080fd5b50610299610651366004613317565b611689565b34801561066257600080fd5b50610299610671366004613317565b6116ba565b34801561068257600080fd5b5061035e6117ba565b34801561069757600080fd5b5061030e6106a6366004613317565b61012d6020526000908152604090205481565b3480156106c557600080fd5b506102996106d436600461343b565b6117e5565b3480156106e557600080fd5b506102996106f4366004613494565b611913565b34801561070557600080fd5b50610299610714366004613317565b61193e565b34801561072557600080fd5b5061035e73dac17f958d2ee523a2206206994597c13d831ec781565b34801561074d57600080fd5b50610299611c89565b34801561076257600080fd5b5061035e73373238337bfe1146fb49989fc222523f83081ddb81565b34801561078a57600080fd5b5061035e6000805160206139cd83398151915281565b3480156107ac57600080fd5b5060c9546001600160a01b031661035e565b3480156107ca57600080fd5b506102996107d936600461328f565b611ce4565b6102996107ec3660046134af565b611d62565b3480156107fd57600080fd5b5061029961080c36600461328f565b611f36565b34801561081d57600080fd5b5061029961082c366004613317565b611fb1565b61029961086e565b34801561084557600080fd5b50610299610854366004613334565b612022565b34801561086557600080fd5b5061030e6121e1565b3460000361088f576040516356316e8760e01b815260040160405180910390fd5b61089834612261565b565b60405163d505accf60e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063d505accf906108dd90339030908a908a908a908a908a906004016134ff565b600060405180830381600087803b1580156108f757600080fd5b505af115801561090b573d6000803e3d6000fd5b5050505061091886612022565b505050505050565b81600003610941576040516356316e8760e01b815260040160405180910390fd5b6040516370a0823160e01b815230600482015260009073dac17f958d2ee523a2206206994597c13d831ec7906370a0823190602401602060405180830381865afa158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b79190613540565b6040516323b872dd60e01b815290915073dac17f958d2ee523a2206206994597c13d831ec7906323b872dd906109f590339030908890600401613559565b600060405180830381600087803b158015610a0f57600080fd5b505af1158015610a23573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925083915073dac17f958d2ee523a2206206994597c13d831ec7906370a0823190602401602060405180830381865afa158015610a7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9f9190613540565b610aa99190613593565b6040516370a0823160e01b81523060048201529091506000906000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015610af8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1c9190613540565b604051630f7c084960e21b81526002600482015260006024820152604481018490526064810186905290915073bebc44782c7db0a1a60cb6fe97d0b483032ff1c790633df0212490608401600060405180830381600087803b158015610b8157600080fd5b505af1158015610b95573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092508391506000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015610be7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0b9190613540565b610c159190613593565b9050610918610c238761226c565b82612295565b60008073373238337bfe1146fb49989fc222523f83081ddb6001600160a01b0316634ba2363a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca291906135aa565b90506000610df3610d8c836001600160a01b031663487bf0826040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0e9190613540565b846001600160a01b03166320aba08b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d709190613540565b610d7a9042613593565b6b033b2e3c9fd0803ce80000006122a1565b836001600160a01b031663c92aecc46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dee9190613540565b61235f565b6040516388787f2b60e01b8152306004820152909150610e739073373238337bfe1146fb49989fc222523f83081ddb906388787f2b90602401602060405180830381865afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190613540565b8261235f565b6040516370a0823160e01b81523060048201526000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015610ebc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee09190613540565b610eea91906135c7565b9250505090565b80600003610f12576040516356316e8760e01b815260040160405180910390fd5b610f1b81612389565b6040516323b872dd60e01b815273ae7ab96520de3a18e5e111b5eaab095312d7fe84906323b872dd90610f5690339030908690600401613559565b6020604051808303816000875af1158015610f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9991906135df565b5050565b80600003610fbe576040516356316e8760e01b815260040160405180910390fd5b610fc88182612394565b6040516323b872dd60e01b81526000805160206139cd833981519152906323b872dd90610f5690339030908690600401613559565b6001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016300361104e5760405162461bcd60e51b815260040161104590613601565b60405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166110976000805160206139ed833981519152546001600160a01b031690565b6001600160a01b0316146110bd5760405162461bcd60e51b81526004016110459061364d565b6110c6816123a0565b604080516000808252602082019092526110e2918391906123a8565b50565b6110ed612518565b61012e541580156110ff575061013054155b1561111d57604051636c7adcb960e11b815260040160405180910390fd5b6101325460ff16156111425760405163233a940b60e11b815260040160405180910390fd5b610898612572565b6001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001630036111925760405162461bcd60e51b815260040161104590613601565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166111db6000805160206139ed833981519152546001600160a01b031690565b6001600160a01b0316146112015760405162461bcd60e51b81526004016110459061364d565b61120a826123a0565b610f99828260016123a8565b6000306001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146112b65760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401611045565b506000805160206139ed8339815191525b90565b6101325461010090046001600160a01b031633146112fb57604051632333f42360e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015611344573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113689190613540565b8111156113885760405163356680b760e01b815260040160405180910390fd5b604051633b4da69f60e01b815273373238337bfe1146fb49989fc222523f83081ddb90633b4da69f906113c19030908590600401613699565b600060405180830381600087803b1580156113db57600080fd5b505af11580156113ef573d6000803e3d6000fd5b5050505050565b6101325461010090046001600160a01b0316331461142757604051632333f42360e01b815260040160405180910390fd5b478111156114485760405163356680b760e01b815260040160405180910390fd5b60405163a1903eab60e01b81526000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe849063a1903eab9083906024016000604051808303818588803b15801561149657600080fd5b505af1158015610918573d6000803e3d6000fd5b6001600160a01b038116600090815261012d602052604081205481906114cf906125c4565b6001600160a01b038416600090815261012f60205260409020549092506114f5906125e6565b9050915091565b611504612518565b61089860006125f4565b60405163d7f7098f60e01b815230600482015260009073373238337bfe1146fb49989fc222523f83081ddb9063d7f7098f906024016020604051808303816000875af1158015611562573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115869190613540565b6040516370a0823160e01b81523060048201526000805160206139cd833981519152906370a0823190602401602060405180830381865afa1580156115cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f39190613540565b6115fd91906135c7565b905090565b60c95433906001600160a01b031681146116705760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401611045565b6110e2816125f4565b611681612518565b61089861260d565b611691612518565b61013280546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6116c2612518565b6101325460ff16156116e75760405163233a940b60e11b815260040160405180910390fd5b6116ef61260d565b6116f88161264a565b610132805460ff1916600117905560405163095ea7b360e01b815273ae7ab96520de3a18e5e111b5eaab095312d7fe849063095ea7b39061174190849060001990600401613699565b6020604051808303816000875af1158015611760573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178491906135df565b5060405163095ea7b360e01b81526000805160206139cd8339815191529063095ea7b390610f5690849060001990600401613699565b610133546001600160a01b0316806112c75760405163fb28a66360e01b815260040160405180910390fd5b336001600160a01b03861661180d57604051634e46966960e11b815260040160405180910390fd5b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090506000818860405160200161185c9291906136de565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8b169284019290925260608301899052608083018890529092509060019060a0016020604051602081039080840390855afa1580156118c7573d6000803e3d6000fd5b505050602060405103519050886001600160a01b0316816001600160a01b03161461190557604051635a83eed960e01b815260040160405180910390fd5b505050610918338784612687565b33321461193357604051639f8129d160e01b815260040160405180910390fd5b6110e2333383612687565b600054610100900460ff161580801561195e5750600054600160ff909116105b806119785750303b158015611978575060005460ff166001145b6119db5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401611045565b6000805460ff1916600117905580156119fe576000805461ff0019166101001790555b611a066128b3565b611a0e6128da565b611a16612909565b611a1e61260d565b6101328054610100600160a81b0319166101006001600160a01b038516021790556040805162b327b360e11b8152905173a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489163095ea7b3917389b78cfa322f6c5de0abceecab66aee45393cc5a916301664f669160048083019260209291908290030181865afa158015611aaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ace91906135aa565b6000196040518363ffffffff1660e01b8152600401611aee929190613699565b6020604051808303816000875af1158015611b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3191906135df565b5060405163095ea7b360e01b815273dac17f958d2ee523a2206206994597c13d831ec79063095ea7b390611b819073bebc44782c7db0a1a60cb6fe97d0b483032ff1c79060001990600401613699565b600060405180830381600087803b158015611b9b57600080fd5b505af1158015611baf573d6000803e3d6000fd5b505060405163095ea7b360e01b81526000805160206139cd833981519152925063095ea7b39150611bfc9073373238337bfe1146fb49989fc222523f83081ddb9060001990600401613699565b6020604051808303816000875af1158015611c1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c3f91906135df565b508015610f99576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b63665a64804211611cdc5760405162461bcd60e51b815260206004820152601f60248201527f456d657267656e63792074696d657374616d70206e6f742072656163686564006044820152606401611045565b610898612938565b60405163d505accf60e01b815273ae7ab96520de3a18e5e111b5eaab095312d7fe849063d505accf90611d2790339030908a908a908a908a908a906004016134ff565b600060405180830381600087803b158015611d4157600080fd5b505af1158015611d55573d6000803e3d6000fd5b5050505061091886610ef1565b611d6a612518565b6040516323f2ebc360e21b81526000805160206139cd83398151915290638fcbaf0c90611dac90889030908990600019906001908b908b908b90600401613715565b600060405180830381600087803b158015611dc657600080fd5b505af1158015611dda573d6000803e3d6000fd5b50506040516323b872dd60e01b81526000805160206139cd83398151915292506323b872dd9150611e1590889030906103e890600401613559565b6020604051808303816000875af1158015611e34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5891906135df565b506040516370a0823160e01b815230600482015247906000906000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015611ea7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ecb9190613540565b905061012e546000148015611ee1575061013054155b611eed57611eed61375e565b6103e88210158015611f0157506103e88110155b611f0d57611f0d61375e565b611f1961dead83612ad4565b611f2561dead82612b20565b611f2d612572565b50505050505050565b6040516323f2ebc360e21b81526000805160206139cd83398151915290638fcbaf0c90611f7690339030908a908a906001908b908b908b90600401613715565b600060405180830381600087803b158015611f9057600080fd5b505af1158015611fa4573d6000803e3d6000fd5b5050505061091886610f9d565b611fb9612518565b60c980546001600160a01b0383166001600160a01b03199091168117909155611fea6097546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b80600003612043576040516356316e8760e01b815260040160405180910390fd5b600061204e8261226c565b90506000670de0b6b3a7640000827389b78cfa322f6c5de0abceecab66aee45393cc5a6001600160a01b031663568d4b6f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d29190613540565b6120dc9190613774565b6120e69190613793565b90506120fb826120f68382613593565b612394565b6040516323b872dd60e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906323b872dd9061213690339030908890600401613559565b6020604051808303816000875af1158015612155573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061217991906135df565b50604051634acc893b60e11b81527389b78cfa322f6c5de0abceecab66aee45393cc5a906395991276906121b39030908790600401613699565b600060405180830381600087803b1580156121cd57600080fd5b505af1158015611f2d573d6000803e3d6000fd5b6040516370a0823160e01b815230600482015260009073ae7ab96520de3a18e5e111b5eaab095312d7fe84906370a0823190602401602060405180830381865afa158015612233573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122579190613540565b6115fd90476135c7565b6110e2816001612b63565b600061227a60066012613593565b61228590600a613899565b61228f9083613774565b92915050565b610f9982826001612c14565b6000838015612341576001841680156122bc578592506122c0565b8392505b50600283046002850494505b841561233b5785860286878204146122e357600080fd5b818101818110156122f357600080fd5b859004965050600185161561233057858302838782041415871515161561231957600080fd5b8181018181101561232957600080fd5b8590049350505b6002850494506122cc565b50612357565b8380156123515760009250612355565b8392505b505b509392505050565b60006b033b2e3c9fd0803ce80000006123788385613774565b6123829190613793565b9392505050565b6110e2816000612b63565b610f9982826000612c14565b6110e2612518565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156123e0576123db83612cce565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561243a575060408051601f3d908101601f1916820190925261243791810190613540565b60015b61249d5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401611045565b6000805160206139ed833981519152811461250c5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401611045565b506123db838383612d6a565b6097546001600160a01b031633146108985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611045565b61257a612d95565b60fb805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061012e546125d26121e1565b6125dc9084613774565b61228f9190613793565b6000610130546125d2610c29565b60c980546001600160a01b03191690556110e281612dde565b612615612e30565b60fb805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125a73390565b6000816001600160a01b03163b116126645761266461375e565b61013380546001600160a01b0319166001600160a01b0392909216919091179055565b6101325460ff166126ab5760405163c61e185b60e01b815260040160405180910390fd5b6001600160a01b0383166000908152610131602052604090205460ff16156126e657604051637979b55560e01b815260040160405180910390fd5b6001600160a01b038316600090815261013160205260408120805460ff191660011790558061271485612e76565b91509150600061272386612ece565b9050600061272f6117ba565b905083156127a7576040805160208101825260008152905163e11013dd60e01b81526001600160a01b0383169163e11013dd918791612774918b918b916004016138d1565b6000604051808303818588803b15801561278d57600080fd5b505af11580156127a1573d6000803e3d6000fd5b50505050505b82156128295760405163540abf7360e01b81526001600160a01b0382169063540abf73906127f69073ae7ab96520de3a18e5e111b5eaab095312d7fe84906000908b9089908c9060040161390a565b600060405180830381600087803b15801561281057600080fd5b505af1158015612824573d6000803e3d6000fd5b505050505b8115611f2d5760405163540abf7360e01b81526001600160a01b0382169063540abf7390612878906000805160206139cd833981519152906003604360981b01908b9088908c9060040161390a565b600060405180830381600087803b15801561289257600080fd5b505af11580156128a6573d6000803e3d6000fd5b5050505050505050505050565b600054610100900460ff166108985760405162461bcd60e51b815260040161104590613952565b600054610100900460ff166129015760405162461bcd60e51b815260040161104590613952565b610898612ffa565b600054610100900460ff166129305760405162461bcd60e51b815260040161104590613952565b61089861302a565b60008061294433612e76565b91509150600061295333612ece565b905081156129d95760405163a9059cbb60e01b815273ae7ab96520de3a18e5e111b5eaab095312d7fe849063a9059cbb906129949033908690600401613699565b6020604051808303816000875af11580156129b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129d791906135df565b505b8015612a575760405163a9059cbb60e01b81526000805160206139cd8339815191529063a9059cbb90612a129033908590600401613699565b6020604051808303816000875af1158015612a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5591906135df565b505b8215612a8c57604051339084156108fc029085906000818181858888f19350505050158015612a8a573d6000803e3d6000fd5b505b604080518481526020810184905290810182905233907f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca949060600160405180910390a2505050565b6001600160a01b038216600090815261012d602052604081208054839290612afd9084906135c7565b925050819055508061012e6000828254612b1791906135c7565b90915550505050565b6001600160a01b038216600090815261012f602052604081208054839290612b499084906135c7565b92505081905550806101306000828254612b1791906135c7565b612b6b612e30565b6000612b756121e1565b90508115612b8a57612b878382613593565b90505b60008161012e5485612b9c9190613774565b612ba69190613793565b905080600003612bc95760405163d205582d60e01b815260040160405180910390fd5b612bd33382612ad4565b604080518281526020810186905233917f5fb1eada1aad82df33a14506173621652514a3b876b0157aec3ca284a0472f61910160405180910390a250505050565b612c1c612e30565b6000612c2661150e565b90508115612c3b57612c388382613593565b90505b6000816101305485612c4d9190613774565b612c579190613793565b905080600003612c7a5760405163d205582d60e01b815260040160405180910390fd5b612c843382612b20565b604080518281526020810187905290810185905233907f8f7ca6ae00dc0904e82dea1f2b4a15053fa68c9364faea9fa6a77c500f696fba9060600160405180910390a25050505050565b6001600160a01b0381163b612d3b5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401611045565b6000805160206139ed83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b612d738361305d565b600082511180612d805750805b156123db57612d8f838361309d565b50505050565b60fb5460ff166108985760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401611045565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60fb5460ff16156108985760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401611045565b6001600160a01b038116600090815261012d602052604081205481908015612ec857612ea1816125c4565b9250612ead84826130c2565b4780841115612ec657612ec08185613593565b92508093505b505b50915091565b6001600160a01b038116600090815261012f60205260408120548015612ff457612ef781613105565b9150612f038382613113565b6040516370a0823160e01b81523060048201526000906000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015612f4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f739190613540565b905080831115612ff25773373238337bfe1146fb49989fc222523f83081ddb63ef693bed30612fa28487613593565b6040518363ffffffff1660e01b8152600401612fbf929190613699565b600060405180830381600087803b158015612fd957600080fd5b505af1158015612fed573d6000803e3d6000fd5b505050505b505b50919050565b600054610100900460ff166130215760405162461bcd60e51b815260040161104590613952565b610898336125f4565b600054610100900460ff166130515760405162461bcd60e51b815260040161104590613952565b60fb805460ff19169055565b61306681612cce565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606123828383604051806060016040528060278152602001613a0d60279139613156565b6001600160a01b038216600090815261012d6020526040812080548392906130eb908490613593565b925050819055508061012e6000828254612b179190613593565b6000610130546125d261150e565b6001600160a01b038216600090815261012f60205260408120805483929061313c908490613593565b92505081905550806101306000828254612b179190613593565b6060600080856001600160a01b031685604051613173919061399d565b600060405180830381855af49150503d80600081146131ae576040519150601f19603f3d011682016040523d82523d6000602084013e6131b3565b606091505b50915091506131c4868383876131ce565b9695505050505050565b6060831561323d578251600003613236576001600160a01b0385163b6132365760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611045565b5081613247565b613247838361324f565b949350505050565b81511561325f5781518083602001fd5b8060405162461bcd60e51b815260040161104591906139b9565b803560ff8116811461328a57600080fd5b919050565b60008060008060008060c087890312156132a857600080fd5b8635955060208701359450604087013593506132c660608801613279565b92506080870135915060a087013590509295509295509295565b600080604083850312156132f357600080fd5b50508035926020909101359150565b6001600160a01b03811681146110e257600080fd5b60006020828403121561332957600080fd5b813561238281613302565b60006020828403121561334657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561337657600080fd5b823561338181613302565b9150602083013567ffffffffffffffff8082111561339e57600080fd5b818501915085601f8301126133b257600080fd5b8135818111156133c4576133c461334d565b604051601f8201601f19908116603f011681019083821181831017156133ec576133ec61334d565b8160405282815288602084870101111561340557600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b803563ffffffff8116811461328a57600080fd5b600080600080600060a0868803121561345357600080fd5b853561345e81613302565b945061346c60208701613279565b9350604086013592506060860135915061348860808701613427565b90509295509295909350565b6000602082840312156134a657600080fd5b61238282613427565b600080600080600060a086880312156134c757600080fd5b85356134d281613302565b9450602086013593506134e760408701613279565b94979396509394606081013594506080013592915050565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b60006020828403121561355257600080fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156135a5576135a561357d565b500390565b6000602082840312156135bc57600080fd5b815161238281613302565b600082198211156135da576135da61357d565b500190565b6000602082840312156135f157600080fd5b8151801515811461238257600080fd5b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6001600160a01b03929092168252602082015260400190565b60005b838110156136cd5781810151838201526020016136b5565b83811115612d8f5750506000910152565b600083516136f08184602088016136b2565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b6001600160a01b039889168152969097166020870152604086019490945260608501929092521515608084015260ff1660a083015260c082015260e08101919091526101000190565b634e487b7160e01b600052600160045260246000fd5b600081600019048311821515161561378e5761378e61357d565b500290565b6000826137b057634e487b7160e01b600052601260045260246000fd5b500490565b600181815b808511156137f05781600019048211156137d6576137d661357d565b808516156137e357918102915b93841c93908002906137ba565b509250929050565b6000826138075750600161228f565b816138145750600061228f565b816001811461382a576002811461383457613850565b600191505061228f565b60ff8411156138455761384561357d565b50506001821b61228f565b5060208310610133831016604e8410600b8410161715613873575081810a61228f565b61387d83836137b5565b80600019048211156138915761389161357d565b029392505050565b600061238283836137f8565b600081518084526138bd8160208601602086016136b2565b601f01601f19169290920160200192915050565b6001600160a01b038416815263ffffffff83166020820152606060408201819052600090613901908301846138a5565b95945050505050565b6001600160a01b0395861681529385166020850152919093166040830152606082019290925263ffffffff909116608082015260c060a0820181905260009082015260e00190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516139af8184602087016136b2565b9190910192915050565b60208152600061238260208301846138a556fe0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c634300080f000a
Deployed Bytecode
0x60806040526004361061028c5760003560e01c806379ba50971161015a578063c54e44eb116100c1578063ebf73de11161007a578063ebf73de1146107de578063f212af83146107f1578063f2fde38b14610811578063f6326fb314610831578063f688bcfb14610839578063fef2acae1461085957600080fd5b8063c54e44eb14610719578063db2e21bc14610741578063dc42e46314610756578063e0bab4c41461077e578063e30c3978146107a0578063e50751ea146107be57600080fd5b8063a32c40c411610113578063a32c40c414610656578063a3b2ef5414610676578063ab4e5c471461068b578063af0374ea146106b9578063ba1f77e8146106d9578063c4d66de8146106f957600080fd5b806379ba50971461059e5780638456cb59146105b357806389a30271146105c85780638b21f170146105f05780638da5cb5b14610618578063a29a43bb1461063657600080fd5b806352d1902d116101fe57806360304c25116101b757806360304c25146104ed57806362e5a482146105045780636ecc20da1461051f57806370a082311461053f578063715018a61461057457806379408c431461058957600080fd5b806352d1902d14610415578063563618421461042a5780635c975abb1461044a5780635cc62e651461046e5780635dac9ed71461049f5780635ebaf1db146104c757600080fd5b80633265aead116102505780633265aead14610376578063365833e1146103965780633659cfe6146103b65780633f4ba83a146103d657806341d19156146103eb5780634f1ef2861461040257600080fd5b806309b48367146102a05780630a553dcb146102c05780630d9d35ef146102e05780631a66371a146103215780632b5445dd1461033657600080fd5b3661029b5761029961086e565b005b600080fd5b3480156102ac57600080fd5b506102996102bb36600461328f565b61089a565b3480156102cc57600080fd5b506102996102db3660046132e0565b610920565b3480156102ec57600080fd5b5061030e6102fb366004613317565b61012f6020526000908152604090205481565b6040519081526020015b60405180910390f35b34801561032d57600080fd5b5061030e610c29565b34801561034257600080fd5b5061035e73bebc44782c7db0a1a60cb6fe97d0b483032ff1c781565b6040516001600160a01b039091168152602001610318565b34801561038257600080fd5b50610299610391366004613334565b610ef1565b3480156103a257600080fd5b506102996103b1366004613334565b610f9d565b3480156103c257600080fd5b506102996103d1366004613317565b610ffd565b3480156103e257600080fd5b506102996110e5565b3480156103f757600080fd5b5061030e6101305481565b610299610410366004613363565b61114a565b34801561042157600080fd5b5061030e611216565b34801561043657600080fd5b50610299610445366004613334565b6112ca565b34801561045657600080fd5b5060fb5460ff165b6040519015158152602001610318565b34801561047a57600080fd5b5061045e610489366004613317565b6101316020526000908152604090205460ff1681565b3480156104ab57600080fd5b5061035e7389b78cfa322f6c5de0abceecab66aee45393cc5a81565b3480156104d357600080fd5b506101325461035e9061010090046001600160a01b031681565b3480156104f957600080fd5b5061030e61012e5481565b34801561051057600080fd5b506101325461045e9060ff1681565b34801561052b57600080fd5b5061029961053a366004613334565b6113f6565b34801561054b57600080fd5b5061055f61055a366004613317565b6114aa565b60408051928352602083019190915201610318565b34801561058057600080fd5b506102996114fc565b34801561059557600080fd5b5061030e61150e565b3480156105aa57600080fd5b50610299611602565b3480156105bf57600080fd5b50610299611679565b3480156105d457600080fd5b5061035e73a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b3480156105fc57600080fd5b5061035e73ae7ab96520de3a18e5e111b5eaab095312d7fe8481565b34801561062457600080fd5b506097546001600160a01b031661035e565b34801561064257600080fd5b50610299610651366004613317565b611689565b34801561066257600080fd5b50610299610671366004613317565b6116ba565b34801561068257600080fd5b5061035e6117ba565b34801561069757600080fd5b5061030e6106a6366004613317565b61012d6020526000908152604090205481565b3480156106c557600080fd5b506102996106d436600461343b565b6117e5565b3480156106e557600080fd5b506102996106f4366004613494565b611913565b34801561070557600080fd5b50610299610714366004613317565b61193e565b34801561072557600080fd5b5061035e73dac17f958d2ee523a2206206994597c13d831ec781565b34801561074d57600080fd5b50610299611c89565b34801561076257600080fd5b5061035e73373238337bfe1146fb49989fc222523f83081ddb81565b34801561078a57600080fd5b5061035e6000805160206139cd83398151915281565b3480156107ac57600080fd5b5060c9546001600160a01b031661035e565b3480156107ca57600080fd5b506102996107d936600461328f565b611ce4565b6102996107ec3660046134af565b611d62565b3480156107fd57600080fd5b5061029961080c36600461328f565b611f36565b34801561081d57600080fd5b5061029961082c366004613317565b611fb1565b61029961086e565b34801561084557600080fd5b50610299610854366004613334565b612022565b34801561086557600080fd5b5061030e6121e1565b3460000361088f576040516356316e8760e01b815260040160405180910390fd5b61089834612261565b565b60405163d505accf60e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489063d505accf906108dd90339030908a908a908a908a908a906004016134ff565b600060405180830381600087803b1580156108f757600080fd5b505af115801561090b573d6000803e3d6000fd5b5050505061091886612022565b505050505050565b81600003610941576040516356316e8760e01b815260040160405180910390fd5b6040516370a0823160e01b815230600482015260009073dac17f958d2ee523a2206206994597c13d831ec7906370a0823190602401602060405180830381865afa158015610993573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b79190613540565b6040516323b872dd60e01b815290915073dac17f958d2ee523a2206206994597c13d831ec7906323b872dd906109f590339030908890600401613559565b600060405180830381600087803b158015610a0f57600080fd5b505af1158015610a23573d6000803e3d6000fd5b50506040516370a0823160e01b81523060048201526000925083915073dac17f958d2ee523a2206206994597c13d831ec7906370a0823190602401602060405180830381865afa158015610a7b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9f9190613540565b610aa99190613593565b6040516370a0823160e01b81523060048201529091506000906000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015610af8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1c9190613540565b604051630f7c084960e21b81526002600482015260006024820152604481018490526064810186905290915073bebc44782c7db0a1a60cb6fe97d0b483032ff1c790633df0212490608401600060405180830381600087803b158015610b8157600080fd5b505af1158015610b95573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152600092508391506000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015610be7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0b9190613540565b610c159190613593565b9050610918610c238761226c565b82612295565b60008073373238337bfe1146fb49989fc222523f83081ddb6001600160a01b0316634ba2363a6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca291906135aa565b90506000610df3610d8c836001600160a01b031663487bf0826040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d0e9190613540565b846001600160a01b03166320aba08b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d709190613540565b610d7a9042613593565b6b033b2e3c9fd0803ce80000006122a1565b836001600160a01b031663c92aecc46040518163ffffffff1660e01b8152600401602060405180830381865afa158015610dca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dee9190613540565b61235f565b6040516388787f2b60e01b8152306004820152909150610e739073373238337bfe1146fb49989fc222523f83081ddb906388787f2b90602401602060405180830381865afa158015610e49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6d9190613540565b8261235f565b6040516370a0823160e01b81523060048201526000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015610ebc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee09190613540565b610eea91906135c7565b9250505090565b80600003610f12576040516356316e8760e01b815260040160405180910390fd5b610f1b81612389565b6040516323b872dd60e01b815273ae7ab96520de3a18e5e111b5eaab095312d7fe84906323b872dd90610f5690339030908690600401613559565b6020604051808303816000875af1158015610f75573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9991906135df565b5050565b80600003610fbe576040516356316e8760e01b815260040160405180910390fd5b610fc88182612394565b6040516323b872dd60e01b81526000805160206139cd833981519152906323b872dd90610f5690339030908690600401613559565b6001600160a01b037f0000000000000000000000000bd88b59d580549285f0a207db5f06bf24a8e56116300361104e5760405162461bcd60e51b815260040161104590613601565b60405180910390fd5b7f0000000000000000000000000bd88b59d580549285f0a207db5f06bf24a8e5616001600160a01b03166110976000805160206139ed833981519152546001600160a01b031690565b6001600160a01b0316146110bd5760405162461bcd60e51b81526004016110459061364d565b6110c6816123a0565b604080516000808252602082019092526110e2918391906123a8565b50565b6110ed612518565b61012e541580156110ff575061013054155b1561111d57604051636c7adcb960e11b815260040160405180910390fd5b6101325460ff16156111425760405163233a940b60e11b815260040160405180910390fd5b610898612572565b6001600160a01b037f0000000000000000000000000bd88b59d580549285f0a207db5f06bf24a8e5611630036111925760405162461bcd60e51b815260040161104590613601565b7f0000000000000000000000000bd88b59d580549285f0a207db5f06bf24a8e5616001600160a01b03166111db6000805160206139ed833981519152546001600160a01b031690565b6001600160a01b0316146112015760405162461bcd60e51b81526004016110459061364d565b61120a826123a0565b610f99828260016123a8565b6000306001600160a01b037f0000000000000000000000000bd88b59d580549285f0a207db5f06bf24a8e56116146112b65760405162461bcd60e51b815260206004820152603860248201527f555550535570677261646561626c653a206d757374206e6f742062652063616c60448201527f6c6564207468726f7567682064656c656761746563616c6c00000000000000006064820152608401611045565b506000805160206139ed8339815191525b90565b6101325461010090046001600160a01b031633146112fb57604051632333f42360e01b815260040160405180910390fd5b6040516370a0823160e01b81523060048201526000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015611344573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113689190613540565b8111156113885760405163356680b760e01b815260040160405180910390fd5b604051633b4da69f60e01b815273373238337bfe1146fb49989fc222523f83081ddb90633b4da69f906113c19030908590600401613699565b600060405180830381600087803b1580156113db57600080fd5b505af11580156113ef573d6000803e3d6000fd5b5050505050565b6101325461010090046001600160a01b0316331461142757604051632333f42360e01b815260040160405180910390fd5b478111156114485760405163356680b760e01b815260040160405180910390fd5b60405163a1903eab60e01b81526000600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe849063a1903eab9083906024016000604051808303818588803b15801561149657600080fd5b505af1158015610918573d6000803e3d6000fd5b6001600160a01b038116600090815261012d602052604081205481906114cf906125c4565b6001600160a01b038416600090815261012f60205260409020549092506114f5906125e6565b9050915091565b611504612518565b61089860006125f4565b60405163d7f7098f60e01b815230600482015260009073373238337bfe1146fb49989fc222523f83081ddb9063d7f7098f906024016020604051808303816000875af1158015611562573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115869190613540565b6040516370a0823160e01b81523060048201526000805160206139cd833981519152906370a0823190602401602060405180830381865afa1580156115cf573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115f39190613540565b6115fd91906135c7565b905090565b60c95433906001600160a01b031681146116705760405162461bcd60e51b815260206004820152602960248201527f4f776e61626c6532537465703a2063616c6c6572206973206e6f7420746865206044820152683732bb9037bbb732b960b91b6064820152608401611045565b6110e2816125f4565b611681612518565b61089861260d565b611691612518565b61013280546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6116c2612518565b6101325460ff16156116e75760405163233a940b60e11b815260040160405180910390fd5b6116ef61260d565b6116f88161264a565b610132805460ff1916600117905560405163095ea7b360e01b815273ae7ab96520de3a18e5e111b5eaab095312d7fe849063095ea7b39061174190849060001990600401613699565b6020604051808303816000875af1158015611760573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061178491906135df565b5060405163095ea7b360e01b81526000805160206139cd8339815191529063095ea7b390610f5690849060001990600401613699565b610133546001600160a01b0316806112c75760405163fb28a66360e01b815260040160405180910390fd5b336001600160a01b03861661180d57604051634e46966960e11b815260040160405180910390fd5b60006040518060400160405280601c81526020017f19457468657265756d205369676e6564204d6573736167653a0a33320000000081525090506000818860405160200161185c9291906136de565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff8b169284019290925260608301899052608083018890529092509060019060a0016020604051602081039080840390855afa1580156118c7573d6000803e3d6000fd5b505050602060405103519050886001600160a01b0316816001600160a01b03161461190557604051635a83eed960e01b815260040160405180910390fd5b505050610918338784612687565b33321461193357604051639f8129d160e01b815260040160405180910390fd5b6110e2333383612687565b600054610100900460ff161580801561195e5750600054600160ff909116105b806119785750303b158015611978575060005460ff166001145b6119db5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b6064820152608401611045565b6000805460ff1916600117905580156119fe576000805461ff0019166101001790555b611a066128b3565b611a0e6128da565b611a16612909565b611a1e61260d565b6101328054610100600160a81b0319166101006001600160a01b038516021790556040805162b327b360e11b8152905173a0b86991c6218b36c1d19d4a2e9eb0ce3606eb489163095ea7b3917389b78cfa322f6c5de0abceecab66aee45393cc5a916301664f669160048083019260209291908290030181865afa158015611aaa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ace91906135aa565b6000196040518363ffffffff1660e01b8152600401611aee929190613699565b6020604051808303816000875af1158015611b0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b3191906135df565b5060405163095ea7b360e01b815273dac17f958d2ee523a2206206994597c13d831ec79063095ea7b390611b819073bebc44782c7db0a1a60cb6fe97d0b483032ff1c79060001990600401613699565b600060405180830381600087803b158015611b9b57600080fd5b505af1158015611baf573d6000803e3d6000fd5b505060405163095ea7b360e01b81526000805160206139cd833981519152925063095ea7b39150611bfc9073373238337bfe1146fb49989fc222523f83081ddb9060001990600401613699565b6020604051808303816000875af1158015611c1b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c3f91906135df565b508015610f99576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15050565b63665a64804211611cdc5760405162461bcd60e51b815260206004820152601f60248201527f456d657267656e63792074696d657374616d70206e6f742072656163686564006044820152606401611045565b610898612938565b60405163d505accf60e01b815273ae7ab96520de3a18e5e111b5eaab095312d7fe849063d505accf90611d2790339030908a908a908a908a908a906004016134ff565b600060405180830381600087803b158015611d4157600080fd5b505af1158015611d55573d6000803e3d6000fd5b5050505061091886610ef1565b611d6a612518565b6040516323f2ebc360e21b81526000805160206139cd83398151915290638fcbaf0c90611dac90889030908990600019906001908b908b908b90600401613715565b600060405180830381600087803b158015611dc657600080fd5b505af1158015611dda573d6000803e3d6000fd5b50506040516323b872dd60e01b81526000805160206139cd83398151915292506323b872dd9150611e1590889030906103e890600401613559565b6020604051808303816000875af1158015611e34573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e5891906135df565b506040516370a0823160e01b815230600482015247906000906000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015611ea7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611ecb9190613540565b905061012e546000148015611ee1575061013054155b611eed57611eed61375e565b6103e88210158015611f0157506103e88110155b611f0d57611f0d61375e565b611f1961dead83612ad4565b611f2561dead82612b20565b611f2d612572565b50505050505050565b6040516323f2ebc360e21b81526000805160206139cd83398151915290638fcbaf0c90611f7690339030908a908a906001908b908b908b90600401613715565b600060405180830381600087803b158015611f9057600080fd5b505af1158015611fa4573d6000803e3d6000fd5b5050505061091886610f9d565b611fb9612518565b60c980546001600160a01b0383166001600160a01b03199091168117909155611fea6097546001600160a01b031690565b6001600160a01b03167f38d16b8cac22d99fc7c124b9cd0de2d3fa1faef420bfe791d8c362d765e2270060405160405180910390a350565b80600003612043576040516356316e8760e01b815260040160405180910390fd5b600061204e8261226c565b90506000670de0b6b3a7640000827389b78cfa322f6c5de0abceecab66aee45393cc5a6001600160a01b031663568d4b6f6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156120ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120d29190613540565b6120dc9190613774565b6120e69190613793565b90506120fb826120f68382613593565b612394565b6040516323b872dd60e01b815273a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48906323b872dd9061213690339030908890600401613559565b6020604051808303816000875af1158015612155573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061217991906135df565b50604051634acc893b60e11b81527389b78cfa322f6c5de0abceecab66aee45393cc5a906395991276906121b39030908790600401613699565b600060405180830381600087803b1580156121cd57600080fd5b505af1158015611f2d573d6000803e3d6000fd5b6040516370a0823160e01b815230600482015260009073ae7ab96520de3a18e5e111b5eaab095312d7fe84906370a0823190602401602060405180830381865afa158015612233573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122579190613540565b6115fd90476135c7565b6110e2816001612b63565b600061227a60066012613593565b61228590600a613899565b61228f9083613774565b92915050565b610f9982826001612c14565b6000838015612341576001841680156122bc578592506122c0565b8392505b50600283046002850494505b841561233b5785860286878204146122e357600080fd5b818101818110156122f357600080fd5b859004965050600185161561233057858302838782041415871515161561231957600080fd5b8181018181101561232957600080fd5b8590049350505b6002850494506122cc565b50612357565b8380156123515760009250612355565b8392505b505b509392505050565b60006b033b2e3c9fd0803ce80000006123788385613774565b6123829190613793565b9392505050565b6110e2816000612b63565b610f9982826000612c14565b6110e2612518565b7f4910fdfa16fed3260ed0e7147f7cc6da11a60208b5b9406d12a635614ffd91435460ff16156123e0576123db83612cce565b505050565b826001600160a01b03166352d1902d6040518163ffffffff1660e01b8152600401602060405180830381865afa92505050801561243a575060408051601f3d908101601f1916820190925261243791810190613540565b60015b61249d5760405162461bcd60e51b815260206004820152602e60248201527f45524331393637557067726164653a206e657720696d706c656d656e7461746960448201526d6f6e206973206e6f74205555505360901b6064820152608401611045565b6000805160206139ed833981519152811461250c5760405162461bcd60e51b815260206004820152602960248201527f45524331393637557067726164653a20756e737570706f727465642070726f786044820152681a58589b195555525160ba1b6064820152608401611045565b506123db838383612d6a565b6097546001600160a01b031633146108985760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401611045565b61257a612d95565b60fb805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600061012e546125d26121e1565b6125dc9084613774565b61228f9190613793565b6000610130546125d2610c29565b60c980546001600160a01b03191690556110e281612dde565b612615612e30565b60fb805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586125a73390565b6000816001600160a01b03163b116126645761266461375e565b61013380546001600160a01b0319166001600160a01b0392909216919091179055565b6101325460ff166126ab5760405163c61e185b60e01b815260040160405180910390fd5b6001600160a01b0383166000908152610131602052604090205460ff16156126e657604051637979b55560e01b815260040160405180910390fd5b6001600160a01b038316600090815261013160205260408120805460ff191660011790558061271485612e76565b91509150600061272386612ece565b9050600061272f6117ba565b905083156127a7576040805160208101825260008152905163e11013dd60e01b81526001600160a01b0383169163e11013dd918791612774918b918b916004016138d1565b6000604051808303818588803b15801561278d57600080fd5b505af11580156127a1573d6000803e3d6000fd5b50505050505b82156128295760405163540abf7360e01b81526001600160a01b0382169063540abf73906127f69073ae7ab96520de3a18e5e111b5eaab095312d7fe84906000908b9089908c9060040161390a565b600060405180830381600087803b15801561281057600080fd5b505af1158015612824573d6000803e3d6000fd5b505050505b8115611f2d5760405163540abf7360e01b81526001600160a01b0382169063540abf7390612878906000805160206139cd833981519152906003604360981b01908b9088908c9060040161390a565b600060405180830381600087803b15801561289257600080fd5b505af11580156128a6573d6000803e3d6000fd5b5050505050505050505050565b600054610100900460ff166108985760405162461bcd60e51b815260040161104590613952565b600054610100900460ff166129015760405162461bcd60e51b815260040161104590613952565b610898612ffa565b600054610100900460ff166129305760405162461bcd60e51b815260040161104590613952565b61089861302a565b60008061294433612e76565b91509150600061295333612ece565b905081156129d95760405163a9059cbb60e01b815273ae7ab96520de3a18e5e111b5eaab095312d7fe849063a9059cbb906129949033908690600401613699565b6020604051808303816000875af11580156129b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129d791906135df565b505b8015612a575760405163a9059cbb60e01b81526000805160206139cd8339815191529063a9059cbb90612a129033908590600401613699565b6020604051808303816000875af1158015612a31573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a5591906135df565b505b8215612a8c57604051339084156108fc029085906000818181858888f19350505050158015612a8a573d6000803e3d6000fd5b505b604080518481526020810184905290810182905233907f02f25270a4d87bea75db541cdfe559334a275b4a233520ed6c0a2429667cca949060600160405180910390a2505050565b6001600160a01b038216600090815261012d602052604081208054839290612afd9084906135c7565b925050819055508061012e6000828254612b1791906135c7565b90915550505050565b6001600160a01b038216600090815261012f602052604081208054839290612b499084906135c7565b92505081905550806101306000828254612b1791906135c7565b612b6b612e30565b6000612b756121e1565b90508115612b8a57612b878382613593565b90505b60008161012e5485612b9c9190613774565b612ba69190613793565b905080600003612bc95760405163d205582d60e01b815260040160405180910390fd5b612bd33382612ad4565b604080518281526020810186905233917f5fb1eada1aad82df33a14506173621652514a3b876b0157aec3ca284a0472f61910160405180910390a250505050565b612c1c612e30565b6000612c2661150e565b90508115612c3b57612c388382613593565b90505b6000816101305485612c4d9190613774565b612c579190613793565b905080600003612c7a5760405163d205582d60e01b815260040160405180910390fd5b612c843382612b20565b604080518281526020810187905290810185905233907f8f7ca6ae00dc0904e82dea1f2b4a15053fa68c9364faea9fa6a77c500f696fba9060600160405180910390a25050505050565b6001600160a01b0381163b612d3b5760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b6064820152608401611045565b6000805160206139ed83398151915280546001600160a01b0319166001600160a01b0392909216919091179055565b612d738361305d565b600082511180612d805750805b156123db57612d8f838361309d565b50505050565b60fb5460ff166108985760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401611045565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60fb5460ff16156108985760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401611045565b6001600160a01b038116600090815261012d602052604081205481908015612ec857612ea1816125c4565b9250612ead84826130c2565b4780841115612ec657612ec08185613593565b92508093505b505b50915091565b6001600160a01b038116600090815261012f60205260408120548015612ff457612ef781613105565b9150612f038382613113565b6040516370a0823160e01b81523060048201526000906000805160206139cd833981519152906370a0823190602401602060405180830381865afa158015612f4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f739190613540565b905080831115612ff25773373238337bfe1146fb49989fc222523f83081ddb63ef693bed30612fa28487613593565b6040518363ffffffff1660e01b8152600401612fbf929190613699565b600060405180830381600087803b158015612fd957600080fd5b505af1158015612fed573d6000803e3d6000fd5b505050505b505b50919050565b600054610100900460ff166130215760405162461bcd60e51b815260040161104590613952565b610898336125f4565b600054610100900460ff166130515760405162461bcd60e51b815260040161104590613952565b60fb805460ff19169055565b61306681612cce565b6040516001600160a01b038216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b60606123828383604051806060016040528060278152602001613a0d60279139613156565b6001600160a01b038216600090815261012d6020526040812080548392906130eb908490613593565b925050819055508061012e6000828254612b179190613593565b6000610130546125d261150e565b6001600160a01b038216600090815261012f60205260408120805483929061313c908490613593565b92505081905550806101306000828254612b179190613593565b6060600080856001600160a01b031685604051613173919061399d565b600060405180830381855af49150503d80600081146131ae576040519150601f19603f3d011682016040523d82523d6000602084013e6131b3565b606091505b50915091506131c4868383876131ce565b9695505050505050565b6060831561323d578251600003613236576001600160a01b0385163b6132365760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401611045565b5081613247565b613247838361324f565b949350505050565b81511561325f5781518083602001fd5b8060405162461bcd60e51b815260040161104591906139b9565b803560ff8116811461328a57600080fd5b919050565b60008060008060008060c087890312156132a857600080fd5b8635955060208701359450604087013593506132c660608801613279565b92506080870135915060a087013590509295509295509295565b600080604083850312156132f357600080fd5b50508035926020909101359150565b6001600160a01b03811681146110e257600080fd5b60006020828403121561332957600080fd5b813561238281613302565b60006020828403121561334657600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b6000806040838503121561337657600080fd5b823561338181613302565b9150602083013567ffffffffffffffff8082111561339e57600080fd5b818501915085601f8301126133b257600080fd5b8135818111156133c4576133c461334d565b604051601f8201601f19908116603f011681019083821181831017156133ec576133ec61334d565b8160405282815288602084870101111561340557600080fd5b8260208601602083013760006020848301015280955050505050509250929050565b803563ffffffff8116811461328a57600080fd5b600080600080600060a0868803121561345357600080fd5b853561345e81613302565b945061346c60208701613279565b9350604086013592506060860135915061348860808701613427565b90509295509295909350565b6000602082840312156134a657600080fd5b61238282613427565b600080600080600060a086880312156134c757600080fd5b85356134d281613302565b9450602086013593506134e760408701613279565b94979396509394606081013594506080013592915050565b6001600160a01b0397881681529590961660208601526040850193909352606084019190915260ff16608083015260a082015260c081019190915260e00190565b60006020828403121561355257600080fd5b5051919050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b634e487b7160e01b600052601160045260246000fd5b6000828210156135a5576135a561357d565b500390565b6000602082840312156135bc57600080fd5b815161238281613302565b600082198211156135da576135da61357d565b500190565b6000602082840312156135f157600080fd5b8151801515811461238257600080fd5b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b19195b1959d85d1958d85b1b60a21b606082015260800190565b6020808252602c908201527f46756e6374696f6e206d7573742062652063616c6c6564207468726f7567682060408201526b6163746976652070726f787960a01b606082015260800190565b6001600160a01b03929092168252602082015260400190565b60005b838110156136cd5781810151838201526020016136b5565b83811115612d8f5750506000910152565b600083516136f08184602088016136b2565b60609390931b6bffffffffffffffffffffffff19169190920190815260140192915050565b6001600160a01b039889168152969097166020870152604086019490945260608501929092521515608084015260ff1660a083015260c082015260e08101919091526101000190565b634e487b7160e01b600052600160045260246000fd5b600081600019048311821515161561378e5761378e61357d565b500290565b6000826137b057634e487b7160e01b600052601260045260246000fd5b500490565b600181815b808511156137f05781600019048211156137d6576137d661357d565b808516156137e357918102915b93841c93908002906137ba565b509250929050565b6000826138075750600161228f565b816138145750600061228f565b816001811461382a576002811461383457613850565b600191505061228f565b60ff8411156138455761384561357d565b50506001821b61228f565b5060208310610133831016604e8410600b8410161715613873575081810a61228f565b61387d83836137b5565b80600019048211156138915761389161357d565b029392505050565b600061238283836137f8565b600081518084526138bd8160208601602086016136b2565b601f01601f19169290920160200192915050565b6001600160a01b038416815263ffffffff83166020820152606060408201819052600090613901908301846138a5565b95945050505050565b6001600160a01b0395861681529385166020850152919093166040830152606082019290925263ffffffff909116608082015260c060a0820181905260009082015260e00190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b600082516139af8184602087016136b2565b9190910192915050565b60208152600061238260208301846138a556fe0000000000000000000000006b175474e89094c44da98b954eedeac495271d0f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc416464726573733a206c6f772d6c6576656c2064656c65676174652063616c6c206661696c6564a164736f6c634300080f000a
Loading...
Loading
Loading...
Loading
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.