Contract 0x73f503fad13203C87889c3D5c567550b2d41D7a4

Txn Hash Method
Block
From
To
Value [Txn Fee]
0x401e1f7924d8c82191de5a690dc7613a8d0fec875317d9e0a9a5fe8676095fb5Create Stream282049332023-04-02 3:25:195 hrs 52 mins ago0x91b4c8de02c3396860d032eb987a51cb0dec56f6 IN  Sablier v1.10 AVAX0.005727804103 25.001
0x19519a25b8ce7f7be9f01f6daa79239039260141ca05da3ad0a65642aa8d1158Create Stream282048222023-04-02 3:21:315 hrs 56 mins ago0x91b4c8de02c3396860d032eb987a51cb0dec56f6 IN  Sablier v1.10 AVAX0.006163046512 25.001
0x69b07721779d29983fd0c81fe0f1a1686dcaa47649472a21de07da3c9c8691a5Withdraw From St...281839292023-04-01 15:37:3517 hrs 40 mins ago0x88d5443f6b0f4965b061f394f0aad662b9a5d11a IN  Sablier v1.10 AVAX0.002645180803 25.001
0xcf3ad2fcca98944c4a2d3367aea073fe5cbcf2840cabbe743e8cf9d8d621e862Withdraw From St...281839162023-04-01 15:37:0717 hrs 40 mins ago0x88d5443f6b0f4965b061f394f0aad662b9a5d11a IN  Sablier v1.10 AVAX0.003085723424 25.001
0x4fae44e64197e9998fb5ef56ea41da028af4b4d465d102cbaf1cae7ea5e7a45eWithdraw From St...281838612023-04-01 15:35:1817 hrs 42 mins ago0x97f1b2d2ca87a82e1cdfdcc44a27b4f71a7ea9a5 IN  Sablier v1.10 AVAX0.001785946435 25.001
0x1a16c548362bb3e8f80bae9098780c4d23166575e882444d94f100630c93710eWithdraw From St...281838452023-04-01 15:34:4717 hrs 43 mins ago0x97f1b2d2ca87a82e1cdfdcc44a27b4f71a7ea9a5 IN  Sablier v1.10 AVAX0.001785646423 25.001
0x081b61fe34a2dc84f9362a8aa219f5033d34b29f68b768d22ab0ccfa395904ddWithdraw From St...281838342023-04-01 15:34:2517 hrs 43 mins ago0x97f1b2d2ca87a82e1cdfdcc44a27b4f71a7ea9a5 IN  Sablier v1.10 AVAX0.001785346411 25.001
0x1d3e2698774640ae33f75b01f198bbf7d15c8b74c61e999b4cbf092aa951c961Withdraw From St...281838222023-04-01 15:34:0017 hrs 44 mins ago0x97f1b2d2ca87a82e1cdfdcc44a27b4f71a7ea9a5 IN  Sablier v1.10 AVAX0.001785646423 25.001
0xbf9d2f2c1c5cc283e67eea096fad33e57e1a34c5d324f4fb6ffc3e8792ad471dWithdraw From St...281838122023-04-01 15:33:3917 hrs 44 mins ago0x97f1b2d2ca87a82e1cdfdcc44a27b4f71a7ea9a5 IN  Sablier v1.10 AVAX0.001785646423 25.001
0x0b6896e7a5cc587c46f50d4fe195f93d8f7acfa9b5b6a40a7afb28fb44d31bd4Withdraw From St...281815222023-04-01 14:16:4019 hrs 1 min ago0x71c08a09209438d9724c5bcc1685b6010dfd1092 IN  Sablier v1.10 AVAX0.002644880791 25.001
0xe7e856384375172a1ec0d3445aa77d167d0b20643f56f5cfa199d8b2e771b769Withdraw From St...281324542023-03-31 10:50:501 day 22 hrs ago0x808c33744d365c476e272471d31e08830086c132 IN  Sablier v1.10 AVAX0.002562002476 25.001
0x377b57448d175b595ee160c1c9a40b8baaf89301ac6034637e2c390cadbca7efWithdraw From St...281034972023-03-30 18:57:532 days 14 hrs ago0x72d8454e7b31dd48fb05bf164300941d92750514 IN  Sablier v1.10 AVAX0.001785646423 25.001
0xce5688979e05f1d5110dbf92b059bf0d7815deb08c19f8c8c318a10845ae0a6fWithdraw From St...281034802023-03-30 18:57:192 days 14 hrs ago0x72d8454e7b31dd48fb05bf164300941d92750514 IN  Sablier v1.10 AVAX0.001785646423 25.001
0xf98442602db7fcb2d57b0a5f4bca50627b17add2ac01c29b7082af435a3b0655Withdraw From St...281034712023-03-30 18:57:012 days 14 hrs ago0x72d8454e7b31dd48fb05bf164300941d92750514 IN  Sablier v1.10 AVAX0.001785646423 25.001
0x4d594fd7ff06e221af4ab2d5497d627fd132d17d6bf8f1eaf33d9922ac2f0475Withdraw From St...281034602023-03-30 18:56:402 days 14 hrs ago0x72d8454e7b31dd48fb05bf164300941d92750514 IN  Sablier v1.10 AVAX0.001785646423 25.001
0x03e36a54434e46f89c7da41c8adcf579f8d4aad7dbce26fc4bcf5e2f4cc3350aWithdraw From St...281034432023-03-30 18:56:062 days 14 hrs ago0x72d8454e7b31dd48fb05bf164300941d92750514 IN  Sablier v1.10 AVAX0.001785646423 25.001
0xafb28dc0b0191dfdc7127bcd5878a9380be01ed22894b83e59bebc327e33a326Withdraw From St...280326572023-03-29 2:45:174 days 6 hrs ago0x808c33744d365c476e272471d31e08830086c132 IN  Sablier v1.10 AVAX0.002562002476 25.001
0x35e69f0101b275479d494b76af4f7cdad3f9c00236e73be348200d1f1efd369bWithdraw From St...279975282023-03-28 6:36:185 days 2 hrs ago0x8426793b4ebfce022997eb4d6303822ca64037f6 IN  Sablier v1.10 AVAX0.002645180803 25.001
0xd15f149391a910e53c13cb05fee891097c60a5b28498eb88f3540da6d394e44dWithdraw From St...279975082023-03-28 6:35:405 days 2 hrs ago0x8426793b4ebfce022997eb4d6303822ca64037f6 IN  Sablier v1.10 AVAX0.002644880791 25.001
0x29bc3d61f0a082385e8a1deeac0e0dc6f920e480d5c44271af0d061a44d27908Withdraw From St...279974822023-03-28 6:34:445 days 2 hrs ago0x8426793b4ebfce022997eb4d6303822ca64037f6 IN  Sablier v1.10 AVAX0.0028034615 26.5
0xa5209b565ab3eb64a97df98eafc10a7508ad92b08ff46360267997a2209194eeWithdraw From St...279974542023-03-28 6:33:545 days 2 hrs ago0x8426793b4ebfce022997eb4d6303822ca64037f6 IN  Sablier v1.10 AVAX0.0028034615 26.5
0xedce2190a2397c3209e7be5e9163f28d3158195f5c75f8964a01c076bff0cceeWithdraw From St...279974262023-03-28 6:32:525 days 2 hrs ago0x8426793b4ebfce022997eb4d6303822ca64037f6 IN  Sablier v1.10 AVAX0.002645180803 25.001
0x10ff4b1ec5a34413055baa0c532630bdccde8ed67095c893f6125dbb46669a42Withdraw From St...279974102023-03-28 6:32:235 days 2 hrs ago0x8426793b4ebfce022997eb4d6303822ca64037f6 IN  Sablier v1.10 AVAX0.002645180803 25.001
0x6932f63c9ba5cbcd672863e7a147099f80e9ae4be600f3e38e46d20513f166cbWithdraw From St...279864502023-03-28 0:14:225 days 9 hrs ago0x808c33744d365c476e272471d31e08830086c132 IN  Sablier v1.10 AVAX0.002548976955 25.001
0x38cd9a0197d6be8959ffef57c669d353b65f47b694aa5fe4aab9fa8b9256a49dWithdraw From St...279671292023-03-27 13:15:575 days 20 hrs ago0x71c08a09209438d9724c5bcc1685b6010dfd1092 IN  Sablier v1.10 AVAX0.002644880791 25.001
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Sablier

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU LGPLv3 license

