Contract 0xf30CF8D373D78D7964A2F7793b730BF7ae0970a8 10

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xdf754460f16ad80baaad8d8d9eac749010abedb76c7791f737bef46eb02d1a72Multicall280606802022-10-02 22:01:481 day 13 hrs ago0x818b2226a90abd99b21679b6eefce52ea529fb3b IN  0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH0.00005291
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355cccMulticall280578582022-10-02 21:26:031 day 13 hrs ago0xf6beb097a5dc796b86de16a46ca4e352ec359d0f IN  0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH0.00007294
0x68e599d070403c32f169397dc45c5cf7998fec8a483532d51d92a03b2a2ee7b7Create Stream226104242022-09-03 7:58:0831 days 3 hrs ago0xd1134f6e28ab3b75500378b47250d6d88e0c1bb0 IN  0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80.002 ETH0.00051887
0x6cb94ef420451b1499feb961821f610bde0f8f167d72a38ca82ba5b71b212884Create Stream225631992022-09-02 23:09:4931 days 11 hrs ago0xb0707a3ba4d6b16cbc7d197f4061ec2d1c77b16e IN  0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH0.00055632
0xdda04519d04199128710ed5e8494d21513d7d28d4d5cd732b1a9efc31d5c2e2dCreate Stream225406962022-09-02 19:22:3931 days 15 hrs ago0xd1134f6e28ab3b75500378b47250d6d88e0c1bb0 IN  0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH0.00137912
0x0422bc4f85cf5e88dbef55e1318137ee5423f66e56c4c0f814c2cd04be9d49d1Multicall225403042022-09-02 19:18:4831 days 15 hrs ago0xd1134f6e28ab3b75500378b47250d6d88e0c1bb0 IN  0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH0.0020186
0x4becb977db76414e30473c0eb50da6131a4b7dca610ebdd12a0913681a6a7ec4Create Stream224381972022-09-02 6:15:0632 days 4 hrs ago0xb0707a3ba4d6b16cbc7d197f4061ec2d1c77b16e IN  0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80.001 ETH0.00004736
0x185e63288baa36fd31cc9c673dc3d3bc5be81d5374612bebea414f438f1cde9fMulticall217321052022-08-28 17:14:2736 days 17 hrs ago0x7f85cf44e446a4b1aace2a28774e88cd6d4e3441 IN  0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH0.000118148499 ETH
0xdefbe049694b87a505046f9b0a094b813ef67b28ae97ff475919c7a8dc8a6dc8Multicall201823572022-08-13 20:58:1851 days 14 hrs ago0xb0707a3ba4d6b16cbc7d197f4061ec2d1c77b16e IN  0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH0.00019675539 ETH
0xd361b5f574ee3f81bbc4233a318369e7cd0d318ea23d14528e6a86f2d5dd7fc90x60e06040200307702022-08-11 19:02:5053 days 16 hrs ago0x9346e1966e0510b3491fe04297bcb33c9e4729d5 IN  Create: FuroStreamRouter0 ETH0.003440683867 ETH
[ Download CSV Export 
Latest 25 internal transaction
Parent Txn Hash Block From To Value
0xdf754460f16ad80baaad8d8d9eac749010abedb76c7791f737bef46eb02d1a72280606802022-10-02 22:01:481 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0xdf754460f16ad80baaad8d8d9eac749010abedb76c7791f737bef46eb02d1a72280606802022-10-02 22:01:481 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0xdf754460f16ad80baaad8d8d9eac749010abedb76c7791f737bef46eb02d1a72280606802022-10-02 22:01:481 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x74c764d41b77dbbb4fe771dab1939b00b146894a0 ETH
0xdf754460f16ad80baaad8d8d9eac749010abedb76c7791f737bef46eb02d1a72280606802022-10-02 22:01:481 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH
0xdf754460f16ad80baaad8d8d9eac749010abedb76c7791f737bef46eb02d1a72280606802022-10-02 22:01:481 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x74c764d41b77dbbb4fe771dab1939b00b146894a0 ETH
0xdf754460f16ad80baaad8d8d9eac749010abedb76c7791f737bef46eb02d1a72280606802022-10-02 22:01:481 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355ccc280578582022-10-02 21:26:031 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355ccc280578582022-10-02 21:26:031 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355ccc280578582022-10-02 21:26:031 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x74c764d41b77dbbb4fe771dab1939b00b146894a0 ETH
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355ccc280578582022-10-02 21:26:031 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355ccc280578582022-10-02 21:26:031 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355ccc280578582022-10-02 21:26:031 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355ccc280578582022-10-02 21:26:031 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x74c764d41b77dbbb4fe771dab1939b00b146894a0 ETH
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355ccc280578582022-10-02 21:26:031 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355ccc280578582022-10-02 21:26:031 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x74c764d41b77dbbb4fe771dab1939b00b146894a0 ETH
0xaa1e7102ceec500894df17e88119ddab942a78c37dc2d02a0a614b10d2355ccc280578582022-10-02 21:26:031 day 13 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a80 ETH
0x68e599d070403c32f169397dc45c5cf7998fec8a483532d51d92a03b2a2ee7b7226104242022-09-03 7:58:0831 days 3 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0x68e599d070403c32f169397dc45c5cf7998fec8a483532d51d92a03b2a2ee7b7226104242022-09-03 7:58:0831 days 3 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0x68e599d070403c32f169397dc45c5cf7998fec8a483532d51d92a03b2a2ee7b7226104242022-09-03 7:58:0831 days 3 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x74c764d41b77dbbb4fe771dab1939b00b146894a0.002 ETH
0x6cb94ef420451b1499feb961821f610bde0f8f167d72a38ca82ba5b71b212884225631992022-09-02 23:09:4931 days 11 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0x6cb94ef420451b1499feb961821f610bde0f8f167d72a38ca82ba5b71b212884225631992022-09-02 23:09:4931 days 11 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0x6cb94ef420451b1499feb961821f610bde0f8f167d72a38ca82ba5b71b212884225631992022-09-02 23:09:4931 days 11 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x74c764d41b77dbbb4fe771dab1939b00b146894a0 ETH
0xdda04519d04199128710ed5e8494d21513d7d28d4d5cd732b1a9efc31d5c2e2d225406962022-09-02 19:22:3931 days 15 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0xdda04519d04199128710ed5e8494d21513d7d28d4d5cd732b1a9efc31d5c2e2d225406962022-09-02 19:22:3931 days 15 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae0 ETH
0xdda04519d04199128710ed5e8494d21513d7d28d4d5cd732b1a9efc31d5c2e2d225406962022-09-02 19:22:3931 days 15 hrs ago 0xf30cf8d373d78d7964a2f7793b730bf7ae0970a8 0x74c764d41b77dbbb4fe771dab1939b00b146894a0 ETH
[ Download CSV Export 
Loading
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 Source Code Verified (Exact Match)

Contract Name:
FuroStreamRouter

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 999999 runs

Other Settings:
default evmVersion
File 1 of 8 : FuroStreamRouter.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.10;

import './interfaces/IFuroStream.sol';

contract FuroStreamRouter is Multicall {
  IBentoBoxMinimal public immutable bentoBox;
  IFuroStream public immutable furoStream;
  address public immutable wETH;

  // custom errors
  error InsufficientShares();

  constructor(
    IBentoBoxMinimal _bentoBox,
    IFuroStream _furoStream,
    address _wETH
  ) {
    bentoBox = _bentoBox;
    furoStream = _furoStream;
    wETH = _wETH;
    _bentoBox.setMasterContractApproval(address(this), address(_furoStream), true, 0, bytes32(0), bytes32(0));
    _bentoBox.registerProtocol();
  }

  function setBentoBoxApproval(
    address user,
    bool approved,
    uint8 v,
    bytes32 r,
    bytes32 s
  ) external payable {
    bentoBox.setMasterContractApproval(user, address(this), approved, v, r, s);
  }

  function createStream(
    address recipient,
    address token,
    uint64 startTime,
    uint64 endTime,
    uint256 amount, /// @dev in token amount and not in shares
    bool fromBentoBox,
    uint256 minShare
  ) external payable returns (uint256 streamId, uint256 depositedShares) {
    depositedShares = _depositToken(token, msg.sender, address(this), amount, fromBentoBox);

    if (depositedShares < minShare) revert InsufficientShares();

    (streamId, ) = furoStream.createStream(
      recipient,
      token == address(0) ? wETH : token,
      startTime,
      endTime,
      amount,
      true
    );

    furoStream.updateSender(streamId, msg.sender);
  }

  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);
    }
  }
}

