ETH Price: $3,649.44 (-7.46%)

Contract

0xf0B2B0A7bcd35cc119E12Cf4F04B2739Ac400bef
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Exit Many114612562020-12-16 1:52:121455 days ago1608083532IN
0xf0B2B0A7...9Ac400bef
0 ETH0.015585750
Exit Many113915362020-12-05 8:22:351465 days ago1607156555IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0007852927
Exit Many113915362020-12-05 8:22:351465 days ago1607156555IN
0xf0B2B0A7...9Ac400bef
0 ETH0.000581720
Exit Many113692892020-12-01 22:08:241469 days ago1606860504IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0049994322.26227097
Exit Many113613922020-11-30 17:05:051470 days ago1606755905IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0154563785.39530685
Exit Many113582302020-11-30 5:39:321470 days ago1606714772IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0219730530
Exit Many113570132020-11-30 1:12:581471 days ago1606698778IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0093580541.67100371
Exit Many113430412020-11-27 21:55:131473 days ago1606514113IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0032583218.002
Exit Many113373372020-11-27 0:35:021474 days ago1606437302IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0030971833
Exit Many113366482020-11-26 22:07:281474 days ago1606428448IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0127170527
Exit Many113350852020-11-26 16:26:271474 days ago1606407987IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0142497878.72893772
Exit Many113342212020-11-26 13:17:521474 days ago1606396672IN
0xf0B2B0A7...9Ac400bef
0 ETH0.019396357
Exit Many113298802020-11-25 21:08:201475 days ago1606338500IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0064445328.69721189
Exit Many113281232020-11-25 14:48:231475 days ago1606315703IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0786709436
Exit Many113227302020-11-24 18:54:171476 days ago1606244057IN
0xf0B2B0A7...9Ac400bef
0 ETH0.013474260
Exit Many113226952020-11-24 18:45:081476 days ago1606243508IN
0xf0B2B0A7...9Ac400bef
0 ETH0.009438960
Exit Many113221012020-11-24 16:28:291476 days ago1606235309IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0135124374.65517241
Exit Many113162902020-11-23 19:13:241477 days ago1606158804IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0050369541.14285714
Exit Many113136612020-11-23 9:27:441477 days ago1606123664IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0068513473
Exit Many113110872020-11-22 23:45:511478 days ago1606088751IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0071862432
Exit Many113031282020-11-21 18:38:111479 days ago1605983891IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0101056545
Exit Many113025402020-11-21 16:28:241479 days ago1605976104IN
0xf0B2B0A7...9Ac400bef
0 ETH0.02762211123
Exit Many112967382020-11-20 19:02:511480 days ago1605898971IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0251797770.87184115
Exit Many112963662020-11-20 17:36:001480 days ago1605893760IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0074108133
Exit Many112868672020-11-19 6:45:511481 days ago1605768351IN
0xf0B2B0A7...9Ac400bef
0 ETH0.0148416723
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Scripts

Compiler Version
v0.5.17+commit.d19bba13

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2020-06-29
*/

// File: ../common.5/openzeppelin/math/Math.sol

pragma solidity ^0.5.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow, so we distribute
        return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
    }
}

// File: ../common.5/openzeppelin/math/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) {
        return sub(a, b, "SafeMath: subtraction overflow");
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     * - Subtraction cannot overflow.
     *
     * _Available since v2.4.0._
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        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) {
        return div(a, b, "SafeMath: division by zero");
    }

    /**
     * @dev Returns the integer division of two unsigned integers. Reverts with custom message 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.
     *
     * _Available since v2.4.0._
     */
    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0, errorMessage);
        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) {
        return mod(a, b, "SafeMath: modulo by zero");
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * Reverts with custom message 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.
     *
     * _Available since v2.4.0._
     */
    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b != 0, errorMessage);
        return a % b;
    }
}

// File: ../common.5/openzeppelin/GSN/Context.sol

pragma solidity ^0.5.0;

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with GSN meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
contract Context {
    // Empty internal constructor, to prevent people from mistakenly deploying
    // an instance of this contract, which should be used via inheritance.
    constructor () internal { }
    // solhint-disable-previous-line no-empty-blocks

    function _msgSender() internal view returns (address payable) {
        return msg.sender;
    }

    function _msgData() internal view returns (bytes memory) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: ../common.5/openzeppelin/token/ERC20/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.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `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: ../common.5/openzeppelin/token/ERC20/ERC20.sol

pragma solidity ^0.5.0;




/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20Mintable}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20 {
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowances;

    uint256 private _totalSupply;

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20};
     *
     * Requirements:
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for `sender`'s tokens of at least
     * `amount`.
     */
    function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }

    /**
     * @dev Moves tokens `amount` from `sender` to `recipient`.
     *
     * This is internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(address sender, address recipient, uint256 amount) internal {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements
     *
     * - `to` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal {
        require(account != address(0), "ERC20: mint to the zero address");

        _totalSupply = _totalSupply.add(amount);
        _balances[account] = _balances[account].add(amount);
        emit Transfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal {
        require(account != address(0), "ERC20: burn from the zero address");

        _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
        _totalSupply = _totalSupply.sub(amount);
        emit Transfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
     *
     * This is internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(address owner, address spender, uint256 amount) internal {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`.`amount` is then deducted
     * from the caller's allowance.
     *
     * See {_burn} and {_approve}.
     */
    function _burnFrom(address account, uint256 amount) internal {
        _burn(account, amount);
        _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance"));
    }
}