Contract Source Code (Solidity Multiple files format)

File 1 of 9: Sablier.sol
pragma solidity =0.5.17;

import "./IERC20.sol";
import "./SafeERC20.sol";
import "./ReentrancyGuard.sol";
import "./CarefulMath.sol";

import "./ISablier.sol";
import "./Types.sol";

/**
 * @title Sablier
 * @author Sablier
 * @notice Money streaming.
 */
contract Sablier is ISablier, ReentrancyGuard, CarefulMath {
    using SafeERC20 for IERC20;

    /*** Storage Properties ***/

    /**
     * @notice Counter for new stream ids.
     */
    uint256 public nextStreamId;

    /**
     * @notice The stream objects identifiable by their unsigned integer ids.
     */
    mapping(uint256 => Types.Stream) private streams;

    /*** Modifiers ***/

    /**
     * @dev Throws if the caller is not the sender of the recipient of the stream.
     */
    modifier onlySenderOrRecipient(uint256 streamId) {
        require(
            msg.sender == streams[streamId].sender || msg.sender == streams[streamId].recipient,
            "caller is not the sender or the recipient of the stream"
        );
        _;
    }

    /**
     * @dev Throws if the provided id does not point to a valid stream.
     */
    modifier streamExists(uint256 streamId) {
        require(streams[streamId].isEntity, "stream does not exist");
        _;
    }

    /*** Contract Logic Starts Here */

    constructor() public {
        nextStreamId = 100000;
    }

    /*** View Functions ***/

    /**
     * @notice Returns the stream with all its properties.
     * @dev Throws if the id does not point to a valid stream.
     * @param streamId The id of the stream to query.
     * @return The stream object.
     */
    function getStream(uint256 streamId)
        external
        view
        streamExists(streamId)
        returns (
            address sender,
            address recipient,
            uint256 deposit,
            address tokenAddress,
            uint256 startTime,
            uint256 stopTime,
            uint256 remainingBalance,
            uint256 ratePerSecond
        )
    {
        sender = streams[streamId].sender;
        recipient = streams[streamId].recipient;
        deposit = streams[streamId].deposit;
        tokenAddress = streams[streamId].tokenAddress;
        startTime = streams[streamId].startTime;
        stopTime = streams[streamId].stopTime;
        remainingBalance = streams[streamId].remainingBalance;
        ratePerSecond = streams[streamId].ratePerSecond;
    }

    /**
     * @notice Returns either the delta in seconds between `block.timestamp` and `startTime` or
     *  between `stopTime` and `startTime, whichever is smaller. If `block.timestamp` is before
     *  `startTime`, it returns 0.
     * @dev Throws if the id does not point to a valid stream.
     * @param streamId The id of the stream for which to query the delta.
     * @return The time delta in seconds.
     */
    function deltaOf(uint256 streamId) public view streamExists(streamId) returns (uint256 delta) {
        Types.Stream memory stream = streams[streamId];
        if (block.timestamp <= stream.startTime) return 0;
        if (block.timestamp < stream.stopTime) return block.timestamp - stream.startTime;
        return stream.stopTime - stream.startTime;
    }

    struct BalanceOfLocalVars {
        MathError mathErr;
        uint256 recipientBalance;
        uint256 withdrawalAmount;
        uint256 senderBalance;
    }

    /**
     * @notice Returns the available funds for the given stream id and address.
     * @dev Throws if the id does not point to a valid stream.
     * @param streamId The id of the stream for which to query the balance.
     * @param who The address for which to query the balance.
     * @return The total funds allocated to `who` as uint256.
     */
    function balanceOf(uint256 streamId, address who) public view streamExists(streamId) returns (uint256 balance) {
        Types.Stream memory stream = streams[streamId];
        BalanceOfLocalVars memory vars;

        uint256 delta = deltaOf(streamId);
        (vars.mathErr, vars.recipientBalance) = mulUInt(delta, stream.ratePerSecond);
        require(vars.mathErr == MathError.NO_ERROR, "recipient balance calculation error");

        /*
         * If the stream `balance` does not equal `deposit`, it means there have been withdrawals.
         * We have to subtract the total amount withdrawn from the amount of money that has been
         * streamed until now.
         */
        if (stream.deposit > stream.remainingBalance) {
            (vars.mathErr, vars.withdrawalAmount) = subUInt(stream.deposit, stream.remainingBalance);
            assert(vars.mathErr == MathError.NO_ERROR);
            (vars.mathErr, vars.recipientBalance) = subUInt(vars.recipientBalance, vars.withdrawalAmount);
            /* `withdrawalAmount` cannot and should not be bigger than `recipientBalance`. */
            assert(vars.mathErr == MathError.NO_ERROR);
        }

        if (who == stream.recipient) return vars.recipientBalance;
        if (who == stream.sender) {
            (vars.mathErr, vars.senderBalance) = subUInt(stream.remainingBalance, vars.recipientBalance);
            /* `recipientBalance` cannot and should not be bigger than `remainingBalance`. */
            assert(vars.mathErr == MathError.NO_ERROR);
            return vars.senderBalance;
        }
        return 0;
    }

    /*** Public Effects & Interactions Functions ***/

    struct CreateStreamLocalVars {
        MathError mathErr;
        uint256 duration;
        uint256 ratePerSecond;
    }

    /**
     * @notice Creates a new stream funded by `msg.sender` and paid towards `recipient`.
     * @dev Throws if the recipient is the zero address, the contract itself or the caller.
     *  Throws if the deposit is 0.
     *  Throws if the start time is before `block.timestamp`.
     *  Throws if the stop time is before the start time.
     *  Throws if the duration calculation has a math error.
     *  Throws if the deposit is smaller than the duration.
     *  Throws if the deposit is not a multiple of the duration.
     *  Throws if the rate calculation has a math error.
     *  Throws if the next stream id calculation has a math error.
     *  Throws if the contract is not allowed to transfer enough tokens.
     *  Throws if there is a token transfer failure.
     * @param recipient The address towards which the money is streamed.
     * @param deposit The amount of money to be streamed.
     * @param tokenAddress The ERC20 token to use as streaming currency.
     * @param startTime The unix timestamp for when the stream starts.
     * @param stopTime The unix timestamp for when the stream stops.
     * @return The uint256 id of the newly created stream.
     */
    function createStream(address recipient, uint256 deposit, address tokenAddress, uint256 startTime, uint256 stopTime)
        public
        returns (uint256)
    {
        require(recipient != address(0x00), "stream to the zero address");
        require(recipient != address(this), "stream to the contract itself");
        require(recipient != msg.sender, "stream to the caller");
        require(deposit > 0, "deposit is zero");
        require(startTime >= block.timestamp, "start time before block.timestamp");
        require(stopTime > startTime, "stop time before the start time");

        CreateStreamLocalVars memory vars;
        (vars.mathErr, vars.duration) = subUInt(stopTime, startTime);
        /* `subUInt` can only return MathError.INTEGER_UNDERFLOW but we know `stopTime` is higher than `startTime`. */
        assert(vars.mathErr == MathError.NO_ERROR);

        /* Without this, the rate per second would be zero. */
        require(deposit >= vars.duration, "deposit smaller than time delta");

        /* This condition avoids dealing with remainders */
        require(deposit % vars.duration == 0, "deposit not multiple of time delta");

        (vars.mathErr, vars.ratePerSecond) = divUInt(deposit, vars.duration);
        /* `divUInt` can only return MathError.DIVISION_BY_ZERO but we know `duration` is not zero. */
        assert(vars.mathErr == MathError.NO_ERROR);

        /* Create and store the stream object. */
        uint256 streamId = nextStreamId;
        streams[streamId] = Types.Stream({
            remainingBalance: deposit,
            deposit: deposit,
            isEntity: true,
            ratePerSecond: vars.ratePerSecond,
            recipient: recipient,
            sender: msg.sender,
            startTime: startTime,
            stopTime: stopTime,
            tokenAddress: tokenAddress
        });

        /* Increment the next stream id. */
        (vars.mathErr, nextStreamId) = addUInt(nextStreamId, uint256(1));
        require(vars.mathErr == MathError.NO_ERROR, "next stream id calculation error");

        IERC20(tokenAddress).safeTransferFrom(msg.sender, address(this), deposit);
        emit CreateStream(streamId, msg.sender, recipient, deposit, tokenAddress, startTime, stopTime);
        return streamId;
    }

    /**
     * @notice Withdraws from the contract to the recipient's account.
     * @dev Throws if the id does not point to a valid stream.
     *  Throws if the caller is not the sender or the recipient of the stream.
     *  Throws if the amount exceeds the available balance.
     *  Throws if there is a token transfer failure.
     * @param streamId The id of the stream to withdraw tokens from.
     * @param amount The amount of tokens to withdraw.
     */
    function withdrawFromStream(uint256 streamId, uint256 amount)
        external
        nonReentrant
        streamExists(streamId)
        onlySenderOrRecipient(streamId)
        returns (bool)
    {
        require(amount > 0, "amount is zero");
        Types.Stream memory stream = streams[streamId];

        uint256 balance = balanceOf(streamId, stream.recipient);
        require(balance >= amount, "amount exceeds the available balance");

        MathError mathErr;
        (mathErr, streams[streamId].remainingBalance) = subUInt(stream.remainingBalance, amount);
        /**
         * `subUInt` can only return MathError.INTEGER_UNDERFLOW but we know that `remainingBalance` is at least
         * as big as `amount`.
         */
        assert(mathErr == MathError.NO_ERROR);

        if (streams[streamId].remainingBalance == 0) delete streams[streamId];

        IERC20(stream.tokenAddress).safeTransfer(stream.recipient, amount);
        emit WithdrawFromStream(streamId, stream.recipient, amount);
        return true;
    }

    /**
     * @notice Cancels the stream and transfers the tokens back on a pro rata basis.
     * @dev Throws if the id does not point to a valid stream.
     *  Throws if the caller is not the sender or the recipient of the stream.
     *  Throws if there is a token transfer failure.
     * @param streamId The id of the stream to cancel.
     * @return bool true=success, otherwise false.
     */
    function cancelStream(uint256 streamId)
        external
        nonReentrant
        streamExists(streamId)
        onlySenderOrRecipient(streamId)
        returns (bool)
    {
        Types.Stream memory stream = streams[streamId];
        uint256 senderBalance = balanceOf(streamId, stream.sender);
        uint256 recipientBalance = balanceOf(streamId, stream.recipient);

        delete streams[streamId];

        IERC20 token = IERC20(stream.tokenAddress);
        if (recipientBalance > 0) token.safeTransfer(stream.recipient, recipientBalance);
        if (senderBalance > 0) token.safeTransfer(stream.sender, senderBalance);

        emit CancelStream(streamId, stream.sender, stream.recipient, senderBalance, recipientBalance);
        return true;
    }
}