File 2 of 8 : IFuroStream.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.10;

import "./ITasker.sol";
import "./ITokenURIFetcher.sol";
import "./IBentoBoxMinimal.sol";
import "../utils/Multicall.sol";
import "../utils/BoringOwnable.sol";
import "@rari-capital/solmate/src/tokens/ERC721.sol";

interface IFuroStream {
    function setBentoBoxApproval(
        address user,
        bool approved,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external payable;

    function createStream(
        address recipient,
        address token,
        uint64 startTime,
        uint64 endTime,
        uint256 amount, /// @dev in token amount and not in shares
        bool fromBento
    ) external payable returns (uint256 streamId, uint256 depositedShares);

    function withdrawFromStream(
        uint256 streamId,
        uint256 sharesToWithdraw,
        address withdrawTo,
        bool toBentoBox,
        bytes memory taskData
    ) external returns (uint256 recipientBalance, address to);

    function cancelStream(uint256 streamId, bool toBentoBox)
        external
        returns (uint256 senderBalance, uint256 recipientBalance);

    function updateSender(uint256 streamId, address sender) external;

    function updateStream(
        uint256 streamId,
        uint128 topUpAmount,
        uint64 extendTime,
        bool fromBentoBox
    ) external payable returns (uint256 depositedShares);

    function streamBalanceOf(uint256 streamId)
        external
        view
        returns (uint256 senderBalance, uint256 recipientBalance);

    function getStream(uint256 streamId) external view returns (Stream memory);

    event CreateStream(
        uint256 indexed streamId,
        address indexed sender,
        address indexed recipient,
        address token,
        uint256 amount,
        uint256 startTime,
        uint256 endTime,
        bool fromBentoBox
    );

    event UpdateStream(
        uint256 indexed streamId,
        uint128 indexed topUpAmount,
        uint64 indexed extendTime,
        bool fromBentoBox
    );

    event Withdraw(
        uint256 indexed streamId,
        uint256 indexed sharesToWithdraw,
        address indexed withdrawTo,
        address token,
        bool toBentoBox
    );

    event CancelStream(
        uint256 indexed streamId,
        uint256 indexed senderBalance,
        uint256 indexed recipientBalance,
        address token,
        bool toBentoBox
    );

    struct Stream {
        address sender;
        address token;
        uint128 depositedShares;
        uint128 withdrawnShares;
        uint64 startTime;
        uint64 endTime;
    }
}

File 3 of 8 : ITasker.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.10;

interface ITasker {
    function onTaskReceived(
        bytes calldata data
    ) external;
}

File 4 of 8 : ITokenURIFetcher.sol
// SPDX-License-Identifier: GPL-3.0-or-later

pragma solidity 0.8.10;

interface ITokenURIFetcher {
    function fetchTokenURIData(uint256 id)
        external
        view
        returns (string memory);
}

File 5 of 8 : IBentoBoxMinimal.sol
// 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;
}

