![ads](/images/gen/moonpay_20.png)
20M+ users trust MoonPay worldwide. Checkout with your preferred payment method.
![ads](/images/gen/cons_20.png)
Ready to onboard to Ethereum? With MetaMask Portfolio, you're in control.
![ads](/images/gen/nexo.png)
Get up to 0.5% cashback per purchase and receive daily interest.
![ads](/images/gen/cons_20.png)
Ready to simplify your web3 experience? Try the all-in-one web3 app trusted by millions worldwide.
Purchase 100+ cryptocurrencies instantly, with Visa/Mastercard, Google/Apple Pay, and a variety of other funding methods.
![ads](/images/gen/coinsgame_20a.png)
Everyday giveaways up to 100 ETH, Lucky Spins. Deposit BONUS 300% and Cashbacks!
![ads](/images/gen/celsiuscasino_20.png)
9 years old Licensed Crypto Casino, Instant Withdraw 24/7, 6000+ Slots available, Paypal Deposit, Instant Live Support 24/7, 30% Rakeback.
![ads](/images/gen/bcgame_04092024_20.png)
5000+ Slots & Live Casino Games, 50+cryptos. Register with Etherscan and get 760% deposit bonus. Win Big$, withdraw it fast.
![ads](/images/gen/bcgames_20.png)
5000+ Slots & Live Casino Games, 50+cryptos. Register with Etherscan and get 760% deposit bonus. Win Big$, withdraw it fast.
![ads](/images/gen/cw_20.png)
Play 100s of games anonymously with all major cryptos. Join CryptoWins & start winning!
![ads](/images/gen/cryptoslots.png)
Anonymous play on awesome games - sign up now for 25 free jackpot spins - worth $100s!
Overview
ETH Balance
Eth Value
$1,691.71 (@ $2,347.67/ETH)Token Holdings
Could not find any matches!
- ERC-20 Tokens (7)0 stETHstETH (stETH)$0.00@2,351.460.57052324 boxETHCat-in-a-Box Ether$1,315.79@2,306.291 TokenERC-20 TOKEN*[Suspicious]98,127 TokenERC-20 TOKEN*[Suspicious]9,283 TokenERC-20 TOKEN*[Spam]3,999.99 TokenERC-20 TOKEN*[Spam]100 TokenERC-20 TOKEN*[Spam]NFT Tokens (8)Withdrawal NFT pufether.orgWithdrawal NFT pufether.orgERC-1155
More Info
Private Name Tags
ContractCreator
TokenTracker
- Transactions
- Internal Transactions
- Token Transfers (ERC-20)
- NFT Transfers
- Contract
- Events
- Analytics
- Multichain Portfolio
- Cards New
- Filter by Tx Type:
- Tx
- Internal Tx
- ERC-20
- NFTs
Latest 25 from a total of 247 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Redeem | 20619330 | 2024-08-27 10:29:47 | 16 days ago | 1724754587 | IN | 0 ETH$0.00 | 0.00035906 | 1.2612934 | ||||
Redeem | 20442270 | 2024-08-02 17:11:59 | 40 days ago | 1722618719 | IN | 0 ETH$0.00 | 0.00048786 | 6.67886608 | ||||
Approve | 20442031 | 2024-08-02 16:23:59 | 40 days ago | 1722615839 | IN | 0 ETH$0.00 | 0.000481 | 10.40324153 | ||||
Withdraw | 20399310 | 2024-07-27 17:14:47 | 46 days ago | 1722100487 | IN | 0 ETH$0.00 | 0.00150932 | 4.75343445 | ||||
Redeem | 20169545 | 2024-06-25 15:18:47 | 78 days ago | 1719328727 | IN | 0 ETH$0.00 | 0.00268975 | 9.27747797 | ||||
Redeem | 19960782 | 2024-05-27 11:02:23 | 107 days ago | 1716807743 | IN | 0 ETH$0.00 | 0.003187 | 11.19632561 | ||||
Redeem | 19830672 | 2024-05-09 6:23:59 | 126 days ago | 1715235839 | IN | 0 ETH$0.00 | 0.00054114 | 5.21960854 | ||||
Redeem | 19805993 | 2024-05-05 19:31:11 | 129 days ago | 1714937471 | IN | 0 ETH$0.00 | 0.00210813 | 7.39376215 | ||||
Redeem | 19727952 | 2024-04-24 21:36:35 | 140 days ago | 1713994595 | IN | 0 ETH$0.00 | 0.00228098 | 8 | ||||
Redeem | 19700437 | 2024-04-21 1:14:59 | 144 days ago | 1713662099 | IN | 0 ETH$0.00 | 0.00070992 | 6.84830244 | ||||
Redeem | 19691712 | 2024-04-19 19:58:23 | 145 days ago | 1713556703 | IN | 0 ETH$0.00 | 0.00092052 | 8.88087679 | ||||
Redeem | 19689449 | 2024-04-19 12:21:23 | 145 days ago | 1713529283 | IN | 0 ETH$0.00 | 0.00123082 | 11.87047034 | ||||
Redeem | 19682259 | 2024-04-18 12:11:35 | 146 days ago | 1713442295 | IN | 0 ETH$0.00 | 0.00470676 | 16.53475466 | ||||
Redeem | 19640618 | 2024-04-12 16:07:47 | 152 days ago | 1712938067 | IN | 0 ETH$0.00 | 0.00225929 | 21.79940621 | ||||
Redeem | 19591659 | 2024-04-05 19:36:35 | 159 days ago | 1712345795 | IN | 0 ETH$0.00 | 0.00213639 | 20.60884639 | ||||
Redeem | 19589599 | 2024-04-05 12:40:35 | 159 days ago | 1712320835 | IN | 0 ETH$0.00 | 0.00231813 | 22.35421243 | ||||
Deposit Cheapeth | 19589594 | 2024-04-05 12:39:35 | 159 days ago | 1712320775 | IN | 6.09241451 ETH$14,303.00 | 0.00587181 | 21.87017112 | ||||
Redeem | 19579460 | 2024-04-04 2:36:11 | 161 days ago | 1712198171 | IN | 0 ETH$0.00 | 0.00320679 | 29.56224006 | ||||
Redeem | 19560004 | 2024-04-01 9:11:23 | 164 days ago | 1711962683 | IN | 0 ETH$0.00 | 0.00427024 | 15 | ||||
Redeem | 19444884 | 2024-03-16 3:45:47 | 180 days ago | 1710560747 | IN | 0 ETH$0.00 | 0.00990193 | 34.78378795 | ||||
Redeem | 19283133 | 2024-02-22 12:25:11 | 202 days ago | 1708604711 | IN | 0 ETH$0.00 | 0.01001481 | 37.36719471 | ||||
Redeem | 19258003 | 2024-02-18 23:41:47 | 206 days ago | 1708299707 | IN | 0 ETH$0.00 | 0.00181912 | 17.54825628 | ||||
Redeem | 19253671 | 2024-02-18 9:02:23 | 207 days ago | 1708246943 | IN | 0 ETH$0.00 | 0.00572045 | 22.90453785 | ||||
Redeem | 19214064 | 2024-02-12 19:35:35 | 212 days ago | 1707766535 | IN | 0 ETH$0.00 | 0.01295855 | 44.69468066 | ||||
Redeem | 19190698 | 2024-02-09 12:54:23 | 215 days ago | 1707483263 | IN | 0 ETH$0.00 | 0.02503941 | 86.36217019 |
Latest 21 internal transactions
Parent Transaction Hash | Block | From | To | |||||
---|---|---|---|---|---|---|---|---|
20505998 | 2024-08-11 14:34:47 | 31 days ago | 1723386887 | 0.94454663 ETH$2,217.49 | ||||
19851531 | 2024-05-12 4:22:47 | 123 days ago | 1715487767 | 0.64405613 ETH$1,512.03 | ||||
19644440 | 2024-04-13 5:01:59 | 152 days ago | 1712984519 | 4.01322038 ETH$9,421.73 | ||||
19026125 | 2024-01-17 10:50:59 | 239 days ago | 1705488659 | 0.13552823 ETH$318.18 | ||||
18040274 | 2023-09-01 7:41:11 | 377 days ago | 1693554071 | 6.2 ETH$14,555.57 | ||||
18004518 | 2023-08-27 7:28:59 | 382 days ago | 1693121339 | 0.12464157 ETH$292.62 | ||||
18004487 | 2023-08-27 7:22:47 | 382 days ago | 1693120967 | 1.49999999 ETH$3,521.51 | ||||
18004481 | 2023-08-27 7:21:35 | 382 days ago | 1693120895 | 1.49999999 ETH$3,521.51 | ||||
17647472 | 2023-07-08 7:10:11 | 432 days ago | 1688800211 | 2.58535842 ETH$6,069.58 | ||||
17586170 | 2023-06-29 16:33:23 | 440 days ago | 1688056403 | 1.64551448 ETH$3,863.13 | ||||
17586156 | 2023-06-29 16:30:35 | 440 days ago | 1688056235 | 43 ETH$100,949.93 | ||||
17586144 | 2023-06-29 16:27:59 | 440 days ago | 1688056079 | 43 ETH$100,949.93 | ||||
17586139 | 2023-06-29 16:26:59 | 440 days ago | 1688056019 | 43 ETH$100,949.93 | ||||
17586135 | 2023-06-29 16:26:11 | 440 days ago | 1688055971 | 43 ETH$100,949.93 | ||||
17586128 | 2023-06-29 16:24:47 | 440 days ago | 1688055887 | 43 ETH$100,949.93 | ||||
17586121 | 2023-06-29 16:23:23 | 440 days ago | 1688055803 | 43 ETH$100,949.93 | ||||
17586115 | 2023-06-29 16:22:11 | 440 days ago | 1688055731 | 43 ETH$100,949.93 | ||||
17586083 | 2023-06-29 16:15:35 | 440 days ago | 1688055335 | 43 ETH$100,949.93 | ||||
17586076 | 2023-06-29 16:14:11 | 440 days ago | 1688055251 | 43 ETH$100,949.93 | ||||
17586067 | 2023-06-29 16:12:23 | 440 days ago | 1688055143 | 43 ETH$100,949.93 | ||||
17586045 | 2023-06-29 16:07:47 | 440 days ago | 1688054867 | 43 ETH$100,949.93 |
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; // https://defigarage.dev/ /* :^^^^^^^^^^^. Y#J????????YGY: Y#. ~#J ........ Y#: :#J ^B5JJJJJJJJ. !G~ Y#: :#J :~~~~~~^ ~@Y .:. Y#: :#J 5B!!!!!!PG. ~@J ~B: 75. :#J .&5 7@: ~@Y....... !@^ :#J .#P:^^^^:Y@: ~@G???????: !@^ :#J .#G!7777777. ~@J !@^ :#J .&5 ~@J !@^ ..................:::::Y#! #G:...... ~@Y !@^ :J5YJJJJJJJJJJJJJJJJJJJJJJ?^ ^JJ??????: :5! ^5: PG: B5 G5 .::::::: . .::::. .::::::. .::::::. .:::::: G5 .. ^7777!7YG^ .BGJ7!77~ ~7777!7P5. ^P5?7??7?&7 JP?7777?G? G5 !B~ &J .&Y !@: J@. .@? :@? Y& G5 !B~ ::::::^&J .&J .::::::?@: J&. .@? :@? .... 5& G5 !B~ ^BJ!!!!!7&J .&J ?G7!!!!!Y@: J&. .@? :&P??????YJ G5 !B~ ?@. &J .&J BP !@: J&. .&? :@7 5G~. 7B~ ?@: ^@J .&J BP ?@: ?@~....:7@? .@J .7YJJJJJJJJJY5^ :5Y?????JG7 .P7 !5J?????YG: !J??????@? 75J??????. ......!&! .7777777^ */ import {ERC20} from "./ERC20.sol"; import {SafeTransferLib} from "./SafeTransferLib.sol"; import {FixedPointMathLib} from "./FixedPointMathLib.sol"; import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; /// @notice Minimal ERC4626 tokenized Vault implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/mixins/ERC4626.sol) contract perpetualTokenOffering is ERC20,AccessControl { using SafeTransferLib for ERC20; using FixedPointMathLib for uint256; /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares); event Withdraw( address indexed caller, address indexed receiver, address indexed owner, uint256 assets, uint256 shares ); /*////////////////////////////////////////////////////////////// IMMUTABLES //////////////////////////////////////////////////////////////*/ ERC20 public immutable asset; ERC20 public immutable lst; address public ciab; address public team; uint256 public lastTotalAssets; uint256 public ltvOnDeposits; uint256 public helper; uint256 public threshold; bytes32 public constant ADMIN_ROLE = keccak256("ADMIN"); constructor( ERC20 _asset, ERC20 _lst, address _ciab, string memory _name, string memory _symbol ) ERC20(_name, _symbol, _asset.decimals()) { asset = _asset; lst = _lst; ciab = _ciab; ltvOnDeposits = 80; team = address(0xb52f8b5E8684dbD2B2A4956305F3aBd936c51621); _setupRole(ADMIN_ROLE, _msgSender()); _setRoleAdmin(ADMIN_ROLE, ADMIN_ROLE); threshold = 2000 ether; } /*////////////////////////////////////////////////////////////// DEPOSIT/WITHDRAWAL LOGIC //////////////////////////////////////////////////////////////*/ function deposit(uint256 assets, address receiver) public onlyRole(ADMIN_ROLE) returns (uint256 shares) { before(); // Need to transfer before minting or ERC777s could reenter. asset.safeTransferFrom(msg.sender, address(this), assets); shares = convertToShares(assets)/10; _mint(receiver, shares); emit Deposit(msg.sender, receiver, assets, shares); afterDeposit(assets, shares); afterMath(); } function depositCheapeth( address receiver) public payable returns (uint256 shares) { require(msg.value >= 100000000000000000, "under minimum"); uint256 _value = msg.value*9/10; helper = msg.value; before(); shares = convertToShares(_value); if(totalAssets() > threshold){ shares = shares*995/1000; } _mint(receiver, shares); helper = 0; emit Deposit(msg.sender, receiver, _value, shares); afterDeposit(_value, shares); afterMath(); } function convert(uint256 amount) public { before(); // send in steth lst.safeTransferFrom(msg.sender,address(this),amount); // approve steth uint256 _size = lst.balanceOf(address(this)); lst.approve(ciab,_size); // deposit into CIAB Iciab(ciab).deposit(_size); // calculate mint amount uint256 _toMint = _size*ltvOnDeposits/100; // mint synth Iciab(ciab).mint(_toMint); asset.transfer(team,_size/10); // get eth payable(msg.sender).transfer(amount); afterMath(); } function withdraw(uint256 assets, address receiver, address owner) public returns (uint256 shares) { before(); shares = previewWithdraw(assets); // No need to check for rounding error, previewWithdraw rounds up. if (msg.sender != owner) { uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) { allowance[owner][msg.sender] = allowed - shares; } } beforeWithdraw(assets, shares); _burn(owner, shares); emit Withdraw(msg.sender, receiver, owner, assets, shares); if(asset.balanceOf(address(this)) < assets){ uint256 _needed = assets - asset.balanceOf(address(this)); Iciab(ciab).mint(_needed); } asset.safeTransfer(receiver, assets); afterMath(); } function redeem(uint256 shares, address receiver, address owner) public returns (uint256 assets) { before(); if (msg.sender != owner) { uint256 allowed = allowance[owner][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) { allowance[owner][msg.sender] = allowed - shares; } } // Check for rounding error since we round down in previewRedeem. require((assets = previewRedeem(shares)) != 0, "ZERO_ASSETS"); beforeWithdraw(assets, shares); _burn(owner, shares); emit Withdraw(msg.sender, receiver, owner, assets, shares); asset.safeTransfer(receiver, assets); afterMath(); } function changeLTV(uint256 ratio) public { before(); // require sender = team require(msg.sender == team,"not team"); ltvOnDeposits = ratio; // get CIAB info uint256 _deposit = Iciab(ciab).deposited(address(this)); uint256 _debt = Iciab(ciab).debt(address(this)); uint256 _outstanding = Iciab(ciab).Owing(address(this)); uint256 _desiredDebt = (_deposit + _outstanding)*ratio/100; uint256 _delta; if(_desiredDebt < _debt){ // repay some debt _delta = _debt - _desiredDebt; asset.approve(ciab, _delta); Iciab(ciab).repay(_delta); } if(_desiredDebt > _debt){ // take some debt _delta = _desiredDebt - _debt; Iciab(ciab).mint(_delta); } afterMath(); } function setTeam(address _team) public { require(msg.sender == team,"Y U NO TEAM"); team = _team; } function setThreshold(uint256 _threshold) public { require(msg.sender == team,"Y U NO TEAM"); threshold = _threshold; } /*////////////////////////////////////////////////////////////// ACCOUNTING LOGIC //////////////////////////////////////////////////////////////*/ function totalAssets() public view returns (uint256){ // get CIAB info uint256 _deposit = Iciab(ciab).deposited(address(this)); uint256 _debt = Iciab(ciab).debt(address(this)); uint256 _outstanding = Iciab(ciab).Owing(address(this)); uint256 _net = (address(this).balance - helper)*9/10 +asset.balanceOf(address(this)) + _deposit + _outstanding - _debt; return _net; } function convertToShares(uint256 assets) public view returns (uint256) { uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. return supply == 0 ? assets*1000 : assets.mulDivDown(supply, totalAssets()); } function convertToAssets(uint256 shares) public view returns (uint256) { uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. return supply == 0 ? shares*1000 : shares.mulDivDown(totalAssets(), supply); } function previewDeposit(uint256 assets) public view returns (uint256) { return convertToShares(assets); } function previewMint(uint256 shares) public view returns (uint256) { uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. return supply == 0 ? shares*1000 : shares.mulDivUp(totalAssets(), supply); } function previewWithdraw(uint256 assets) public view returns (uint256) { uint256 supply = totalSupply; // Saves an extra SLOAD if totalSupply is non-zero. return supply == 0 ? assets*1000 : assets.mulDivUp(supply, totalAssets()); } function previewRedeem(uint256 shares) public view returns (uint256) { return convertToAssets(shares); } /*////////////////////////////////////////////////////////////// DEPOSIT/WITHDRAWAL LIMIT LOGIC //////////////////////////////////////////////////////////////*/ function maxDeposit(address) public view returns (uint256) { return type(uint256).max; } function maxMint(address) public view returns (uint256) { return type(uint256).max; } function maxWithdraw(address owner) public view returns (uint256) { return convertToAssets(balanceOf[owner]); } function maxRedeem(address owner) public view returns (uint256) { return balanceOf[owner]; } /*////////////////////////////////////////////////////////////// INTERNAL HOOKS LOGIC //////////////////////////////////////////////////////////////*/ function beforeWithdraw(uint256 assets, uint256 shares) internal {} function afterDeposit(uint256 assets, uint256 shares) internal {} function before() internal { if(lastTotalAssets < totalAssets()){ uint256 _delta = totalAssets() - lastTotalAssets; Iciab(ciab).mint(_delta); asset.transfer(team,_delta); } } function afterMath() internal { lastTotalAssets = totalAssets(); } } interface Iciab { function deposit(uint256 amount) external; function withdraw(uint256 amount) external; function mint(uint256 amount) external; function repay(uint256 amount) external; function Owing(address _depositor) external view returns(uint256 _allocation); function deposited(address _depositor) external pure returns(uint256 _deposit); function debt(address _depositor) external pure returns(uint256 _debt); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; import {ERC20} from "./ERC20.sol"; /// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/SafeTransferLib.sol) /// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer. /// @dev Note that none of the functions in this library check that a token has code at all! That responsibility is delegated to the caller. library SafeTransferLib { /*////////////////////////////////////////////////////////////// ETH OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferETH(address to, uint256 amount) internal { bool success; assembly { // Transfer the ETH and store if it succeeded or not. success := call(gas(), to, amount, 0, 0, 0, 0) } require(success, "ETH_TRANSFER_FAILED"); } /*////////////////////////////////////////////////////////////// ERC20 OPERATIONS //////////////////////////////////////////////////////////////*/ function safeTransferFrom( ERC20 token, address from, address to, uint256 amount ) internal { bool success; assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), from) // Append the "from" argument. mstore(add(freeMemoryPointer, 36), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 68), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 100 because the length of our calldata totals up like so: 4 + 32 * 3. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 100, 0, 32) ) } require(success, "TRANSFER_FROM_FAILED"); } function safeTransfer( ERC20 token, address to, uint256 amount ) internal { bool success; assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "TRANSFER_FAILED"); } function safeApprove( ERC20 token, address to, uint256 amount ) internal { bool success; assembly { // Get a pointer to some free memory. let freeMemoryPointer := mload(0x40) // Write the abi-encoded calldata into memory, beginning with the function selector. mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) mstore(add(freeMemoryPointer, 4), to) // Append the "to" argument. mstore(add(freeMemoryPointer, 36), amount) // Append the "amount" argument. success := and( // Set success to whether the call reverted, if not we check it either // returned exactly 1 (can't just be non-zero data), or had no return data. or(and(eq(mload(0), 1), gt(returndatasize(), 31)), iszero(returndatasize())), // We use 68 because the length of our calldata totals up like so: 4 + 32 * 2. // We use 0 and 32 to copy up to 32 bytes of return data into the scratch space. // Counterintuitively, this call must be positioned second to the or() call in the // surrounding and() call or else returndatasize() will be zero during the computation. call(gas(), token, 0, freeMemoryPointer, 68, 0, 32) ) } require(success, "APPROVE_FAILED"); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Arithmetic library with operations for fixed-point numbers. /// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/FixedPointMathLib.sol) /// @author Inspired by USM (https://github.com/usmfum/USM/blob/master/contracts/WadMath.sol) library FixedPointMathLib { /*////////////////////////////////////////////////////////////// SIMPLIFIED FIXED POINT OPERATIONS //////////////////////////////////////////////////////////////*/ uint256 internal constant WAD = 1e18; // The scalar of ETH and most ERC20s. function mulWadDown(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivDown(x, y, WAD); // Equivalent to (x * y) / WAD rounded down. } function mulWadUp(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivUp(x, y, WAD); // Equivalent to (x * y) / WAD rounded up. } function divWadDown(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivDown(x, WAD, y); // Equivalent to (x * WAD) / y rounded down. } function divWadUp(uint256 x, uint256 y) internal pure returns (uint256) { return mulDivUp(x, WAD, y); // Equivalent to (x * WAD) / y rounded up. } /*////////////////////////////////////////////////////////////// LOW LEVEL FIXED POINT OPERATIONS //////////////////////////////////////////////////////////////*/ function mulDivDown( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 z) { assembly { // Store x * y in z for now. z := mul(x, y) // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y)) if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) { revert(0, 0) } // Divide z by the denominator. z := div(z, denominator) } } function mulDivUp( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 z) { assembly { // Store x * y in z for now. z := mul(x, y) // Equivalent to require(denominator != 0 && (x == 0 || (x * y) / x == y)) if iszero(and(iszero(iszero(denominator)), or(iszero(x), eq(div(z, x), y)))) { revert(0, 0) } // First, divide z - 1 by the denominator and add 1. // We allow z - 1 to underflow if z is 0, because we multiply the // end result by 0 if z is zero, ensuring we return 0 if z is zero. z := mul(iszero(iszero(z)), add(div(sub(z, 1), denominator), 1)) } } function rpow( uint256 x, uint256 n, uint256 scalar ) internal pure returns (uint256 z) { assembly { switch x case 0 { switch n case 0 { // 0 ** 0 = 1 z := scalar } default { // 0 ** n = 0 z := 0 } } default { switch mod(n, 2) case 0 { // If n is even, store scalar in z for now. z := scalar } default { // If n is odd, store x in z for now. z := x } // Shifting right by 1 is like dividing by 2. let half := shr(1, scalar) for { // Shift n right by 1 before looping to halve it. n := shr(1, n) } n { // Shift n right by 1 each iteration to halve it. n := shr(1, n) } { // Revert immediately if x ** 2 would overflow. // Equivalent to iszero(eq(div(xx, x), x)) here. if shr(128, x) { revert(0, 0) } // Store x squared. let xx := mul(x, x) // Round to the nearest number. let xxRound := add(xx, half) // Revert if xx + half overflowed. if lt(xxRound, xx) { revert(0, 0) } // Set x to scaled xxRound. x := div(xxRound, scalar) // If n is even: if mod(n, 2) { // Compute z * x. let zx := mul(z, x) // If z * x overflowed: if iszero(eq(div(zx, x), z)) { // Revert if x is non-zero. if iszero(iszero(x)) { revert(0, 0) } } // Round to the nearest number. let zxRound := add(zx, half) // Revert if zx + half overflowed. if lt(zxRound, zx) { revert(0, 0) } // Return properly scaled zxRound. z := div(zxRound, scalar) } } } } } /*////////////////////////////////////////////////////////////// GENERAL NUMBER UTILITIES //////////////////////////////////////////////////////////////*/ function sqrt(uint256 x) internal pure returns (uint256 z) { assembly { // Start off with z at 1. z := 1 // Used below to help find a nearby power of 2. let y := x // Find the lowest power of 2 that is at least sqrt(x). if iszero(lt(y, 0x100000000000000000000000000000000)) { y := shr(128, y) // Like dividing by 2 ** 128. z := shl(64, z) // Like multiplying by 2 ** 64. } if iszero(lt(y, 0x10000000000000000)) { y := shr(64, y) // Like dividing by 2 ** 64. z := shl(32, z) // Like multiplying by 2 ** 32. } if iszero(lt(y, 0x100000000)) { y := shr(32, y) // Like dividing by 2 ** 32. z := shl(16, z) // Like multiplying by 2 ** 16. } if iszero(lt(y, 0x10000)) { y := shr(16, y) // Like dividing by 2 ** 16. z := shl(8, z) // Like multiplying by 2 ** 8. } if iszero(lt(y, 0x100)) { y := shr(8, y) // Like dividing by 2 ** 8. z := shl(4, z) // Like multiplying by 2 ** 4. } if iszero(lt(y, 0x10)) { y := shr(4, y) // Like dividing by 2 ** 4. z := shl(2, z) // Like multiplying by 2 ** 2. } if iszero(lt(y, 0x8)) { // Equivalent to 2 ** z. z := shl(1, z) } // Shifting right by 1 is like dividing by 2. z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) z := shr(1, add(z, div(x, z))) // Compute a rounded down version of z. let zRoundDown := div(x, z) // If zRoundDown is smaller, use it. if lt(zRoundDown, z) { z := zRoundDown } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(account), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
[{"inputs":[{"internalType":"contract ERC20","name":"_asset","type":"address"},{"internalType":"contract ERC20","name":"_lst","type":"address"},{"internalType":"address","name":"_ciab","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"ratio","type":"uint256"}],"name":"changeLTV","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ciab","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"convert","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"convertToAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"convertToShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"depositCheapeth","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"helper","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastTotalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lst","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ltvOnDeposits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","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":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_team","type":"address"}],"name":"setTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_threshold","type":"uint256"}],"name":"setThreshold","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"team","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"threshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101206040523480156200001257600080fd5b5060405162003471380380620034718339810160408190526200003591620003f3565b8181866001600160a01b031663313ce5676040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000076573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200009c91906200049e565b6000620000aa848262000559565b506001620000b9838262000559565b5060ff81166080524660a052620000cf6200017a565b60c0525050506001600160a01b0380861660e05284811661010052600780549185166001600160a01b03199283161790556050600a556008805490911673b52f8b5e8684dbd2b2a4956305f3abd936c516211790556200014660008051602062003451833981519152620001403390565b62000216565b62000161600080516020620034518339815191528062000226565b5050686c6b935b8bbd400000600c5550620006a3915050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051620001ae919062000625565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b62000222828262000271565b5050565b600082815260066020526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff16620002225760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002d13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6001600160a01b03811681146200032b57600080fd5b50565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200035657600080fd5b81516001600160401b03808211156200037357620003736200032e565b604051601f8301601f19908116603f011681019082821181831017156200039e576200039e6200032e565b81604052838152602092508683858801011115620003bb57600080fd5b600091505b83821015620003df5785820183015181830184015290820190620003c0565b600093810190920192909252949350505050565b600080600080600060a086880312156200040c57600080fd5b8551620004198162000315565b60208701519095506200042c8162000315565b60408701519094506200043f8162000315565b60608701519093506001600160401b03808211156200045d57600080fd5b6200046b89838a0162000344565b935060808801519150808211156200048257600080fd5b50620004918882890162000344565b9150509295509295909350565b600060208284031215620004b157600080fd5b815160ff81168114620004c357600080fd5b9392505050565b600181811c90821680620004df57607f821691505b6020821081036200050057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200055457600081815260208120601f850160051c810160208610156200052f5750805b601f850160051c820191505b8181101562000550578281556001016200053b565b5050505b505050565b81516001600160401b038111156200057557620005756200032e565b6200058d81620005868454620004ca565b8462000506565b602080601f831160018114620005c55760008415620005ac5750858301515b600019600386901b1c1916600185901b17855562000550565b600085815260208120601f198616915b82811015620005f657888601518255948401946001909101908401620005d5565b5085821015620006155787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008083546200063581620004ca565b60018281168015620006505760018114620006665762000697565b60ff198416875282151583028701945062000697565b8760005260208060002060005b858110156200068e5781548a82015290840190820162000673565b50505082870194505b50929695505050505050565b60805160a05160c05160e05161010051612d156200073c600039600081816104310152818161127b015281816112bb015261135a01526000818161056801528181610b010152818161116e015281816114c501528181611727015281816117b8015281816118a301528181611a0701528181611c8f015261235c01526000610f5801526000610f23015260006104ed0152612d156000f3fe6080604052600436106103085760003560e01c80636e553f651161019a578063b3d7f6b9116100e1578063d1c0e0871161008a578063d905777e11610064578063d905777e146108f5578063dd62ed3e1461092b578063ef8b30f71461096357600080fd5b8063d1c0e08714610895578063d505accf146108b5578063d547741f146108d557600080fd5b8063c63d75b6116100bb578063c63d75b61461058a578063c6e6f59214610855578063ce96cb771461087557600080fd5b8063b3d7f6b9146107f5578063b460af9414610815578063ba0876521461083557600080fd5b806391d1485411610143578063a217fddf1161011d578063a217fddf146107a0578063a3908e1b146107b5578063a9059cbb146107d557600080fd5b806391d148541461072557806395d89b411461076b578063960bfe041461078057600080fd5b80637ecebe00116101745780637ecebe00146106b857806385f2aef2146106e55780638721fc271461070557600080fd5b80636e553f651461063757806370a082311461065757806375b238fc1461068457600080fd5b80632f2ff15d1161025e57806342cde4e811610207578063568efc07116101e1578063568efc07146105f557806363b0e66a1461060b57806366d95b871461062157600080fd5b806342cde4e8146105ac5780634cdad506146105c257806354a4b107146105e257600080fd5b806336568abe1161023857806336568abe1461053657806338d52e0f14610556578063402d267d1461058a57600080fd5b80632f2ff15d146104bb578063313ce567146104db5780633644e5151461052157600080fd5b8063095ea7b3116102c057806318e8cb961161029a57806318e8cb961461041f57806323b872dd1461046b578063248a9ca31461048b57600080fd5b8063095ea7b3146103c95780630a28a477146103e957806318160ddd1461040957600080fd5b806306fdde03116102f157806306fdde031461036557806307a2d13a14610387578063095cf5c6146103a757600080fd5b806301e1d1141461030d57806301ffc9a714610335575b600080fd5b34801561031957600080fd5b50610322610983565b6040519081526020015b60405180910390f35b34801561034157600080fd5b5061035561035036600461285c565b610bc2565b604051901515815260200161032c565b34801561037157600080fd5b5061037a610c2b565b60405161032c91906128aa565b34801561039357600080fd5b506103226103a23660046128dd565b610cb9565b3480156103b357600080fd5b506103c76103c2366004612912565b610cf0565b005b3480156103d557600080fd5b506103556103e436600461292d565b610d77565b3480156103f557600080fd5b506103226104043660046128dd565b610de3565b34801561041557600080fd5b5061032260025481565b34801561042b57600080fd5b506104537f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161032c565b34801561047757600080fd5b50610355610486366004612957565b610e03565b34801561049757600080fd5b506103226104a63660046128dd565b60009081526006602052604090206001015490565b3480156104c757600080fd5b506103c76104d6366004612993565b610ef5565b3480156104e757600080fd5b5061050f7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff909116815260200161032c565b34801561052d57600080fd5b50610322610f1f565b34801561054257600080fd5b506103c7610551366004612993565b610f7a565b34801561056257600080fd5b506104537f000000000000000000000000000000000000000000000000000000000000000081565b34801561059657600080fd5b506103226105a5366004612912565b5060001990565b3480156105b857600080fd5b50610322600c5481565b3480156105ce57600080fd5b506103226105dd3660046128dd565b611006565b6103226105f0366004612912565b611011565b34801561060157600080fd5b5061032260095481565b34801561061757600080fd5b50610322600b5481565b34801561062d57600080fd5b50610322600a5481565b34801561064357600080fd5b50610322610652366004612993565b61112d565b34801561066357600080fd5b50610322610672366004612912565b60036020526000908152604090205481565b34801561069057600080fd5b506103227fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b3480156106c457600080fd5b506103226106d3366004612912565b60056020526000908152604090205481565b3480156106f157600080fd5b50600854610453906001600160a01b031681565b34801561071157600080fd5b50600754610453906001600160a01b031681565b34801561073157600080fd5b50610355610740366004612993565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561077757600080fd5b5061037a61120c565b34801561078c57600080fd5b506103c761079b3660046128dd565b611219565b3480156107ac57600080fd5b50610322600081565b3480156107c157600080fd5b506103c76107d03660046128dd565b611266565b3480156107e157600080fd5b506103556107f036600461292d565b6115a1565b34801561080157600080fd5b506103226108103660046128dd565b611619565b34801561082157600080fd5b506103226108303660046129bf565b611638565b34801561084157600080fd5b506103226108503660046129bf565b6118d2565b34801561086157600080fd5b506103226108703660046128dd565b611a2e565b34801561088157600080fd5b50610322610890366004612912565b611a4e565b3480156108a157600080fd5b506103c76108b03660046128dd565b611a70565b3480156108c157600080fd5b506103c76108d03660046129fb565b611df7565b3480156108e157600080fd5b506103c76108f0366004612993565b612065565b34801561090157600080fd5b50610322610910366004612912565b6001600160a01b031660009081526003602052604090205490565b34801561093757600080fd5b50610322610946366004612a6e565b600460209081526000928352604080842090915290825290205481565b34801561096f57600080fd5b5061032261097e3660046128dd565b61208a565b60075460405163cb13cddb60e01b815230600482015260009182916001600160a01b039091169063cb13cddb90602401602060405180830381865afa1580156109d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f49190612a98565b6007546040516326db15bb60e21b81523060048201529192506000916001600160a01b0390911690639b6c56ec90602401602060405180830381865afa158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a669190612a98565b600754604051637d0fd2c760e11b81523060048201529192506000916001600160a01b039091169063fa1fa58e90602401602060405180830381865afa158015610ab4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad89190612a98565b6040516370a0823160e01b81523060048201529091506000908390839086906001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906370a0823190602401602060405180830381865afa158015610b48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6c9190612a98565b600a600b5447610b7c9190612ac7565b610b87906009612ada565b610b919190612af1565b610b9b9190612b13565b610ba59190612b13565b610baf9190612b13565b610bb99190612ac7565b95945050505050565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610c2557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60008054610c3890612b26565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6490612b26565b8015610cb15780601f10610c8657610100808354040283529160200191610cb1565b820191906000526020600020905b815481529060010190602001808311610c9457829003601f168201915b505050505081565b6002546000908015610cdd57610cd8610cd0610983565b849083612095565b610ce9565b610ce9836103e8612ada565b9392505050565b6008546001600160a01b03163314610d3d5760405162461bcd60e51b815260206004820152600b60248201526a592055204e4f205445414d60a81b60448201526064015b60405180910390fd5b600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610dd29086815260200190565b60405180910390a350600192915050565b6002546000908015610cdd57610cd881610dfb610983565b8591906120b4565b6001600160a01b03831660009081526004602090815260408083203384529091528120546000198114610e5f57610e3a8382612ac7565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b03851660009081526003602052604081208054859290610e87908490612ac7565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610ee29087815260200190565b60405180910390a3506001949350505050565b600082815260066020526040902060010154610f10816120e2565b610f1a83836120ef565b505050565b60007f00000000000000000000000000000000000000000000000000000000000000004614610f5557610f50612191565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b6001600160a01b0381163314610ff85760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610d34565b611002828261222b565b5050565b6000610c2582610cb9565b600067016345785d8a000034101561106b5760405162461bcd60e51b815260206004820152600d60248201527f756e646572206d696e696d756d000000000000000000000000000000000000006044820152606401610d34565b6000600a61107a346009612ada565b6110849190612af1565b34600b5590506110926122ae565b61109b81611a2e565b9150600c546110a8610983565b11156110ca576103e86110bd836103e3612ada565b6110c79190612af1565b91505b6110d483836123cf565b6000600b5560408051828152602081018490526001600160a01b0385169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a361112761243b565b50919050565b60007fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42611159816120e2565b6111616122ae565b6111966001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333087612448565b600a6111a185611a2e565b6111ab9190612af1565b91506111b783836123cf565b60408051858152602081018490526001600160a01b0385169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a361120561243b565b5092915050565b60018054610c3890612b26565b6008546001600160a01b031633146112615760405162461bcd60e51b815260206004820152600b60248201526a592055204e4f205445414d60a81b6044820152606401610d34565b600c55565b61126e6122ae565b6112a36001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016333084612448565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561130a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132e9190612a98565b60075460405163095ea7b360e01b81526001600160a01b039182166004820152602481018390529192507f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303816000875af11580156113a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c79190612b5a565b506007546040517fb6b55f25000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b15801561142757600080fd5b505af115801561143b573d6000803e3d6000fd5b5050505060006064600a54836114519190612ada565b61145b9190612af1565b60075460405163140e25ad60e31b8152600481018390529192506001600160a01b03169063a0712d6890602401600060405180830381600087803b1580156114a257600080fd5b505af11580156114b6573d6000803e3d6000fd5b50506008546001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116935063a9059cbb9250166114fb600a86612af1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156a9190612b5a565b50604051339084156108fc029085906000818181858888f19350505050158015611598573d6000803e3d6000fd5b50610f1a61243b565b336000908152600360205260408120805483919083906115c2908490612ac7565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610dd29086815260200190565b6002546000908015610cdd57610cd8611630610983565b8490836120b4565b60006116426122ae565b61164b84610de3565b9050336001600160a01b038316146116bb576001600160a01b038216600090815260046020908152604080832033845290915290205460001981146116b9576116948282612ac7565b6001600160a01b03841660009081526004602090815260408083203384529091529020555b505b6116c582826124f4565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46040516370a0823160e01b815230600482015284907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179a9190612a98565b1015611896576040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015611807573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182b9190612a98565b6118359086612ac7565b60075460405163140e25ad60e31b8152600481018390529192506001600160a01b03169063a0712d6890602401600060405180830381600087803b15801561187c57600080fd5b505af1158015611890573d6000803e3d6000fd5b50505050505b6118ca6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168486612568565b610ce961243b565b60006118dc6122ae565b336001600160a01b0383161461194a576001600160a01b03821660009081526004602090815260408083203384529091529020546000198114611948576119238582612ac7565b6001600160a01b03841660009081526004602090815260408083203384529091529020555b505b61195384611006565b9050806000036119a55760405162461bcd60e51b815260206004820152600b60248201527f5a45524f5f4153534554530000000000000000000000000000000000000000006044820152606401610d34565b6119af82856124f4565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46118ca6001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000168483612568565b6002546000908015610cdd57610cd881611a46610983565b859190612095565b6001600160a01b038116600090815260036020526040812054610c2590610cb9565b611a786122ae565b6008546001600160a01b03163314611ad25760405162461bcd60e51b815260206004820152600860248201527f6e6f74207465616d0000000000000000000000000000000000000000000000006044820152606401610d34565b600a81905560075460405163cb13cddb60e01b81523060048201526000916001600160a01b03169063cb13cddb90602401602060405180830381865afa158015611b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b449190612a98565b6007546040516326db15bb60e21b81523060048201529192506000916001600160a01b0390911690639b6c56ec90602401602060405180830381865afa158015611b92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb69190612a98565b600754604051637d0fd2c760e11b81523060048201529192506000916001600160a01b039091169063fa1fa58e90602401602060405180830381865afa158015611c04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c289190612a98565b90506000606485611c398487612b13565b611c439190612ada565b611c4d9190612af1565b9050600083821015611d7557611c638285612ac7565b60075460405163095ea7b360e01b81526001600160a01b039182166004820152602481018390529192507f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303816000875af1158015611cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cfc9190612b5a565b506007546040517f371fd8e6000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169063371fd8e690602401600060405180830381600087803b158015611d5c57600080fd5b505af1158015611d70573d6000803e3d6000fd5b505050505b83821115611de757611d878483612ac7565b60075460405163140e25ad60e31b8152600481018390529192506001600160a01b03169063a0712d6890602401600060405180830381600087803b158015611dce57600080fd5b505af1158015611de2573d6000803e3d6000fd5b505050505b611def61243b565b505050505050565b42841015611e475760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152606401610d34565b60006001611e53610f1f565b6001600160a01b038a811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f19010000000000000000000000000000000000000000000000000000000000006101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015611f7a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611fb05750876001600160a01b0316816001600160a01b0316145b611ffc5760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152606401610d34565b6001600160a01b0390811660009081526004602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b600082815260066020526040902060010154612080816120e2565b610f1a838361222b565b6000610c2582611a2e565b8282028115158415858304851417166120ad57600080fd5b0492915050565b8282028115158415858304851417166120cc57600080fd5b6001826001830304018115150290509392505050565b6120ec81336125f4565b50565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff166110025760008281526006602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561214d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60006040516121c39190612b7c565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff16156110025760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6122b6610983565b60095410156123cd5760006009546122cc610983565b6122d69190612ac7565b60075460405163140e25ad60e31b8152600481018390529192506001600160a01b03169063a0712d6890602401600060405180830381600087803b15801561231d57600080fd5b505af1158015612331573d6000803e3d6000fd5b505060085460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018590527f0000000000000000000000000000000000000000000000000000000000000000909116925063a9059cbb91506044016020604051808303816000875af11580156123a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110029190612b5a565b565b80600260008282546123e19190612b13565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91015b60405180910390a35050565b612443610983565b600955565b60006040517f23b872dd0000000000000000000000000000000000000000000000000000000081528460048201528360248201528260448201526020600060648360008a5af13d15601f3d11600160005114161716915050806124ed5760405162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c45440000000000000000000000006044820152606401610d34565b5050505050565b6001600160a01b0382166000908152600360205260408120805483929061251c908490612ac7565b90915550506002805482900390556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161242f565b600060405163a9059cbb60e01b8152836004820152826024820152602060006044836000895af13d15601f3d11600160005114161716915050806125ee5760405162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152606401610d34565b50505050565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff166110025761262781612669565b61263283602061267b565b604051602001612643929190612c1b565b60408051601f198184030181529082905262461bcd60e51b8252610d34916004016128aa565b6060610c256001600160a01b03831660145b6060600061268a836002612ada565b612695906002612b13565b67ffffffffffffffff8111156126ad576126ad612c9c565b6040519080825280601f01601f1916602001820160405280156126d7576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061270e5761270e612cb2565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061275957612759612cb2565b60200101906001600160f81b031916908160001a905350600061277d846002612ada565b612788906001612b13565b90505b600181111561280d577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106127c9576127c9612cb2565b1a60f81b8282815181106127df576127df612cb2565b60200101906001600160f81b031916908160001a90535060049490941c9361280681612cc8565b905061278b565b508315610ce95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d34565b60006020828403121561286e57600080fd5b81356001600160e01b031981168114610ce957600080fd5b60005b838110156128a1578181015183820152602001612889565b50506000910152565b60208152600082518060208401526128c9816040850160208701612886565b601f01601f19169190910160400192915050565b6000602082840312156128ef57600080fd5b5035919050565b80356001600160a01b038116811461290d57600080fd5b919050565b60006020828403121561292457600080fd5b610ce9826128f6565b6000806040838503121561294057600080fd5b612949836128f6565b946020939093013593505050565b60008060006060848603121561296c57600080fd5b612975846128f6565b9250612983602085016128f6565b9150604084013590509250925092565b600080604083850312156129a657600080fd5b823591506129b6602084016128f6565b90509250929050565b6000806000606084860312156129d457600080fd5b833592506129e4602085016128f6565b91506129f2604085016128f6565b90509250925092565b600080600080600080600060e0888a031215612a1657600080fd5b612a1f886128f6565b9650612a2d602089016128f6565b95506040880135945060608801359350608088013560ff81168114612a5157600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612a8157600080fd5b612a8a836128f6565b91506129b6602084016128f6565b600060208284031215612aaa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610c2557610c25612ab1565b8082028115828204841417610c2557610c25612ab1565b600082612b0e57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610c2557610c25612ab1565b600181811c90821680612b3a57607f821691505b60208210810361112757634e487b7160e01b600052602260045260246000fd5b600060208284031215612b6c57600080fd5b81518015158114610ce957600080fd5b600080835481600182811c915080831680612b9857607f831692505b60208084108203612bb757634e487b7160e01b86526022600452602486fd5b818015612bcb5760018114612be057612c0d565b60ff1986168952841515850289019650612c0d565b60008a81526020902060005b86811015612c055781548b820152908501908301612bec565b505084890196505b509498975050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612c53816017850160208801612886565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612c90816028840160208801612886565b01602801949350505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081612cd757612cd7612ab1565b50600019019056fea2646970667358221220f17d7726c88080c1556d2a7441cee81216cc5798e6b5b1e594d14c3571f58d1d64736f6c63430008110033df8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec420000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b73000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe840000000000000000000000006ffd098e92b606b2947b89a08911c00ca06890fa00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000b4465466920476172616765000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4445464947415241474500000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103085760003560e01c80636e553f651161019a578063b3d7f6b9116100e1578063d1c0e0871161008a578063d905777e11610064578063d905777e146108f5578063dd62ed3e1461092b578063ef8b30f71461096357600080fd5b8063d1c0e08714610895578063d505accf146108b5578063d547741f146108d557600080fd5b8063c63d75b6116100bb578063c63d75b61461058a578063c6e6f59214610855578063ce96cb771461087557600080fd5b8063b3d7f6b9146107f5578063b460af9414610815578063ba0876521461083557600080fd5b806391d1485411610143578063a217fddf1161011d578063a217fddf146107a0578063a3908e1b146107b5578063a9059cbb146107d557600080fd5b806391d148541461072557806395d89b411461076b578063960bfe041461078057600080fd5b80637ecebe00116101745780637ecebe00146106b857806385f2aef2146106e55780638721fc271461070557600080fd5b80636e553f651461063757806370a082311461065757806375b238fc1461068457600080fd5b80632f2ff15d1161025e57806342cde4e811610207578063568efc07116101e1578063568efc07146105f557806363b0e66a1461060b57806366d95b871461062157600080fd5b806342cde4e8146105ac5780634cdad506146105c257806354a4b107146105e257600080fd5b806336568abe1161023857806336568abe1461053657806338d52e0f14610556578063402d267d1461058a57600080fd5b80632f2ff15d146104bb578063313ce567146104db5780633644e5151461052157600080fd5b8063095ea7b3116102c057806318e8cb961161029a57806318e8cb961461041f57806323b872dd1461046b578063248a9ca31461048b57600080fd5b8063095ea7b3146103c95780630a28a477146103e957806318160ddd1461040957600080fd5b806306fdde03116102f157806306fdde031461036557806307a2d13a14610387578063095cf5c6146103a757600080fd5b806301e1d1141461030d57806301ffc9a714610335575b600080fd5b34801561031957600080fd5b50610322610983565b6040519081526020015b60405180910390f35b34801561034157600080fd5b5061035561035036600461285c565b610bc2565b604051901515815260200161032c565b34801561037157600080fd5b5061037a610c2b565b60405161032c91906128aa565b34801561039357600080fd5b506103226103a23660046128dd565b610cb9565b3480156103b357600080fd5b506103c76103c2366004612912565b610cf0565b005b3480156103d557600080fd5b506103556103e436600461292d565b610d77565b3480156103f557600080fd5b506103226104043660046128dd565b610de3565b34801561041557600080fd5b5061032260025481565b34801561042b57600080fd5b506104537f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe8481565b6040516001600160a01b03909116815260200161032c565b34801561047757600080fd5b50610355610486366004612957565b610e03565b34801561049757600080fd5b506103226104a63660046128dd565b60009081526006602052604090206001015490565b3480156104c757600080fd5b506103c76104d6366004612993565b610ef5565b3480156104e757600080fd5b5061050f7f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff909116815260200161032c565b34801561052d57600080fd5b50610322610f1f565b34801561054257600080fd5b506103c7610551366004612993565b610f7a565b34801561056257600080fd5b506104537f0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b7381565b34801561059657600080fd5b506103226105a5366004612912565b5060001990565b3480156105b857600080fd5b50610322600c5481565b3480156105ce57600080fd5b506103226105dd3660046128dd565b611006565b6103226105f0366004612912565b611011565b34801561060157600080fd5b5061032260095481565b34801561061757600080fd5b50610322600b5481565b34801561062d57600080fd5b50610322600a5481565b34801561064357600080fd5b50610322610652366004612993565b61112d565b34801561066357600080fd5b50610322610672366004612912565b60036020526000908152604090205481565b34801561069057600080fd5b506103227fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4281565b3480156106c457600080fd5b506103226106d3366004612912565b60056020526000908152604090205481565b3480156106f157600080fd5b50600854610453906001600160a01b031681565b34801561071157600080fd5b50600754610453906001600160a01b031681565b34801561073157600080fd5b50610355610740366004612993565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b34801561077757600080fd5b5061037a61120c565b34801561078c57600080fd5b506103c761079b3660046128dd565b611219565b3480156107ac57600080fd5b50610322600081565b3480156107c157600080fd5b506103c76107d03660046128dd565b611266565b3480156107e157600080fd5b506103556107f036600461292d565b6115a1565b34801561080157600080fd5b506103226108103660046128dd565b611619565b34801561082157600080fd5b506103226108303660046129bf565b611638565b34801561084157600080fd5b506103226108503660046129bf565b6118d2565b34801561086157600080fd5b506103226108703660046128dd565b611a2e565b34801561088157600080fd5b50610322610890366004612912565b611a4e565b3480156108a157600080fd5b506103c76108b03660046128dd565b611a70565b3480156108c157600080fd5b506103c76108d03660046129fb565b611df7565b3480156108e157600080fd5b506103c76108f0366004612993565b612065565b34801561090157600080fd5b50610322610910366004612912565b6001600160a01b031660009081526003602052604090205490565b34801561093757600080fd5b50610322610946366004612a6e565b600460209081526000928352604080842090915290825290205481565b34801561096f57600080fd5b5061032261097e3660046128dd565b61208a565b60075460405163cb13cddb60e01b815230600482015260009182916001600160a01b039091169063cb13cddb90602401602060405180830381865afa1580156109d0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109f49190612a98565b6007546040516326db15bb60e21b81523060048201529192506000916001600160a01b0390911690639b6c56ec90602401602060405180830381865afa158015610a42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a669190612a98565b600754604051637d0fd2c760e11b81523060048201529192506000916001600160a01b039091169063fa1fa58e90602401602060405180830381865afa158015610ab4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ad89190612a98565b6040516370a0823160e01b81523060048201529091506000908390839086906001600160a01b037f0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b7316906370a0823190602401602060405180830381865afa158015610b48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6c9190612a98565b600a600b5447610b7c9190612ac7565b610b87906009612ada565b610b919190612af1565b610b9b9190612b13565b610ba59190612b13565b610baf9190612b13565b610bb99190612ac7565b95945050505050565b60006001600160e01b031982167f7965db0b000000000000000000000000000000000000000000000000000000001480610c2557507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60008054610c3890612b26565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6490612b26565b8015610cb15780601f10610c8657610100808354040283529160200191610cb1565b820191906000526020600020905b815481529060010190602001808311610c9457829003601f168201915b505050505081565b6002546000908015610cdd57610cd8610cd0610983565b849083612095565b610ce9565b610ce9836103e8612ada565b9392505050565b6008546001600160a01b03163314610d3d5760405162461bcd60e51b815260206004820152600b60248201526a592055204e4f205445414d60a81b60448201526064015b60405180910390fd5b600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610dd29086815260200190565b60405180910390a350600192915050565b6002546000908015610cdd57610cd881610dfb610983565b8591906120b4565b6001600160a01b03831660009081526004602090815260408083203384529091528120546000198114610e5f57610e3a8382612ac7565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b03851660009081526003602052604081208054859290610e87908490612ac7565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610ee29087815260200190565b60405180910390a3506001949350505050565b600082815260066020526040902060010154610f10816120e2565b610f1a83836120ef565b505050565b60007f00000000000000000000000000000000000000000000000000000000000000014614610f5557610f50612191565b905090565b507fa2a0718d3b73916e37528c2847f39739925c3ecd41a8cea876a0789559144a6f90565b6001600160a01b0381163314610ff85760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152608401610d34565b611002828261222b565b5050565b6000610c2582610cb9565b600067016345785d8a000034101561106b5760405162461bcd60e51b815260206004820152600d60248201527f756e646572206d696e696d756d000000000000000000000000000000000000006044820152606401610d34565b6000600a61107a346009612ada565b6110849190612af1565b34600b5590506110926122ae565b61109b81611a2e565b9150600c546110a8610983565b11156110ca576103e86110bd836103e3612ada565b6110c79190612af1565b91505b6110d483836123cf565b6000600b5560408051828152602081018490526001600160a01b0385169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a361112761243b565b50919050565b60007fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42611159816120e2565b6111616122ae565b6111966001600160a01b037f0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b7316333087612448565b600a6111a185611a2e565b6111ab9190612af1565b91506111b783836123cf565b60408051858152602081018490526001600160a01b0385169133917fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d7910160405180910390a361120561243b565b5092915050565b60018054610c3890612b26565b6008546001600160a01b031633146112615760405162461bcd60e51b815260206004820152600b60248201526a592055204e4f205445414d60a81b6044820152606401610d34565b600c55565b61126e6122ae565b6112a36001600160a01b037f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe8416333084612448565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe846001600160a01b0316906370a0823190602401602060405180830381865afa15801561130a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132e9190612a98565b60075460405163095ea7b360e01b81526001600160a01b039182166004820152602481018390529192507f000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84169063095ea7b3906044016020604051808303816000875af11580156113a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c79190612b5a565b506007546040517fb6b55f25000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169063b6b55f2590602401600060405180830381600087803b15801561142757600080fd5b505af115801561143b573d6000803e3d6000fd5b5050505060006064600a54836114519190612ada565b61145b9190612af1565b60075460405163140e25ad60e31b8152600481018390529192506001600160a01b03169063a0712d6890602401600060405180830381600087803b1580156114a257600080fd5b505af11580156114b6573d6000803e3d6000fd5b50506008546001600160a01b037f0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b738116935063a9059cbb9250166114fb600a86612af1565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015611546573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061156a9190612b5a565b50604051339084156108fc029085906000818181858888f19350505050158015611598573d6000803e3d6000fd5b50610f1a61243b565b336000908152600360205260408120805483919083906115c2908490612ac7565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610dd29086815260200190565b6002546000908015610cdd57610cd8611630610983565b8490836120b4565b60006116426122ae565b61164b84610de3565b9050336001600160a01b038316146116bb576001600160a01b038216600090815260046020908152604080832033845290915290205460001981146116b9576116948282612ac7565b6001600160a01b03841660009081526004602090815260408083203384529091529020555b505b6116c582826124f4565b60408051858152602081018390526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46040516370a0823160e01b815230600482015284907f0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b736001600160a01b0316906370a0823190602401602060405180830381865afa158015611776573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061179a9190612a98565b1015611896576040516370a0823160e01b81523060048201526000907f0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b736001600160a01b0316906370a0823190602401602060405180830381865afa158015611807573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061182b9190612a98565b6118359086612ac7565b60075460405163140e25ad60e31b8152600481018390529192506001600160a01b03169063a0712d6890602401600060405180830381600087803b15801561187c57600080fd5b505af1158015611890573d6000803e3d6000fd5b50505050505b6118ca6001600160a01b037f0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b73168486612568565b610ce961243b565b60006118dc6122ae565b336001600160a01b0383161461194a576001600160a01b03821660009081526004602090815260408083203384529091529020546000198114611948576119238582612ac7565b6001600160a01b03841660009081526004602090815260408083203384529091529020555b505b61195384611006565b9050806000036119a55760405162461bcd60e51b815260206004820152600b60248201527f5a45524f5f4153534554530000000000000000000000000000000000000000006044820152606401610d34565b6119af82856124f4565b60408051828152602081018690526001600160a01b03808516929086169133917ffbde797d201c681b91056529119e0b02407c7bb96a4a2c75c01fc9667232c8db910160405180910390a46118ca6001600160a01b037f0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b73168483612568565b6002546000908015610cdd57610cd881611a46610983565b859190612095565b6001600160a01b038116600090815260036020526040812054610c2590610cb9565b611a786122ae565b6008546001600160a01b03163314611ad25760405162461bcd60e51b815260206004820152600860248201527f6e6f74207465616d0000000000000000000000000000000000000000000000006044820152606401610d34565b600a81905560075460405163cb13cddb60e01b81523060048201526000916001600160a01b03169063cb13cddb90602401602060405180830381865afa158015611b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b449190612a98565b6007546040516326db15bb60e21b81523060048201529192506000916001600160a01b0390911690639b6c56ec90602401602060405180830381865afa158015611b92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb69190612a98565b600754604051637d0fd2c760e11b81523060048201529192506000916001600160a01b039091169063fa1fa58e90602401602060405180830381865afa158015611c04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c289190612a98565b90506000606485611c398487612b13565b611c439190612ada565b611c4d9190612af1565b9050600083821015611d7557611c638285612ac7565b60075460405163095ea7b360e01b81526001600160a01b039182166004820152602481018390529192507f0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b73169063095ea7b3906044016020604051808303816000875af1158015611cd8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cfc9190612b5a565b506007546040517f371fd8e6000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b039091169063371fd8e690602401600060405180830381600087803b158015611d5c57600080fd5b505af1158015611d70573d6000803e3d6000fd5b505050505b83821115611de757611d878483612ac7565b60075460405163140e25ad60e31b8152600481018390529192506001600160a01b03169063a0712d6890602401600060405180830381600087803b158015611dce57600080fd5b505af1158015611de2573d6000803e3d6000fd5b505050505b611def61243b565b505050505050565b42841015611e475760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f455850495245440000000000000000006044820152606401610d34565b60006001611e53610f1f565b6001600160a01b038a811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e0830190915280519201919091207f19010000000000000000000000000000000000000000000000000000000000006101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015611f7a573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811615801590611fb05750876001600160a01b0316816001600160a01b0316145b611ffc5760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152606401610d34565b6001600160a01b0390811660009081526004602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b600082815260066020526040902060010154612080816120e2565b610f1a838361222b565b6000610c2582611a2e565b8282028115158415858304851417166120ad57600080fd5b0492915050565b8282028115158415858304851417166120cc57600080fd5b6001826001830304018115150290509392505050565b6120ec81336125f4565b50565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff166110025760008281526006602090815260408083206001600160a01b03851684529091529020805460ff1916600117905561214d3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60006040516121c39190612b7c565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff16156110025760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6122b6610983565b60095410156123cd5760006009546122cc610983565b6122d69190612ac7565b60075460405163140e25ad60e31b8152600481018390529192506001600160a01b03169063a0712d6890602401600060405180830381600087803b15801561231d57600080fd5b505af1158015612331573d6000803e3d6000fd5b505060085460405163a9059cbb60e01b81526001600160a01b039182166004820152602481018590527f0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b73909116925063a9059cbb91506044016020604051808303816000875af11580156123a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110029190612b5a565b565b80600260008282546123e19190612b13565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91015b60405180910390a35050565b612443610983565b600955565b60006040517f23b872dd0000000000000000000000000000000000000000000000000000000081528460048201528360248201528260448201526020600060648360008a5af13d15601f3d11600160005114161716915050806124ed5760405162461bcd60e51b815260206004820152601460248201527f5452414e534645525f46524f4d5f4641494c45440000000000000000000000006044820152606401610d34565b5050505050565b6001600160a01b0382166000908152600360205260408120805483929061251c908490612ac7565b90915550506002805482900390556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200161242f565b600060405163a9059cbb60e01b8152836004820152826024820152602060006044836000895af13d15601f3d11600160005114161716915050806125ee5760405162461bcd60e51b815260206004820152600f60248201527f5452414e534645525f4641494c454400000000000000000000000000000000006044820152606401610d34565b50505050565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff166110025761262781612669565b61263283602061267b565b604051602001612643929190612c1b565b60408051601f198184030181529082905262461bcd60e51b8252610d34916004016128aa565b6060610c256001600160a01b03831660145b6060600061268a836002612ada565b612695906002612b13565b67ffffffffffffffff8111156126ad576126ad612c9c565b6040519080825280601f01601f1916602001820160405280156126d7576020820181803683370190505b5090507f30000000000000000000000000000000000000000000000000000000000000008160008151811061270e5761270e612cb2565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061275957612759612cb2565b60200101906001600160f81b031916908160001a905350600061277d846002612ada565b612788906001612b13565b90505b600181111561280d577f303132333435363738396162636465660000000000000000000000000000000085600f16601081106127c9576127c9612cb2565b1a60f81b8282815181106127df576127df612cb2565b60200101906001600160f81b031916908160001a90535060049490941c9361280681612cc8565b905061278b565b508315610ce95760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610d34565b60006020828403121561286e57600080fd5b81356001600160e01b031981168114610ce957600080fd5b60005b838110156128a1578181015183820152602001612889565b50506000910152565b60208152600082518060208401526128c9816040850160208701612886565b601f01601f19169190910160400192915050565b6000602082840312156128ef57600080fd5b5035919050565b80356001600160a01b038116811461290d57600080fd5b919050565b60006020828403121561292457600080fd5b610ce9826128f6565b6000806040838503121561294057600080fd5b612949836128f6565b946020939093013593505050565b60008060006060848603121561296c57600080fd5b612975846128f6565b9250612983602085016128f6565b9150604084013590509250925092565b600080604083850312156129a657600080fd5b823591506129b6602084016128f6565b90509250929050565b6000806000606084860312156129d457600080fd5b833592506129e4602085016128f6565b91506129f2604085016128f6565b90509250925092565b600080600080600080600060e0888a031215612a1657600080fd5b612a1f886128f6565b9650612a2d602089016128f6565b95506040880135945060608801359350608088013560ff81168114612a5157600080fd5b9699959850939692959460a0840135945060c09093013592915050565b60008060408385031215612a8157600080fd5b612a8a836128f6565b91506129b6602084016128f6565b600060208284031215612aaa57600080fd5b5051919050565b634e487b7160e01b600052601160045260246000fd5b81810381811115610c2557610c25612ab1565b8082028115828204841417610c2557610c25612ab1565b600082612b0e57634e487b7160e01b600052601260045260246000fd5b500490565b80820180821115610c2557610c25612ab1565b600181811c90821680612b3a57607f821691505b60208210810361112757634e487b7160e01b600052602260045260246000fd5b600060208284031215612b6c57600080fd5b81518015158114610ce957600080fd5b600080835481600182811c915080831680612b9857607f831692505b60208084108203612bb757634e487b7160e01b86526022600452602486fd5b818015612bcb5760018114612be057612c0d565b60ff1986168952841515850289019650612c0d565b60008a81526020902060005b86811015612c055781548b820152908501908301612bec565b505084890196505b509498975050505050505050565b7f416363657373436f6e74726f6c3a206163636f756e7420000000000000000000815260008351612c53816017850160208801612886565b7f206973206d697373696e6720726f6c65200000000000000000000000000000006017918401918201528351612c90816028840160208801612886565b01602801949350505050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081612cd757612cd7612ab1565b50600019019056fea2646970667358221220f17d7726c88080c1556d2a7441cee81216cc5798e6b5b1e594d14c3571f58d1d64736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b73000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe840000000000000000000000006ffd098e92b606b2947b89a08911c00ca06890fa00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000b4465466920476172616765000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a4445464947415241474500000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _asset (address): 0x7690202e2C2297bcD03664e31116d1dFfE7e3B73
Arg [1] : _lst (address): 0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84
Arg [2] : _ciab (address): 0x6ffD098E92B606b2947b89A08911C00ca06890FA
Arg [3] : _name (string): DeFi Garage
Arg [4] : _symbol (string): DEFIGARAGE
-----Encoded View---------------
9 Constructor Arguments found :
Arg [0] : 0000000000000000000000007690202e2c2297bcd03664e31116d1dffe7e3b73
Arg [1] : 000000000000000000000000ae7ab96520de3a18e5e111b5eaab095312d7fe84
Arg [2] : 0000000000000000000000006ffd098e92b606b2947b89a08911c00ca06890fa
Arg [3] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [4] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000b
Arg [6] : 4465466920476172616765000000000000000000000000000000000000000000
Arg [7] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [8] : 4445464947415241474500000000000000000000000000000000000000000000
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.
Address QR Code
My Address - Private Name Tag or Note
My Name Tag:
Private Note:
Please DO NOT store any passwords or private keys here.
The compiled contract might be susceptible to VerbatimInvalidDeduplication (low-severity), FullInlinerNonExpressionSplitArgumentEvaluationOrder (low-severity), MissingSideEffectsOnSelectorAccess (low-severity) Solidity Compiler Bugs.
Connect a Wallet
Connect a Wallet
Connect a Wallet
Address Cards
Before You Copy
This website uses cookies to improve your experience. By continuing to use this website, you agree to its Terms and Privacy Policy.