File 2 of 9: Address.sol
pragma solidity ^0.5.0;

/**
 * @dev Collection of functions related to the address type,
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * This test is non-exhaustive, and there may be false-negatives: during the
     * execution of a contract's constructor, its address will be reported as
     * not containing a contract.
     *
     * > It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies in extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly { size := extcodesize(account) }
        return size > 0;
    }
}

File 3 of 9: CarefulMath.sol
pragma solidity >=0.5.17;

/**
  * @title Careful Math
  * @author Compound
  * @notice Derived from OpenZeppelin's SafeMath library
  *         https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol
  */
contract CarefulMath {

    /**
     * @dev Possible error codes that we can return
     */
    enum MathError {
        NO_ERROR,
        DIVISION_BY_ZERO,
        INTEGER_OVERFLOW,
        INTEGER_UNDERFLOW
    }

    /**
    * @dev Multiplies two numbers, returns an error on overflow.
    */
    function mulUInt(uint a, uint b) internal pure returns (MathError, uint) {
        if (a == 0) {
            return (MathError.NO_ERROR, 0);
        }

        uint c = a * b;

        if (c / a != b) {
            return (MathError.INTEGER_OVERFLOW, 0);
        } else {
            return (MathError.NO_ERROR, c);
        }
    }

    /**
    * @dev Integer division of two numbers, truncating the quotient.
    */
    function divUInt(uint a, uint b) internal pure returns (MathError, uint) {
        if (b == 0) {
            return (MathError.DIVISION_BY_ZERO, 0);
        }

        return (MathError.NO_ERROR, a / b);
    }

    /**
    * @dev Subtracts two numbers, returns an error on overflow (i.e. if subtrahend is greater than minuend).
    */
    function subUInt(uint a, uint b) internal pure returns (MathError, uint) {
        if (b <= a) {
            return (MathError.NO_ERROR, a - b);
        } else {
            return (MathError.INTEGER_UNDERFLOW, 0);
        }
    }

    /**
    * @dev Adds two numbers, returns an error on overflow.
    */
    function addUInt(uint a, uint b) internal pure returns (MathError, uint) {
        uint c = a + b;

        if (c >= a) {
            return (MathError.NO_ERROR, c);
        } else {
            return (MathError.INTEGER_OVERFLOW, 0);
        }
    }

    /**
    * @dev add a and b and then subtract c
    */
    function addThenSubUInt(uint a, uint b, uint c) internal pure returns (MathError, uint) {
        (MathError err0, uint sum) = addUInt(a, b);

        if (err0 != MathError.NO_ERROR) {
            return (err0, 0);
        }

        return subUInt(sum, c);
    }
}