File 6 of 8 : Multicall.sol
// 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;
        }
    }
}

File 7 of 8 : BoringOwnable.sol
// 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");
        _;
    }
}

File 8 of 8 : ERC721.sol
// 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);
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 999999
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"contract IBentoBoxMinimal","name":"_bentoBox","type":"address"},{"internalType":"contract IFuroStream","name":"_furoStream","type":"address"},{"internalType":"address","name":"_wETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"InsufficientShares","type":"error"},{"inputs":[],"name":"bentoBox","outputs":[{"internalType":"contract IBentoBoxMinimal","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"token","type":"address"},{"internalType":"uint64","name":"startTime","type":"uint64"},{"internalType":"uint64","name":"endTime","type":"uint64"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"fromBentoBox","type":"bool"},{"internalType":"uint256","name":"minShare","type":"uint256"}],"name":"createStream","outputs":[{"internalType":"uint256","name":"streamId","type":"uint256"},{"internalType":"uint256","name":"depositedShares","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"furoStream","outputs":[{"internalType":"contract IFuroStream","name":"","type":"address"}],"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":[{"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":[],"name":"wETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

60e060405234801561001057600080fd5b50604051610fc0380380610fc083398101604081905261002f91610133565b6001600160a01b03838116608081905283821660a081905291831660c05260405163c0a47c9360e01b81523060048201526024810192909252600160448301526000606483018190526084830181905260a48301529063c0a47c939060c401600060405180830381600087803b1580156100a857600080fd5b505af11580156100bc573d6000803e3d6000fd5b50505050826001600160a01b031663aee4d1b26040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156100fb57600080fd5b505af115801561010f573d6000803e3d6000fd5b50505050505050610180565b6001600160a01b038116811461013057600080fd5b50565b60008060006060848603121561014857600080fd5b83516101538161011b565b60208501519093506101648161011b565b60408501519092506101758161011b565b809150509250925092565b60805160a05160c051610de16101df6000396000818161016b015261031f015260008181610117015281816102a8015261043301526000818160be015281816101f7015281816106860152818161075001526107ca0152610de16000f3fe6080604052600436106100655760003560e01c80636f972346116100435780636f97234614610105578063ac9650d814610139578063f24286211461015957600080fd5b8063489bb0b21461006a57806365e1d2e11461007f5780636b2ace87146100ac575b600080fd5b61007d6100783660046108f3565b61018d565b005b61009261008d366004610968565b61025a565b604080519283526020830191909152015b60405180910390f35b3480156100b857600080fd5b506100e07f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016100a3565b34801561011157600080fd5b506100e07f000000000000000000000000000000000000000000000000000000000000000081565b61014c6101473660046109e0565b6104b0565b6040516100a39190610acf565b34801561016557600080fd5b506100e07f000000000000000000000000000000000000000000000000000000000000000081565b6040517fc0a47c9300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff8681166004830152306024830152851515604483015260ff851660648301526084820184905260a482018390527f0000000000000000000000000000000000000000000000000000000000000000169063c0a47c939060c401600060405180830381600087803b15801561023b57600080fd5b505af115801561024f573d6000803e3d6000fd5b505050505050505050565b60008061026a883330888861062b565b9050828110156102a6576040517f3999656700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1663c14cf8f08a600073ffffffffffffffffffffffffffffffffffffffff168b73ffffffffffffffffffffffffffffffffffffffff161461031d578a61033f565b7f00000000000000000000000000000000000000000000000000000000000000005b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b16815273ffffffffffffffffffffffffffffffffffffffff92831660048201529116602482015267ffffffffffffffff808b1660448301528916606482015260848101889052600160a482015260c40160408051808303816000875af11580156103d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fa9190610b4f565b506040517f2b913453000000000000000000000000000000000000000000000000000000008152600481018290523360248201529092507f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff1690632b91345390604401600060405180830381600087803b15801561048c57600080fd5b505af11580156104a0573d6000803e3d6000fd5b5050505097509795505050505050565b60608167ffffffffffffffff8111156104cb576104cb610b73565b6040519080825280602002602001820160405280156104fe57816020015b60608152602001906001900390816104e95790505b50905060005b82811015610624576000803086868581811061052257610522610ba2565b90506020028101906105349190610bd1565b604051610542929190610c3d565b600060405180830381855af49150503d806000811461057d576040519150601f19603f3d011682016040523d82523d6000602084013e610582565b606091505b5091509150816105f15760448151101561059b57600080fd5b600481019050808060200190518101906105b59190610c4d565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105e89190610d18565b60405180910390fd5b8084848151811061060457610604610ba2565b60200260200101819052505050808061061c90610d32565b915050610504565b5092915050565b600081156107b3576040517fda5139ca00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff878116600483015260248201859052600060448301527f0000000000000000000000000000000000000000000000000000000000000000169063da5139ca90606401602060405180830381865afa1580156106cd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106f19190610d92565b6040517ff18d03cc00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff888116600483015287811660248301528681166044830152606482018390529192507f00000000000000000000000000000000000000000000000000000000000000009091169063f18d03cc90608401600060405180830381600087803b15801561079657600080fd5b505af11580156107aa573d6000803e3d6000fd5b505050506108b1565b73ffffffffffffffffffffffffffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000008116906302b9446c90881615610800576000610802565b845b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b16815273ffffffffffffffffffffffffffffffffffffffff808b166004830152808a16602483015288166044820152606481018790526000608482015260a401604080518083038185885af1158015610888573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906108ad9190610b4f565b9150505b95945050505050565b803573ffffffffffffffffffffffffffffffffffffffff811681146108de57600080fd5b919050565b803580151581146108de57600080fd5b600080600080600060a0868803121561090b57600080fd5b610914866108ba565b9450610922602087016108e3565b9350604086013560ff8116811461093857600080fd5b94979396509394606081013594506080013592915050565b803567ffffffffffffffff811681146108de57600080fd5b600080600080600080600060e0888a03121561098357600080fd5b61098c886108ba565b965061099a602089016108ba565b95506109a860408901610950565b94506109b660608901610950565b9350608088013592506109cb60a089016108e3565b915060c0880135905092959891949750929550565b600080602083850312156109f357600080fd5b823567ffffffffffffffff80821115610a0b57600080fd5b818501915085601f830112610a1f57600080fd5b813581811115610a2e57600080fd5b8660208260051b8501011115610a4357600080fd5b60209290920196919550909350505050565b60005b83811015610a70578181015183820152602001610a58565b83811115610a7f576000848401525b50505050565b60008151808452610a9d816020860160208601610a55565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6000602080830181845280855180835260408601915060408160051b870101925083870160005b82811015610b42577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc0888603018452610b30858351610a85565b94509285019290850190600101610af6565b5092979650505050505050565b60008060408385031215610b6257600080fd5b505080516020909101519092909150565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008083357fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe1843603018112610c0657600080fd5b83018035915067ffffffffffffffff821115610c2157600080fd5b602001915036819003821315610c3657600080fd5b9250929050565b8183823760009101908152919050565b600060208284031215610c5f57600080fd5b815167ffffffffffffffff80821115610c7757600080fd5b818401915084601f830112610c8b57600080fd5b815181811115610c9d57610c9d610b73565b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f01168101908382118183101715610ce357610ce3610b73565b81604052828152876020848701011115610cfc57600080fd5b610d0d836020830160208801610a55565b979650505050505050565b602081526000610d2b6020830184610a85565b9392505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415610d8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b5060010190565b600060208284031215610da457600080fd5b505191905056fea2646970667358221220ed79c6d404efbcf7510b580e3fbcaf634f736a6657264f4f98fbea64bf21946264736f6c634300080a003300000000000000000000000074c764d41b77dbbb4fe771dab1939b00b146894a0000000000000000000000004ab2fc6e258a0ca7175d05ff10c5cf798a672cae00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000074c764d41b77dbbb4fe771dab1939b00b146894a0000000000000000000000004ab2fc6e258a0ca7175d05ff10c5cf798a672cae00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1

-----Decoded View---------------
Arg [0] : _bentoBox (address): 0x74c764d41b77dbbb4fe771dab1939b00b146894a
Arg [1] : _furoStream (address): 0x4ab2fc6e258a0ca7175d05ff10c5cf798a672cae
Arg [2] : _wETH (address): 0x82af49447d8a07e3bd95bd0d56f35241523fbab1

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 00000000000000000000000074c764d41b77dbbb4fe771dab1939b00b146894a
Arg [1] : 0000000000000000000000004ab2fc6e258a0ca7175d05ff10c5cf798a672cae
Arg [2] : 00000000000000000000000082af49447d8a07e3bd95bd0d56f35241523fbab1


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.