More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 3,684 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Process Route | 40176005 | 469 days ago | IN | 0.003 AVAX | 0.0037916 | ||||
Process Route | 35440868 | 580 days ago | IN | 0 AVAX | 0.00984024 | ||||
Process Route | 35004236 | 591 days ago | IN | 0 AVAX | 0.00900708 | ||||
Process Route | 34695314 | 598 days ago | IN | 0.04 AVAX | 0.003498 | ||||
Process Route | 34695270 | 598 days ago | IN | 0.02 AVAX | 0.00395115 | ||||
Process Route | 34477430 | 604 days ago | IN | 0 AVAX | 0.00388307 | ||||
Process Route | 34247320 | 609 days ago | IN | 0 AVAX | 0.0038837 | ||||
Process Route | 34064412 | 614 days ago | IN | 0.001 AVAX | 0.00353623 | ||||
Process Route | 33657865 | 624 days ago | IN | 0 AVAX | 0.0061494 | ||||
Process Route | 33653481 | 624 days ago | IN | 0 AVAX | 0.0061494 | ||||
Process Route | 33639215 | 624 days ago | IN | 0 AVAX | 0.00437466 | ||||
Process Route | 33448062 | 628 days ago | IN | 2.5 AVAX | 0.0039521 | ||||
Process Route | 33448031 | 628 days ago | IN | 2.55 AVAX | 0.0039521 | ||||
Process Route | 33447974 | 628 days ago | IN | 2.4 AVAX | 0.0039521 | ||||
Process Route | 33154087 | 635 days ago | IN | 0.1 AVAX | 0.00353655 | ||||
Process Route | 33112222 | 636 days ago | IN | 0 AVAX | 0.0038837 | ||||
Process Route | 33049053 | 638 days ago | IN | 0.02 AVAX | 0.00385007 | ||||
Process Route | 32673770 | 647 days ago | IN | 0.2 AVAX | 0.00353279 | ||||
Process Route | 32582180 | 649 days ago | IN | 0 AVAX | 0.00408243 | ||||
Process Route | 32582163 | 649 days ago | IN | 0 AVAX | 0.00625884 | ||||
Process Route | 32407458 | 653 days ago | IN | 0 AVAX | 0.00516752 | ||||
Process Route | 32281337 | 656 days ago | IN | 0 AVAX | 0.00388307 | ||||
Process Route | 32180975 | 658 days ago | IN | 0 AVAX | 0.0038837 | ||||
Process Route | 32046662 | 661 days ago | IN | 0 AVAX | 0.0038837 | ||||
Process Route | 32039313 | 662 days ago | IN | 0.20719583 AVAX | 0.00395305 |
Latest 25 internal transactions (View All)
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
40176005 | 469 days ago | 0.003 AVAX | ||||
35440868 | 580 days ago | 1.02397222 AVAX | ||||
35440868 | 580 days ago | 1.02397222 AVAX | ||||
35004236 | 591 days ago | 0.48435248 AVAX | ||||
35004236 | 591 days ago | 0.48435248 AVAX | ||||
34695314 | 598 days ago | 0.04 AVAX | ||||
34695270 | 598 days ago | 0.02 AVAX | ||||
34477430 | 604 days ago | 0.39560831 AVAX | ||||
34477430 | 604 days ago | 0.39560831 AVAX | ||||
34247320 | 609 days ago | 0.50096591 AVAX | ||||
34247320 | 609 days ago | 0.50096591 AVAX | ||||
34064412 | 614 days ago | 0.001 AVAX | ||||
33657865 | 624 days ago | 0.34940846 AVAX | ||||
33657865 | 624 days ago | 0.34940846 AVAX | ||||
33653481 | 624 days ago | 0.33500899 AVAX | ||||
33653481 | 624 days ago | 0.33500899 AVAX | ||||
33639215 | 624 days ago | 0.07983115 AVAX | ||||
33639215 | 624 days ago | 0.07983115 AVAX | ||||
33448062 | 628 days ago | 2.5 AVAX | ||||
33448031 | 628 days ago | 2.55 AVAX | ||||
33447974 | 628 days ago | 2.4 AVAX | ||||
33154087 | 635 days ago | 0.1 AVAX | ||||
33112222 | 636 days ago | 0.37998954 AVAX | ||||
33112222 | 636 days ago | 0.37998954 AVAX | ||||
33049053 | 638 days ago | 0.02 AVAX |
Loading...
Loading
Contract Name:
RouteProcessor
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 10000000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.10; import '../interfaces/IUniswapV2Pair.sol'; import '../interfaces/IBentoBoxMinimal.sol'; import '../interfaces/IPool.sol'; import '../interfaces/IWETH.sol'; import './InputStream.sol'; import '@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol'; address constant NATIVE_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; /// @title A route processor for the Sushi Aggregator /// @author Okavango contract RouteProcessor { using SafeERC20 for IERC20; using InputStream for uint256; IBentoBoxMinimal public immutable bentoBox; uint private unlocked = 1; modifier lock() { require(unlocked == 1, 'RouteProcessor is locked'); unlocked = 2; _; unlocked = 1; } constructor(address _bentoBox) { bentoBox = IBentoBoxMinimal(_bentoBox); } /// @notice For native unwrapping receive() external payable {} /// @notice Processes the route generated off-chain. Has a lock /// @param tokenIn Address of the input token /// @param amountIn Amount of the input token /// @param tokenOut Address of the output token /// @param amountOutMin Minimum amount of the output token /// @return amountOut Actual amount of the output token function processRoute( address tokenIn, uint256 amountIn, address tokenOut, uint256 amountOutMin, address to, bytes memory route ) external payable lock returns (uint256 amountOut) { return processRouteInternal(tokenIn, amountIn, tokenOut, amountOutMin, to, route); } /// @notice Transfers some value to <transferValueTo> and then processes the route /// @param transferValueTo Address where the value should be transferred /// @param amountValueTransfer How much value to transfer /// @param tokenIn Address of the input token /// @param amountIn Amount of the input token /// @param tokenOut Address of the output token /// @param amountOutMin Minimum amount of the output token /// @return amountOut Actual amount of the output token function transferValueAndprocessRoute( address payable transferValueTo, uint256 amountValueTransfer, address tokenIn, uint256 amountIn, address tokenOut, uint256 amountOutMin, address to, bytes memory route ) external payable lock returns (uint256 amountOut) { (bool success, bytes memory returnBytes) = transferValueTo.call{value: amountValueTransfer}(''); require(success, string(abi.encodePacked(returnBytes))); return processRouteInternal(tokenIn, amountIn, tokenOut, amountOutMin, to, route); } /// @notice Processes the route generated off-chain /// @param tokenIn Address of the input token /// @param amountIn Amount of the input token /// @param tokenOut Address of the output token /// @param amountOutMin Minimum amount of the output token /// @return amountOut Actual amount of the output token function processRouteInternal( address tokenIn, uint256 amountIn, address tokenOut, uint256 amountOutMin, address to, bytes memory route ) private returns (uint256 amountOut) { uint256 amountInAcc = 0; uint256 balanceInitial = tokenOut == NATIVE_ADDRESS ? address(to).balance : IERC20(tokenOut).balanceOf(to); uint256 stream = InputStream.createStream(route); while (stream.isNotEmpty()) { uint8 commandCode = stream.readUint8(); if (commandCode < 20) { if (commandCode == 10) swapUniswapPool(stream); // Sushi/Uniswap pool swap else if (commandCode == 4) distributeERC20Shares(stream); // distribute ERC20 tokens from this router to pools else if (commandCode == 3) amountInAcc += distributeERC20Amounts(stream, tokenIn); // initial distribution else if (commandCode == 5) amountInAcc += wrapAndDistributeERC20Amounts(stream); // wrap natives and initial distribution else if (commandCode == 6) unwrapNative(to, stream); else if (commandCode == 7) amountInAcc += distributeERC20AmountsFromRP(stream, tokenIn); // initial distribution else revert('Unknown command code'); } else if (commandCode < 24) { if (commandCode == 20) bentoDepositAmountFromBento(stream, tokenIn); else if (commandCode == 21) swapTrident(stream); else if (commandCode == 23) bentoWithdrawShareFromRP(stream, tokenIn); else revert('Unknown command code'); } else { if (commandCode == 24) amountInAcc += distributeBentoShares(stream, tokenIn); else if (commandCode == 25) distributeBentoPortions(stream); else if (commandCode == 26) bentoDepositAllFromBento(stream); else if (commandCode == 27) bentoWithdrawAllFromRP(stream); else revert('Unknown command code'); } } require(amountInAcc == amountIn, 'Wrong amountIn value'); uint256 balanceFinal = tokenOut == NATIVE_ADDRESS ? address(to).balance : IERC20(tokenOut).balanceOf(to); require(balanceFinal >= balanceInitial + amountOutMin, 'Minimal ouput balance violation'); amountOut = balanceFinal - balanceInitial; } /// @notice Transfers input tokens sent to BentoBox to a pool /// @notice Expected to be called for initial liquidity transfer from user to BentoBox, so we know exact amounts /// @param stream [Pool, Amount]. Pool into which an amount of tokens will be transferred /// @param token Address of the token to transfer function bentoDepositAmountFromBento(uint256 stream, address token) private { address to = stream.readAddress(); uint256 amount = stream.readUint(); bentoBox.deposit(token, address(bentoBox), to, amount, 0); } /// @notice Transfers all available input tokens from BentoBox to a pool /// @param stream [Pool, Token]. Pool into which all tokens will be transferred function bentoDepositAllFromBento(uint256 stream) private { address to = stream.readAddress(); address token = stream.readAddress(); uint256 amount = IERC20(token).balanceOf(address(bentoBox)) + bentoBox.strategyData(token).balance - bentoBox.totals(token).elastic; bentoBox.deposit(token, address(bentoBox), to, amount, 0); } /// @notice Withdraws BentoBox tokens from BentoBox to an address /// @param stream [To, Amount]. Destination where an amount of token will be transferred /// @param token Token to transfer function bentoWithdrawShareFromRP(uint256 stream, address token) private { address to = stream.readAddress(); uint256 amount = stream.readUint(); bentoBox.withdraw(token, address(this), to, amount, 0); } /// @notice Withdraws all available BentoBox tokens from BentoBox to an address /// @param stream [Token, To]. Token which will be transferred to a destination function bentoWithdrawAllFromRP(uint256 stream) private { address token = stream.readAddress(); address to = stream.readAddress(); uint256 amount = bentoBox.balanceOf(token, address(this)); bentoBox.withdraw(token, address(this), to, 0, amount); } /// @notice Performs a Trident pool swap /// @param stream [Pool, SwapData]. Pool against a swap defined by SwapData will be executed function swapTrident(uint256 stream) private { address pool = stream.readAddress(); bytes memory swapData = stream.readBytes(); IPool(pool).swap(swapData); } /// @notice Performs a Sushi/UniswapV2 pool swap /// @param stream [Pool, TokenIn, Direction, To] /// @return amountOut Amount of the output token function swapUniswapPool(uint256 stream) private returns (uint256 amountOut) { address pool = stream.readAddress(); address tokenIn = stream.readAddress(); uint8 direction = stream.readUint8(); address to = stream.readAddress(); (uint256 r0, uint256 r1, ) = IUniswapV2Pair(pool).getReserves(); require(r0 > 0 && r1 > 0, 'Wrong pool reserves'); (uint256 reserveIn, uint256 reserveOut) = direction == 1 ? (r0, r1) : (r1, r0); uint256 amountIn = IERC20(tokenIn).balanceOf(pool) - reserveIn; uint256 amountInWithFee = amountIn * 997; amountOut = (amountInWithFee * reserveOut) / (reserveIn * 1000 + amountInWithFee); (uint256 amount0Out, uint256 amount1Out) = direction == 1 ? (uint256(0), amountOut) : (amountOut, uint256(0)); IUniswapV2Pair(pool).swap(amount0Out, amount1Out, to, new bytes(0)); } /// @notice Distributes input ERC20 tokens from msg.sender to addresses. Tokens should be approved /// @notice Expected to be called for initial liquidity transfer from the user to pools, so we know exact amounts /// @param stream [ArrayLength, ...[To, Amount][]]. An array of destinations and token amounts /// @param token Token to distribute /// @return amountTotal Total amount distributed function distributeERC20Amounts(uint256 stream, address token) private returns (uint256 amountTotal) { uint8 num = stream.readUint8(); amountTotal = 0; for (uint256 i = 0; i < num; ++i) { address to = stream.readAddress(); uint256 amount = stream.readUint(); amountTotal += amount; IERC20(token).safeTransferFrom(msg.sender, to, amount); } } /// @notice Distributes input ERC20 tokens from this contract to addresses. Tokens should be approved /// @notice Expected to be called for initial liquidity transfer from the user to pools, so we know exact amounts /// @param stream [ArrayLength, ...[To, Amount][]]. An array of destinations and token amounts /// @param token Token to distribute /// @return amountTotal Total amount distributed function distributeERC20AmountsFromRP(uint256 stream, address token) private returns (uint256 amountTotal) { uint8 num = stream.readUint8(); amountTotal = 0; for (uint256 i = 0; i < num; ++i) { address to = stream.readAddress(); uint256 amount = stream.readUint(); amountTotal += amount; IERC20(token).safeTransfer(to, amount); } } /// @notice Wraps all native inputs and distributes wrapped ERC20 tokens from RouteProcessor to addresses /// @notice Expected to be called for initial liquidity transfer from the user to pools, so we know exact amounts /// @param stream [WrapToken, ArrayLength, ...[To, Amount][]]. An array of destinations and token amounts /// @return amountTotal Total amount distributed function wrapAndDistributeERC20Amounts(uint256 stream) private returns (uint256 amountTotal) { address token = stream.readAddress(); IWETH(token).deposit{value: address(this).balance}(); uint8 num = stream.readUint8(); amountTotal = 0; for (uint256 i = 0; i < num; ++i) { address to = stream.readAddress(); uint256 amount = stream.readUint(); amountTotal += amount; IERC20(token).safeTransfer(to, amount); } require(address(this).balance == 0, "RouteProcessor: invalid input amount"); } /// @notice Distributes input BentoBox tokens from msg.sender to addresses. Tokens should be approved /// @notice Expected to be called for initial liquidity transfer from the user to pools, so we know exact amounts /// @param stream [ArrayLength, ...[To, ShareAmount][]]. An array of destinations and token share amounts /// @param token Token to distribute /// @return sharesTotal Total shares distributed function distributeBentoShares(uint256 stream, address token) private returns (uint256 sharesTotal) { uint8 num = stream.readUint8(); sharesTotal = 0; for (uint256 i = 0; i < num; ++i) { address to = stream.readAddress(); uint256 share = stream.readUint(); sharesTotal += share; bentoBox.transfer(token, msg.sender, to, share); } } /// @notice Distributes ERC20 tokens from RouteProcessor to addresses /// @notice Quantity for sending is determined by share in 1/65535 /// @notice During routing we can't predict in advance the actual value of internal swaps because of slippage, /// @notice so we have to work with shares - not fixed amounts /// @param stream [Token, ArrayLength, ...[To, ShareAmount][]]. Token to distribute. An array of destinations and token share amounts function distributeERC20Shares(uint256 stream) private { address token = stream.readAddress(); uint8 num = stream.readUint8(); uint256 amountTotal = IERC20(token).balanceOf(address(this)) - 1; // slot undrain protection unchecked { for (uint256 i = 0; i < num; ++i) { address to = stream.readAddress(); uint16 share = stream.readUint16(); uint256 amount = (amountTotal * share) / 65535; amountTotal -= amount; IERC20(token).safeTransfer(to, amount); } } } /// @notice Distributes BentoBox tokens from RouteProcessor to addresses /// @notice Quantity for sending is determined by portions in 1/65535. /// @notice During routing we can't predict in advance the actual value of internal swaps because of slippage, /// @notice so we have to work with portions - not fixed amounts /// @param stream [Token, ArrayLength, ...[To, ShareAmount][]]. Token to distribute. An array of destinations and token share amounts function distributeBentoPortions(uint256 stream) private { address token = stream.readAddress(); uint8 num = stream.readUint8(); uint256 amountTotal = bentoBox.balanceOf(token, address(this)) - 1; // slot undrain protection unchecked { for (uint256 i = 0; i < num; ++i) { address to = stream.readAddress(); uint16 share = stream.readUint16(); uint256 amount = (amountTotal * share) / 65535; amountTotal -= amount; bentoBox.transfer(token, address(this), to, amount); } } } /// @notice Unwraps the Native Token /// @param receiver Destination of the unwrapped token /// @param stream [Token]. Token to unwrap native function unwrapNative(address receiver, uint256 stream) private { address token = stream.readAddress(); IWETH(token).withdraw( IERC20(token).balanceOf(address(this)) - 1); // slot undrain protection payable(receiver).transfer(address(this).balance); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.10; library InputStream { function createStream(bytes memory data) internal pure returns (uint256 stream) { assembly { stream := mload(0x40) mstore(0x40, add(stream, 64)) mstore(stream, data) let length := mload(data) mstore(add(stream, 32), add(data, length)) } } function isNotEmpty(uint256 stream) internal pure returns (bool) { uint256 pos; uint256 finish; assembly { pos := mload(stream) finish := mload(add(stream, 32)) } return pos < finish; } function readUint8(uint256 stream) internal pure returns (uint8 res) { assembly { let pos := mload(stream) pos := add(pos, 1) res := mload(pos) mstore(stream, pos) } } function readUint16(uint256 stream) internal pure returns (uint16 res) { assembly { let pos := mload(stream) pos := add(pos, 2) res := mload(pos) mstore(stream, pos) } } function readUint32(uint256 stream) internal pure returns (uint32 res) { assembly { let pos := mload(stream) pos := add(pos, 4) res := mload(pos) mstore(stream, pos) } } function readUint(uint256 stream) internal pure returns (uint256 res) { assembly { let pos := mload(stream) pos := add(pos, 32) res := mload(pos) mstore(stream, pos) } } function readAddress(uint256 stream) internal pure returns (address res) { assembly { let pos := mload(stream) pos := add(pos, 20) res := mload(pos) mstore(stream, pos) } } function readBytes(uint256 stream) internal pure returns (bytes memory res) { assembly { let pos := mload(stream) res := add(pos, 32) let length := mload(res) mstore(stream, add(res, length)) } } }
// SPDX-License-Identifier: UNLICENSED pragma solidity >=0.8.0; struct Rebase { uint128 elastic; uint128 base; } struct StrategyData { uint64 strategyStartDate; uint64 targetPercentage; uint128 balance; // the balance of the strategy that BentoBox thinks is in there } /// @notice A rebasing library library RebaseLibrary { /// @notice Calculates the base value in relationship to `elastic` and `total`. function toBase(Rebase memory total, uint256 elastic) internal pure returns (uint256 base) { if (total.elastic == 0) { base = elastic; } else { base = (elastic * total.base) / total.elastic; } } /// @notice Calculates the elastic value in relationship to `base` and `total`. function toElastic(Rebase memory total, uint256 base) internal pure returns (uint256 elastic) { if (total.base == 0) { elastic = base; } else { elastic = (base * total.elastic) / total.base; } } } /// @notice Minimal BentoBox vault interface. /// @dev `token` is aliased as `address` from `IERC20` for simplicity. interface IBentoBoxMinimal { /// @notice Balance per ERC-20 token per account in shares. function balanceOf(address, address) external view returns (uint256); /// @dev Helper function to represent an `amount` of `token` in shares. /// @param token The ERC-20 token. /// @param amount The `token` amount. /// @param roundUp If the result `share` should be rounded up. /// @return share The token amount represented in shares. function toShare( address token, uint256 amount, bool roundUp ) external view returns (uint256 share); /// @dev Helper function to represent shares back into the `token` amount. /// @param token The ERC-20 token. /// @param share The amount of shares. /// @param roundUp If the result should be rounded up. /// @return amount The share amount back into native representation. function toAmount( address token, uint256 share, bool roundUp ) external view returns (uint256 amount); /// @notice Registers this contract so that users can approve it for BentoBox. function registerProtocol() external; /// @notice Deposit an amount of `token` represented in either `amount` or `share`. /// @param token The ERC-20 token to deposit. /// @param from which account to pull the tokens. /// @param to which account to push the tokens. /// @param amount Token amount in native representation to deposit. /// @param share Token amount represented in shares to deposit. Takes precedence over `amount`. /// @return amountOut The amount deposited. /// @return shareOut The deposited amount represented in shares. function deposit( address token, address from, address to, uint256 amount, uint256 share ) external payable returns (uint256 amountOut, uint256 shareOut); /// @notice Withdraws an amount of `token` from a user account. /// @param token_ The ERC-20 token to withdraw. /// @param from which user to pull the tokens. /// @param to which user to push the tokens. /// @param amount of tokens. Either one of `amount` or `share` needs to be supplied. /// @param share Like above, but `share` takes precedence over `amount`. function withdraw( address token_, address from, address to, uint256 amount, uint256 share ) external returns (uint256 amountOut, uint256 shareOut); /// @notice Transfer shares from a user account to another one. /// @param token The ERC-20 token to transfer. /// @param from which user to pull the tokens. /// @param to which user to push the tokens. /// @param share The amount of `token` in shares. function transfer( address token, address from, address to, uint256 share ) external; /// @dev Reads the Rebase `totals`from storage for a given token function totals(address token) external view returns (Rebase memory total); function strategyData(address token) external view returns (StrategyData memory total); /// @dev Approves users' BentoBox assets to a "master" contract. function setMasterContractApproval( address user, address masterContract, bool approved, uint8 v, bytes32 r, bytes32 s ) external; function harvest( address token, bool balance, uint256 maxChangeAmount ) external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.5.0; pragma experimental ABIEncoderV2; /// @notice Trident pool interface. interface IPool { /// @notice Executes a swap from one token to another. /// @dev The input tokens must've already been sent to the pool. /// @param data ABI-encoded params that the pool requires. /// @return finalAmountOut The amount of output tokens that were sent to the user. function swap(bytes calldata data) external returns (uint256 finalAmountOut); /// @notice Executes a swap from one token to another with a callback. /// @dev This function allows borrowing the output tokens and sending the input tokens in the callback. /// @param data ABI-encoded params that the pool requires. /// @return finalAmountOut The amount of output tokens that were sent to the user. function flashSwap(bytes calldata data) external returns (uint256 finalAmountOut); /// @notice Mints liquidity tokens. /// @param data ABI-encoded params that the pool requires. /// @return liquidity The amount of liquidity tokens that were minted for the user. function mint(bytes calldata data) external returns (uint256 liquidity); /// @notice Burns liquidity tokens. /// @dev The input LP tokens must've already been sent to the pool. /// @param data ABI-encoded params that the pool requires. /// @return withdrawnAmounts The amount of various output tokens that were sent to the user. function burn(bytes calldata data) external returns (TokenAmount[] memory withdrawnAmounts); /// @notice Burns liquidity tokens for a single output token. /// @dev The input LP tokens must've already been sent to the pool. /// @param data ABI-encoded params that the pool requires. /// @return amountOut The amount of output tokens that were sent to the user. function burnSingle(bytes calldata data) external returns (uint256 amountOut); /// @return A unique identifier for the pool type. function poolIdentifier() external pure returns (bytes32); /// @return An array of tokens supported by the pool. function getAssets() external view returns (address[] memory); /// @notice Simulates a trade and returns the expected output. /// @dev The pool does not need to include a trade simulator directly in itself - it can use a library. /// @param data ABI-encoded params that the pool requires. /// @return finalAmountOut The amount of output tokens that will be sent to the user if the trade is executed. function getAmountOut(bytes calldata data) external view returns (uint256 finalAmountOut); /// @notice Simulates a trade and returns the expected output. /// @dev The pool does not need to include a trade simulator directly in itself - it can use a library. /// @param data ABI-encoded params that the pool requires. /// @return finalAmountIn The amount of input tokens that are required from the user if the trade is executed. function getAmountIn(bytes calldata data) external view returns (uint256 finalAmountIn); /// @dev This event must be emitted on all swaps. event Swap(address indexed recipient, address indexed tokenIn, address indexed tokenOut, uint256 amountIn, uint256 amountOut); /// @dev This struct frames output tokens for burns. struct TokenAmount { address token; uint256 amount; } }
// SPDX-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; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.10; interface IWETH { function deposit() external payable; function transfer(address to, uint256 value) external returns (bool); function withdraw(uint256) external; }
{ "optimizer": { "enabled": true, "runs": 10000000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_bentoBox","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"bentoBox","outputs":[{"internalType":"contract IBentoBoxMinimal","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"route","type":"bytes"}],"name":"processRoute","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address payable","name":"transferValueTo","type":"address"},{"internalType":"uint256","name":"amountValueTransfer","type":"uint256"},{"internalType":"address","name":"tokenIn","type":"address"},{"internalType":"uint256","name":"amountIn","type":"uint256"},{"internalType":"address","name":"tokenOut","type":"address"},{"internalType":"uint256","name":"amountOutMin","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"bytes","name":"route","type":"bytes"}],"name":"transferValueAndprocessRoute","outputs":[{"internalType":"uint256","name":"amountOut","type":"uint256"}],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a0604052600160005534801561001557600080fd5b506040516200255e3803806200255e83398101604081905261003691610047565b6001600160a01b0316608052610077565b60006020828403121561005957600080fd5b81516001600160a01b038116811461007057600080fd5b9392505050565b60805161247f620000df60003960008181607c015281816110470152818161122001528181611307015281816113f20152818161150a015281816115e5015281816116aa0152818161175701528181611838015281816118fe01526119cd015261247f6000f3fe6080604052600436106100385760003560e01c80632646478b146100445780636b2ace871461006a57806393b3774c146100c357600080fd5b3661003f57005b600080fd5b610057610052366004611f4c565b6100d6565b6040519081526020015b60405180910390f35b34801561007657600080fd5b5061009e7f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610061565b6100576100d1366004611fd3565b61016b565b60008054600114610148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f526f75746550726f636573736f72206973206c6f636b6564000000000000000060448201526064015b60405180910390fd5b600260005561015b8787878787876102bc565b6001600055979650505050505050565b600080546001146101d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f526f75746550726f636573736f72206973206c6f636b65640000000000000000604482015260640161013f565b60026000908155604051819073ffffffffffffffffffffffffffffffffffffffff8c16908b908381818185875af1925050503d8060008114610236576040519150601f19603f3d011682016040523d82523d6000602084013e61023b565b606091505b5091509150818160405160200161025291906120a4565b60405160208183030381529060405290610299576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013f919061210a565b506102a88989898989896102bc565b60016000559b9a5050505050505050505050565b6000808073ffffffffffffffffffffffffffffffffffffffff871673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610386576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528816906370a0823190602401602060405180830381865afa15801561035d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103819190612124565b61039f565b8473ffffffffffffffffffffffffffffffffffffffff16315b604080518082019091528581528551860160208201529091505b80516020820151111561058d5760006103d88280516001018051915290565b905060148160ff1610156104e5578060ff16600a1415610401576103fb82610765565b50610587565b8060ff166004141561041b5761041682610a87565b610587565b8060ff166003141561044257610431828c610bcb565b61043b908561216c565b9350610587565b8060ff16600514156104575761043182610c63565b8060ff166006141561046d576104168783610dfc565b8060ff166007141561048357610431828c610f4d565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e6b6e6f776e20636f6d6d616e6420636f6465000000000000000000000000604482015260640161013f565b60188160ff161015610532578060ff166014141561050757610416828c610fdc565b8060ff166015141561051c57610416826110dc565b8060ff166017141561048357610416828c611196565b8060ff166018141561054857610431828c611251565b8060ff166019141561055d5761041682611378565b8060ff16601a14156105725761041682611574565b8060ff16601b14156104835761041682611887565b506103b9565b8883146105f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f57726f6e6720616d6f756e74496e2076616c7565000000000000000000000000604482015260640161013f565b600073ffffffffffffffffffffffffffffffffffffffff891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146106be576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528a16906370a0823190602401602060405180830381865afa158015610695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b99190612124565b6106d7565b8673ffffffffffffffffffffffffffffffffffffffff16315b90506106e3888461216c565b81101561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4d696e696d616c206f757075742062616c616e63652076696f6c6174696f6e00604482015260640161013f565b6107568382612184565b9b9a5050505050505050505050565b6000806107788380516014018051915290565b9050600061078c8480516014018051915290565b905060006107a08580516001018051915290565b905060006107b48680516014018051915290565b90506000808573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610804573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082891906121be565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff16915060008211801561085d5750600081115b6108c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f57726f6e6720706f6f6c20726573657276657300000000000000000000000000604482015260640161013f565b6000808560ff166001146108d85782846108db565b83835b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301529294509092506000918491908a16906370a0823190602401602060405180830381865afa158015610953573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109779190612124565b6109819190612184565b90506000610991826103e561220e565b9050806109a0856103e861220e565b6109aa919061216c565b6109b4848361220e565b6109be919061224b565b9a506000808960ff166001146109d6578c60006109da565b60008d5b604080516000815260208101918290527f022c0d9f00000000000000000000000000000000000000000000000000000000909152919350915073ffffffffffffffffffffffffffffffffffffffff8d169063022c0d9f90610a4490859085908e9060248101612286565b600060405180830381600087803b158015610a5e57600080fd5b505af1158015610a72573d6000803e3d6000fd5b50505050505050505050505050505050919050565b6000610a998280516014018051915290565b90506000610aad8380516001018051915290565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009060019073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b449190612124565b610b4e9190612184565b905060005b8260ff16811015610bc4576000610b708680516014018051915290565b90506000610b848780516002018051915290565b61ffff8082168602049485900394909150610bb673ffffffffffffffffffffffffffffffffffffffff881684836119fe565b505050806001019050610b53565b5050505050565b600080610bde8480516001018051915290565b90506000915060005b8160ff16811015610c5b576000610c048680516014018051915290565b90506000610c188780516020018051915290565b9050610c24818661216c565b9450610c4873ffffffffffffffffffffffffffffffffffffffff8716338484611ad7565b505080610c54906122cb565b9050610be7565b505092915050565b600080610c768380516014018051915290565b90508073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015610cc057600080fd5b505af1158015610cd4573d6000803e3d6000fd5b50505050506000610ceb8480516001018051915290565b90506000925060005b8160ff16811015610d67576000610d118680516014018051915290565b90506000610d258780516020018051915290565b9050610d31818761216c565b9550610d5473ffffffffffffffffffffffffffffffffffffffff861683836119fe565b505080610d60906122cb565b9050610cf4565b504715610df5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f526f75746550726f636573736f723a20696e76616c696420696e70757420616d60448201527f6f756e7400000000000000000000000000000000000000000000000000000000606482015260840161013f565b5050919050565b6000610e0e8280516014018051915290565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915073ffffffffffffffffffffffffffffffffffffffff821690632e1a7d4d9060019083906370a0823190602401602060405180830381865afa158015610e86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eaa9190612124565b610eb49190612184565b6040518263ffffffff1660e01b8152600401610ed291815260200190565b600060405180830381600087803b158015610eec57600080fd5b505af1158015610f00573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff861692504780156108fc029250906000818181858888f19350505050158015610f47573d6000803e3d6000fd5b50505050565b600080610f608480516001018051915290565b90506000915060005b8160ff16811015610c5b576000610f868680516014018051915290565b90506000610f9a8780516020018051915290565b9050610fa6818661216c565b9450610fc973ffffffffffffffffffffffffffffffffffffffff871683836119fe565b505080610fd5906122cb565b9050610f69565b6000610fee8380516014018051915290565b905060006110028480516020018051915290565b6040517f02b9446c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301819052908516604483015260648201839052600060848301529192506302b9446c9060a4015b60408051808303816000875af11580156110b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d49190612304565b505050505050565b60006110ee8280516014018051915290565b8251602080820180519092010184526040517f627dd56a0000000000000000000000000000000000000000000000000000000081529192509073ffffffffffffffffffffffffffffffffffffffff83169063627dd56a9061115390849060040161210a565b6020604051808303816000875af1158015611172573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f479190612124565b60006111a88380516014018051915290565b905060006111bc8480516020018051915290565b6040517f97da6d3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152848116604483015260648201839052600060848301529192507f0000000000000000000000000000000000000000000000000000000000000000909116906397da6d309060a401611092565b6000806112648480516001018051915290565b90506000915060005b8160ff16811015610c5b57600061128a8680516014018051915290565b9050600061129e8780516020018051915290565b90506112aa818661216c565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301523360248301528481166044830152606482018490529196507f00000000000000000000000000000000000000000000000000000000000000009091169063f18d03cc90608401600060405180830381600087803b15801561134d57600080fd5b505af1158015611361573d6000803e3d6000fd5b50505050505080611371906122cb565b905061126d565b600061138a8280516014018051915290565b9050600061139e8380516001018051915290565b6040517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301523060248301529192506000916001917f00000000000000000000000000000000000000000000000000000000000000009091169063f7888aec90604401602060405180830381865afa15801561143b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145f9190612124565b6114699190612184565b905060005b8260ff16811015610bc457600061148b8680516014018051915290565b9050600061149f8780516002018051915290565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152306024830152848116604483015261ffff8084168802046064830181905296879003969293507f0000000000000000000000000000000000000000000000000000000000000000169063f18d03cc90608401600060405180830381600087803b15801561154e57600080fd5b505af1158015611562573d6000803e3d6000fd5b5050505050505080600101905061146e565b60006115868280516014018051915290565b9050600061159a8380516014018051915290565b6040517f4ffe34db00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301529192506000917f00000000000000000000000000000000000000000000000000000000000000001690634ffe34db906024016040805180830381865afa15801561162b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164f9190612348565b516040517fdf23b45b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526fffffffffffffffffffffffffffffffff909216917f0000000000000000000000000000000000000000000000000000000000000000169063df23b45b90602401606060405180830381865afa1580156116f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171591906123bb565b60409081015190517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000000000000000000000000000000000000000000811660048301526fffffffffffffffffffffffffffffffff909216918516906370a0823190602401602060405180830381865afa1580156117bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117df9190612124565b6117e9919061216c565b6117f39190612184565b6040517f02b9446c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527f0000000000000000000000000000000000000000000000000000000000000000811660248301819052908616604483015260648201839052600060848301529192506302b9446c9060a401611092565b60006118998280516014018051915290565b905060006118ad8380516014018051915290565b6040517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301523060248301529192506000917f0000000000000000000000000000000000000000000000000000000000000000169063f7888aec90604401602060405180830381865afa158015611945573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119699190612124565b6040517f97da6d3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152848116604483015260006064830152608482018390529192507f0000000000000000000000000000000000000000000000000000000000000000909116906397da6d309060a401611092565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611ad29084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611b35565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610f479085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611a50565b6000611b97826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611c419092919063ffffffff16565b805190915015611ad25780806020019051810190611bb59190612427565b611ad2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161013f565b6060611c508484600085611c58565b949350505050565b606082471015611cea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161013f565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611d1391906120a4565b60006040518083038185875af1925050503d8060008114611d50576040519150601f19603f3d011682016040523d82523d6000602084013e611d55565b606091505b5091509150611d6687838387611d71565b979650505050505050565b60608315611e04578251611dfd5773ffffffffffffffffffffffffffffffffffffffff85163b611dfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161013f565b5081611c50565b611c508383815115611e195781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013f919061210a565b73ffffffffffffffffffffffffffffffffffffffff81168114611e6f57600080fd5b50565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112611eb257600080fd5b813567ffffffffffffffff80821115611ecd57611ecd611e72565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611f1357611f13611e72565b81604052838152866020858801011115611f2c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060c08789031215611f6557600080fd5b8635611f7081611e4d565b9550602087013594506040870135611f8781611e4d565b9350606087013592506080870135611f9e81611e4d565b915060a087013567ffffffffffffffff811115611fba57600080fd5b611fc689828a01611ea1565b9150509295509295509295565b600080600080600080600080610100898b031215611ff057600080fd5b8835611ffb81611e4d565b975060208901359650604089013561201281611e4d565b955060608901359450608089013561202981611e4d565b935060a0890135925060c089013561204081611e4d565b915060e089013567ffffffffffffffff81111561205c57600080fd5b6120688b828c01611ea1565b9150509295985092959890939650565b60005b8381101561209357818101518382015260200161207b565b83811115610f475750506000910152565b600082516120b6818460208701612078565b9190910192915050565b600081518084526120d8816020860160208601612078565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061211d60208301846120c0565b9392505050565b60006020828403121561213657600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561217f5761217f61213d565b500190565b6000828210156121965761219661213d565b500390565b80516dffffffffffffffffffffffffffff811681146121b957600080fd5b919050565b6000806000606084860312156121d357600080fd5b6121dc8461219b565b92506121ea6020850161219b565b9150604084015163ffffffff8116811461220357600080fd5b809150509250925092565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156122465761224661213d565b500290565b600082612281577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b84815283602082015273ffffffffffffffffffffffffffffffffffffffff831660408201526080606082015260006122c160808301846120c0565b9695505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156122fd576122fd61213d565b5060010190565b6000806040838503121561231757600080fd5b505080516020909101519092909150565b80516fffffffffffffffffffffffffffffffff811681146121b957600080fd5b60006040828403121561235a57600080fd5b6040516040810181811067ffffffffffffffff8211171561237d5761237d611e72565b60405261238983612328565b815261239760208401612328565b60208201529392505050565b805167ffffffffffffffff811681146121b957600080fd5b6000606082840312156123cd57600080fd5b6040516060810181811067ffffffffffffffff821117156123f0576123f0611e72565b6040526123fc836123a3565b815261240a602084016123a3565b602082015261241b60408401612328565b60408201529392505050565b60006020828403121561243957600080fd5b8151801515811461211d57600080fdfea26469706673582212209b78afa27a62136892cf89cf9f96738d000f62d1e7884677de68fa7be644924a64736f6c634300080a00330000000000000000000000000711b6026068f736bae6b213031fce978d48e026
Deployed Bytecode
0x6080604052600436106100385760003560e01c80632646478b146100445780636b2ace871461006a57806393b3774c146100c357600080fd5b3661003f57005b600080fd5b610057610052366004611f4c565b6100d6565b6040519081526020015b60405180910390f35b34801561007657600080fd5b5061009e7f0000000000000000000000000711b6026068f736bae6b213031fce978d48e02681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610061565b6100576100d1366004611fd3565b61016b565b60008054600114610148576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f526f75746550726f636573736f72206973206c6f636b6564000000000000000060448201526064015b60405180910390fd5b600260005561015b8787878787876102bc565b6001600055979650505050505050565b600080546001146101d8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601860248201527f526f75746550726f636573736f72206973206c6f636b65640000000000000000604482015260640161013f565b60026000908155604051819073ffffffffffffffffffffffffffffffffffffffff8c16908b908381818185875af1925050503d8060008114610236576040519150601f19603f3d011682016040523d82523d6000602084013e61023b565b606091505b5091509150818160405160200161025291906120a4565b60405160208183030381529060405290610299576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013f919061210a565b506102a88989898989896102bc565b60016000559b9a5050505050505050505050565b6000808073ffffffffffffffffffffffffffffffffffffffff871673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee14610386576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528816906370a0823190602401602060405180830381865afa15801561035d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103819190612124565b61039f565b8473ffffffffffffffffffffffffffffffffffffffff16315b604080518082019091528581528551860160208201529091505b80516020820151111561058d5760006103d88280516001018051915290565b905060148160ff1610156104e5578060ff16600a1415610401576103fb82610765565b50610587565b8060ff166004141561041b5761041682610a87565b610587565b8060ff166003141561044257610431828c610bcb565b61043b908561216c565b9350610587565b8060ff16600514156104575761043182610c63565b8060ff166006141561046d576104168783610dfc565b8060ff166007141561048357610431828c610f4d565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f556e6b6e6f776e20636f6d6d616e6420636f6465000000000000000000000000604482015260640161013f565b60188160ff161015610532578060ff166014141561050757610416828c610fdc565b8060ff166015141561051c57610416826110dc565b8060ff166017141561048357610416828c611196565b8060ff166018141561054857610431828c611251565b8060ff166019141561055d5761041682611378565b8060ff16601a14156105725761041682611574565b8060ff16601b14156104835761041682611887565b506103b9565b8883146105f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f57726f6e6720616d6f756e74496e2076616c7565000000000000000000000000604482015260640161013f565b600073ffffffffffffffffffffffffffffffffffffffff891673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee146106be576040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301528a16906370a0823190602401602060405180830381865afa158015610695573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106b99190612124565b6106d7565b8673ffffffffffffffffffffffffffffffffffffffff16315b90506106e3888461216c565b81101561074c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601f60248201527f4d696e696d616c206f757075742062616c616e63652076696f6c6174696f6e00604482015260640161013f565b6107568382612184565b9b9a5050505050505050505050565b6000806107788380516014018051915290565b9050600061078c8480516014018051915290565b905060006107a08580516001018051915290565b905060006107b48680516014018051915290565b90506000808573ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610804573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082891906121be565b506dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff16915060008211801561085d5750600081115b6108c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601360248201527f57726f6e6720706f6f6c20726573657276657300000000000000000000000000604482015260640161013f565b6000808560ff166001146108d85782846108db565b83835b6040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8b811660048301529294509092506000918491908a16906370a0823190602401602060405180830381865afa158015610953573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109779190612124565b6109819190612184565b90506000610991826103e561220e565b9050806109a0856103e861220e565b6109aa919061216c565b6109b4848361220e565b6109be919061224b565b9a506000808960ff166001146109d6578c60006109da565b60008d5b604080516000815260208101918290527f022c0d9f00000000000000000000000000000000000000000000000000000000909152919350915073ffffffffffffffffffffffffffffffffffffffff8d169063022c0d9f90610a4490859085908e9060248101612286565b600060405180830381600087803b158015610a5e57600080fd5b505af1158015610a72573d6000803e3d6000fd5b50505050505050505050505050505050919050565b6000610a998280516014018051915290565b90506000610aad8380516001018051915290565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915060009060019073ffffffffffffffffffffffffffffffffffffffff8516906370a0823190602401602060405180830381865afa158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b449190612124565b610b4e9190612184565b905060005b8260ff16811015610bc4576000610b708680516014018051915290565b90506000610b848780516002018051915290565b61ffff8082168602049485900394909150610bb673ffffffffffffffffffffffffffffffffffffffff881684836119fe565b505050806001019050610b53565b5050505050565b600080610bde8480516001018051915290565b90506000915060005b8160ff16811015610c5b576000610c048680516014018051915290565b90506000610c188780516020018051915290565b9050610c24818661216c565b9450610c4873ffffffffffffffffffffffffffffffffffffffff8716338484611ad7565b505080610c54906122cb565b9050610be7565b505092915050565b600080610c768380516014018051915290565b90508073ffffffffffffffffffffffffffffffffffffffff1663d0e30db0476040518263ffffffff1660e01b81526004016000604051808303818588803b158015610cc057600080fd5b505af1158015610cd4573d6000803e3d6000fd5b50505050506000610ceb8480516001018051915290565b90506000925060005b8160ff16811015610d67576000610d118680516014018051915290565b90506000610d258780516020018051915290565b9050610d31818761216c565b9550610d5473ffffffffffffffffffffffffffffffffffffffff861683836119fe565b505080610d60906122cb565b9050610cf4565b504715610df5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f526f75746550726f636573736f723a20696e76616c696420696e70757420616d60448201527f6f756e7400000000000000000000000000000000000000000000000000000000606482015260840161013f565b5050919050565b6000610e0e8280516014018051915290565b6040517f70a0823100000000000000000000000000000000000000000000000000000000815230600482015290915073ffffffffffffffffffffffffffffffffffffffff821690632e1a7d4d9060019083906370a0823190602401602060405180830381865afa158015610e86573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eaa9190612124565b610eb49190612184565b6040518263ffffffff1660e01b8152600401610ed291815260200190565b600060405180830381600087803b158015610eec57600080fd5b505af1158015610f00573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff861692504780156108fc029250906000818181858888f19350505050158015610f47573d6000803e3d6000fd5b50505050565b600080610f608480516001018051915290565b90506000915060005b8160ff16811015610c5b576000610f868680516014018051915290565b90506000610f9a8780516020018051915290565b9050610fa6818661216c565b9450610fc973ffffffffffffffffffffffffffffffffffffffff871683836119fe565b505080610fd5906122cb565b9050610f69565b6000610fee8380516014018051915290565b905060006110028480516020018051915290565b6040517f02b9446c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85811660048301527f0000000000000000000000000711b6026068f736bae6b213031fce978d48e026811660248301819052908516604483015260648201839052600060848301529192506302b9446c9060a4015b60408051808303816000875af11580156110b0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d49190612304565b505050505050565b60006110ee8280516014018051915290565b8251602080820180519092010184526040517f627dd56a0000000000000000000000000000000000000000000000000000000081529192509073ffffffffffffffffffffffffffffffffffffffff83169063627dd56a9061115390849060040161210a565b6020604051808303816000875af1158015611172573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f479190612124565b60006111a88380516014018051915290565b905060006111bc8480516020018051915290565b6040517f97da6d3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152848116604483015260648201839052600060848301529192507f0000000000000000000000000711b6026068f736bae6b213031fce978d48e026909116906397da6d309060a401611092565b6000806112648480516001018051915290565b90506000915060005b8160ff16811015610c5b57600061128a8680516014018051915290565b9050600061129e8780516020018051915290565b90506112aa818661216c565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff88811660048301523360248301528481166044830152606482018490529196507f0000000000000000000000000711b6026068f736bae6b213031fce978d48e0269091169063f18d03cc90608401600060405180830381600087803b15801561134d57600080fd5b505af1158015611361573d6000803e3d6000fd5b50505050505080611371906122cb565b905061126d565b600061138a8280516014018051915290565b9050600061139e8380516001018051915290565b6040517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301523060248301529192506000916001917f0000000000000000000000000711b6026068f736bae6b213031fce978d48e0269091169063f7888aec90604401602060405180830381865afa15801561143b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061145f9190612124565b6114699190612184565b905060005b8260ff16811015610bc457600061148b8680516014018051915290565b9050600061149f8780516002018051915290565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8881166004830152306024830152848116604483015261ffff8084168802046064830181905296879003969293507f0000000000000000000000000711b6026068f736bae6b213031fce978d48e026169063f18d03cc90608401600060405180830381600087803b15801561154e57600080fd5b505af1158015611562573d6000803e3d6000fd5b5050505050505080600101905061146e565b60006115868280516014018051915290565b9050600061159a8380516014018051915290565b6040517f4ffe34db00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff80831660048301529192506000917f0000000000000000000000000711b6026068f736bae6b213031fce978d48e0261690634ffe34db906024016040805180830381865afa15801561162b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061164f9190612348565b516040517fdf23b45b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301526fffffffffffffffffffffffffffffffff909216917f0000000000000000000000000711b6026068f736bae6b213031fce978d48e026169063df23b45b90602401606060405180830381865afa1580156116f1573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171591906123bb565b60409081015190517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff7f0000000000000000000000000711b6026068f736bae6b213031fce978d48e026811660048301526fffffffffffffffffffffffffffffffff909216918516906370a0823190602401602060405180830381865afa1580156117bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117df9190612124565b6117e9919061216c565b6117f39190612184565b6040517f02b9446c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301527f0000000000000000000000000711b6026068f736bae6b213031fce978d48e026811660248301819052908616604483015260648201839052600060848301529192506302b9446c9060a401611092565b60006118998280516014018051915290565b905060006118ad8380516014018051915290565b6040517ff7888aec00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301523060248301529192506000917f0000000000000000000000000711b6026068f736bae6b213031fce978d48e026169063f7888aec90604401602060405180830381865afa158015611945573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119699190612124565b6040517f97da6d3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8581166004830152306024830152848116604483015260006064830152608482018390529192507f0000000000000000000000000711b6026068f736bae6b213031fce978d48e026909116906397da6d309060a401611092565b60405173ffffffffffffffffffffffffffffffffffffffff8316602482015260448101829052611ad29084907fa9059cbb00000000000000000000000000000000000000000000000000000000906064015b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fffffffff0000000000000000000000000000000000000000000000000000000090931692909217909152611b35565b505050565b60405173ffffffffffffffffffffffffffffffffffffffff80851660248301528316604482015260648101829052610f479085907f23b872dd0000000000000000000000000000000000000000000000000000000090608401611a50565b6000611b97826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16611c419092919063ffffffff16565b805190915015611ad25780806020019051810190611bb59190612427565b611ad2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f74207375636365656400000000000000000000000000000000000000000000606482015260840161013f565b6060611c508484600085611c58565b949350505050565b606082471015611cea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c0000000000000000000000000000000000000000000000000000606482015260840161013f565b6000808673ffffffffffffffffffffffffffffffffffffffff168587604051611d1391906120a4565b60006040518083038185875af1925050503d8060008114611d50576040519150601f19603f3d011682016040523d82523d6000602084013e611d55565b606091505b5091509150611d6687838387611d71565b979650505050505050565b60608315611e04578251611dfd5773ffffffffffffffffffffffffffffffffffffffff85163b611dfd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161013f565b5081611c50565b611c508383815115611e195781518083602001fd5b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161013f919061210a565b73ffffffffffffffffffffffffffffffffffffffff81168114611e6f57600080fd5b50565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f830112611eb257600080fd5b813567ffffffffffffffff80821115611ecd57611ecd611e72565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908282118183101715611f1357611f13611e72565b81604052838152866020858801011115611f2c57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060008060008060c08789031215611f6557600080fd5b8635611f7081611e4d565b9550602087013594506040870135611f8781611e4d565b9350606087013592506080870135611f9e81611e4d565b915060a087013567ffffffffffffffff811115611fba57600080fd5b611fc689828a01611ea1565b9150509295509295509295565b600080600080600080600080610100898b031215611ff057600080fd5b8835611ffb81611e4d565b975060208901359650604089013561201281611e4d565b955060608901359450608089013561202981611e4d565b935060a0890135925060c089013561204081611e4d565b915060e089013567ffffffffffffffff81111561205c57600080fd5b6120688b828c01611ea1565b9150509295985092959890939650565b60005b8381101561209357818101518382015260200161207b565b83811115610f475750506000910152565b600082516120b6818460208701612078565b9190910192915050565b600081518084526120d8816020860160208601612078565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60208152600061211d60208301846120c0565b9392505050565b60006020828403121561213657600080fd5b5051919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000821982111561217f5761217f61213d565b500190565b6000828210156121965761219661213d565b500390565b80516dffffffffffffffffffffffffffff811681146121b957600080fd5b919050565b6000806000606084860312156121d357600080fd5b6121dc8461219b565b92506121ea6020850161219b565b9150604084015163ffffffff8116811461220357600080fd5b809150509250925092565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156122465761224661213d565b500290565b600082612281577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b84815283602082015273ffffffffffffffffffffffffffffffffffffffff831660408201526080606082015260006122c160808301846120c0565b9695505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156122fd576122fd61213d565b5060010190565b6000806040838503121561231757600080fd5b505080516020909101519092909150565b80516fffffffffffffffffffffffffffffffff811681146121b957600080fd5b60006040828403121561235a57600080fd5b6040516040810181811067ffffffffffffffff8211171561237d5761237d611e72565b60405261238983612328565b815261239760208401612328565b60208201529392505050565b805167ffffffffffffffff811681146121b957600080fd5b6000606082840312156123cd57600080fd5b6040516060810181811067ffffffffffffffff821117156123f0576123f0611e72565b6040526123fc836123a3565b815261240a602084016123a3565b602082015261241b60408401612328565b60408201529392505050565b60006020828403121561243957600080fd5b8151801515811461211d57600080fdfea26469706673582212209b78afa27a62136892cf89cf9f96738d000f62d1e7884677de68fa7be644924a64736f6c634300080a0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000711b6026068f736bae6b213031fce978d48e026
-----Decoded View---------------
Arg [0] : _bentoBox (address): 0x0711B6026068f736bae6B213031fCE978D48E026
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000711b6026068f736bae6b213031fce978d48e026
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.