// File: ../common.5/openzeppelin/access/Roles.sol

pragma solidity ^0.5.0;

/**
 * @title Roles
 * @dev Library for managing addresses assigned to a Role.
 */
library Roles {
    struct Role {
        mapping (address => bool) bearer;
    }

    /**
     * @dev Give an account access to this role.
     */
    function add(Role storage role, address account) internal {
        require(!has(role, account), "Roles: account already has role");
        role.bearer[account] = true;
    }

    /**
     * @dev Remove an account's access to this role.
     */
    function remove(Role storage role, address account) internal {
        require(has(role, account), "Roles: account does not have role");
        role.bearer[account] = false;
    }

    /**
     * @dev Check if an account has this role.
     * @return bool
     */
    function has(Role storage role, address account) internal view returns (bool) {
        require(account != address(0), "Roles: account is the zero address");
        return role.bearer[account];
    }
}

// File: ../common.5/openzeppelin/access/roles/MinterRole.sol

pragma solidity ^0.5.0;



contract MinterRole is Context {
    using Roles for Roles.Role;

    event MinterAdded(address indexed account);
    event MinterRemoved(address indexed account);

    Roles.Role private _minters;

    constructor () internal {
        _addMinter(_msgSender());
    }

    modifier onlyMinter() {
        require(isMinter(_msgSender()), "MinterRole: caller does not have the Minter role");
        _;
    }

    function isMinter(address account) public view returns (bool) {
        return _minters.has(account);
    }

    function addMinter(address account) public onlyMinter {
        _addMinter(account);
    }

    function renounceMinter() public {
        _removeMinter(_msgSender());
    }

    function _addMinter(address account) internal {
        _minters.add(account);
        emit MinterAdded(account);
    }

    function _removeMinter(address account) internal {
        _minters.remove(account);
        emit MinterRemoved(account);
    }
}

// File: ../common.5/openzeppelin/token/ERC20/ERC20Mintable.sol

pragma solidity ^0.5.0;



/**
 * @dev Extension of {ERC20} that adds a set of accounts with the {MinterRole},
 * which have permission to mint (create) new tokens as they see fit.
 *
 * At construction, the deployer of the contract is the only minter.
 */
contract ERC20Mintable is ERC20, MinterRole {
    /**
     * @dev See {ERC20-_mint}.
     *
     * Requirements:
     *
     * - the caller must have the {MinterRole}.
     */
    function mint(address account, uint256 amount) public onlyMinter returns (bool) {
        _mint(account, amount);
        return true;
    }
}

// File: contracts/BucketSale.sol

pragma solidity ^0.5.17;




contract IDecimals
{
    function decimals()
        public
        view
        returns (uint8);
}

