Contract
0x312A8E33d78d3Ab79E62971E86e5e8c9c5E28D64
10
Contract Overview
Balance:
0 AVAX
AVAX Value:
$0.00
Txn Hash | Method |
Block
|
From
|
To
|
Value | [Txn Fee] | |||
---|---|---|---|---|---|---|---|---|---|
0xc11adfa62f95d769c2785f987d35f9937b9e833d2649d5ccb62e7d304b4ff508 | 0x60c06040 | 18157958 | 234 days 2 hrs ago | 0x9346e1966e0510b3491fe04297bcb33c9e4729d5 | IN | Create: FuroVesting | 0 AVAX | 1.5022093 |
[ Download CSV Export ]
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
FuroVesting
Compiler Version
v0.8.10+commit.fc410830
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.10; import "../interfaces/IFuroVesting.sol"; contract FuroVesting is IFuroVesting, ERC721("Furo Vesting", "FUROVEST"), Multicall, BoringOwnable { IBentoBoxMinimal public immutable bentoBox; address public immutable wETH; address public tokenURIFetcher; mapping(uint256 => Vest) public vests; uint256 public vestIds; uint256 public constant PERCENTAGE_PRECISION = 1e18; // custom errors error InvalidStart(); error NotOwner(); error NotVestReceiver(); error InvalidStepSetting(); error InsufficientShares(); constructor(IBentoBoxMinimal _bentoBox, address _wETH) { bentoBox = _bentoBox; wETH = _wETH; vestIds = 1; _bentoBox.registerProtocol(); } function setTokenURIFetcher(address _fetcher) external onlyOwner { tokenURIFetcher = _fetcher; } function tokenURI(uint256 id) public view override returns (string memory) { return ITokenURIFetcher(tokenURIFetcher).fetchTokenURIData(id); } function setBentoBoxApproval( address user, bool approved, uint8 v, bytes32 r, bytes32 s ) external payable override { bentoBox.setMasterContractApproval( user, address(this), approved, v, r, s ); } function createVesting(VestParams calldata vestParams) external payable override returns ( uint256 depositedShares, uint256 vestId, uint128 stepShares, uint128 cliffShares ) { if (vestParams.start < block.timestamp) revert InvalidStart(); if (vestParams.stepPercentage > PERCENTAGE_PRECISION) revert InvalidStepSetting(); if (vestParams.stepDuration == 0 || vestParams.steps == 0) revert InvalidStepSetting(); depositedShares = _depositToken( address(vestParams.token), msg.sender, address(this), vestParams.amount, vestParams.fromBentoBox ); if(depositedShares < vestParams.minShare) revert InsufficientShares(); stepShares = uint128( (vestParams.stepPercentage * depositedShares) / PERCENTAGE_PRECISION ); cliffShares = uint128( depositedShares - (stepShares * vestParams.steps) ); vestId = vestIds++; _mint(vestParams.recipient, vestId); vests[vestId] = Vest({ owner: msg.sender, token: address(vestParams.token) == address(0) ? IERC20(wETH) : vestParams.token, start: vestParams.start, cliffDuration: vestParams.cliffDuration, stepDuration: vestParams.stepDuration, steps: vestParams.steps, cliffShares: cliffShares, stepShares: stepShares, claimed: 0 }); emit CreateVesting( vestId, vestParams.token, msg.sender, vestParams.recipient, vestParams.start, vestParams.cliffDuration, vestParams.stepDuration, vestParams.steps, cliffShares, stepShares, vestParams.fromBentoBox ); } function withdraw( uint256 vestId, bytes calldata taskData, bool toBentoBox ) external override { Vest storage vest = vests[vestId]; address recipient = ownerOf[vestId]; if (recipient != msg.sender) revert NotVestReceiver(); uint256 canClaim = _balanceOf(vest) - vest.claimed; if (canClaim == 0) return; vest.claimed += uint128(canClaim); _transferToken( address(vest.token), address(this), recipient, canClaim, toBentoBox ); if (taskData.length != 0) ITasker(recipient).onTaskReceived(taskData); emit Withdraw(vestId, vest.token, canClaim, toBentoBox); } function stopVesting(uint256 vestId, bool toBentoBox) external override { Vest memory vest = vests[vestId]; if (vest.owner != msg.sender) revert NotOwner(); uint256 amountVested = _balanceOf(vest); uint256 canClaim = amountVested - vest.claimed; uint256 returnShares = (vest.cliffShares + (vest.steps * vest.stepShares)) - amountVested; delete vests[vestId]; _transferToken( address(vest.token), address(this), ownerOf[vestId], canClaim, toBentoBox ); _transferToken( address(vest.token), address(this), msg.sender, returnShares, toBentoBox ); emit CancelVesting( vestId, returnShares, canClaim, vest.token, toBentoBox ); } function vestBalance(uint256 vestId) external view override returns (uint256) { Vest memory vest = vests[vestId]; return _balanceOf(vest) - vest.claimed; } function _balanceOf(Vest memory vest) internal view returns (uint256 claimable) { uint256 timeAfterCliff = vest.start + vest.cliffDuration; if (block.timestamp < timeAfterCliff) { return claimable; } uint256 passedSinceCliff = block.timestamp - timeAfterCliff; uint256 stepPassed = Math.min( vest.steps, passedSinceCliff / vest.stepDuration ); claimable = vest.cliffShares + (vest.stepShares * stepPassed); } function updateOwner(uint256 vestId, address newOwner) external override { Vest storage vest = vests[vestId]; if (vest.owner != msg.sender) revert NotOwner(); vest.owner = newOwner; emit LogUpdateOwner(vestId, newOwner); } function _depositToken( address token, address from, address to, uint256 amount, bool fromBentoBox ) internal returns (uint256 depositedShares) { if (fromBentoBox) { depositedShares = bentoBox.toShare(token, amount, false); bentoBox.transfer(token, from, to, depositedShares); } else { (, depositedShares) = bentoBox.deposit{ value: token == address(0) ? amount : 0 }(token, from, to, amount, 0); } } function _transferToken( address token, address from, address to, uint256 shares, bool toBentoBox ) internal { if (toBentoBox) { bentoBox.transfer(token, from, to, shares); } else { bentoBox.withdraw(token, from, to, 0, shares); } } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.10; import "./ITasker.sol"; import "./IERC20.sol"; import "./ITokenURIFetcher.sol"; import "./IBentoBoxMinimal.sol"; import "../utils/Multicall.sol"; import "../utils/BoringOwnable.sol"; import "@openzeppelin/contracts/utils/math/Math.sol"; import "@rari-capital/solmate/src/tokens/ERC721.sol"; interface IFuroVesting { function setBentoBoxApproval( address user, bool approved, uint8 v, bytes32 r, bytes32 s ) external payable; function createVesting(VestParams calldata vestParams) external payable returns ( uint256 depositedShares, uint256 vestId, uint128 stepShares, uint128 cliffShares ); function withdraw( uint256 vestId, bytes memory taskData, bool toBentoBox ) external; function stopVesting(uint256 vestId, bool toBentoBox) external; function vestBalance(uint256 vestId) external view returns (uint256); function updateOwner(uint256 vestId, address newOwner) external; struct VestParams { IERC20 token; address recipient; uint32 start; uint32 cliffDuration; uint32 stepDuration; uint32 steps; uint128 stepPercentage; uint128 amount; bool fromBentoBox; uint256 minShare; } struct Vest { address owner; IERC20 token; uint32 start; uint32 cliffDuration; uint32 stepDuration; uint32 steps; uint128 cliffShares; uint128 stepShares; uint128 claimed; } event CreateVesting( uint256 indexed vestId, IERC20 token, address indexed owner, address indexed recipient, uint32 start, uint32 cliffDuration, uint32 stepDuration, uint32 steps, uint128 cliffShares, uint128 stepShares, bool fromBentoBox ); event Withdraw( uint256 indexed vestId, IERC20 indexed token, uint256 indexed amount, bool toBentoBox ); event CancelVesting( uint256 indexed vestId, uint256 indexed ownerAmount, uint256 indexed recipientAmount, IERC20 token, bool toBentoBox ); event LogUpdateOwner(uint256 indexed vestId, address indexed newOwner); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.10; interface ITasker { function onTaskReceived( bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.10; 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; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.10; interface ITokenURIFetcher { function fetchTokenURIData(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.8.10; /// @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; function setMasterContractApproval( address user, address masterContract, bool approved, uint8 v, bytes32 r, bytes32 s ) external; }
// SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.8.10; /// @title Multicall /// @notice Enables calling multiple methods in a single call to the contract abstract contract Multicall { function multicall(bytes[] calldata data) public payable returns (bytes[] memory results) { results = new bytes[](data.length); for (uint256 i = 0; i < data.length; i++) { (bool success, bytes memory result) = address(this).delegatecall( data[i] ); if (!success) { // Next 5 lines from https://ethereum.stackexchange.com/a/83577 if (result.length < 68) revert(); assembly { result := add(result, 0x04) } revert(abi.decode(result, (string))); } results[i] = result; } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.12; // Audit on 5-Jan-2021 by Keno and BoringCrypto // Source: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/access/Ownable.sol + Claimable.sol // Edited by BoringCrypto contract BoringOwnableData { address public owner; address public pendingOwner; } contract BoringOwnable is BoringOwnableData { event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /// @notice `owner` defaults to msg.sender on construction. constructor() { owner = msg.sender; emit OwnershipTransferred(address(0), msg.sender); } /// @notice Transfers ownership to `newOwner`. Either directly or claimable by the new pending owner. /// Can only be invoked by the current `owner`. /// @param newOwner Address of the new owner. /// @param direct True if `newOwner` should be set immediately. False if `newOwner` needs to use `claimOwnership`. /// @param renounce Allows the `newOwner` to be `address(0)` if `direct` and `renounce` is True. Has no effect otherwise. function transferOwnership( address newOwner, bool direct, bool renounce ) public onlyOwner { if (direct) { // Checks require( newOwner != address(0) || renounce, "Ownable: zero address" ); // Effects emit OwnershipTransferred(owner, newOwner); owner = newOwner; pendingOwner = address(0); } else { // Effects pendingOwner = newOwner; } } /// @notice Needs to be called by `pendingOwner` to claim ownership. function claimOwnership() public { address _pendingOwner = pendingOwner; // Checks require( msg.sender == _pendingOwner, "Ownable: caller != pending owner" ); // Effects emit OwnershipTransferred(owner, _pendingOwner); owner = _pendingOwner; pendingOwner = address(0); } /// @notice Only allows the `owner` to execute the function. modifier onlyOwner() { require(msg.sender == owner, "Ownable: caller is not the owner"); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. It the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`. // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`. // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a // good first aproximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1; uint256 x = a; if (x >> 128 > 0) { x >>= 128; result <<= 64; } if (x >> 64 > 0) { x >>= 64; result <<= 32; } if (x >> 32 > 0) { x >>= 32; result <<= 16; } if (x >> 16 > 0) { x >>= 16; result <<= 8; } if (x >> 8 > 0) { x >>= 8; result <<= 4; } if (x >> 4 > 0) { x >>= 4; result <<= 2; } if (x >> 2 > 0) { result <<= 1; } // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { uint256 result = sqrt(a); if (rounding == Rounding.Up && result * result < a) { result += 1; } return result; } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern, minimalist, and gas efficient ERC-721 implementation. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) /// @dev Note that balanceOf does not revert if passed the zero address, in defiance of the ERC. abstract contract ERC721 { /*/////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 indexed id); event Approval(address indexed owner, address indexed spender, uint256 indexed id); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /*/////////////////////////////////////////////////////////////// METADATA STORAGE/LOGIC //////////////////////////////////////////////////////////////*/ string public name; string public symbol; function tokenURI(uint256 id) public view virtual returns (string memory); /*/////////////////////////////////////////////////////////////// ERC721 STORAGE //////////////////////////////////////////////////////////////*/ mapping(address => uint256) public balanceOf; mapping(uint256 => address) public ownerOf; mapping(uint256 => address) public getApproved; mapping(address => mapping(address => bool)) public isApprovedForAll; /*/////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor(string memory _name, string memory _symbol) { name = _name; symbol = _symbol; } /*/////////////////////////////////////////////////////////////// ERC721 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 id) public virtual { address owner = ownerOf[id]; require(msg.sender == owner || isApprovedForAll[owner][msg.sender], "NOT_AUTHORIZED"); getApproved[id] = spender; emit Approval(owner, spender, id); } function setApprovalForAll(address operator, bool approved) public virtual { isApprovedForAll[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, operator, approved); } function transferFrom( address from, address to, uint256 id ) public virtual { require(from == ownerOf[id], "WRONG_FROM"); require(to != address(0), "INVALID_RECIPIENT"); require( msg.sender == from || msg.sender == getApproved[id] || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED" ); // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. unchecked { balanceOf[from]--; balanceOf[to]++; } ownerOf[id] = to; delete getApproved[id]; emit Transfer(from, to, id); } function safeTransferFrom( address from, address to, uint256 id ) public virtual { transferFrom(from, to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, "") == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } function safeTransferFrom( address from, address to, uint256 id, bytes memory data ) public virtual { transferFrom(from, to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, from, id, data) == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } /*/////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/ function supportsInterface(bytes4 interfaceId) public pure virtual returns (bool) { return interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 interfaceId == 0x80ac58cd || // ERC165 Interface ID for ERC721 interfaceId == 0x5b5e139f; // ERC165 Interface ID for ERC721Metadata } /*/////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 id) internal virtual { require(to != address(0), "INVALID_RECIPIENT"); require(ownerOf[id] == address(0), "ALREADY_MINTED"); // Counter overflow is incredibly unrealistic. unchecked { balanceOf[to]++; } ownerOf[id] = to; emit Transfer(address(0), to, id); } function _burn(uint256 id) internal virtual { address owner = ownerOf[id]; require(ownerOf[id] != address(0), "NOT_MINTED"); // Ownership check above ensures no underflow. unchecked { balanceOf[owner]--; } delete ownerOf[id]; delete getApproved[id]; emit Transfer(owner, address(0), id); } /*/////////////////////////////////////////////////////////////// INTERNAL SAFE MINT LOGIC //////////////////////////////////////////////////////////////*/ function _safeMint(address to, uint256 id) internal virtual { _mint(to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, "") == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } function _safeMint( address to, uint256 id, bytes memory data ) internal virtual { _mint(to, id); require( to.code.length == 0 || ERC721TokenReceiver(to).onERC721Received(msg.sender, address(0), id, data) == ERC721TokenReceiver.onERC721Received.selector, "UNSAFE_RECIPIENT" ); } } /// @notice A generic interface for a contract which properly accepts ERC721 tokens. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC721.sol) interface ERC721TokenReceiver { function onERC721Received( address operator, address from, uint256 id, bytes calldata data ) external returns (bytes4); }
{ "optimizer": { "enabled": true, "runs": 999999 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
[{"inputs":[{"internalType":"contract IBentoBoxMinimal","name":"_bentoBox","type":"address"},{"internalType":"address","name":"_wETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InsufficientShares","type":"error"},{"inputs":[],"name":"InvalidStart","type":"error"},{"inputs":[],"name":"InvalidStepSetting","type":"error"},{"inputs":[],"name":"NotOwner","type":"error"},{"inputs":[],"name":"NotVestReceiver","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"vestId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"ownerAmount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"recipientAmount","type":"uint256"},{"indexed":false,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"bool","name":"toBentoBox","type":"bool"}],"name":"CancelVesting","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"vestId","type":"uint256"},{"indexed":false,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint32","name":"start","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"cliffDuration","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"stepDuration","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"steps","type":"uint32"},{"indexed":false,"internalType":"uint128","name":"cliffShares","type":"uint128"},{"indexed":false,"internalType":"uint128","name":"stepShares","type":"uint128"},{"indexed":false,"internalType":"bool","name":"fromBentoBox","type":"bool"}],"name":"CreateVesting","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"vestId","type":"uint256"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"LogUpdateOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"vestId","type":"uint256"},{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"bool","name":"toBentoBox","type":"bool"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"PERCENTAGE_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"bentoBox","outputs":[{"internalType":"contract IBentoBoxMinimal","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint32","name":"start","type":"uint32"},{"internalType":"uint32","name":"cliffDuration","type":"uint32"},{"internalType":"uint32","name":"stepDuration","type":"uint32"},{"internalType":"uint32","name":"steps","type":"uint32"},{"internalType":"uint128","name":"stepPercentage","type":"uint128"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"bool","name":"fromBentoBox","type":"bool"},{"internalType":"uint256","name":"minShare","type":"uint256"}],"internalType":"struct IFuroVesting.VestParams","name":"vestParams","type":"tuple"}],"name":"createVesting","outputs":[{"internalType":"uint256","name":"depositedShares","type":"uint256"},{"internalType":"uint256","name":"vestId","type":"uint256"},{"internalType":"uint128","name":"stepShares","type":"uint128"},{"internalType":"uint128","name":"cliffShares","type":"uint128"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes[]","name":"data","type":"bytes[]"}],"name":"multicall","outputs":[{"internalType":"bytes[]","name":"results","type":"bytes[]"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pendingOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"bool","name":"approved","type":"bool"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"setBentoBoxApproval","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_fetcher","type":"address"}],"name":"setTokenURIFetcher","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"vestId","type":"uint256"},{"internalType":"bool","name":"toBentoBox","type":"bool"}],"name":"stopVesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURIFetcher","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"},{"internalType":"bool","name":"direct","type":"bool"},{"internalType":"bool","name":"renounce","type":"bool"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"vestId","type":"uint256"},{"internalType":"address","name":"newOwner","type":"address"}],"name":"updateOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"vestId","type":"uint256"}],"name":"vestBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vestIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"vests","outputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"uint32","name":"start","type":"uint32"},{"internalType":"uint32","name":"cliffDuration","type":"uint32"},{"internalType":"uint32","name":"stepDuration","type":"uint32"},{"internalType":"uint32","name":"steps","type":"uint32"},{"internalType":"uint128","name":"cliffShares","type":"uint128"},{"internalType":"uint128","name":"stepShares","type":"uint128"},{"internalType":"uint128","name":"claimed","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"vestId","type":"uint256"},{"internalType":"bytes","name":"taskData","type":"bytes"},{"internalType":"bool","name":"toBentoBox","type":"bool"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b50604051620039eb380380620039eb833981016040819052620000349162000216565b604080518082018252600c81526b4675726f2056657374696e6760a01b60208083019182528351808501909452600884526711955493d59154d560c21b908401528151919291620000889160009162000157565b5080516200009e90600190602084019062000157565b5050600680546001600160a01b031916339081179091556040519091506000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a36001600160a01b03808316608081905290821660a0526001600a556040805163577268d960e11b8152905163aee4d1b29160048082019260009290919082900301818387803b1580156200013657600080fd5b505af11580156200014b573d6000803e3d6000fd5b50505050505062000292565b828054620001659062000255565b90600052602060002090601f016020900481019282620001895760008555620001d4565b82601f10620001a457805160ff1916838001178555620001d4565b82800160010185558215620001d4579182015b82811115620001d4578251825591602001919060010190620001b7565b50620001e2929150620001e6565b5090565b5b80821115620001e25760008155600101620001e7565b6001600160a01b03811681146200021357600080fd5b50565b600080604083850312156200022a57600080fd5b82516200023781620001fd565b60208401519092506200024a81620001fd565b809150509250929050565b600181811c908216806200026a57607f821691505b602082108114156200028c57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a051613702620002e9600039600081816107f6015261109f0152600081816105ef01528181611bd3015281816126d20152818161279c0152818161281601528181612aff0152612bc301526137026000f3fe6080604052600436106101d85760003560e01c80636352211e11610102578063ac9650d811610095578063e256888f11610064578063e256888f14610760578063e30c39781461077c578063e985e9c5146107a9578063f2428621146107e457600080fd5b8063ac9650d8146106e0578063b3a2b2cf14610700578063b88d4fde14610720578063c87b56dd1461074057600080fd5b80638da5cb5b116100d15780638da5cb5b1461065e57806395d89b411461068b578063a203db8e146106a0578063a22cb465146106c057600080fd5b80636352211e1461059a5780636b2ace87146105dd57806370a08231146106115780637192711f1461063e57600080fd5b80631aac5c341161017a57806342842e0e1161014957806342842e0e146103da578063489bb0b2146103fa5780634e71e0c81461040d57806351def5561461042257600080fd5b80631aac5c341461033957806323b872dd146103845780632bcea736146103a457806340e76eff146103ba57600080fd5b806307d88aad116101b657806307d88aad14610256578063081812fc146102a8578063095ea7b3146102eb57806319f771711461030b57600080fd5b806301ffc9a7146101dd57806306fdde0314610212578063078dfbe714610234575b600080fd5b3480156101e957600080fd5b506101fd6101f8366004612c80565b610818565b60405190151581526020015b60405180910390f35b34801561021e57600080fd5b506102276108fd565b6040516102099190612d13565b34801561024057600080fd5b5061025461024f366004612d5d565b61098b565b005b34801561026257600080fd5b506008546102839073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610209565b3480156102b457600080fd5b506102836102c3366004612da2565b60046020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156102f757600080fd5b50610254610306366004612dbb565b610b7c565b34801561031757600080fd5b5061032b610326366004612da2565b610cc6565b604051908152602001610209565b61034c610347366004612de7565b610ded565b6040805194855260208501939093526fffffffffffffffffffffffffffffffff91821692840192909252166060820152608001610209565b34801561039057600080fd5b5061025461039f366004612e00565b61142f565b3480156103b057600080fd5b5061032b600a5481565b3480156103c657600080fd5b506102546103d5366004612e41565b6116f6565b3480156103e657600080fd5b506102546103f5366004612e00565b611a04565b610254610408366004612ece565b611b69565b34801561041957600080fd5b50610254611c36565b34801561042e57600080fd5b5061051b61043d366004612da2565b600960205260009081526040902080546001820154600283015460039093015473ffffffffffffffffffffffffffffffffffffffff928316939282169263ffffffff740100000000000000000000000000000000000000008404811693780100000000000000000000000000000000000000000000000081048216937c0100000000000000000000000000000000000000000000000000000000909104821692918216916fffffffffffffffffffffffffffffffff640100000000909104811691808216917001000000000000000000000000000000009091041689565b6040805173ffffffffffffffffffffffffffffffffffffffff9a8b1681529990981660208a015263ffffffff96871697890197909752938516606088015291841660808701529290921660a08501526fffffffffffffffffffffffffffffffff91821660c0850152811660e08401521661010082015261012001610209565b3480156105a657600080fd5b506102836105b5366004612da2565b60036020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b3480156105e957600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b34801561061d57600080fd5b5061032b61062c366004612f2d565b60026020526000908152604090205481565b34801561064a57600080fd5b50610254610659366004612f4a565b611d4d565b34801561066a57600080fd5b506006546102839073ffffffffffffffffffffffffffffffffffffffff1681565b34801561069757600080fd5b50610227611e1b565b3480156106ac57600080fd5b506102546106bb366004612f7a565b611e28565b3480156106cc57600080fd5b506102546106db366004612fa6565b6120eb565b6106f36106ee366004612fd2565b612182565b6040516102099190613047565b34801561070c57600080fd5b5061025461071b366004612f2d565b6122f4565b34801561072c57600080fd5b5061025461073b36600461318b565b6123bc565b34801561074c57600080fd5b5061022761075b366004612da2565b61250d565b34801561076c57600080fd5b5061032b670de0b6b3a764000081565b34801561078857600080fd5b506007546102839073ffffffffffffffffffffffffffffffffffffffff1681565b3480156107b557600080fd5b506101fd6107c436600461323a565b600560209081526000928352604080842090915290825290205460ff1681565b3480156107f057600080fd5b506102837f000000000000000000000000000000000000000000000000000000000000000081565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614806108ab57507f80ac58cd000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b806108f757507f5b5e139f000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b6000805461090a90613268565b80601f016020809104026020016040519081016040528092919081815260200182805461093690613268565b80156109835780601f1061095857610100808354040283529160200191610983565b820191906000526020600020905b81548152906001019060200180831161096657829003601f168201915b505050505081565b60065473ffffffffffffffffffffffffffffffffffffffff163314610a11576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b8115610b365773ffffffffffffffffffffffffffffffffffffffff8316151580610a385750805b610a9e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f4f776e61626c653a207a65726f206164647265737300000000000000000000006044820152606401610a08565b60065460405173ffffffffffffffffffffffffffffffffffffffff8086169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36006805473ffffffffffffffffffffffffffffffffffffffff85167fffffffffffffffffffffffff000000000000000000000000000000000000000091821617909155600780549091169055505050565b600780547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff85161790555b505050565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1633811480610bdf575073ffffffffffffffffffffffffffffffffffffffff8116600090815260056020908152604080832033845290915290205460ff165b610c45576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a45440000000000000000000000000000000000006044820152606401610a08565b60008281526004602052604080822080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff87811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6000818152600960209081526040808320815161012081018352815473ffffffffffffffffffffffffffffffffffffffff908116825260018301549081169482019490945263ffffffff74010000000000000000000000000000000000000000850481169382019390935278010000000000000000000000000000000000000000000000008404831660608201527c010000000000000000000000000000000000000000000000000000000090930482166080840152600281015491821660a08401526fffffffffffffffffffffffffffffffff640100000000909204821660c08401526003015480821660e08401527001000000000000000000000000000000009004166101008201819052610ddc826125c3565b610de691906132e5565b9392505050565b600080808042610e0360608701604088016132fc565b63ffffffff161015610e41576040517f38356e4c00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b670de0b6b3a7640000610e5a60e0870160c08801613322565b6fffffffffffffffffffffffffffffffff161115610ea4576040517fd276d51400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610eb460a08601608087016132fc565b63ffffffff161580610ed95750610ed160c0860160a087016132fc565b63ffffffff16155b15610f10576040517fd276d51400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610f5c610f206020870187612f2d565b3330610f336101008a0160e08b01613322565b6fffffffffffffffffffffffffffffffff16610f576101208b016101008c01613354565b612677565b9350846101200135841015610f9d576040517f3999656700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b670de0b6b3a764000084610fb760e0880160c08901613322565b6fffffffffffffffffffffffffffffffff16610fd3919061336f565b610fdd91906133ac565b9150610fef60c0860160a087016132fc565b610fff9063ffffffff16836133e7565b61101b906fffffffffffffffffffffffffffffffff16856132e5565b600a8054919250600061102d8361341f565b90915550925061104c6110466040870160208801612f2d565b84612904565b60408051610120810190915233815260208082019060009061107090890189612f2d565b73ffffffffffffffffffffffffffffffffffffffff161461109d576110986020880188612f2d565b6110bf565b7f00000000000000000000000000000000000000000000000000000000000000005b73ffffffffffffffffffffffffffffffffffffffff1681526020016110ea60608801604089016132fc565b63ffffffff16815260200161110560808801606089016132fc565b63ffffffff16815260200161112060a08801608089016132fc565b63ffffffff16815260200161113b60c0880160a089016132fc565b63ffffffff90811682526fffffffffffffffffffffffffffffffff80851660208085019190915286821660408086019190915260006060958601819052898152600983528190208651815473ffffffffffffffffffffffffffffffffffffffff9182167fffffffffffffffffffffffff0000000000000000000000000000000000000000918216178355888501516001840180548b8701519a8c015160808d01518b167c0100000000000000000000000000000000000000000000000000000000027bffffffffffffffffffffffffffffffffffffffffffffffffffffffff918c167801000000000000000000000000000000000000000000000000029190911677ffffffffffffffffffffffffffffffffffffffffffffffff9c8c1674010000000000000000000000000000000000000000027fffffffffffffffff00000000000000000000000000000000000000000000000090931694909616939093171799909916929092179190911790965560a087015160028201805460c08a0151871664010000000002981691909616179590951790935560e085015161010090950151821670010000000000000000000000000000000002949091169390931760039092019190915561131391908701908701612f2d565b73ffffffffffffffffffffffffffffffffffffffff1633847f603bb53f65550199ed7346ba18d49bcb7ec77162b3167b272f8cd19b20d9510b61135960208a018a612f2d565b61136960608b0160408c016132fc565b61137960808c0160608d016132fc565b61138960a08d0160808e016132fc565b61139960c08e0160a08f016132fc565b898b8f6101000160208101906113af9190613354565b6040805173ffffffffffffffffffffffffffffffffffffffff909916895263ffffffff97881660208a0152958716958801959095529285166060870152931660808501526fffffffffffffffffffffffffffffffff92831660a08501529190911660c0830152151560e08201526101000160405180910390a49193509193565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff8481169116146114bf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600a60248201527f57524f4e475f46524f4d000000000000000000000000000000000000000000006044820152606401610a08565b73ffffffffffffffffffffffffffffffffffffffff821661153c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f494e56414c49445f524543495049454e540000000000000000000000000000006044820152606401610a08565b3373ffffffffffffffffffffffffffffffffffffffff84161480611583575060008181526004602052604090205473ffffffffffffffffffffffffffffffffffffffff1633145b806115be575073ffffffffffffffffffffffffffffffffffffffff8316600090815260056020908152604080832033845290915290205460ff165b611624576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f4e4f545f415554484f52495a45440000000000000000000000000000000000006044820152606401610a08565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260026020908152604080832080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019055938616808352848320805460010190558583526003825284832080547fffffffffffffffffffffffff00000000000000000000000000000000000000009081168317909155600490925284832080549092169091559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600084815260096020908152604080832060039092529091205473ffffffffffffffffffffffffffffffffffffffff1633811461175f576040517fe1c6117100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60038201546040805161012081018252845473ffffffffffffffffffffffffffffffffffffffff90811682526001860154908116602083015274010000000000000000000000000000000000000000810463ffffffff9081169383019390935278010000000000000000000000000000000000000000000000008104831660608301527c0100000000000000000000000000000000000000000000000000000000900482166080820152600285015491821660a08201526fffffffffffffffffffffffffffffffff640100000000909204821660c082015281831660e0820152700100000000000000000000000000000000909204166101008201819052600091611869906125c3565b61187391906132e5565b905080611882575050506119fe565b808360030160108282829054906101000a90046fffffffffffffffffffffffffffffffff166118b19190613458565b92506101000a8154816fffffffffffffffffffffffffffffffff02191690836fffffffffffffffffffffffffffffffff1602179055506119188360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1630848488612a9d565b84156119a5576040517f330df28200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff83169063330df28290611972908990899060040161348c565b600060405180830381600087803b15801561198c57600080fd5b505af11580156119a0573d6000803e3d6000fd5b505050505b60018301546040518515158152829173ffffffffffffffffffffffffffffffffffffffff169089907fff942d249898505febb2a9a00118e27567c084b9497d0aa3ba5e332c235b4f389060200160405180910390a45050505b50505050565b611a0f83838361142f565b73ffffffffffffffffffffffffffffffffffffffff82163b1580611b0357506040517f150b7a020000000000000000000000000000000000000000000000000000000080825233600483015273ffffffffffffffffffffffffffffffffffffffff858116602484015260448301849052608060648401526000608484015290919084169063150b7a029060a4016020604051808303816000875af1158015611abb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611adf91906134d9565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b610b77576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610a08565b6040517fc0a47c9300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152306024830152851515604483015260ff851660648301526084820184905260a482018390527f0000000000000000000000000000000000000000000000000000000000000000169063c0a47c939060c401600060405180830381600087803b158015611c1757600080fd5b505af1158015611c2b573d6000803e3d6000fd5b505050505050505050565b60075473ffffffffffffffffffffffffffffffffffffffff16338114611cb8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c657220213d2070656e64696e67206f776e65726044820152606401610a08565b60065460405173ffffffffffffffffffffffffffffffffffffffff8084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36006805473ffffffffffffffffffffffffffffffffffffffff9092167fffffffffffffffffffffffff0000000000000000000000000000000000000000928316179055600780549091169055565b6000828152600960205260409020805473ffffffffffffffffffffffffffffffffffffffff163314611dab576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff8316908117825560405184907fca0251ba80971adc7e92434b097ca40450b2a317013c51c5c5cb6ae74500bb0090600090a3505050565b6001805461090a90613268565b600082815260096020908152604091829020825161012081018452815473ffffffffffffffffffffffffffffffffffffffff90811680835260018401549182169483019490945263ffffffff74010000000000000000000000000000000000000000820481169583019590955278010000000000000000000000000000000000000000000000008104851660608301527c0100000000000000000000000000000000000000000000000000000000900484166080820152600282015493841660a08201526fffffffffffffffffffffffffffffffff640100000000909404841660c082015260039091015480841660e083015270010000000000000000000000000000000090049092166101008301523314611f70576040517f30cd747100000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000611f7b826125c3565b905060008261010001516fffffffffffffffffffffffffffffffff1682611fa291906132e5565b90506000828460e001518560a0015163ffffffff16611fc191906133e7565b8560c00151611fd09190613458565b6fffffffffffffffffffffffffffffffff16611fec91906132e5565b600087815260096020908152604080832080547fffffffffffffffffffffffff0000000000000000000000000000000000000000908116825560018201859055600282018054909116905560039081018490558883015192529091205491925061206f91309073ffffffffffffffffffffffffffffffffffffffff168589612a9d565b612080846020015130338489612a9d565b8181877f061c75052be1ee7232bc654d7f489af163c983bb99c5affe5e8fc2e5225cb5778760200151896040516120db92919073ffffffffffffffffffffffffffffffffffffffff9290921682521515602082015260400190565b60405180910390a4505050505050565b33600081815260056020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60608167ffffffffffffffff81111561219d5761219d6130c7565b6040519080825280602002602001820160405280156121d057816020015b60608152602001906001900390816121bb5790505b50905060005b828110156122ed57600080308686858181106121f4576121f46134f6565b90506020028101906122069190613525565b604051612214929190613591565b600060405180830381855af49150503d806000811461224f576040519150601f19603f3d011682016040523d82523d6000602084013e612254565b606091505b5091509150816122ba5760448151101561226d57600080fd5b6004810190508080602001905181019061228791906135a1565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a089190612d13565b808484815181106122cd576122cd6134f6565b6020026020010181905250505080806122e59061341f565b9150506121d6565b5092915050565b60065473ffffffffffffffffffffffffffffffffffffffff163314612375576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a08565b600880547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6123c784848461142f565b73ffffffffffffffffffffffffffffffffffffffff83163b15806124a757506040517f150b7a02000000000000000000000000000000000000000000000000000000008082529073ffffffffffffffffffffffffffffffffffffffff85169063150b7a029061244090339089908890889060040161360f565b6020604051808303816000875af115801561245f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061248391906134d9565b7fffffffff0000000000000000000000000000000000000000000000000000000016145b6119fe576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f554e534146455f524543495049454e54000000000000000000000000000000006044820152606401610a08565b6008546040517fc981fac40000000000000000000000000000000000000000000000000000000081526004810183905260609173ffffffffffffffffffffffffffffffffffffffff169063c981fac490602401600060405180830381865afa15801561257d573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526108f791908101906135a1565b600080826060015183604001516125da9190613658565b63ffffffff169050804210156125f05750919050565b60006125fc82426132e5565b905060006126298560a0015163ffffffff16866080015163ffffffff168461262491906133ac565b612c39565b9050808560e001516fffffffffffffffffffffffffffffffff1661264d919061336f565b8560c001516fffffffffffffffffffffffffffffffff1661266e9190613677565b95945050505050565b600081156127ff576040517fda5139ca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201859052600060448301527f0000000000000000000000000000000000000000000000000000000000000000169063da5139ca90606401602060405180830381865afa158015612719573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061273d919061368f565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015287811660248301528681166044830152606482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063f18d03cc90608401600060405180830381600087803b1580156127e257600080fd5b505af11580156127f6573d6000803e3d6000fd5b5050505061266e565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116906302b9446c9088161561284c57600061284e565b845b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff808b166004830152808a16602483015288166044820152606481018790526000608482015260a401604080518083038185885af11580156128d4573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906128f991906136a8565b979650505050505050565b73ffffffffffffffffffffffffffffffffffffffff8216612981576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601160248201527f494e56414c49445f524543495049454e540000000000000000000000000000006044820152606401610a08565b60008181526003602052604090205473ffffffffffffffffffffffffffffffffffffffff1615612a0d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f414c52454144595f4d494e5445440000000000000000000000000000000000006044820152606401610a08565b73ffffffffffffffffffffffffffffffffffffffff8216600081815260026020908152604080832080546001019055848352600390915280822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8015612b60576040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff868116600483015285811660248301528481166044830152606482018490527f0000000000000000000000000000000000000000000000000000000000000000169063f18d03cc90608401600060405180830381600087803b158015612b4357600080fd5b505af1158015612b57573d6000803e3d6000fd5b50505050612c32565b6040517f97da6d3000000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff86811660048301528581166024830152848116604483015260006064830152608482018490527f000000000000000000000000000000000000000000000000000000000000000016906397da6d309060a40160408051808303816000875af1158015612c0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c2f91906136a8565b50505b5050505050565b6000818310612c485781610de6565b5090919050565b7fffffffff0000000000000000000000000000000000000000000000000000000081168114612c7d57600080fd5b50565b600060208284031215612c9257600080fd5b8135610de681612c4f565b60005b83811015612cb8578181015183820152602001612ca0565b838111156119fe5750506000910152565b60008151808452612ce1816020860160208601612c9d565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000610de66020830184612cc9565b73ffffffffffffffffffffffffffffffffffffffff81168114612c7d57600080fd5b80358015158114612d5857600080fd5b919050565b600080600060608486031215612d7257600080fd5b8335612d7d81612d26565b9250612d8b60208501612d48565b9150612d9960408501612d48565b90509250925092565b600060208284031215612db457600080fd5b5035919050565b60008060408385031215612dce57600080fd5b8235612dd981612d26565b946020939093013593505050565b60006101408284031215612dfa57600080fd5b50919050565b600080600060608486031215612e1557600080fd5b8335612e2081612d26565b92506020840135612e3081612d26565b929592945050506040919091013590565b60008060008060608587031215612e5757600080fd5b84359350602085013567ffffffffffffffff80821115612e7657600080fd5b818701915087601f830112612e8a57600080fd5b813581811115612e9957600080fd5b886020828501011115612eab57600080fd5b602083019550809450505050612ec360408601612d48565b905092959194509250565b600080600080600060a08688031215612ee657600080fd5b8535612ef181612d26565b9450612eff60208701612d48565b9350604086013560ff81168114612f1557600080fd5b94979396509394606081013594506080013592915050565b600060208284031215612f3f57600080fd5b8135610de681612d26565b60008060408385031215612f5d57600080fd5b823591506020830135612f6f81612d26565b809150509250929050565b60008060408385031215612f8d57600080fd5b82359150612f9d60208401612d48565b90509250929050565b60008060408385031215612fb957600080fd5b8235612fc481612d26565b9150612f9d60208401612d48565b60008060208385031215612fe557600080fd5b823567ffffffffffffffff80821115612ffd57600080fd5b818501915085601f83011261301157600080fd5b81358181111561302057600080fd5b8660208260051b850101111561303557600080fd5b60209290920196919550909350505050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b828110156130ba577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08886030184526130a8858351612cc9565b9450928501929085019060010161306e565b5092979650505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff8111828210171561313d5761313d6130c7565b604052919050565b600067ffffffffffffffff82111561315f5761315f6130c7565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b600080600080608085870312156131a157600080fd5b84356131ac81612d26565b935060208501356131bc81612d26565b925060408501359150606085013567ffffffffffffffff8111156131df57600080fd5b8501601f810187136131f057600080fd5b80356132036131fe82613145565b6130f6565b81815288602083850101111561321857600080fd5b8160208401602083013760006020838301015280935050505092959194509250565b6000806040838503121561324d57600080fd5b823561325881612d26565b91506020830135612f6f81612d26565b600181811c9082168061327c57607f821691505b60208210811415612dfa577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000828210156132f7576132f76132b6565b500390565b60006020828403121561330e57600080fd5b813563ffffffff81168114610de657600080fd5b60006020828403121561333457600080fd5b81356fffffffffffffffffffffffffffffffff81168114610de657600080fd5b60006020828403121561336657600080fd5b610de682612d48565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133a7576133a76132b6565b500290565b6000826133e2577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006fffffffffffffffffffffffffffffffff80831681851681830481118215151615613416576134166132b6565b02949350505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613451576134516132b6565b5060010190565b60006fffffffffffffffffffffffffffffffff808316818516808303821115613483576134836132b6565b01949350505050565b60208152816020820152818360408301376000818301604090810191909152601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160101919050565b6000602082840312156134eb57600080fd5b8151610de681612c4f565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe184360301811261355a57600080fd5b83018035915067ffffffffffffffff82111561357557600080fd5b60200191503681900382131561358a57600080fd5b9250929050565b8183823760009101908152919050565b6000602082840312156135b357600080fd5b815167ffffffffffffffff8111156135ca57600080fd5b8201601f810184136135db57600080fd5b80516135e96131fe82613145565b8181528560208385010111156135fe57600080fd5b61266e826020830160208601612c9d565b600073ffffffffffffffffffffffffffffffffffffffff80871683528086166020840152508360408301526080606083015261364e6080830184612cc9565b9695505050505050565b600063ffffffff808316818516808303821115613483576134836132b6565b6000821982111561368a5761368a6132b6565b500190565b6000602082840312156136a157600080fd5b5051919050565b600080604083850312156136bb57600080fd5b50508051602090910151909290915056fea2646970667358221220a8952d0da48f0399ece15f1fe6d1d0769d0f6fa4e998e39a91d525f5b5c45c1e64736f6c634300080a00330000000000000000000000000711b6026068f736bae6b213031fce978d48e026000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000711b6026068f736bae6b213031fce978d48e026000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7
-----Decoded View---------------
Arg [0] : _bentoBox (address): 0x0711b6026068f736bae6b213031fce978d48e026
Arg [1] : _wETH (address): 0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000711b6026068f736bae6b213031fce978d48e026
Arg [1] : 000000000000000000000000b31f66aa3c1e785363f0875a1b74e27b85fd66c7
Age | Block | Fee Address | BC Fee Address | Voting Power | Jailed | Incoming |
---|
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.