File 4 of 9: IERC20.sol
pragma solidity ^0.5.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see `ERC20Detailed`.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a `Transfer` event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through `transferFrom`. This is
     * zero by default.
     *
     * This value changes when `approve` or `transferFrom` are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * > Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an `Approval` event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a `Transfer` event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to `approve`. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 5 of 9: ISablier.sol
pragma solidity >=0.5.17;

/**
 * @title ISablier
 * @author Sablier
 */
interface ISablier {
    /**
     * @notice Emits when a stream is successfully created.
     */
    event CreateStream(
        uint256 indexed streamId,
        address indexed sender,
        address indexed recipient,
        uint256 deposit,
        address tokenAddress,
        uint256 startTime,
        uint256 stopTime
    );

    /**
     * @notice Emits when the recipient of a stream withdraws a portion or all their pro rata share of the stream.
     */
    event WithdrawFromStream(uint256 indexed streamId, address indexed recipient, uint256 amount);

    /**
     * @notice Emits when a stream is successfully cancelled and tokens are transferred back on a pro rata basis.
     */
    event CancelStream(
        uint256 indexed streamId,
        address indexed sender,
        address indexed recipient,
        uint256 senderBalance,
        uint256 recipientBalance
    );

    function balanceOf(uint256 streamId, address who) external view returns (uint256 balance);

    function getStream(uint256 streamId)
        external
        view
        returns (
            address sender,
            address recipient,
            uint256 deposit,
            address token,
            uint256 startTime,
            uint256 stopTime,
            uint256 remainingBalance,
            uint256 ratePerSecond
        );

    function createStream(address recipient, uint256 deposit, address tokenAddress, uint256 startTime, uint256 stopTime)
        external
        returns (uint256 streamId);

    function withdrawFromStream(uint256 streamId, uint256 funds) external returns (bool);

    function cancelStream(uint256 streamId) external returns (bool);
}

File 6 of 9: ReentrancyGuard.sol
pragma solidity ^0.5.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the `nonReentrant` modifier
 * available, which can be aplied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 */
contract ReentrancyGuard {
    /// @dev counter to allow mutex lock with only one SSTORE operation
    uint256 private _guardCounter;

    constructor () internal {
        // The counter starts at one to prevent changing it from zero to a non-zero
        // value, which is a more expensive operation.
        _guardCounter = 1;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and make it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _guardCounter += 1;
        uint256 localCounter = _guardCounter;
        _;
        require(localCounter == _guardCounter, "ReentrancyGuard: reentrant call");
    }
}

File 7 of 9: SafeERC20.sol
pragma solidity ^0.5.0;

import "./IERC20.sol";
import "./SafeMath.sol";
import "./Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using SafeMath for uint256;
    using Address for address;

    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    function safeApprove(IERC20 token, address spender, uint256 value) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        // solhint-disable-next-line max-line-length
        require((value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).add(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 newAllowance = token.allowance(address(this), spender).sub(value);
        callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves.

        // A Solidity high level call has three parts:
        //  1. The target address is checked to verify it contains contract code
        //  2. The call itself is made, and success asserted
        //  3. The return value is decoded, which in turn checks the size of the returned data.
        // solhint-disable-next-line max-line-length
        require(address(token).isContract(), "SafeERC20: call to non-contract");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = address(token).call(data);
        require(success, "SafeERC20: low-level call failed");

        if (returndata.length > 0) { // Return data is optional
            // solhint-disable-next-line max-line-length
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 8 of 9: SafeMath.sol
pragma solidity ^0.5.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a, "SafeMath: addition overflow");

        return c;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SafeMath: subtraction overflow");
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "SafeMath: multiplication overflow");

        return c;
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, "SafeMath: division by zero");
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0, "SafeMath: modulo by zero");
        return a % b;
    }
}

File 9 of 9: Types.sol
pragma solidity =0.5.17;

/**
 * @title Sablier Types
 * @author Sablier
 */
library Types {
    struct Stream {
        uint256 deposit;
        uint256 ratePerSecond;
        uint256 remainingBalance;
        uint256 startTime;
        uint256 stopTime;
        address recipient;
        address sender;
        address tokenAddress;
        bool isEntity;
    }
}

Contract ABI

