Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
XSushiSwapperFlat
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-06-16 */ /** *Submitted for verification at Etherscan.io on 2021-06-14 */ // SPDX-License-Identifier: MIXED // File @boringcrypto/boring-solidity/contracts/libraries/[email protected] // License-Identifier: MIT pragma solidity 0.6.12; /// @notice A library for performing overflow-/underflow-safe math, /// updated with awesomeness from of DappHub (https://github.com/dapphub/ds-math). library BoringMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { require((c = a + b) >= b, "BoringMath: Add Overflow"); } function sub(uint256 a, uint256 b) internal pure returns (uint256 c) { require((c = a - b) <= a, "BoringMath: Underflow"); } function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b == 0 || (c = a * b) / b == a, "BoringMath: Mul Overflow"); } function to128(uint256 a) internal pure returns (uint128 c) { require(a <= uint128(-1), "BoringMath: uint128 Overflow"); c = uint128(a); } function to64(uint256 a) internal pure returns (uint64 c) { require(a <= uint64(-1), "BoringMath: uint64 Overflow"); c = uint64(a); } function to32(uint256 a) internal pure returns (uint32 c) { require(a <= uint32(-1), "BoringMath: uint32 Overflow"); c = uint32(a); } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint128. library BoringMath128 { function add(uint128 a, uint128 b) internal pure returns (uint128 c) { require((c = a + b) >= b, "BoringMath: Add Overflow"); } function sub(uint128 a, uint128 b) internal pure returns (uint128 c) { require((c = a - b) <= a, "BoringMath: Underflow"); } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint64. library BoringMath64 { function add(uint64 a, uint64 b) internal pure returns (uint64 c) { require((c = a + b) >= b, "BoringMath: Add Overflow"); } function sub(uint64 a, uint64 b) internal pure returns (uint64 c) { require((c = a - b) <= a, "BoringMath: Underflow"); } } /// @notice A library for performing overflow-/underflow-safe addition and subtraction on uint32. library BoringMath32 { function add(uint32 a, uint32 b) internal pure returns (uint32 c) { require((c = a + b) >= b, "BoringMath: Add Overflow"); } function sub(uint32 a, uint32 b) internal pure returns (uint32 c) { require((c = a - b) <= a, "BoringMath: Underflow"); } } // File @sushiswap/core/contracts/uniswapv2/interfaces/[email protected] // License-Identifier: GPL-3.0 pragma solidity >=0.5.0; interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function migrator() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; function setMigrator(address) external; } // File @sushiswap/core/contracts/uniswapv2/interfaces/[email protected] // License-Identifier: GPL-3.0 pragma solidity >=0.5.0; interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } // File @boringcrypto/boring-solidity/contracts/interfaces/[email protected] // License-Identifier: MIT pragma solidity 0.6.12; interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); /// @notice EIP 2612 function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; } // File contracts/interfaces/ISwapper.sol // License-Identifier: MIT pragma solidity 0.6.12; interface ISwapper { /// @notice Withdraws 'amountFrom' of token 'from' from the BentoBox account for this swapper. /// Swaps it for at least 'amountToMin' of token 'to'. /// Transfers the swapped tokens of 'to' into the BentoBox using a plain ERC20 transfer. /// Returns the amount of tokens 'to' transferred to BentoBox. /// (The BentoBox skim function will be used by the caller to get the swapped funds). function swap( IERC20 fromToken, IERC20 toToken, address recipient, uint256 shareToMin, uint256 shareFrom ) external returns (uint256 extraShare, uint256 shareReturned); /// @notice Calculates the amount of token 'from' needed to complete the swap (amountFrom), /// this should be less than or equal to amountFromMax. /// Withdraws 'amountFrom' of token 'from' from the BentoBox account for this swapper. /// Swaps it for exactly 'exactAmountTo' of token 'to'. /// Transfers the swapped tokens of 'to' into the BentoBox using a plain ERC20 transfer. /// Transfers allocated, but unused 'from' tokens within the BentoBox to 'refundTo' (amountFromMax - amountFrom). /// Returns the amount of 'from' tokens withdrawn from BentoBox (amountFrom). /// (The BentoBox skim function will be used by the caller to get the swapped funds). function swapExact( IERC20 fromToken, IERC20 toToken, address recipient, address refundTo, uint256 shareFromSupplied, uint256 shareToExact ) external returns (uint256 shareUsed, uint256 shareReturned); } // File @boringcrypto/boring-solidity/contracts/libraries/[email protected] // License-Identifier: MIT pragma solidity 0.6.12; struct Rebase { uint128 elastic; uint128 base; } /// @notice A rebasing library using overflow-/underflow-safe math. library RebaseLibrary { using BoringMath for uint256; using BoringMath128 for uint128; /// @notice Calculates the base value in relationship to `elastic` and `total`. function toBase( Rebase memory total, uint256 elastic, bool roundUp ) internal pure returns (uint256 base) { if (total.elastic == 0) { base = elastic; } else { base = elastic.mul(total.base) / total.elastic; if (roundUp && base.mul(total.elastic) / total.base < elastic) { base = base.add(1); } } } /// @notice Calculates the elastic value in relationship to `base` and `total`. function toElastic( Rebase memory total, uint256 base, bool roundUp ) internal pure returns (uint256 elastic) { if (total.base == 0) { elastic = base; } else { elastic = base.mul(total.elastic) / total.base; if (roundUp && elastic.mul(total.base) / total.elastic < base) { elastic = elastic.add(1); } } } /// @notice Add `elastic` to `total` and doubles `total.base`. /// @return (Rebase) The new total. /// @return base in relationship to `elastic`. function add( Rebase memory total, uint256 elastic, bool roundUp ) internal pure returns (Rebase memory, uint256 base) { base = toBase(total, elastic, roundUp); total.elastic = total.elastic.add(elastic.to128()); total.base = total.base.add(base.to128()); return (total, base); } /// @notice Sub `base` from `total` and update `total.elastic`. /// @return (Rebase) The new total. /// @return elastic in relationship to `base`. function sub( Rebase memory total, uint256 base, bool roundUp ) internal pure returns (Rebase memory, uint256 elastic) { elastic = toElastic(total, base, roundUp); total.elastic = total.elastic.sub(elastic.to128()); total.base = total.base.sub(base.to128()); return (total, elastic); } /// @notice Add `elastic` and `base` to `total`. function add( Rebase memory total, uint256 elastic, uint256 base ) internal pure returns (Rebase memory) { total.elastic = total.elastic.add(elastic.to128()); total.base = total.base.add(base.to128()); return total; } /// @notice Subtract `elastic` and `base` to `total`. function sub( Rebase memory total, uint256 elastic, uint256 base ) internal pure returns (Rebase memory) { total.elastic = total.elastic.sub(elastic.to128()); total.base = total.base.sub(base.to128()); return total; } /// @notice Add `elastic` to `total` and update storage. /// @return newElastic Returns updated `elastic`. function addElastic(Rebase storage total, uint256 elastic) internal returns (uint256 newElastic) { newElastic = total.elastic = total.elastic.add(elastic.to128()); } /// @notice Subtract `elastic` from `total` and update storage. /// @return newElastic Returns updated `elastic`. function subElastic(Rebase storage total, uint256 elastic) internal returns (uint256 newElastic) { newElastic = total.elastic = total.elastic.sub(elastic.to128()); } } // File @sushiswap/bentobox-sdk/contracts/[email protected] // License-Identifier: MIT pragma solidity 0.6.12; interface IBatchFlashBorrower { function onBatchFlashLoan( address sender, IERC20[] calldata tokens, uint256[] calldata amounts, uint256[] calldata fees, bytes calldata data ) external; } // File @sushiswap/bentobox-sdk/contracts/[email protected] // License-Identifier: MIT pragma solidity 0.6.12; interface IFlashBorrower { function onFlashLoan( address sender, IERC20 token, uint256 amount, uint256 fee, bytes calldata data ) external; } // File @sushiswap/bentobox-sdk/contracts/[email protected] // License-Identifier: MIT pragma solidity 0.6.12; interface IStrategy { // Send the assets to the Strategy and call skim to invest them function skim(uint256 amount) external; // Harvest any profits made converted to the asset and pass them to the caller function harvest(uint256 balance, address sender) external returns (int256 amountAdded); // Withdraw assets. The returned amount can differ from the requested amount due to rounding. // The actualAmount should be very close to the amount. The difference should NOT be used to report a loss. That's what harvest is for. function withdraw(uint256 amount) external returns (uint256 actualAmount); // Withdraw all assets in the safest way possible. This shouldn't fail. function exit(uint256 balance) external returns (int256 amountAdded); } // File @sushiswap/bentobox-sdk/contracts/[email protected] // License-Identifier: MIT pragma solidity 0.6.12; pragma experimental ABIEncoderV2; interface IBentoBoxV1 { event LogDeploy(address indexed masterContract, bytes data, address indexed cloneAddress); event LogDeposit(address indexed token, address indexed from, address indexed to, uint256 amount, uint256 share); event LogFlashLoan(address indexed borrower, address indexed token, uint256 amount, uint256 feeAmount, address indexed receiver); event LogRegisterProtocol(address indexed protocol); event LogSetMasterContractApproval(address indexed masterContract, address indexed user, bool approved); event LogStrategyDivest(address indexed token, uint256 amount); event LogStrategyInvest(address indexed token, uint256 amount); event LogStrategyLoss(address indexed token, uint256 amount); event LogStrategyProfit(address indexed token, uint256 amount); event LogStrategyQueued(address indexed token, address indexed strategy); event LogStrategySet(address indexed token, address indexed strategy); event LogStrategyTargetPercentage(address indexed token, uint256 targetPercentage); event LogTransfer(address indexed token, address indexed from, address indexed to, uint256 share); event LogWhiteListMasterContract(address indexed masterContract, bool approved); event LogWithdraw(address indexed token, address indexed from, address indexed to, uint256 amount, uint256 share); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function balanceOf(IERC20, address) external view returns (uint256); function batch(bytes[] calldata calls, bool revertOnFail) external payable returns (bool[] memory successes, bytes[] memory results); function batchFlashLoan(IBatchFlashBorrower borrower, address[] calldata receivers, IERC20[] calldata tokens, uint256[] calldata amounts, bytes calldata data) external; function claimOwnership() external; function deploy(address masterContract, bytes calldata data, bool useCreate2) external payable; function deposit(IERC20 token_, address from, address to, uint256 amount, uint256 share) external payable returns (uint256 amountOut, uint256 shareOut); function flashLoan(IFlashBorrower borrower, address receiver, IERC20 token, uint256 amount, bytes calldata data) external; function harvest(IERC20 token, bool balance, uint256 maxChangeAmount) external; function masterContractApproved(address, address) external view returns (bool); function masterContractOf(address) external view returns (address); function nonces(address) external view returns (uint256); function owner() external view returns (address); function pendingOwner() external view returns (address); function pendingStrategy(IERC20) external view returns (IStrategy); function permitToken(IERC20 token, address from, address to, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s) external; function registerProtocol() external; function setMasterContractApproval(address user, address masterContract, bool approved, uint8 v, bytes32 r, bytes32 s) external; function setStrategy(IERC20 token, IStrategy newStrategy) external; function setStrategyTargetPercentage(IERC20 token, uint64 targetPercentage_) external; function strategy(IERC20) external view returns (IStrategy); function strategyData(IERC20) external view returns (uint64 strategyStartDate, uint64 targetPercentage, uint128 balance); function toAmount(IERC20 token, uint256 share, bool roundUp) external view returns (uint256 amount); function toShare(IERC20 token, uint256 amount, bool roundUp) external view returns (uint256 share); function totals(IERC20) external view returns (Rebase memory totals_); function transfer(IERC20 token, address from, address to, uint256 share) external; function transferMultiple(IERC20 token, address from, address[] calldata tos, uint256[] calldata shares) external; function transferOwnership(address newOwner, bool direct, bool renounce) external; function whitelistMasterContract(address masterContract, bool approved) external; function whitelistedMasterContracts(address) external view returns (bool); function withdraw(IERC20 token_, address from, address to, uint256 amount, uint256 share) external returns (uint256 amountOut, uint256 shareOut); } // File contracts/swappers/YVXSushiSwapper.sol // License-Identifier: MIT pragma solidity 0.6.12; interface CurvePool { function exchange_underlying(int128 i, int128 j, uint256 dx, uint256 min_dy, address receiver) external returns (uint256); } interface SushiBar { function leave(uint256 share) external; } interface Sushi is IERC20 { function transfer(address _to, uint256 _value) external returns (bool success); } interface TetherToken { function approve(address _spender, uint256 _value) external; } contract XSushiSwapperFlat is ISwapper { using BoringMath for uint256; // Local variables IBentoBoxV1 public immutable bentoBox; CurvePool public constant MIM3POOL = CurvePool(0x5a6A4D54456819380173272A5E8E9B9904BdF41B); TetherToken public constant TETHER = TetherToken(0xdAC17F958D2ee523a2206206994597C13D831ec7); SushiBar public constant xSushi = SushiBar(0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272); Sushi public constant SUSHI = Sushi(0x6B3595068778DD592e39A122f4f5a5cF09C90fE2); IUniswapV2Pair constant SUSHI_WETH = IUniswapV2Pair(0x795065dCc9f64b5614C407a6EFDC400DA6221FB0); IUniswapV2Pair constant pair = IUniswapV2Pair(0x06da0fd433C1A5d7a4faa01111c044910A184553); constructor( IBentoBoxV1 bentoBox_ ) public { bentoBox = bentoBox_; TETHER.approve(address(MIM3POOL), type(uint256).max); } // Given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset function getAmountOut( uint256 amountIn, uint256 reserveIn, uint256 reserveOut ) internal pure returns (uint256 amountOut) { uint256 amountInWithFee = amountIn.mul(997); uint256 numerator = amountInWithFee.mul(reserveOut); uint256 denominator = reserveIn.mul(1000).add(amountInWithFee); amountOut = numerator / denominator; } // Given an output amount of an asset and pair reserves, returns a required input amount of the other asset function getAmountIn( uint256 amountOut, uint256 reserveIn, uint256 reserveOut ) internal pure returns (uint256 amountIn) { uint256 numerator = reserveIn.mul(amountOut).mul(1000); uint256 denominator = reserveOut.sub(amountOut).mul(997); amountIn = (numerator / denominator).add(1); } // Swaps to a flexible amount, from an exact input amount /// @inheritdoc ISwapper function swap( IERC20 fromToken, IERC20 toToken, address recipient, uint256 shareToMin, uint256 shareFrom ) public override returns (uint256 extraShare, uint256 shareReturned) { { (uint256 amountXSushiFrom, ) = bentoBox.withdraw(fromToken, address(this), address(this), 0, shareFrom); xSushi.leave(amountXSushiFrom); } uint256 amountFirst; { uint256 amountFrom = SUSHI.balanceOf(address(this)); SUSHI.transfer(address(SUSHI_WETH), amountFrom); (uint256 reserve0, uint256 reserve1, ) = SUSHI_WETH.getReserves(); amountFirst = getAmountOut(amountFrom, reserve0, reserve1); } SUSHI_WETH.swap(0, amountFirst, address(pair), new bytes(0)); (uint256 reserve0, uint256 reserve1, ) = pair.getReserves(); uint256 amountIntermediate = getAmountOut(amountFirst, reserve0, reserve1); pair.swap(0, amountIntermediate, address(this), new bytes(0)); uint256 amountTo = MIM3POOL.exchange_underlying(3, 0, amountIntermediate, 0, address(bentoBox)); (, shareReturned) = bentoBox.deposit(toToken, address(bentoBox), recipient, amountTo, 0); extraShare = shareReturned.sub(shareToMin); } // Swaps to an exact amount, from a flexible input amount /// @inheritdoc ISwapper function swapExact( IERC20 fromToken, IERC20 toToken, address recipient, address refundTo, uint256 shareFromSupplied, uint256 shareToExact ) public override returns (uint256 shareUsed, uint256 shareReturned) { return (0,0); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IBentoBoxV1","name":"bentoBox_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"MIM3POOL","outputs":[{"internalType":"contract CurvePool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SUSHI","outputs":[{"internalType":"contract Sushi","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TETHER","outputs":[{"internalType":"contract TetherToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bentoBox","outputs":[{"internalType":"contract IBentoBoxV1","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"fromToken","type":"address"},{"internalType":"contract IERC20","name":"toToken","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"shareToMin","type":"uint256"},{"internalType":"uint256","name":"shareFrom","type":"uint256"}],"name":"swap","outputs":[{"internalType":"uint256","name":"extraShare","type":"uint256"},{"internalType":"uint256","name":"shareReturned","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"fromToken","type":"address"},{"internalType":"contract IERC20","name":"toToken","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"refundTo","type":"address"},{"internalType":"uint256","name":"shareFromSupplied","type":"uint256"},{"internalType":"uint256","name":"shareToExact","type":"uint256"}],"name":"swapExact","outputs":[{"internalType":"uint256","name":"shareUsed","type":"uint256"},{"internalType":"uint256","name":"shareReturned","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"xSushi","outputs":[{"internalType":"contract SushiBar","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b50604051610d90380380610d9083398101604081905261002f916100c8565b6001600160601b0319606082901b1660805260405163095ea7b360e01b815273dac17f958d2ee523a2206206994597c13d831ec79063095ea7b39061009090735a6a4d54456819380173272a5e8e9b9904bdf41b90600019906004016100f6565b600060405180830381600087803b1580156100aa57600080fd5b505af11580156100be573d6000803e3d6000fd5b505050505061010f565b6000602082840312156100d9578081fd5b81516001600160a01b03811681146100ef578182fd5b9392505050565b6001600160a01b03929092168252602082015260400190565b60805160601c610c506101406000398061011c528061018d528061067352806106f152806107215250610c506000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c806378e7e3d11161005b57806378e7e3d1146100c9578063ab560e10146100d1578063d2984608146100d9578063e343fe12146100e15761007d565b806322a88c09146100825780634622be90146100a05780636b2ace87146100c1575b600080fd5b61008a6100f4565b6040516100979190610a2b565b60405180910390f35b6100b36100ae3660046108d5565b61010c565b604051610097929190610bdf565b61008a61011a565b61008a61013e565b61008a610156565b61008a61016e565b6100b36100ef366004610942565b610186565b735a6a4d54456819380173272a5e8e9b9904bdf41b81565b600080965096945050505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b73dac17f958d2ee523a2206206994597c13d831ec781565b736b3595068778dd592e39a122f4f5a5cf09c90fe281565b738798249c2e607446efb7ad49ec89dd1865ff427281565b60008060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166397da6d308930306000896040518663ffffffff1660e01b81526004016101e0959493929190610a58565b6040805180830381600087803b1580156101f957600080fd5b505af115801561020d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102319190610a08565b506040516367dfd4c960e01b8152909150738798249c2e607446efb7ad49ec89dd1865ff4272906367dfd4c99061026c908490600401610bd6565b600060405180830381600087803b15801561028657600080fd5b505af115801561029a573d6000803e3d6000fd5b50506040516370a0823160e01b815260009350839250736b3595068778dd592e39a122f4f5a5cf09c90fe291506370a08231906102db903090600401610a2b565b60206040518083038186803b1580156102f357600080fd5b505afa158015610307573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032b91906109f0565b60405163a9059cbb60e01b8152909150736b3595068778dd592e39a122f4f5a5cf09c90fe29063a9059cbb9061037b9073795065dcc9f64b5614c407a6efdc400da6221fb0908590600401610a3f565b602060405180830381600087803b15801561039557600080fd5b505af11580156103a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103cd91906108ae565b5060008073795065dcc9f64b5614c407a6efdc400da6221fb06001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561041e57600080fd5b505afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610456919061099c565b506001600160701b031691506001600160701b031691506104788383836107d4565b604080516000808252602082019283905263022c0d9f60e01b90925291955073795065dcc9f64b5614c407a6efdc400da6221fb0945063022c0d9f93506104dc92509085907306da0fd433c1a5d7a4faa01111c044910a1845539060248101610a8c565b600060405180830381600087803b1580156104f657600080fd5b505af115801561050a573d6000803e3d6000fd5b505050506000807306da0fd433c1a5d7a4faa01111c044910a1845536001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561055e57600080fd5b505afa158015610572573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610596919061099c565b506001600160701b031691506001600160701b0316915060006105ba8484846107d4565b604080516000808252602082019283905263022c0d9f60e01b9092529192507306da0fd433c1a5d7a4faa01111c044910a1845539163022c0d9f91610606918590309060248101610a8c565b600060405180830381600087803b15801561062057600080fd5b505af1158015610634573d6000803e3d6000fd5b50506040516322770cc360e11b815260009250735a6a4d54456819380173272a5e8e9b9904bdf41b91506344ee19869061069b906003908590879082907f000000000000000000000000000000000000000000000000000000000000000090600401610afe565b602060405180830381600087803b1580156106b557600080fd5b505af11580156106c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ed91906109f0565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166302b9446c8c7f00000000000000000000000000000000000000000000000000000000000000008d8560006040518663ffffffff1660e01b8152600401610764959493929190610a58565b6040805180830381600087803b15801561077d57600080fd5b505af1158015610791573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b59190610a08565b96506107c39050868a610822565b965050505050509550959350505050565b6000806107e3856103e5610854565b905060006107f18285610854565b9050600061080b83610805886103e8610854565b9061088b565b905080828161081657fe5b04979650505050505050565b8082038281111561084e5760405162461bcd60e51b815260040161084590610b31565b60405180910390fd5b92915050565b600081158061086f5750508082028282828161086c57fe5b04145b61084e5760405162461bcd60e51b815260040161084590610b9f565b8181018181101561084e5760405162461bcd60e51b815260040161084590610b68565b6000602082840312156108bf578081fd5b815180151581146108ce578182fd5b9392505050565b60008060008060008060c087890312156108ed578182fd5b86356108f881610bed565b9550602087013561090881610bed565b9450604087013561091881610bed565b9350606087013561092881610bed565b9598949750929560808101359460a0909101359350915050565b600080600080600060a08688031215610959578081fd5b853561096481610bed565b9450602086013561097481610bed565b9350604086013561098481610bed565b94979396509394606081013594506080013592915050565b6000806000606084860312156109b0578283fd5b83516109bb81610c05565b60208501519093506109cc81610c05565b604085015190925063ffffffff811681146109e5578182fd5b809150509250925092565b600060208284031215610a01578081fd5b5051919050565b60008060408385031215610a1a578182fd5b505080516020909101519092909150565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03958616815293851660208501529190931660408301526060820192909252608081019190915260a00190565b6000858252602085818401526001600160a01b0385166040840152608060608401528351806080850152825b81811015610ad45785810183015185820160a001528201610ab8565b81811115610ae5578360a083870101525b50601f01601f19169290920160a0019695505050505050565b600f95860b81529390940b6020840152604083019190915260608201526001600160a01b03909116608082015260a00190565b60208082526015908201527f426f72696e674d6174683a20556e646572666c6f770000000000000000000000604082015260600190565b60208082526018908201527f426f72696e674d6174683a20416464204f766572666c6f770000000000000000604082015260600190565b60208082526018908201527f426f72696e674d6174683a204d756c204f766572666c6f770000000000000000604082015260600190565b90815260200190565b918252602082015260400190565b6001600160a01b0381168114610c0257600080fd5b50565b6001600160701b0381168114610c0257600080fdfea2646970667358221220b2bb2d7650f0e6bd55c4084f16f89555c8f4f52a908b63ed4d42bce69981458864736f6c634300060c0033000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061007d5760003560e01c806378e7e3d11161005b57806378e7e3d1146100c9578063ab560e10146100d1578063d2984608146100d9578063e343fe12146100e15761007d565b806322a88c09146100825780634622be90146100a05780636b2ace87146100c1575b600080fd5b61008a6100f4565b6040516100979190610a2b565b60405180910390f35b6100b36100ae3660046108d5565b61010c565b604051610097929190610bdf565b61008a61011a565b61008a61013e565b61008a610156565b61008a61016e565b6100b36100ef366004610942565b610186565b735a6a4d54456819380173272a5e8e9b9904bdf41b81565b600080965096945050505050565b7f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd64396681565b73dac17f958d2ee523a2206206994597c13d831ec781565b736b3595068778dd592e39a122f4f5a5cf09c90fe281565b738798249c2e607446efb7ad49ec89dd1865ff427281565b60008060007f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439666001600160a01b03166397da6d308930306000896040518663ffffffff1660e01b81526004016101e0959493929190610a58565b6040805180830381600087803b1580156101f957600080fd5b505af115801561020d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102319190610a08565b506040516367dfd4c960e01b8152909150738798249c2e607446efb7ad49ec89dd1865ff4272906367dfd4c99061026c908490600401610bd6565b600060405180830381600087803b15801561028657600080fd5b505af115801561029a573d6000803e3d6000fd5b50506040516370a0823160e01b815260009350839250736b3595068778dd592e39a122f4f5a5cf09c90fe291506370a08231906102db903090600401610a2b565b60206040518083038186803b1580156102f357600080fd5b505afa158015610307573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061032b91906109f0565b60405163a9059cbb60e01b8152909150736b3595068778dd592e39a122f4f5a5cf09c90fe29063a9059cbb9061037b9073795065dcc9f64b5614c407a6efdc400da6221fb0908590600401610a3f565b602060405180830381600087803b15801561039557600080fd5b505af11580156103a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103cd91906108ae565b5060008073795065dcc9f64b5614c407a6efdc400da6221fb06001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561041e57600080fd5b505afa158015610432573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610456919061099c565b506001600160701b031691506001600160701b031691506104788383836107d4565b604080516000808252602082019283905263022c0d9f60e01b90925291955073795065dcc9f64b5614c407a6efdc400da6221fb0945063022c0d9f93506104dc92509085907306da0fd433c1a5d7a4faa01111c044910a1845539060248101610a8c565b600060405180830381600087803b1580156104f657600080fd5b505af115801561050a573d6000803e3d6000fd5b505050506000807306da0fd433c1a5d7a4faa01111c044910a1845536001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561055e57600080fd5b505afa158015610572573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610596919061099c565b506001600160701b031691506001600160701b0316915060006105ba8484846107d4565b604080516000808252602082019283905263022c0d9f60e01b9092529192507306da0fd433c1a5d7a4faa01111c044910a1845539163022c0d9f91610606918590309060248101610a8c565b600060405180830381600087803b15801561062057600080fd5b505af1158015610634573d6000803e3d6000fd5b50506040516322770cc360e11b815260009250735a6a4d54456819380173272a5e8e9b9904bdf41b91506344ee19869061069b906003908590879082907f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd64396690600401610afe565b602060405180830381600087803b1580156106b557600080fd5b505af11580156106c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ed91906109f0565b90507f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439666001600160a01b03166302b9446c8c7f000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd6439668d8560006040518663ffffffff1660e01b8152600401610764959493929190610a58565b6040805180830381600087803b15801561077d57600080fd5b505af1158015610791573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b59190610a08565b96506107c39050868a610822565b965050505050509550959350505050565b6000806107e3856103e5610854565b905060006107f18285610854565b9050600061080b83610805886103e8610854565b9061088b565b905080828161081657fe5b04979650505050505050565b8082038281111561084e5760405162461bcd60e51b815260040161084590610b31565b60405180910390fd5b92915050565b600081158061086f5750508082028282828161086c57fe5b04145b61084e5760405162461bcd60e51b815260040161084590610b9f565b8181018181101561084e5760405162461bcd60e51b815260040161084590610b68565b6000602082840312156108bf578081fd5b815180151581146108ce578182fd5b9392505050565b60008060008060008060c087890312156108ed578182fd5b86356108f881610bed565b9550602087013561090881610bed565b9450604087013561091881610bed565b9350606087013561092881610bed565b9598949750929560808101359460a0909101359350915050565b600080600080600060a08688031215610959578081fd5b853561096481610bed565b9450602086013561097481610bed565b9350604086013561098481610bed565b94979396509394606081013594506080013592915050565b6000806000606084860312156109b0578283fd5b83516109bb81610c05565b60208501519093506109cc81610c05565b604085015190925063ffffffff811681146109e5578182fd5b809150509250925092565b600060208284031215610a01578081fd5b5051919050565b60008060408385031215610a1a578182fd5b505080516020909101519092909150565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b03958616815293851660208501529190931660408301526060820192909252608081019190915260a00190565b6000858252602085818401526001600160a01b0385166040840152608060608401528351806080850152825b81811015610ad45785810183015185820160a001528201610ab8565b81811115610ae5578360a083870101525b50601f01601f19169290920160a0019695505050505050565b600f95860b81529390940b6020840152604083019190915260608201526001600160a01b03909116608082015260a00190565b60208082526015908201527f426f72696e674d6174683a20556e646572666c6f770000000000000000000000604082015260600190565b60208082526018908201527f426f72696e674d6174683a20416464204f766572666c6f770000000000000000604082015260600190565b60208082526018908201527f426f72696e674d6174683a204d756c204f766572666c6f770000000000000000604082015260600190565b90815260200190565b918252602082015260400190565b6001600160a01b0381168114610c0257600080fd5b50565b6001600160701b0381168114610c0257600080fdfea2646970667358221220b2bb2d7650f0e6bd55c4084f16f89555c8f4f52a908b63ed4d42bce69981458864736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966
-----Decoded View---------------
Arg [0] : bentoBox_ (address): 0xF5BCE5077908a1b7370B9ae04AdC565EBd643966
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000f5bce5077908a1b7370b9ae04adc565ebd643966
Deployed Bytecode Sourcemap
19184:3740:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;19335:90;;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;22623:298;;;;;;:::i;:::-;;:::i;:::-;;;;;;;;:::i;19291:37::-;;;:::i;19432:92::-;;;:::i;19628:79::-;;;:::i;19535:86::-;;;:::i;21164:1358::-;;;;;;:::i;:::-;;:::i;19335:90::-;19382:42;19335:90;:::o;22623:298::-;22848:17;;22623:298;;;;;;;;;:::o;19291:37::-;;;:::o;19432:92::-;19481:42;19432:92;:::o;19628:79::-;19664:42;19628:79;:::o;19535:86::-;19578:42;19535:86;:::o;21164:1358::-;21347:18;21367:21;21417:24;21447:8;-1:-1:-1;;;;;21447:17:0;;21465:9;21484:4;21499;21506:1;21509:9;21447:72;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1;21532:30:0;;-1:-1:-1;;;21532:30:0;;21416:103;;-1:-1:-1;19578:42:0;;21532:12;;:30;;21416:103;;21532:30;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;21652:30:0;;-1:-1:-1;;;21652:30:0;;21586:19;;-1:-1:-1;21586:19:0;;-1:-1:-1;19664:42:0;;-1:-1:-1;21652:15:0;;:30;;21676:4;;21652:30;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21703:47;;-1:-1:-1;;;21703:47:0;;21631:51;;-1:-1:-1;19664:42:0;;21703:14;;:47;;19766:42;;21631:51;;21703:47;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;21766:16;21784;19766:42;-1:-1:-1;;;;;21806:22:0;;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;21765:65;-1:-1:-1;;;;;21765:65:0;;;-1:-1:-1;;;;;21765:65:0;;;21865:44;21878:10;21890:8;21900;21865:12;:44::i;:::-;22000:12;;;21969:1;22000:12;;;;;;;;;;-1:-1:-1;;;21953:60:0;;;21851:58;;-1:-1:-1;19766:42:0;;-1:-1:-1;21953:15:0;;-1:-1:-1;21953:60:0;;-1:-1:-1;21969:1:0;21851:58;;19862:42;;21953:60;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;22027:16;22045;19862:42;-1:-1:-1;;;;;22067:16:0;;:18;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22026:59;-1:-1:-1;;;;;22026:59:0;;;-1:-1:-1;;;;;22026:59:0;;;22106:26;22135:45;22148:11;22161:8;22171;22135:12;:45::i;:::-;22239:12;;;22201:1;22239:12;;;;;;;;;;-1:-1:-1;;;22191:61:0;;;22106:74;;-1:-1:-1;19862:42:0;;22191:9;;:61;;22106:74;;22232:4;;22191:61;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;22284:76:0;;-1:-1:-1;;;22284:76:0;;22265:16;;-1:-1:-1;19382:42:0;;-1:-1:-1;22284:28:0;;:76;;22313:1;;22265:16;;22319:18;;22265:16;;22350:8;;22284:76;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22265:95;;22393:8;-1:-1:-1;;;;;22393:16:0;;22410:7;22427:8;22438:9;22449:8;22459:1;22393:68;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;22373:88;-1:-1:-1;22485:29:0;;-1:-1:-1;22373:88:0;22503:10;22485:17;:29::i;:::-;22472:42;;21164:1358;;;;;;;;;;;;;:::o;20196:398::-;20332:17;;20388;:8;20401:3;20388:12;:17::i;:::-;20362:43;-1:-1:-1;20416:17:0;20436:31;20362:43;20456:10;20436:19;:31::i;:::-;20416:51;-1:-1:-1;20478:19:0;20500:40;20524:15;20500:19;:9;20514:4;20500:13;:19::i;:::-;:23;;:40::i;:::-;20478:62;;20575:11;20563:9;:23;;;;;;;20196:398;-1:-1:-1;;;;;;;20196:398:0:o;572:138::-;665:5;;;660:16;;;;652:50;;;;-1:-1:-1;;;652:50:0;;;;;;;:::i;:::-;;;;;;;;;572:138;;;;:::o;718:155::-;776:9;806:6;;;:30;;-1:-1:-1;;821:5:0;;;835:1;830;821:5;830:1;816:15;;;;;:20;806:30;798:67;;;;-1:-1:-1;;;798:67:0;;;;;;;:::i;423:141::-;516:5;;;511:16;;;;503:53;;;;-1:-1:-1;;;503:53:0;;;;;;;:::i;1000:257:-1:-;;1112:2;1100:9;1091:7;1087:23;1083:32;1080:2;;;-1:-1;;1118:12;1080:2;223:6;217:13;17805:5;14436:13;14429:21;17783:5;17780:32;17770:2;;-1:-1;;17816:12;17770:2;1170:71;1074:183;-1:-1;;;1074:183::o;1264:925::-;;;;;;;1481:3;1469:9;1460:7;1456:23;1452:33;1449:2;;;-1:-1;;1488:12;1449:2;371:6;358:20;383:47;424:5;383:47;:::i;:::-;1540:77;-1:-1;1654:2;1707:22;;358:20;383:47;358:20;383:47;:::i;:::-;1662:77;-1:-1;1776:2;1815:22;;72:20;97:33;72:20;97:33;:::i;:::-;1784:63;-1:-1;1884:2;1923:22;;72:20;97:33;72:20;97:33;:::i;:::-;1443:746;;;;-1:-1;1443:746;;1992:3;2032:22;;650:20;;2101:3;2141:22;;;650:20;;-1:-1;1443:746;-1:-1;;1443:746::o;2196:799::-;;;;;;2396:3;2384:9;2375:7;2371:23;2367:33;2364:2;;;-1:-1;;2403:12;2364:2;371:6;358:20;383:47;424:5;383:47;:::i;:::-;2455:77;-1:-1;2569:2;2622:22;;358:20;383:47;358:20;383:47;:::i;:::-;2577:77;-1:-1;2691:2;2730:22;;72:20;97:33;72:20;97:33;:::i;:::-;2358:637;;;;-1:-1;2699:63;;2799:2;2838:22;;650:20;;-1:-1;2907:3;2947:22;650:20;;2358:637;-1:-1;;2358:637::o;3002:533::-;;;;3150:2;3138:9;3129:7;3125:23;3121:32;3118:2;;;-1:-1;;3156:12;3118:2;526:6;520:13;538:33;565:5;538:33;:::i;:::-;3319:2;3369:22;;520:13;3208:74;;-1:-1;538:33;520:13;538:33;:::i;:::-;3438:2;3487:22;;938:13;3327:74;;-1:-1;15063:10;15052:22;;18300:34;;18290:2;;-1:-1;;18338:12;18290:2;3446:73;;;;3112:423;;;;;:::o;3542:263::-;;3657:2;3645:9;3636:7;3632:23;3628:32;3625:2;;;-1:-1;;3663:12;3625:2;-1:-1;798:13;;3619:186;-1:-1;3619:186::o;3812:399::-;;;3944:2;3932:9;3923:7;3919:23;3915:32;3912:2;;;-1:-1;;3950:12;3912:2;-1:-1;;798:13;;4113:2;4163:22;;;798:13;;;;;-1:-1;3906:305::o;7251:222::-;-1:-1;;;;;14846:54;;;;4289:37;;7378:2;7363:18;;7349:124::o;7480:333::-;-1:-1;;;;;14846:54;;;;4289:37;;7799:2;7784:18;;7202:37;7635:2;7620:18;;7606:207::o;8354:712::-;-1:-1;;;;;14846:54;;;4777:68;;14846:54;;;8794:2;8779:18;;4289:37;14846:54;;;;8877:2;8862:18;;4289:37;8968:2;8953:18;;5918:58;;;;9051:3;9036:19;;7202:37;;;;8615:3;8600:19;;8586:480::o;10581:656::-;;17061:24;5925:3;5918:58;10991:2;7232:5;10991:2;10980:9;10976:18;7202:37;-1:-1;;;;;14352:5;14846:54;11074:2;11063:9;11059:18;4289:37;10818:3;11111:2;11100:9;11096:18;11089:48;4480:5;13888:12;14044:6;10818:3;10807:9;10803:19;14032;-1:-1;17291:101;17305:6;17302:1;17299:13;17291:101;;;17372:11;;;;;17366:18;17353:11;;;14072:14;17353:11;17346:39;17320:10;;17291:101;;;17407:6;17404:1;17401:13;17398:2;;;-1:-1;14072:14;17463:6;10807:9;17454:16;;17447:27;17398:2;-1:-1;17579:7;17563:14;-1:-1;;17559:28;4637:39;;;;14072:14;4637:39;;10789:448;-1:-1;;;;;;10789:448::o;11244:712::-;14646:2;14635:21;;;5770:57;;14635:21;;;;11684:2;11669:18;;5770:57;11767:2;11752:18;;7202:37;;;;11858:2;11843:18;;5918:58;-1:-1;;;;;14846:54;;;11941:3;11926:19;;4289:37;11505:3;11490:19;;11476:480::o;11963:416::-;12163:2;12177:47;;;6360:2;12148:18;;;14032:19;6396:23;14072:14;;;6376:44;6439:12;;;12134:245::o;12386:416::-;12586:2;12600:47;;;6690:2;12571:18;;;14032:19;6726:26;14072:14;;;6706:47;6772:12;;;12557:245::o;12809:416::-;13009:2;13023:47;;;7023:2;12994:18;;;14032:19;7059:26;14072:14;;;7039:47;7105:12;;;12980:245::o;13232:222::-;7202:37;;;13359:2;13344:18;;13330:124::o;13461:333::-;7202:37;;;13780:2;13765:18;;7202:37;13616:2;13601:18;;13587:207::o;17600:117::-;-1:-1;;;;;17687:5;14846:54;17662:5;17659:35;17649:2;;17708:1;;17698:12;17649:2;17643:74;:::o;17994:117::-;-1:-1;;;;;18081:5;14730:42;18056:5;18053:35;18043:2;;18102:1;;18092:12
Swarm Source
ipfs://b2bb2d7650f0e6bd55c4084f16f89555c8f4f52a908b63ed4d42bce699814588
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
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.