More Info
Private Name Tags
ContractCreator
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
19182783 | 148 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
MorphoBlueWrapper
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 10000 runs
Other Settings:
london EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // Thanks to ultrasecr.eth pragma solidity ^0.8.19; import { IMorphoFlashLoanCallback } from "./interfaces/IMorphoFlashLoanCallback.sol"; import { IMorpho } from "./interfaces/IMorpho.sol"; import { BaseWrapper, IERC7399, ERC20 } from "../BaseWrapper.sol"; /// @dev MorphoBlue Flash Lender that uses MorphoBlue as source of liquidity. contract MorphoBlueWrapper is BaseWrapper, IMorphoFlashLoanCallback { error NotMorpho(); error UnsupportedAsset(address asset); IMorpho public immutable morpho; constructor(IMorpho _morpho) { morpho = _morpho; } /// @inheritdoc IERC7399 function maxFlashLoan(address asset) public view returns (uint256) { return ERC20(asset).balanceOf(address(morpho)); } /// @inheritdoc IERC7399 function flashFee(address asset, uint256 amount) external view returns (uint256) { uint256 max = maxFlashLoan(asset); if (max == 0) revert UnsupportedAsset(asset); return amount >= max ? type(uint256).max : 0; } function onMorphoFlashLoan(uint256 amount, bytes calldata params) external { if (msg.sender != address(morpho)) revert NotMorpho(); (address asset, bytes memory data) = abi.decode(params, (address, bytes)); _bridgeToCallback(asset, amount, 0, data); } function _flashLoan(address asset, uint256 amount, bytes memory data) internal override { morpho.flashLoan(asset, amount, abi.encode(asset, data)); } }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; interface IMorphoFlashLoanCallback { function onMorphoFlashLoan(uint256 assets, bytes calldata data) external; }
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; interface IMorpho { function flashLoan(address token, uint256 assets, bytes memory data) external; }
// SPDX-License-Identifier: MIT // Thanks to ultrasecr.eth pragma solidity ^0.8.19; import "erc7399/IERC7399.sol"; import { TransferHelper, ERC20 } from "./utils/TransferHelper.sol"; import { FunctionCodec } from "./utils/FunctionCodec.sol"; /// @dev All ERC7399 flash loan wrappers have the same general structure. /// - The ERC7399 `flash` function is the entry point for the flash loan. /// - The wrapper calls the underlying lender flash lender on their non-ERC7399 flash lending call to borrow the funds. /// - The lender sends the funds to the wrapper. /// - The wrapper receives the callback from the lender. /// - The wrapper sends the funds to the loan receiver. /// - The wrapper calls the callback supplied by the original borrower. /// - The callback from the original borrower executes. /// - Depending on the lender, the wrapper may have to approve it to pull the repayment. /// - If there is any data to return, it is kept in a storage variable. /// - The wrapper exits the callback. /// - The lender verifies or pulls the repayment. /// - The wrapper returns to the original borrower the stored result of its callback. abstract contract BaseWrapper is IERC7399 { using TransferHelper for address; struct Data { address loanReceiver; address initiator; function(address, address, address, uint256, uint256, bytes memory) external returns (bytes memory) callback; bytes initiatorData; } bytes internal _callbackResult; /// @inheritdoc IERC7399 /// @dev The entry point for the ERC7399 flash loan. Packs data to convert the legacy flash loan into an ERC7399 /// flash loan. Then it calls the legacy flash loan. Once the flash loan is done, checks if there is any return /// data and returns it. function flash( address loanReceiver, address asset, uint256 amount, bytes calldata initiatorData, function(address, address, address, uint256, uint256, bytes memory) external returns (bytes memory) callback ) external returns (bytes memory result) { Data memory data = Data({ loanReceiver: loanReceiver, initiator: msg.sender, callback: callback, initiatorData: initiatorData }); return _flash(asset, amount, data); } /// @dev Alternative entry point for the ERC7399 flash loan, without function pointers. Packs data to convert the /// legacy flash loan into an ERC7399 flash loan. Then it calls the legacy flash loan. Once the flash loan is done, /// checks if there is any return data and returns it. function flash( address loanReceiver, address asset, uint256 amount, bytes calldata initiatorData, address callbackTarget, bytes4 callbackSelector ) external returns (bytes memory result) { Data memory data = Data({ loanReceiver: loanReceiver, initiator: msg.sender, callback: FunctionCodec.decodeFunction(callbackTarget, callbackSelector), initiatorData: initiatorData }); return _flash(asset, amount, data); } function _flash(address asset, uint256 amount, Data memory data) internal virtual returns (bytes memory result) { _flashLoan(asset, amount, abi.encode(data)); result = _callbackResult; // Avoid storage write if not needed if (result.length > 0) { delete _callbackResult; } return result; } /// @dev Call the legacy flashloan function in the child contract. This is where we borrow from Aave, Uniswap, etc. function _flashLoan(address asset, uint256 amount, bytes memory data) internal virtual; /// @dev Handle the common parts of bridging the callback from legacy to ERC7399. Transfer the funds to the loan /// receiver. Call the callback supplied by the original borrower. Approve the repayment if necessary. If there is /// any result, it is kept in a storage variable to be retrieved on `flash` after the legacy flash loan is finished. function _bridgeToCallback(address asset, uint256 amount, uint256 fee, bytes memory params) internal { Data memory data = abi.decode(params, (Data)); _transferAssets(asset, amount, data.loanReceiver); // call the callback and tell the callback receiver to repay the loan to this contract bytes memory result = data.callback(data.initiator, _repayTo(), address(asset), amount, fee, data.initiatorData); _approveRepayment(asset, amount, fee); if (result.length > 0) { // if there's any result, it is kept in a storage variable to be retrieved later in this tx _callbackResult = result; } } /// @dev Transfer the assets to the loan receiver. /// Override it if the provider can send the funds directly function _transferAssets(address asset, uint256 amount, address loanReceiver) internal virtual { asset.safeTransfer(loanReceiver, amount); } /// @dev Approve the repayment of the loan to the provider if needed. /// Override it if the provider can receive the funds directly and you want to avoid the if condition function _approveRepayment(address asset, uint256 amount, uint256 fee) internal virtual { if (_repayTo() == address(this)) { ERC20(asset).approve(msg.sender, amount + fee); } } /// @dev Where should the end client send the funds to repay the loan /// Override it if the provider can receive the funds directly function _repayTo() internal view virtual returns (address) { return address(this); } }
// SPDX-License-Identifier: CC0 pragma solidity >=0.6.4; /// @dev Specification for flash lenders compatible with ERC-7399 interface IERC7399 { /// @dev The amount of currency available to be lent. /// @param asset The loan currency. /// @return The amount of `asset` that can be borrowed. function maxFlashLoan(address asset) external view returns (uint256); /// @dev The fee to be charged for a given loan. /// @param asset The loan currency. /// @param amount The amount of assets lent. /// @return The amount of `asset` to be charged for the loan, on top of the returned principal. function flashFee(address asset, uint256 amount) external view returns (uint256); /// @dev Initiate a flash loan. /// @param loanReceiver The address receiving the flash loan /// @param asset The asset to be loaned /// @param amount The amount to loaned /// @param data The ABI encoded user data /// @param callback The address and signature of the callback function /// @return result ABI encoded result of the callback function flash( address loanReceiver, address asset, uint256 amount, bytes calldata data, /// @dev callback. This is a combination of the callback receiver address, and the signature of callback /// function. It is encoded packed as 20 bytes + 4 bytes. /// @dev the return of the callback function is not encoded in the parameter, but must be `returns (bytes /// memory)` for compliance with the standard. /// @param initiator The address that called this function /// @param paymentReceiver The address that needs to receive the amount plus fee at the end of the callback /// @param asset The asset to be loaned /// @param amount The amount to loaned /// @param fee The fee to be paid /// @param data The ABI encoded data to be passed to the callback /// @return result ABI encoded result of the callback function(address, address, address, uint256, uint256, bytes memory) external returns (bytes memory) callback ) external returns (bytes memory); }
// SPDX-License-Identifier: MIT // Taken from https://github.com/Uniswap/uniswap-lib/blob/master/src/libraries/TransferHelper.sol pragma solidity ^0.8.19; import { ERC20 } from "solmate/tokens/ERC20.sol"; import { RevertMsgExtractor } from "./RevertMsgExtractor.sol"; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false // USDT is a well known token that returns nothing for its transfer, transferFrom, and approve functions // and part of the reason this library exists library TransferHelper { /// @notice Transfers assets from msg.sender to a recipient /// @dev Errors with the underlying revert message if transfer fails /// @param asset The contract address of the asset which will be transferred /// @param to The recipient of the transfer /// @param value The value of the transfer function safeTransfer(address asset, address to, uint256 value) internal { (bool success, bytes memory data) = // solhint-disable-next-line avoid-low-level-calls address(asset).call(abi.encodeWithSelector(ERC20.transfer.selector, to, value)); if (!(success && (data.length == 0 || abi.decode(data, (bool))))) revert(RevertMsgExtractor.getRevertMsg(data)); } }
// SPDX-License-Identifier: MIT // Thanks to ultrasecr.eth pragma solidity ^0.8.19; library FunctionCodec { function encodeParams(address contractAddr, bytes4 selector) internal pure returns (bytes24) { return bytes24(bytes20(contractAddr)) | bytes24(selector) >> 160; } function decodeParams(bytes24 encoded) internal pure returns (address contractAddr, bytes4 selector) { contractAddr = address(bytes20(encoded)); selector = bytes4(encoded << 160); } function encodeFunction( function(address, address, address, uint256, uint256, bytes memory) external returns (bytes memory) f ) internal pure returns (bytes24) { return encodeParams(f.address, f.selector); } function decodeFunction( address contractAddr, bytes4 selector ) internal pure returns (function(address, address, address, uint256, uint256, bytes memory) external returns (bytes memory) f) { uint32 s = uint32(selector); // solhint-disable-next-line no-inline-assembly assembly { f.address := contractAddr f.selector := s } } function decodeFunction(bytes24 encoded) internal pure returns (function(address, address, address, uint256, uint256, bytes memory) external returns (bytes memory) f) { (address contractAddr, bytes4 selector) = decodeParams(encoded); return decodeFunction(contractAddr, selector); } }
// 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: MIT // Taken from // https://github.com/sushiswap/BoringSolidity/blob/441e51c0544cf2451e6116fe00515e71d7c42e2c/src/BoringBatchable.sol pragma solidity ^0.8.19; library RevertMsgExtractor { /// @dev Helper function to extract a useful revert message from a failed call. /// If the returned data is malformed or not correctly abi encoded then this call can fail itself. function getRevertMsg(bytes memory returnData) internal pure returns (string memory) { // If the _res length is less than 68, then the transaction failed silently (without a revert message) if (returnData.length < 68) return "Transaction reverted silently"; // solhint-disable-next-line no-inline-assembly assembly { // Slice the sighash. returnData := add(returnData, 0x04) } return abi.decode(returnData, (string)); // All that remains is the revert string } }
{ "remappings": [ "@prb/test/=lib/prb-test/src/", "forge-std/=lib/forge-std/src/", "erc7399/=lib/erc7399/src/", "solmate/=lib/solmate/src/", "ds-test/=lib/forge-std/lib/ds-test/src/", "erc3156/=lib/erc3156/contracts/", "prb-test/=lib/prb-test/src/", "registry/=lib/registry/" ], "optimizer": { "enabled": true, "runs": 10000 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "none", "appendCBOR": false }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "london", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IMorpho","name":"_morpho","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotMorpho","type":"error"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"UnsupportedAsset","type":"error"},{"inputs":[{"internalType":"address","name":"loanReceiver","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"initiatorData","type":"bytes"},{"internalType":"function (address,address,address,uint256,uint256,bytes) external returns (bytes)","name":"callback","type":"function"}],"name":"flash","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"loanReceiver","type":"address"},{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"initiatorData","type":"bytes"},{"internalType":"address","name":"callbackTarget","type":"address"},{"internalType":"bytes4","name":"callbackSelector","type":"bytes4"}],"name":"flash","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"flashFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"maxFlashLoan","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"morpho","outputs":[{"internalType":"contract IMorpho","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"params","type":"bytes"}],"name":"onMorphoFlashLoan","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b506040516113d83803806113d883398101604081905261002f91610040565b6001600160a01b0316608052610070565b60006020828403121561005257600080fd5b81516001600160a01b038116811461006957600080fd5b9392505050565b60805161133961009f6000396000818160ee01528181610160015281816102c9015261073201526113396000f3fe608060405234801561001057600080fd5b50600436106100725760003560e01c8063af2511c011610050578063af2511c0146100d6578063d8fbc833146100e9578063d9d98ce41461013557600080fd5b806331f570721461007757806340a08f101461008c578063613255ab146100b5575b600080fd5b61008a610085366004610a1d565b610148565b005b61009f61009a366004610ab9565b6101de565b6040516100ac9190610bbf565b60405180910390f35b6100c86100c3366004610bd2565b61028c565b6040519081526020016100ac565b61009f6100e4366004610bef565b610346565b6101107f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ac565b6100c8610143366004610cad565b6103d6565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016146101b7576040517fe51b512300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806101c683850185610d9d565b915091506101d78286600084610474565b5050505050565b6060600060405180608001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff168152602001858563ffffffff169060201b1760401b815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250905061027f888883610574565b9998505050505050505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000081166004830152600091908316906370a0823190602401602060405180830381865afa15801561031c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103409190610e30565b92915050565b6040805160808101825273ffffffffffffffffffffffffffffffffffffffff891681523360208201526060916000919081018560e086901c63ffffffff169060201b1760401b815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250905061027f888883610574565b6000806103e28461028c565b90508060000361043b576040517fee84f40b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024015b60405180910390fd5b8083101561044a57600061046c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b949350505050565b60008180602001905181019061048a9190610e99565b905061049b85858360000151610649565b600081604001518060601c9060401c63ffffffff1683602001516104bc3090565b89898988606001516040518763ffffffff1660e01b81526004016104e596959493929190610f55565b6000604051808303816000875af1158015610504573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261054a9190810190610fae565b905061055786868661066f565b80511561056c57600061056a828261107c565b505b505050505050565b60606105a084848460405160200161058c9190611196565b604051602081830303815290604052610730565b600080546105ad90610fe3565b80601f01602080910402602001604051908101604052809291908181526020018280546105d990610fe3565b80156106265780601f106105fb57610100808354040283529160200191610626565b820191906000526020600020905b81548152906001019060200180831161060957829003601f168201915b505050505090506000815111156106425761064260008061097e565b9392505050565b61066a73ffffffffffffffffffffffffffffffffffffffff841682846107dc565b505050565b73ffffffffffffffffffffffffffffffffffffffff831663095ea7b333610696848661120b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015610706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072a9190611245565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663e0232b4284848685604051602001610781929190611267565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016107ae93929190611296565b600060405180830381600087803b1580156107c857600080fd5b505af115801561056a573d6000803e3d6000fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283929087169161087391906112d4565b6000604051808303816000865af19150503d80600081146108b0576040519150601f19603f3d011682016040523d82523d6000602084013e6108b5565b606091505b50915091508180156108df5750805115806108df5750808060200190518101906108df9190611245565b6101d7576108ec8161091f565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104329190610bbf565b606060448251101561096457505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b6004820191508180602001905181019061034091906112f0565b50805461098a90610fe3565b6000825580601f1061099a575050565b601f0160209004906000526020600020908101906109b891906109bb565b50565b5b808211156109d057600081556001016109bc565b5090565b60008083601f8401126109e657600080fd5b50813567ffffffffffffffff8111156109fe57600080fd5b602083019150836020828501011115610a1657600080fd5b9250929050565b600080600060408486031215610a3257600080fd5b83359250602084013567ffffffffffffffff811115610a5057600080fd5b610a5c868287016109d4565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146109b857600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000811681146109b857600080fd5b600080600080600080600060a0888a031215610ad457600080fd5b8735610adf81610a69565b96506020880135610aef81610a69565b955060408801359450606088013567ffffffffffffffff811115610b1257600080fd5b610b1e8a828b016109d4565b9095509350506080880135610b3281610a8b565b8060601c925063ffffffff8160401c1691505092959891949750929550565b60005b83811015610b6c578181015183820152602001610b54565b50506000910152565b60008151808452610b8d816020860160208601610b51565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106426020830184610b75565b600060208284031215610be457600080fd5b813561064281610a69565b600080600080600080600060c0888a031215610c0a57600080fd5b8735610c1581610a69565b96506020880135610c2581610a69565b955060408801359450606088013567ffffffffffffffff811115610c4857600080fd5b610c548a828b016109d4565b9095509350506080880135610c6881610a69565b915060a08801357fffffffff0000000000000000000000000000000000000000000000000000000081168114610c9d57600080fd5b8091505092959891949750929550565b60008060408385031215610cc057600080fd5b8235610ccb81610a69565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610d4f57610d4f610cd9565b604052919050565b600067ffffffffffffffff821115610d7157610d71610cd9565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008060408385031215610db057600080fd5b8235610dbb81610a69565b9150602083013567ffffffffffffffff811115610dd757600080fd5b8301601f81018513610de857600080fd5b8035610dfb610df682610d57565b610d08565b818152866020838501011115610e1057600080fd5b816020840160208301376000602083830101528093505050509250929050565b600060208284031215610e4257600080fd5b5051919050565b6000610e57610df684610d57565b9050828152838383011115610e6b57600080fd5b610642836020830184610b51565b600082601f830112610e8a57600080fd5b61064283835160208501610e49565b600060208284031215610eab57600080fd5b815167ffffffffffffffff80821115610ec357600080fd5b9083019060808286031215610ed757600080fd5b604051608081018181108382111715610ef257610ef2610cd9565b6040528251610f0081610a69565b81526020830151610f1081610a69565b60208201526040830151610f2381610a8b565b6040820152606083015182811115610f3a57600080fd5b610f4687828601610e79565b60608301525095945050505050565b600073ffffffffffffffffffffffffffffffffffffffff8089168352808816602084015280871660408401525084606083015283608083015260c060a0830152610fa260c0830184610b75565b98975050505050505050565b600060208284031215610fc057600080fd5b815167ffffffffffffffff811115610fd757600080fd5b61046c84828501610e79565b600181811c90821680610ff757607f821691505b602082108103611030577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f82111561066a57600081815260208120601f850160051c8101602086101561105d5750805b601f850160051c820191505b8181101561056c57828155600101611069565b815167ffffffffffffffff81111561109657611096610cd9565b6110aa816110a48454610fe3565b84611036565b602080601f8311600181146110fd57600084156110c75750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561056c565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561114a5788860151825594840194600190910190840161112b565b508582101561118657878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60208152600073ffffffffffffffffffffffffffffffffffffffff808451166020840152806020850151166040840152507fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000006040840151166060830152606083015160808084015261046c60a0840182610b75565b80820180821115610340577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006020828403121561125757600080fd5b8151801515811461064257600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316815260406020820152600061046c6040830184610b75565b73ffffffffffffffffffffffffffffffffffffffff841681528260208201526060604082015260006112cb6060830184610b75565b95945050505050565b600082516112e6818460208701610b51565b9190910192915050565b60006020828403121561130257600080fd5b815167ffffffffffffffff81111561131957600080fd5b8201601f8101841361132a57600080fd5b61046c84825160208401610e4956000000000000000000000000bbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100725760003560e01c8063af2511c011610050578063af2511c0146100d6578063d8fbc833146100e9578063d9d98ce41461013557600080fd5b806331f570721461007757806340a08f101461008c578063613255ab146100b5575b600080fd5b61008a610085366004610a1d565b610148565b005b61009f61009a366004610ab9565b6101de565b6040516100ac9190610bbf565b60405180910390f35b6100c86100c3366004610bd2565b61028c565b6040519081526020016100ac565b61009f6100e4366004610bef565b610346565b6101107f000000000000000000000000bbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb81565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100ac565b6100c8610143366004610cad565b6103d6565b3373ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000bbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb16146101b7576040517fe51b512300000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000806101c683850185610d9d565b915091506101d78286600084610474565b5050505050565b6060600060405180608001604052808a73ffffffffffffffffffffffffffffffffffffffff1681526020013373ffffffffffffffffffffffffffffffffffffffff168152602001858563ffffffff169060201b1760401b815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250905061027f888883610574565b9998505050505050505050565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f000000000000000000000000bbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb81166004830152600091908316906370a0823190602401602060405180830381865afa15801561031c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103409190610e30565b92915050565b6040805160808101825273ffffffffffffffffffffffffffffffffffffffff891681523360208201526060916000919081018560e086901c63ffffffff169060201b1760401b815260200187878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050915250905061027f888883610574565b6000806103e28461028c565b90508060000361043b576040517fee84f40b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024015b60405180910390fd5b8083101561044a57600061046c565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff5b949350505050565b60008180602001905181019061048a9190610e99565b905061049b85858360000151610649565b600081604001518060601c9060401c63ffffffff1683602001516104bc3090565b89898988606001516040518763ffffffff1660e01b81526004016104e596959493929190610f55565b6000604051808303816000875af1158015610504573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261054a9190810190610fae565b905061055786868661066f565b80511561056c57600061056a828261107c565b505b505050505050565b60606105a084848460405160200161058c9190611196565b604051602081830303815290604052610730565b600080546105ad90610fe3565b80601f01602080910402602001604051908101604052809291908181526020018280546105d990610fe3565b80156106265780601f106105fb57610100808354040283529160200191610626565b820191906000526020600020905b81548152906001019060200180831161060957829003601f168201915b505050505090506000815111156106425761064260008061097e565b9392505050565b61066a73ffffffffffffffffffffffffffffffffffffffff841682846107dc565b505050565b73ffffffffffffffffffffffffffffffffffffffff831663095ea7b333610696848661120b565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff909216600483015260248201526044016020604051808303816000875af1158015610706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072a9190611245565b50505050565b7f000000000000000000000000bbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb73ffffffffffffffffffffffffffffffffffffffff1663e0232b4284848685604051602001610781929190611267565b6040516020818303038152906040526040518463ffffffff1660e01b81526004016107ae93929190611296565b600060405180830381600087803b1580156107c857600080fd5b505af115801561056a573d6000803e3d6000fd5b6040805173ffffffffffffffffffffffffffffffffffffffff8481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052915160009283929087169161087391906112d4565b6000604051808303816000865af19150503d80600081146108b0576040519150601f19603f3d011682016040523d82523d6000602084013e6108b5565b606091505b50915091508180156108df5750805115806108df5750808060200190518101906108df9190611245565b6101d7576108ec8161091f565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104329190610bbf565b606060448251101561096457505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b6004820191508180602001905181019061034091906112f0565b50805461098a90610fe3565b6000825580601f1061099a575050565b601f0160209004906000526020600020908101906109b891906109bb565b50565b5b808211156109d057600081556001016109bc565b5090565b60008083601f8401126109e657600080fd5b50813567ffffffffffffffff8111156109fe57600080fd5b602083019150836020828501011115610a1657600080fd5b9250929050565b600080600060408486031215610a3257600080fd5b83359250602084013567ffffffffffffffff811115610a5057600080fd5b610a5c868287016109d4565b9497909650939450505050565b73ffffffffffffffffffffffffffffffffffffffff811681146109b857600080fd5b7fffffffffffffffffffffffffffffffffffffffffffffffff0000000000000000811681146109b857600080fd5b600080600080600080600060a0888a031215610ad457600080fd5b8735610adf81610a69565b96506020880135610aef81610a69565b955060408801359450606088013567ffffffffffffffff811115610b1257600080fd5b610b1e8a828b016109d4565b9095509350506080880135610b3281610a8b565b8060601c925063ffffffff8160401c1691505092959891949750929550565b60005b83811015610b6c578181015183820152602001610b54565b50506000910152565b60008151808452610b8d816020860160208601610b51565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006106426020830184610b75565b600060208284031215610be457600080fd5b813561064281610a69565b600080600080600080600060c0888a031215610c0a57600080fd5b8735610c1581610a69565b96506020880135610c2581610a69565b955060408801359450606088013567ffffffffffffffff811115610c4857600080fd5b610c548a828b016109d4565b9095509350506080880135610c6881610a69565b915060a08801357fffffffff0000000000000000000000000000000000000000000000000000000081168114610c9d57600080fd5b8091505092959891949750929550565b60008060408385031215610cc057600080fd5b8235610ccb81610a69565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715610d4f57610d4f610cd9565b604052919050565b600067ffffffffffffffff821115610d7157610d71610cd9565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60008060408385031215610db057600080fd5b8235610dbb81610a69565b9150602083013567ffffffffffffffff811115610dd757600080fd5b8301601f81018513610de857600080fd5b8035610dfb610df682610d57565b610d08565b818152866020838501011115610e1057600080fd5b816020840160208301376000602083830101528093505050509250929050565b600060208284031215610e4257600080fd5b5051919050565b6000610e57610df684610d57565b9050828152838383011115610e6b57600080fd5b610642836020830184610b51565b600082601f830112610e8a57600080fd5b61064283835160208501610e49565b600060208284031215610eab57600080fd5b815167ffffffffffffffff80821115610ec357600080fd5b9083019060808286031215610ed757600080fd5b604051608081018181108382111715610ef257610ef2610cd9565b6040528251610f0081610a69565b81526020830151610f1081610a69565b60208201526040830151610f2381610a8b565b6040820152606083015182811115610f3a57600080fd5b610f4687828601610e79565b60608301525095945050505050565b600073ffffffffffffffffffffffffffffffffffffffff8089168352808816602084015280871660408401525084606083015283608083015260c060a0830152610fa260c0830184610b75565b98975050505050505050565b600060208284031215610fc057600080fd5b815167ffffffffffffffff811115610fd757600080fd5b61046c84828501610e79565b600181811c90821680610ff757607f821691505b602082108103611030577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b601f82111561066a57600081815260208120601f850160051c8101602086101561105d5750805b601f850160051c820191505b8181101561056c57828155600101611069565b815167ffffffffffffffff81111561109657611096610cd9565b6110aa816110a48454610fe3565b84611036565b602080601f8311600181146110fd57600084156110c75750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b17855561056c565b6000858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b8281101561114a5788860151825594840194600190910190840161112b565b508582101561118657878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b60208152600073ffffffffffffffffffffffffffffffffffffffff808451166020840152806020850151166040840152507fffffffffffffffffffffffffffffffffffffffffffffffff00000000000000006040840151166060830152606083015160808084015261046c60a0840182610b75565b80820180821115610340577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006020828403121561125757600080fd5b8151801515811461064257600080fd5b73ffffffffffffffffffffffffffffffffffffffff8316815260406020820152600061046c6040830184610b75565b73ffffffffffffffffffffffffffffffffffffffff841681528260208201526060604082015260006112cb6060830184610b75565b95945050505050565b600082516112e6818460208701610b51565b9190910192915050565b60006020828403121561130257600080fd5b815167ffffffffffffffff81111561131957600080fd5b8201601f8101841361132a57600080fd5b61046c84825160208401610e4956
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000bbbbbbbbbb9cc5e90e3b3af64bdaf62c37eeffcb
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.