[{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"streamId","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"senderBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"recipientBalance","type":"uint256"}],"name":"CancelStream","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"streamId","type":"uint256"},{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"deposit","type":"uint256"},{"indexed":false,"internalType":"address","name":"tokenAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"startTime","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"stopTime","type":"uint256"}],"name":"CreateStream","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"streamId","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WithdrawFromStream","type":"event"},{"constant":true,"inputs":[{"internalType":"uint256","name":"streamId","type":"uint256"},{"internalType":"address","name":"who","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"streamId","type":"uint256"}],"name":"cancelStream","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"stopTime","type":"uint256"}],"name":"createStream","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"streamId","type":"uint256"}],"name":"deltaOf","outputs":[{"internalType":"uint256","name":"delta","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"streamId","type":"uint256"}],"name":"getStream","outputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"deposit","type":"uint256"},{"internalType":"address","name":"tokenAddress","type":"address"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"stopTime","type":"uint256"},{"internalType":"uint256","name":"remainingBalance","type":"uint256"},{"internalType":"uint256","name":"ratePerSecond","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"nextStreamId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"streamId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawFromStream","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b5060016000819055620186a0905561180e8061002d6000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80637a9b2c6c1161005b5780637a9b2c6c146100f9578063894e9a0d1461011c578063a82ccd4d1461018c578063cc1b4bf6146101a95761007d565b80631e99d569146100825780633656eec21461009c5780636db9241b146100c8575b600080fd5b61008a6101e9565b60408051918252519081900360200190f35b61008a600480360360408110156100b257600080fd5b50803590602001356001600160a01b03166101ef565b6100e5600480360360208110156100de57600080fd5b50356104d4565b604080519115158252519081900360200190f35b6100e56004803603604081101561010f57600080fd5b50803590602001356107e8565b6101396004803603602081101561013257600080fd5b5035610b79565b604080516001600160a01b03998a168152978916602089015287810196909652939096166060860152608085019190915260a084015260c083019390935260e08201929092529051908190036101000190f35b61008a600480360360208110156101a257600080fd5b5035610c4d565b61008a600480360360a08110156101bf57600080fd5b506001600160a01b0381358116916020810135916040820135169060608101359060800135610d87565b60015481565b6000828152600260205260408120600701548390600160a01b900460ff16610256576040805162461bcd60e51b81526020600482015260156024820152741cdd1c99585b48191bd95cc81b9bdd08195e1a5cdd605a1b604482015290519081900360640190fd5b61025e61163a565b50600084815260026020818152604092839020835161012081018552815481526001820154928101929092529182015492810192909252600381015460608301526004810154608083015260058101546001600160a01b0390811660a08401526006820154811660c084015260079091015490811660e0830152600160a01b900460ff1615156101008201526102f26116a3565b60006102fd87610c4d565b905061030d81846020015161130f565b602084018190528382600381111561032157fe5b600381111561032c57fe5b905250600090508251600381111561034057fe5b1461037c5760405162461bcd60e51b81526004018080602001828103825260238152602001806117566023913960400191505060405180910390fd5b6040830151835111156104215761039b83600001518460400151611351565b60408401819052838260038111156103af57fe5b60038111156103ba57fe5b90525060009050825160038111156103ce57fe5b146103d557fe5b6103e782602001518360400151611351565b60208401819052838260038111156103fb57fe5b600381111561040657fe5b905250600090508251600381111561041a57fe5b1461042157fe5b8260a001516001600160a01b0316866001600160a01b0316141561044d57506020015192506104cd9050565b8260c001516001600160a01b0316866001600160a01b031614156104c55761047d83604001518360200151611351565b606084018190528382600381111561049157fe5b600381111561049c57fe5b90525060009050825160038111156104b057fe5b146104b757fe5b506060015192506104cd9050565b600094505050505b5092915050565b60008054600101808255828252600260205260408220600701548390600160a01b900460ff16610543576040805162461bcd60e51b81526020600482015260156024820152741cdd1c99585b48191bd95cc81b9bdd08195e1a5cdd605a1b604482015290519081900360640190fd5b60008481526002602052604090206006015484906001600160a01b031633148061058657506000818152600260205260409020600501546001600160a01b031633145b6105c15760405162461bcd60e51b81526004018080602001828103825260378152602001806117796037913960400191505060405180910390fd5b6105c961163a565b506000858152600260208181526040808420815161012081018352815481526001820154938101939093529283015490820152600382015460608201526004820154608082015260058201546001600160a01b0390811660a08301526006830154811660c0830181905260079093015490811660e0830152600160a01b900460ff16151561010082015291906106609088906101ef565b90506000610672888460a001516101ef565b60008981526002602081905260408220828155600181018390559081018290556003810182905560048101919091556005810180546001600160a01b0319908116909155600682018054909116905560070180546001600160a81b031916905560e084015190915081156107005760a0840151610700906001600160a01b038316908463ffffffff61137416565b82156107265760c0840151610726906001600160a01b038316908563ffffffff61137416565b8360a001516001600160a01b03168460c001516001600160a01b03168a7fca3e6079b726e7728802a0537949e2d1c7762304fa641fb06eb56daf2ba8c6b98686604051808381526020018281526020019250505060405180910390a46001975050505050505060005481146107e2576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b50919050565b60008054600101808255838252600260205260408220600701548490600160a01b900460ff16610857576040805162461bcd60e51b81526020600482015260156024820152741cdd1c99585b48191bd95cc81b9bdd08195e1a5cdd605a1b604482015290519081900360640190fd5b60008581526002602052604090206006015485906001600160a01b031633148061089a57506000818152600260205260409020600501546001600160a01b031633145b6108d55760405162461bcd60e51b81526004018080602001828103825260378152602001806117796037913960400191505060405180910390fd5b6000851161091b576040805162461bcd60e51b815260206004820152600e60248201526d616d6f756e74206973207a65726f60901b604482015290519081900360640190fd5b61092361163a565b506000868152600260208181526040808420815161012081018352815481526001820154938101939093529283015490820152600382015460608201526004820154608082015260058201546001600160a01b0390811660a083018190526006840154821660c084015260079093015490811660e0830152600160a01b900460ff16151561010082015291906109ba9089906101ef565b9050868110156109fb5760405162461bcd60e51b81526004018080602001828103825260248152602001806116ef6024913960400191505060405180910390fd5b6000610a0b836040015189611351565b60008b815260026020819052604082200191909155909150816003811115610a2f57fe5b14610a3657fe5b60008981526002602081905260409091200154610aae5760008981526002602081905260408220828155600181018390559081018290556003810182905560048101919091556005810180546001600160a01b0319908116909155600682018054909116905560070180546001600160a81b03191690555b610ad48360a00151898560e001516001600160a01b03166113749092919063ffffffff16565b8260a001516001600160a01b0316897f36c3ab437e6a424ed25dc4bfdeb62706aa06558660fab2dab229d2555adaf89c8a6040518082815260200191505060405180910390a360019650505050505060005481146104cd576040805162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015290519081900360640190fd5b600080600080600080600080886002600082815260200190815260200160002060070160149054906101000a900460ff16610bf3576040805162461bcd60e51b81526020600482015260156024820152741cdd1c99585b48191bd95cc81b9bdd08195e1a5cdd605a1b604482015290519081900360640190fd5b505050600096875250506002602081905260409095206006810154600582015482546007840154600385015460048601549a8601546001909601546001600160a01b039586169c9486169b939a5094909116975095509350565b6000818152600260205260408120600701548290600160a01b900460ff16610cb4576040805162461bcd60e51b81526020600482015260156024820152741cdd1c99585b48191bd95cc81b9bdd08195e1a5cdd605a1b604482015290519081900360640190fd5b610cbc61163a565b506000838152600260208181526040928390208351610120810185528154815260018201549281019290925291820154928101929092526003810154606083018190526004820154608084015260058201546001600160a01b0390811660a08501526006830154811660c085015260079092015491821660e0840152600160a01b90910460ff1615156101008301524211610d5b5760009250506107e2565b8060800151421015610d745760600151420391506107e2565b6060810151608090910151039392505050565b60006001600160a01b038616610de4576040805162461bcd60e51b815260206004820152601a60248201527f73747265616d20746f20746865207a65726f2061646472657373000000000000604482015290519081900360640190fd5b6001600160a01b038616301415610e42576040805162461bcd60e51b815260206004820152601d60248201527f73747265616d20746f2074686520636f6e747261637420697473656c66000000604482015290519081900360640190fd5b6001600160a01b038616331415610e97576040805162461bcd60e51b815260206004820152601460248201527339ba3932b0b6903a37903a34329031b0b63632b960611b604482015290519081900360640190fd5b60008511610ede576040805162461bcd60e51b815260206004820152600f60248201526e6465706f736974206973207a65726f60881b604482015290519081900360640190fd5b42831015610f1d5760405162461bcd60e51b81526004018080602001828103825260218152602001806117136021913960400191505060405180910390fd5b828211610f71576040805162461bcd60e51b815260206004820152601f60248201527f73746f702074696d65206265666f7265207468652073746172742074696d6500604482015290519081900360640190fd5b610f796116cc565b610f838385611351565b6020830181905282826003811115610f9757fe5b6003811115610fa257fe5b9052506000905081516003811115610fb657fe5b14610fbd57fe5b8060200151861015611016576040805162461bcd60e51b815260206004820152601f60248201527f6465706f73697420736d616c6c6572207468616e2074696d652064656c746100604482015290519081900360640190fd5b8060200151868161102357fe5b06156110605760405162461bcd60e51b81526004018080602001828103825260228152602001806117346022913960400191505060405180910390fd5b61106e8682602001516113cb565b604083018190528282600381111561108257fe5b600381111561108d57fe5b90525060009050815160038111156110a157fe5b146110a857fe5b6000600154905060405180610120016040528088815260200183604001518152602001888152602001868152602001858152602001896001600160a01b03168152602001336001600160a01b03168152602001876001600160a01b031681526020016001151581525060026000838152602001908152602001600020600082015181600001556020820151816001015560408201518160020155606082015181600301556080820151816004015560a08201518160050160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060c08201518160060160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060e08201518160070160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506101008201518160070160146101000a81548160ff02191690831515021790555090505061120e60015460016113f6565b60018190558382600381111561122057fe5b600381111561122b57fe5b905250600090508251600381111561123f57fe5b14611291576040805162461bcd60e51b815260206004820181905260248201527f6e6578742073747265616d2069642063616c63756c6174696f6e206572726f72604482015290519081900360640190fd5b6112ac6001600160a01b03871633308a63ffffffff61141c16565b604080518881526001600160a01b038881166020830152818301889052606082018790529151918a1691339184917f7b01d409597969366dc268d7f957a990d1ca3d3449baf8fb45db67351aecfe789181900360800190a4979650505050505050565b600080836113225750600090508061134a565b8383028385828161132f57fe5b04146113435750600291506000905061134a565b6000925090505b9250929050565b60008083831161136857506000905081830361134a565b5060039050600061134a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526113c690849061147c565b505050565b600080826113df575060019050600061134a565b60008385816113ea57fe5b04915091509250929050565b60008083830184811061140e5760009250905061134a565b50600291506000905061134a565b604080516001600160a01b0385811660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261147690859061147c565b50505050565b61148e826001600160a01b0316611634565b6114df576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b6020831061151d5780518252601f1990920191602091820191016114fe565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d806000811461157f576040519150601f19603f3d011682016040523d82523d6000602084013e611584565b606091505b5091509150816115db576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115611476578080602001905160208110156115f757600080fd5b50516114765760405162461bcd60e51b815260040180806020018281038252602a8152602001806117b0602a913960400191505060405180910390fd5b3b151590565b604051806101200160405280600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b031681526020016000151581525090565b604080516080810190915280600081526020016000815260200160008152602001600081525090565b604080516060810190915280600081526020016000815260200160008152509056fe616d6f756e7420657863656564732074686520617661696c61626c652062616c616e636573746172742074696d65206265666f726520626c6f636b2e74696d657374616d706465706f736974206e6f74206d756c7469706c65206f662074696d652064656c7461726563697069656e742062616c616e63652063616c63756c6174696f6e206572726f7263616c6c6572206973206e6f74207468652073656e646572206f722074686520726563697069656e74206f66207468652073747265616d5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a72315820c52021f48f1b12fa61e9d5e41ec9488cb706c744cd676378fd0886e385ce4d8f64736f6c63430005110032