contract BucketSale
{
    using SafeMath for uint256;

    string public termsAndConditions = "By interacting with this contract, I confirm I am not a US citizen. I agree to be bound by the terms found at https://foundrydao.com/sale/terms";

    // When passing around bonuses, we use 3 decimals of precision.
    uint constant HUNDRED_PERC = 100000;
    uint constant MAX_BONUS_PERC = 20000;
    uint constant ONE_PERC = 1000;

    /*
    Every pair of (uint bucketId, address buyer) identifies exactly one 'buy'.
    This buy tracks how much tokenSoldFor the user has entered into the bucket,
    and how much tokenOnSale the user has exited with.
    */

    struct Buy
    {
        uint valueEntered;
        uint buyerTokensExited;
    }

    mapping (uint => mapping (address => Buy)) public buys;

    /*
    Each Bucket tracks how much tokenSoldFor has been entered in total;
    this is used to determine how much tokenOnSale the user can later exit with.
    */

    struct Bucket
    {
        uint totalValueEntered;
    }

    mapping (uint => Bucket) public buckets;

    // For each address, this tallies how much tokenSoldFor the address is responsible for referring.
    mapping (address => uint) public referredTotal;

    address public treasury;
    uint public startOfSale;
    uint public bucketPeriod;
    uint public bucketSupply;
    uint public bucketCount;
    uint public totalExitedTokens;
    ERC20Mintable public tokenOnSale;       // we assume the bucket sale contract has minting rights for this contract
    IERC20 public tokenSoldFor;

    constructor (
            address _treasury,
            uint _startOfSale,
            uint _bucketPeriod,
            uint _bucketSupply,
            uint _bucketCount,
            ERC20Mintable _tokenOnSale,    // FRY in our case
            IERC20 _tokenSoldFor)    // typically DAI
        public
    {
        require(_treasury != address(0), "treasury cannot be 0x0");
        require(_bucketPeriod > 0, "bucket period cannot be 0");
        require(_bucketSupply > 0, "bucket supply cannot be 0");
        require(_bucketCount > 0, "bucket count cannot be 0");
        require(address(_tokenOnSale) != address(0), "token on sale cannot be 0x0");
        require(address(_tokenSoldFor) != address(0), "token sold for cannot be 0x0");

        treasury = _treasury;
        startOfSale = _startOfSale;
        bucketPeriod = _bucketPeriod;
        bucketSupply = _bucketSupply;
        bucketCount = _bucketCount;
        tokenOnSale = _tokenOnSale;
        tokenSoldFor = _tokenSoldFor;
    }

    function currentBucket()
        public
        view
        returns (uint)
    {
        return block.timestamp.sub(startOfSale).div(bucketPeriod);
    }

    event Entered(
        address _sender,
        uint256 _bucketId,
        address indexed _buyer,
        uint _valueEntered,
        uint _buyerReferralReward,
        address indexed _referrer,
        uint _referrerReferralReward);
    function agreeToTermsAndConditionsListedInThisContractAndEnterSale(
            address _buyer,
            uint _bucketId,
            uint _amount,
            address _referrer)
        public
    {
        require(_amount > 0, "no funds provided");

        bool transferSuccess = tokenSoldFor.transferFrom(msg.sender, treasury, _amount);
        require(transferSuccess, "enter transfer failed");

        registerEnter(_bucketId, _buyer, _amount);
        referredTotal[_referrer] = referredTotal[_referrer].add(_amount); // referredTotal[0x0] will track buys with no referral

        if (_referrer != address(0)) // If there is a referrer
        {
            uint buyerReferralReward = _amount.mul(buyerReferralRewardPerc()).div(HUNDRED_PERC);
            uint referrerReferralReward = _amount.mul(referrerReferralRewardPerc(_referrer)).div(HUNDRED_PERC);

            // Both rewards are registered as buys in the next bucket
            registerEnter(_bucketId.add(1), _buyer, buyerReferralReward);
            registerEnter(_bucketId.add(1), _referrer, referrerReferralReward);

            emit Entered(
                msg.sender,
                _bucketId,
                _buyer,
                _amount,
                buyerReferralReward,
                _referrer,
                referrerReferralReward);
        }
        else
        {
            emit Entered(
                msg.sender,
                _bucketId,
                _buyer,
                _amount,
                0,
                address(0),
                0);
        }
    }

    function registerEnter(uint _bucketId, address _buyer, uint _amount)
        internal
    {
        require(_bucketId >= currentBucket(), "cannot enter past buckets");
        require(_bucketId < bucketCount, "invalid bucket id--past end of sale");

        Buy storage buy = buys[_bucketId][_buyer];
        buy.valueEntered = buy.valueEntered.add(_amount);

        Bucket storage bucket = buckets[_bucketId];
        bucket.totalValueEntered = bucket.totalValueEntered.add(_amount);
    }

    event Exited(
        uint256 _bucketId,
        address indexed _buyer,
        uint _tokensExited);
    function exit(uint _bucketId, address _buyer)
        public
    {
        require(
            _bucketId < currentBucket(),
            "can only exit from concluded buckets");

        Buy storage buyToWithdraw = buys[_bucketId][_buyer];
        require(buyToWithdraw.valueEntered > 0, "can't exit if you didn't enter");
        require(buyToWithdraw.buyerTokensExited == 0, "already exited");

        /*
        Note that buyToWithdraw.buyerTokensExited serves a dual purpose:
        First, it is always set to a non-zero value when a buy has been exited from,
        and checked in the line above to guard against repeated exits.
        Second, it's used as simple record-keeping for future analysis;
        hence the use of uint rather than something like bool buyerTokensHaveExited.
        */

        buyToWithdraw.buyerTokensExited = calculateExitableTokens(_bucketId, _buyer);
        totalExitedTokens = totalExitedTokens.add(buyToWithdraw.buyerTokensExited);

        bool mintSuccess = tokenOnSale.mint(_buyer, buyToWithdraw.buyerTokensExited);
        require(mintSuccess, "exit mint/transfer failed");

        emit Exited(
            _bucketId,
            _buyer,
            buyToWithdraw.buyerTokensExited);
    }

    function buyerReferralRewardPerc()
        public
        pure
        returns(uint)
    {
        return ONE_PERC.mul(10);
    }

    function referrerReferralRewardPerc(address _referrerAddress)
        public
        view
        returns(uint)
    {
        if (_referrerAddress == address(0))
        {
            return 0;
        }
        else
        {
            // integer number of dai contributed
            uint daiContributed = referredTotal[_referrerAddress].div(10 ** uint(IDecimals(address(tokenSoldFor)).decimals()));

            /*
            A more explicit way to do the following 'uint multiplier' line would be something like:

            float bonusFromDaiContributed = daiContributed / 100000.0;
            float multiplier = bonusFromDaiContributed + 0.1;

            However, because we are already using 3 digits of precision for bonus values,
            the integer amount of Dai happens to exactly equal the bonusPercent value we want
            (i.e. 10,000 Dai == 10000 == 10*ONE_PERC)

            So below, `multiplier = daiContributed + (10*ONE_PERC)`
            increases the multiplier by 1% for every 1k Dai, which is what we want.
            */
            uint multiplier = daiContributed.add(ONE_PERC.mul(10)); // this guarentees every referrer gets at least 10% of what the buyer is buying

            uint result = Math.min(MAX_BONUS_PERC, multiplier); // Cap it at 20% bonus
            return result;
        }
    }

    function calculateExitableTokens(uint _bucketId, address _buyer)
        public
        view
        returns(uint)
    {
        Bucket storage bucket = buckets[_bucketId];
        Buy storage buyToWithdraw = buys[_bucketId][_buyer];
        return bucketSupply
            .mul(buyToWithdraw.valueEntered)
            .div(bucket.totalValueEntered);
    }
}

// File: contracts/Scripts.sol

//
// Attention Auditor:
// We consider this contract outside of the audit scope, given that it
// interacts with the BucketSale contract as an external user and is
// fundamentally limited in the same ways.
//

pragma solidity ^0.5.17;


contract Scripts {
    using SafeMath for uint;

    function getExitInfo(BucketSale _bucketSale, address _buyer)
        public
        view
        returns (uint[1201] memory)
        // The structure here is that the first element contains the sum of exitable tokens and the rest are the indices of the
        // buckets the buyer can exit from
    {
        // goal:
        // 1. return the total FRY the buyer can extract
        // 2. return the bucketIds of each bucket they can extract from

        // logic:
        // *loop over all concluded buckets
        //   *check the .buys for this _buyer
        //   *if there is a buy
        //      *add buy amount to the first array element
        //      *append the bucketId to the array

        uint[1201] memory results; // some gas to allocate this memory * 1201
        uint pointer = 0;

        // mutlipy the loop gas by at least _bucketSale.currentBucket()
        for (uint bucketId = 0; bucketId < Math.min(_bucketSale.currentBucket(), _bucketSale.bucketCount()); bucketId = bucketId.add(1))
        {
            // mapping lookup cost
            // does this differ for empty and non-empty values?
            (uint valueEntered, uint buyerTokensExited) = _bucketSale.buys(bucketId, _buyer);

            if (valueEntered > 0 && buyerTokensExited == 0) {
                // some basic set of gas, all memory related.
                // is there any sort of optimization which may play a role here?

                // update the running total for this buyer
                // this involves 2 mapping lookups again.
                results[0] = results[0]
                    .add(_bucketSale.calculateExitableTokens(bucketId, _buyer));

                // append the bucketId to the results array
                pointer = pointer.add(1);
                results[pointer] = bucketId;
            }
        }

        return results;
    }

    function getGeneralInfo(BucketSale _bucketSale, address _buyer, uint _bucketId)
        public
        view
        returns (
            uint _totalExitedTokens,
            uint _bucket_totalValueEntered,
            uint _buy_valueEntered,
            uint _buy_buyerTokensExited,
            uint _tokenSoldForAllowance,
            uint _tokenSoldForBalance,
            uint _ethBalance,
            uint _tokenOnSaleBalance,
            uint[1201] memory _exitInfo)
    {
        _totalExitedTokens = _bucketSale.totalExitedTokens();
        _bucket_totalValueEntered = _bucketSale.buckets(_bucketId);
        (_buy_valueEntered, _buy_buyerTokensExited) = _bucketSale.buys(_bucketId, _buyer);
        _tokenSoldForAllowance = _bucketSale.tokenSoldFor().allowance(_buyer, address(_bucketSale));
        _tokenSoldForBalance = _bucketSale.tokenSoldFor().balanceOf(_buyer);
        _ethBalance = _buyer.balance;
        _tokenOnSaleBalance = _bucketSale.tokenOnSale().balanceOf(_buyer);
        _exitInfo = getExitInfo(_bucketSale, _buyer);
    }

    function exitMany(
            BucketSale _bucketSale,
            address _buyer,
            uint[] memory bucketIds)
        public
    {
        for (uint bucketIdIter = 0; bucketIdIter < bucketIds.length; bucketIdIter = bucketIdIter.add(1))
        {
            _bucketSale.exit(bucketIds[bucketIdIter], _buyer);
        }
    }
}