Deployed ByteCode Sourcemap

257:11408:5:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;257:11408:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;448:27;;;:::i;:::-;;;;;;;;;;;;;;;;3721:1595;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3721:1595:5;;;;;;-1:-1:-1;;;;;3721:1595:5;;:::i;10898:765::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10898:765:5;;:::i;:::-;;;;;;;;;;;;;;;;;;9452:1038;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;9452:1038:5;;;;;;;:::i;1606:800::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;1606:800:5;;:::i;:::-;;;;-1:-1:-1;;;;;1606:800:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2834:357;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;2834:357:5;;:::i;6695:2285::-;;;;;;13:3:-1;8;5:12;2:2;;;30:1;27;20:12;2:2;-1:-1;;;;;;6695:2285:5;;;;;;;;;;;;;;;;;;;;;;;;;:::i;448:27::-;;;;:::o;3721:1595::-;3815:15;1169:17;;;:7;:17;;;;;:26;;;:17;;-1:-1:-1;;;1169:26:5;;;;1161:60;;;;;-1:-1:-1;;;1161:60:5;;;;;;;;;;;;-1:-1:-1;;;1161:60:5;;;;;;;;;;;;;;;3842:26;;:::i;:::-;-1:-1:-1;3871:17:5;;;;:7;:17;;;;;;;;;3842:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3842:46:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3842:46:5;;;;;;;;;;3898:30;;:::i;:::-;3939:13;3955:17;3963:8;3955:7;:17::i;:::-;3939:33;;4022:36;4030:5;4037:6;:20;;;4022:7;:36::i;:::-;3997:21;;;3982:76;;;3983:4;3982:76;;;;;;;;;;;;;;;;;;;-1:-1:-1;4092:18:5;;-1:-1:-1;4076:12:5;;:34;;;;;;;;;4068:82;;;;-1:-1:-1;;;4068:82:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4432:23;;;;4415:14;;:40;4411:472;;;4511:48;4519:6;:14;;;4535:6;:23;;;4511:7;:48::i;:::-;4486:21;;;4471:88;;;4472:4;4471:88;;;;;;;;;;;;;;;;;;;-1:-1:-1;4596:18:5;;-1:-1:-1;4580:12:5;;:34;;;;;;;;;4573:42;;;;4669:53;4677:4;:21;;;4700:4;:21;;;4669:7;:53::i;:::-;4644:21;;;4629:93;;;4630:4;4629:93;;;;;;;;;;;;;;;;;;;-1:-1:-1;4853:18:5;;-1:-1:-1;4837:12:5;;:34;;;;;;;;;4830:42;;;;4904:6;:16;;;-1:-1:-1;;;;;4897:23:5;:3;-1:-1:-1;;;;;4897:23:5;;4893:57;;;-1:-1:-1;4929:21:5;;;;-1:-1:-1;4922:28:5;;-1:-1:-1;4922:28:5;4893:57;4971:6;:13;;;-1:-1:-1;;;;;4964:20:5;:3;-1:-1:-1;;;;;4964:20:5;;4960:332;;;5037:55;5045:6;:23;;;5070:4;:21;;;5037:7;:55::i;:::-;5015:18;;;5000:92;;;5001:4;5000:92;;;;;;;;;;;;;;;;;;;-1:-1:-1;5223:18:5;;-1:-1:-1;5207:12:5;;:34;;;;;;;;;5200:42;;;;-1:-1:-1;5263:18:5;;;;-1:-1:-1;5256:25:5;;-1:-1:-1;5256:25:5;4960:332;5308:1;5301:8;;;;;1231:1;3721:1595;;;;;:::o;10898:765::-;11064:4;1301:18:4;;1318:1;1301:18;;;;1169:17:5;;;:7;:17;;;;;:26;;;:17;;-1:-1:-1;;;1169:26:5;;;;1161:60;;;;;-1:-1:-1;;;1161:60:5;;;;;;;;;;;;-1:-1:-1;;;1161:60:5;;;;;;;;;;;;;;;849:17;;;;:7;:17;;;;;:24;;;:17;;-1:-1:-1;;;;;849:24:5;835:10;:38;;:83;;-1:-1:-1;891:17:5;;;;:7;:17;;;;;:27;;;-1:-1:-1;;;;;891:27:5;877:10;:41;835:83;814:185;;;;-1:-1:-1;;;814:185:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;11084:26;;:::i;:::-;-1:-1:-1;11113:17:5;;;;:7;:17;;;;;;;;11084:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;11084:46:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;11084:46:5;;;;;;;;;;;11113:17;11164:34;;11113:17;;11164:9;:34::i;:::-;11140:58;;11208:24;11235:37;11245:8;11255:6;:16;;;11235:9;:37::i;:::-;11290:17;;;;:7;:17;;;;;;;11283:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;11283:24:5;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;11283:24:5;;;11340:19;;;;11208:64;;-1:-1:-1;11374:20:5;;11370:80;;11415:16;;;;11396:54;;-1:-1:-1;;;;;11396:18:5;;;11433:16;11396:54;:18;:54;:::i;:::-;11464:17;;11460:71;;11502:13;;;;11483:48;;-1:-1:-1;;;;;11483:18:5;;;11517:13;11483:48;:18;:48;:::i;:::-;11585:6;:16;;;-1:-1:-1;;;;;11547:88:5;11570:6;:13;;;-1:-1:-1;;;;;11547:88:5;11560:8;11547:88;11603:13;11618:16;11547:88;;;;;;;;;;;;;;;;;;;;;;;;11652:4;11645:11;;;;;;1231:1;1375::4;1410:13;;1394:12;:29;1386:73;;;;;-1:-1:-1;;;1386:73:4;;;;;;;;;;;;;;;;;;;;;;;;;;;;10898:765:5;;;;:::o;9452:1038::-;9640:4;1301:18:4;;1318:1;1301:18;;;;1169:17:5;;;:7;:17;;;;;:26;;;:17;;-1:-1:-1;;;1169:26:5;;;;1161:60;;;;;-1:-1:-1;;;1161:60:5;;;;;;;;;;;;-1:-1:-1;;;1161:60:5;;;;;;;;;;;;;;;849:17;;;;:7;:17;;;;;:24;;;:17;;-1:-1:-1;;;;;849:24:5;835:10;:38;;:83;;-1:-1:-1;891:17:5;;;;:7;:17;;;;;:27;;;-1:-1:-1;;;;;891:27:5;877:10;:41;835:83;814:185;;;;-1:-1:-1;;;814:185:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9677:1;9668:6;:10;9660:37;;;;;-1:-1:-1;;;9660:37:5;;;;;;;;;;;;-1:-1:-1;;;9660:37:5;;;;;;;;;;;;;;;9707:26;;:::i;:::-;-1:-1:-1;9736:17:5;;;;:7;:17;;;;;;;;9707:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;9707:46:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;9707:46:5;;;;;;;;;;;9736:17;9782:37;;9736:17;;9782:9;:37::i;:::-;9764:55;;9848:6;9837:7;:17;;9829:66;;;;-1:-1:-1;;;9829:66:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9906:17;9981:40;9989:6;:23;;;10014:6;9981:7;:40::i;:::-;9943:17;;;;:7;:17;;;;;;;:34;9933:88;;;;;;-1:-1:-1;10206:7:5;:29;;;;;;;;;10199:37;;;;10251:17;;;;:7;:17;;;;;;;;:34;;10247:69;;10299:17;;;;:7;:17;;;;;;;10292:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;10292:24:5;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;10292:24:5;;;10247:69;10327:66;10368:6;:16;;;10386:6;10334;:19;;;-1:-1:-1;;;;;10327:40:5;;;:66;;;;;:::i;:::-;10437:6;:16;;;-1:-1:-1;;;;;10408:54:5;10427:8;10408:54;10455:6;10408:54;;;;;;;;;;;;;;;;;;10479:4;10472:11;;;;;1231:1;1375::4;1410:13;;1394:12;:29;1386:73;;;;;-1:-1:-1;;;1386:73:4;;;;;;;;;;;;;;;;;;;;;;;;;;;1606:800:5;1734:14;1762:17;1793:15;1822:20;1856:17;1887:16;1917:24;1955:21;1694:8;1169:7;:17;1177:8;1169:17;;;;;;;;;;;:26;;;;;;;;;;;;1161:60;;;;;-1:-1:-1;;;1161:60:5;;;;;;;;;;;;-1:-1:-1;;;1161:60:5;;;;;;;;;;;;;;;-1:-1:-1;;;2010:17:5;;;;-1:-1:-1;;2010:7:5;:17;;;;;;;;:24;;;;2056:27;;;;2103:25;;2153:30;;;;2205:27;;;;2253:26;;;;2308:34;;;;2010:24;2368:31;;;;-1:-1:-1;;;;;2010:24:5;;;;2056:27;;;;2103:25;;-1:-1:-1;2153:30:5;;;;;-1:-1:-1;2205:27:5;-1:-1:-1;2253:26:5;-1:-1:-1;1606:800:5:o;2834:357::-;2913:13;1169:17;;;:7;:17;;;;;:26;;;:17;;-1:-1:-1;;;1169:26:5;;;;1161:60;;;;;-1:-1:-1;;;1161:60:5;;;;;;;;;;;;-1:-1:-1;;;1161:60:5;;;;;;;;;;;;;;;2938:26;;:::i;:::-;-1:-1:-1;2967:17:5;;;;:7;:17;;;;;;;;;2938:46;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2938:46:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;2938:46:5;;;;;;;;;;;2998:15;:35;2994:49;;3042:1;3035:8;;;;;2994:49;3075:6;:15;;;3057;:33;3053:80;;;3117:16;;;3099:15;:34;;-1:-1:-1;3092:41:5;;3053:80;3168:16;;;;3150:15;;;;;:34;;2834:357;-1:-1:-1;;;2834:357:5:o;6695:2285::-;6844:7;-1:-1:-1;;;;;6875:26:5;;6867:65;;;;;-1:-1:-1;;;6867:65:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;6950:26:5;;6971:4;6950:26;;6942:68;;;;;-1:-1:-1;;;6942:68:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7028:23:5;;7041:10;7028:23;;7020:56;;;;;-1:-1:-1;;;7020:56:5;;;;;;;;;;;;-1:-1:-1;;;7020:56:5;;;;;;;;;;;;;;;7104:1;7094:7;:11;7086:39;;;;;-1:-1:-1;;;7086:39:5;;;;;;;;;;;;-1:-1:-1;;;7086:39:5;;;;;;;;;;;;;;;7156:15;7143:9;:28;;7135:74;;;;-1:-1:-1;;;7135:74:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7238:9;7227:8;:20;7219:64;;;;;-1:-1:-1;;;7219:64:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;7294:33;;:::i;:::-;7369:28;7377:8;7387:9;7369:7;:28::i;:::-;7352:13;;;7337:60;;;7338:4;7337:60;;;;;;;;;;;;;;;;;;;-1:-1:-1;7549:18:5;;-1:-1:-1;7533:12:5;;:34;;;;;;;;;7526:42;;;;7661:4;:13;;;7650:7;:24;;7642:68;;;;;-1:-1:-1;;;7642:68:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;7799:4;:13;;;7789:7;:23;;;;;;:28;7781:75;;;;-1:-1:-1;;;7781:75:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7904:31;7912:7;7921:4;:13;;;7904:7;:31::i;:::-;7882:18;;;7867:68;;;7868:4;7867:68;;;;;;;;;;;;;;;;;;;-1:-1:-1;8071:18:5;;-1:-1:-1;8055:12:5;;:34;;;;;;;;;8048:42;;;;8151:16;8170:12;;8151:31;;8212:340;;;;;;;;8287:7;8212:340;;;;8351:4;:18;;;8212:340;;;;8257:7;8212:340;;;;8460:9;8212:340;;;;8493:8;8212:340;;;;8394:9;-1:-1:-1;;;;;8212:340:5;;;;;8425:10;-1:-1:-1;;;;;8212:340:5;;;;;8529:12;-1:-1:-1;;;;;8212:340:5;;;;;8318:4;8212:340;;;;;8192:7;:17;8200:8;8192:17;;;;;;;;;;;:360;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8192:360:5;;;;;-1:-1:-1;;;;;8192:360:5;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8192:360:5;;;;;-1:-1:-1;;;;;8192:360:5;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;8192:360:5;;;;;-1:-1:-1;;;;;8192:360:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8638:33;8646:12;;8668:1;8638:7;:33::i;:::-;8622:12;8607:64;;;8608:4;8607:64;;;;;;;;;;;;;;;;;;;-1:-1:-1;8705:18:5;;-1:-1:-1;8689:12:5;;:34;;;;;;;;;8681:79;;;;;-1:-1:-1;;;8681:79:5;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8771:73;-1:-1:-1;;;;;8771:37:5;;8809:10;8829:4;8836:7;8771:73;:37;:73;:::i;:::-;8859:89;;;;;;-1:-1:-1;;;;;8859:89:5;;;;;;;;;;;;;;;;;;;;;;;;;8882:10;;8872:8;;8859:89;;;;;;;;;8965:8;6695:2285;-1:-1:-1;;;;;;;6695:2285:5:o;544:331:1:-;600:9;;631:6;627:67;;-1:-1:-1;661:18:1;;-1:-1:-1;661:18:1;653:30;;627:67;713:5;;;717:1;713;:5;:1;733:5;;;;;:10;729:140;;-1:-1:-1;767:26:1;;-1:-1:-1;795:1:1;;-1:-1:-1;759:38:1;;729:140;836:18;;-1:-1:-1;856:1:1;-1:-1:-1;544:331:1;;;;;;:::o;1304:230::-;1360:9;1371:4;1396:1;1391;:6;1387:141;;-1:-1:-1;1421:18:1;;-1:-1:-1;1441:5:1;;;1413:34;;1387:141;-1:-1:-1;1486:27:1;;-1:-1:-1;1515:1:1;1478:39;;643:174:6;751:58;;;-1:-1:-1;;;;;751:58:6;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;751:58:6;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;725:85:6;;744:5;;725:18;:85::i;:::-;643:174;;;:::o;965:209:1:-;1021:9;;1052:6;1048:75;;-1:-1:-1;1082:26:1;;-1:-1:-1;1110:1:1;1074:38;;1048:75;1141:18;1165:1;1161;:5;;;;;;1133:34;;;;965:209;;;;;:::o;1614:250::-;1670:9;;1706:5;;;1726:6;;;1722:136;;1756:18;;-1:-1:-1;1776:1:1;-1:-1:-1;1748:30:1;;1722:136;-1:-1:-1;1817:26:1;;-1:-1:-1;1845:1:1;;-1:-1:-1;1809:38:1;;823:202:6;949:68;;;-1:-1:-1;;;;;949:68:6;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;949:68:6;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;923:95:6;;942:5;;923:18;:95::i;:::-;823:202;;;;:::o;2602:1095::-;3197:27;3205:5;-1:-1:-1;;;;;3197:25:6;;:27::i;:::-;3189:71;;;;;-1:-1:-1;;;3189:71:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;3331:12;3345:23;3380:5;-1:-1:-1;;;;;3372:19:6;3392:4;3372:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;3372:25:6;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;3330:67:6;;;;3415:7;3407:52;;;;;-1:-1:-1;;;3407:52:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;3474:17;;:21;3470:221;;3614:10;3603:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;3603:30:6;3595:85;;;;-1:-1:-1;;;3595:85:6;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;542:413:0;902:20;940:8;;;542:413::o;257:11408:5:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;257:11408:5;;;;;;-1:-1:-1;;;;;257:11408:5;;;;;;-1:-1:-1;;;;;257:11408:5;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;257:11408:5;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;-1:-1:-1;257:11408:5;;;;;;;;;;;;;;:::o

Swarm Source

bzzr://c52021f48f1b12fa61e9d5e41ec9488cb706c744cd676378fd0886e385ce4d8f
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.