Contract Security Audit

Contract ABI

[{"constant":false,"inputs":[{"internalType":"contract BucketSale","name":"_bucketSale","type":"address"},{"internalType":"address","name":"_buyer","type":"address"},{"internalType":"uint256[]","name":"bucketIds","type":"uint256[]"}],"name":"exitMany","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"contract BucketSale","name":"_bucketSale","type":"address"},{"internalType":"address","name":"_buyer","type":"address"}],"name":"getExitInfo","outputs":[{"internalType":"uint256[1201]","name":"","type":"uint256[1201]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"contract BucketSale","name":"_bucketSale","type":"address"},{"internalType":"address","name":"_buyer","type":"address"},{"internalType":"uint256","name":"_bucketId","type":"uint256"}],"name":"getGeneralInfo","outputs":[{"internalType":"uint256","name":"_totalExitedTokens","type":"uint256"},{"internalType":"uint256","name":"_bucket_totalValueEntered","type":"uint256"},{"internalType":"uint256","name":"_buy_valueEntered","type":"uint256"},{"internalType":"uint256","name":"_buy_buyerTokensExited","type":"uint256"},{"internalType":"uint256","name":"_tokenSoldForAllowance","type":"uint256"},{"internalType":"uint256","name":"_tokenSoldForBalance","type":"uint256"},{"internalType":"uint256","name":"_ethBalance","type":"uint256"},{"internalType":"uint256","name":"_tokenOnSaleBalance","type":"uint256"},{"internalType":"uint256[1201]","name":"_exitInfo","type":"uint256[1201]"}],"payable":false,"stateMutability":"view","type":"function"}]

608060405234801561001057600080fd5b50610a3f806100206000396000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c806306894f8d1461004657806398baa8ca146100ad5780639fe5d76c1461016b575b600080fd5b6100746004803603604081101561005c57600080fd5b506001600160a01b0381358116916020013516610215565b604051808261962080838360005b8381101561009a578181015183820152602001610082565b5050505090500191505060405180910390f35b610169600480360360608110156100c357600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156100f757600080fd5b82018360208201111561010957600080fd5b8035906020019184602083028401116401000000008311171561012b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610473945050505050565b005b6101a16004803603606081101561018157600080fd5b506001600160a01b0381358116916020810135909116906040013561052b565b604051808a8152602001898152602001888152602001878152602001868152602001858152602001848152602001838152602001826104b160200280838360005b838110156101fa5781810151838201526020016101e2565b50505050905001995050505050505050505060405180910390f35b61021d6109ea565b6102256109ea565b6000805b610302866001600160a01b0316634f127aae6040518163ffffffff1660e01b815260040160206040518083038186803b15801561026557600080fd5b505afa158015610279573d6000803e3d6000fd5b505050506040513d602081101561028f57600080fd5b50516040805163617ab39f60e11b815290516001600160a01b038a169163c2f5673e916004808301926020929190829003018186803b1580156102d157600080fd5b505afa1580156102e5573d6000803e3d6000fd5b505050506040513d60208110156102fb57600080fd5b5051610978565b811015610469576040805163f838b82560e01b8152600481018390526001600160a01b03878116602483015282516000938493928b169263f838b8259260448083019392829003018186803b15801561035a57600080fd5b505afa15801561036e573d6000803e3d6000fd5b505050506040513d604081101561038457600080fd5b5080516020909101519092509050811580159061039f575080155b1561044e57604080516310bcadbb60e21b8152600481018590526001600160a01b038981166024830152915161042b928b16916342f2b6ec916044808301926020929190829003018186803b1580156103f757600080fd5b505afa15801561040b573d6000803e3d6000fd5b505050506040513d602081101561042157600080fd5b5051865190610990565b8552610438846001610990565b93508285856104b1811061044857fe5b60200201525b50610462905081600163ffffffff61099016565b9050610229565b5090949350505050565b60005b815181101561052557836001600160a01b031663cff4075983838151811061049a57fe5b6020026020010151856040518363ffffffff1660e01b815260040180838152602001826001600160a01b03166001600160a01b0316815260200192505050600060405180830381600087803b1580156104f257600080fd5b505af1158015610506573d6000803e3d6000fd5b5050505061051e60018261099090919063ffffffff16565b9050610476565b50505050565b60008060008060008060008061053f6109ea565b8b6001600160a01b0316634b42442e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561057857600080fd5b505afa15801561058c573d6000803e3d6000fd5b505050506040513d60208110156105a257600080fd5b505160408051639b51fb0d60e01b8152600481018d90529051919a506001600160a01b038e1691639b51fb0d91602480820192602092909190829003018186803b1580156105ef57600080fd5b505afa158015610603573d6000803e3d6000fd5b505050506040513d602081101561061957600080fd5b50516040805163f838b82560e01b8152600481018d90526001600160a01b038e811660248301528251939b508f169263f838b82592604480840193919291829003018186803b15801561066b57600080fd5b505afa15801561067f573d6000803e3d6000fd5b505050506040513d604081101561069557600080fd5b508051602091820151604080516323f1dd5560e11b81529051929a509098506001600160a01b038f16926347e3baaa92600480840193829003018186803b1580156106df57600080fd5b505afa1580156106f3573d6000803e3d6000fd5b505050506040513d602081101561070957600080fd5b505160408051636eb1769f60e11b81526001600160a01b038e811660048301528f811660248301529151919092169163dd62ed3e916044808301926020929190829003018186803b15801561075d57600080fd5b505afa158015610771573d6000803e3d6000fd5b505050506040513d602081101561078757600080fd5b5051604080516323f1dd5560e11b815290519196506001600160a01b038e16916347e3baaa91600480820192602092909190829003018186803b1580156107cd57600080fd5b505afa1580156107e1573d6000803e3d6000fd5b505050506040513d60208110156107f757600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b15801561084357600080fd5b505afa158015610857573d6000803e3d6000fd5b505050506040513d602081101561086d57600080fd5b5051604080516301839a9160e61b815290519195506001600160a01b03808e163195508e16916360e6a44091600480820192602092909190829003018186803b1580156108b957600080fd5b505afa1580156108cd573d6000803e3d6000fd5b505050506040513d60208110156108e357600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b15801561092f57600080fd5b505afa158015610943573d6000803e3d6000fd5b505050506040513d602081101561095957600080fd5b505191506109678c8c610215565b905093979b92969a50939750939750565b60008183106109875781610989565b825b9392505050565b600082820183811015610989576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6040518061962001604052806104b190602082028038833950919291505056fea265627a7a723158204ad06ffacb623079c23ffbd0c25c7f128bbd3da000d6839617e457ab1604ed8364736f6c63430005110032

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100415760003560e01c806306894f8d1461004657806398baa8ca146100ad5780639fe5d76c1461016b575b600080fd5b6100746004803603604081101561005c57600080fd5b506001600160a01b0381358116916020013516610215565b604051808261962080838360005b8381101561009a578181015183820152602001610082565b5050505090500191505060405180910390f35b610169600480360360608110156100c357600080fd5b6001600160a01b0382358116926020810135909116918101906060810160408201356401000000008111156100f757600080fd5b82018360208201111561010957600080fd5b8035906020019184602083028401116401000000008311171561012b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610473945050505050565b005b6101a16004803603606081101561018157600080fd5b506001600160a01b0381358116916020810135909116906040013561052b565b604051808a8152602001898152602001888152602001878152602001868152602001858152602001848152602001838152602001826104b160200280838360005b838110156101fa5781810151838201526020016101e2565b50505050905001995050505050505050505060405180910390f35b61021d6109ea565b6102256109ea565b6000805b610302866001600160a01b0316634f127aae6040518163ffffffff1660e01b815260040160206040518083038186803b15801561026557600080fd5b505afa158015610279573d6000803e3d6000fd5b505050506040513d602081101561028f57600080fd5b50516040805163617ab39f60e11b815290516001600160a01b038a169163c2f5673e916004808301926020929190829003018186803b1580156102d157600080fd5b505afa1580156102e5573d6000803e3d6000fd5b505050506040513d60208110156102fb57600080fd5b5051610978565b811015610469576040805163f838b82560e01b8152600481018390526001600160a01b03878116602483015282516000938493928b169263f838b8259260448083019392829003018186803b15801561035a57600080fd5b505afa15801561036e573d6000803e3d6000fd5b505050506040513d604081101561038457600080fd5b5080516020909101519092509050811580159061039f575080155b1561044e57604080516310bcadbb60e21b8152600481018590526001600160a01b038981166024830152915161042b928b16916342f2b6ec916044808301926020929190829003018186803b1580156103f757600080fd5b505afa15801561040b573d6000803e3d6000fd5b505050506040513d602081101561042157600080fd5b5051865190610990565b8552610438846001610990565b93508285856104b1811061044857fe5b60200201525b50610462905081600163ffffffff61099016565b9050610229565b5090949350505050565b60005b815181101561052557836001600160a01b031663cff4075983838151811061049a57fe5b6020026020010151856040518363ffffffff1660e01b815260040180838152602001826001600160a01b03166001600160a01b0316815260200192505050600060405180830381600087803b1580156104f257600080fd5b505af1158015610506573d6000803e3d6000fd5b5050505061051e60018261099090919063ffffffff16565b9050610476565b50505050565b60008060008060008060008061053f6109ea565b8b6001600160a01b0316634b42442e6040518163ffffffff1660e01b815260040160206040518083038186803b15801561057857600080fd5b505afa15801561058c573d6000803e3d6000fd5b505050506040513d60208110156105a257600080fd5b505160408051639b51fb0d60e01b8152600481018d90529051919a506001600160a01b038e1691639b51fb0d91602480820192602092909190829003018186803b1580156105ef57600080fd5b505afa158015610603573d6000803e3d6000fd5b505050506040513d602081101561061957600080fd5b50516040805163f838b82560e01b8152600481018d90526001600160a01b038e811660248301528251939b508f169263f838b82592604480840193919291829003018186803b15801561066b57600080fd5b505afa15801561067f573d6000803e3d6000fd5b505050506040513d604081101561069557600080fd5b508051602091820151604080516323f1dd5560e11b81529051929a509098506001600160a01b038f16926347e3baaa92600480840193829003018186803b1580156106df57600080fd5b505afa1580156106f3573d6000803e3d6000fd5b505050506040513d602081101561070957600080fd5b505160408051636eb1769f60e11b81526001600160a01b038e811660048301528f811660248301529151919092169163dd62ed3e916044808301926020929190829003018186803b15801561075d57600080fd5b505afa158015610771573d6000803e3d6000fd5b505050506040513d602081101561078757600080fd5b5051604080516323f1dd5560e11b815290519196506001600160a01b038e16916347e3baaa91600480820192602092909190829003018186803b1580156107cd57600080fd5b505afa1580156107e1573d6000803e3d6000fd5b505050506040513d60208110156107f757600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b15801561084357600080fd5b505afa158015610857573d6000803e3d6000fd5b505050506040513d602081101561086d57600080fd5b5051604080516301839a9160e61b815290519195506001600160a01b03808e163195508e16916360e6a44091600480820192602092909190829003018186803b1580156108b957600080fd5b505afa1580156108cd573d6000803e3d6000fd5b505050506040513d60208110156108e357600080fd5b5051604080516370a0823160e01b81526001600160a01b038e81166004830152915191909216916370a08231916024808301926020929190829003018186803b15801561092f57600080fd5b505afa158015610943573d6000803e3d6000fd5b505050506040513d602081101561095957600080fd5b505191506109678c8c610215565b905093979b92969a50939750939750565b60008183106109875781610989565b825b9392505050565b600082820183811015610989576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6040518061962001604052806104b190602082028038833950919291505056fea265627a7a723158204ad06ffacb623079c23ffbd0c25c7f128bbd3da000d6839617e457ab1604ed8364736f6c63430005110032

Deployed Bytecode Sourcemap

30526:3398:0:-;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;30526:3398:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30582:1907;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;30582:1907:0;;;;;;;;;;:::i;:::-;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;30582:1907:0;;;;;;;;;;;;;;;;33577:344;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;33577:344:0;;;;;;;;;;;;;;;;;;;;;;;21:11:-1;5:28;;2:2;;;46:1;43;36:12;2:2;33577:344:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;33577:344:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;39:11;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;33577:344:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;33577:344:0;;-1:-1:-1;33577:344:0;;-1:-1:-1;;;;;33577:344:0:i;:::-;;32497:1072;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;32497:1072:0;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;32497:1072:0;;;;;;;;;;;;;;;;;;;;;;;;30582:1907;30691:17;;:::i;:::-;31307:25;;:::i;:::-;31386:12;;31488:967;31523:64;31532:11;-1:-1:-1;;;;;31532:25:0;;:27;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;31532:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31532:27:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31532:27:0;31561:25;;;-1:-1:-1;;;31561:25:0;;;;-1:-1:-1;;;;;31561:23:0;;;;;:25;;;;;31532:27;;31561:25;;;;;;;:23;:25;;;5:2:-1;;;;30:1;27;20:12;5:2;31561:25:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31561:25:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31561:25:0;31523:8;:64::i;:::-;31512:8;:75;31488:967;;;31788:34;;;-1:-1:-1;;;31788:34:0;;;;;;;;-1:-1:-1;;;;;31788:34:0;;;;;;;;;31743:17;;;;31788:16;;;;;;:34;;;;;;;;;;;:16;:34;;;5:2:-1;;;;30:1;27;20:12;5:2;31788:34:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;31788:34:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;31788:34:0;;;;;;;;;-1:-1:-1;31788:34:0;-1:-1:-1;31843:16:0;;;;;:42;;-1:-1:-1;31863:22:0;;31843:42;31839:605;;;32222:53;;;-1:-1:-1;;;32222:53:0;;;;;;;;-1:-1:-1;;;;;32222:53:0;;;;;;;;;32185:91;;32222:35;;;;;:53;;;;;;;;;;;;;;:35;:53;;;5:2:-1;;;;30:1;27;20:12;5:2;32222:53:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;32222:53:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;32222:53:0;32185:10;;;:36;:91::i;:::-;32172:104;;32368:14;:7;32380:1;32368:11;:14::i;:::-;32358:24;;32420:8;32401:7;32409;32401:16;;;;;;;;;;:27;31839:605;-1:-1:-1;31600:15:0;;-1:-1:-1;31600:8:0;31613:1;31600:15;:12;:15;:::i;:::-;31589:26;;31488:967;;;-1:-1:-1;32474:7:0;;30582:1907;-1:-1:-1;;;;30582:1907:0:o;33577:344::-;33737:17;33732:182;33775:9;:16;33760:12;:31;33732:182;;;33853:11;-1:-1:-1;;;;;33853:16:0;;33870:9;33880:12;33870:23;;;;;;;;;;;;;;33895:6;33853:49;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;33853:49:0;-1:-1:-1;;;;;33853:49:0;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;33853:49:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33853:49:0;;;;33808:19;33825:1;33808:12;:16;;:19;;;;:::i;:::-;33793:34;;33732:182;;;;33577:344;;;:::o;32497:1072::-;32639:23;32677:30;32722:22;32759:27;32801;32843:25;32883:16;32914:24;32953:27;;:::i;:::-;33019:11;-1:-1:-1;;;;;33019:29:0;;:31;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;33019:31:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33019:31:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33019:31:0;33089:30;;;-1:-1:-1;;;33089:30:0;;;;;;;;;;33019:31;;-1:-1:-1;;;;;;33089:19:0;;;;;:30;;;;;33019:31;;33089:30;;;;;;;;:19;:30;;;5:2:-1;;;;30:1;27;20:12;5:2;33089:30:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33089:30:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33089:30:0;33176:35;;;-1:-1:-1;;;33176:35:0;;;;;;;;-1:-1:-1;;;;;33176:35:0;;;;;;;;;33089:30;;-1:-1:-1;33176:16:0;;;;;:35;;;;;;;;;;;;;:16;:35;;;5:2:-1;;;;30:1;27;20:12;5:2;33176:35:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33176:35:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33176:35:0;;;;;;;;33247:26;;-1:-1:-1;;;33247:26:0;;;;33176:35;;-1:-1:-1;33176:35:0;;-1:-1:-1;;;;;;33247:24:0;;;;;:26;;;;;;;;;;:24;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;33247:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33247:26:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33247:26:0;:66;;;-1:-1:-1;;;33247:66:0;;-1:-1:-1;;;;;33247:66:0;;;;;;;;;;;;;;;;:36;;;;;;;:66;;;;;:26;;:66;;;;;;;:36;:66;;;5:2:-1;;;;30:1;27;20:12;5:2;33247:66:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33247:66:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33247:66:0;33347:26;;;-1:-1:-1;;;33347:26:0;;;;33247:66;;-1:-1:-1;;;;;;33347:24:0;;;;;:26;;;;;33247:66;;33347:26;;;;;;;;:24;:26;;;5:2:-1;;;;30:1;27;20:12;5:2;33347:26:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33347:26:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33347:26:0;:44;;;-1:-1:-1;;;33347:44:0;;-1:-1:-1;;;;;33347:44:0;;;;;;;;;:36;;;;;;;:44;;;;;:26;;:44;;;;;;;:36;:44;;;5:2:-1;;;;30:1;27;20:12;5:2;33347:44:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33347:44:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33347:44:0;33463:25;;;-1:-1:-1;;;33463:25:0;;;;33347:44;;-1:-1:-1;;;;;;33416:14:0;;;;;-1:-1:-1;33463:23:0;;;;;:25;;;;;33347:44;;33463:25;;;;;;;;:23;:25;;;5:2:-1;;;;30:1;27;20:12;5:2;33463:25:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33463:25:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33463:25:0;:43;;;-1:-1:-1;;;33463:43:0;;-1:-1:-1;;;;;33463:43:0;;;;;;;;;:35;;;;;;;:43;;;;;:25;;:43;;;;;;;:35;:43;;;5:2:-1;;;;30:1;27;20:12;5:2;33463:43:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;33463:43:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;33463:43:0;;-1:-1:-1;33529:32:0;33541:11;33554:6;33529:11;:32::i;:::-;33517:44;;32497:1072;;;;;;;;;;;;;:::o;425:106::-;483:7;514:1;510;:5;:13;;522:1;510:13;;;518:1;510:13;503:20;425:106;-1:-1:-1;;;425:106:0:o;1764:181::-;1822:7;1854:5;;;1878:6;;;;1870:46;;;;;-1:-1:-1;;;1870:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;30526:3398;;;;;;;;;;;29:2:-1;21:6;17:15;117:4;105:10;97:6;88:34;-1:-1;30526:3398:0;;;-1:-1:-1;;30526:3398:0:o

Swarm Source

bzzr://4ad06ffacb623079c23ffbd0c25c7f128bbd3da000d6839617e457ab1604ed83

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.