GLMR Price: $0.17569 (-4.74%)
Gas: 125 GWei

Contract

0x21d3d7f03b5406d0bFA5cc1A9958Ae21B8DFBC22

Overview

GLMR Balance

Moonbeam Chain LogoMoonbeam Chain LogoMoonbeam Chain Logo0 GLMR

GLMR Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Downvote Item36708282023-05-30 4:59:18606 days ago1685422758IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00985873141.60579953
Downvote Item36708262023-05-30 4:58:53606 days ago1685422733IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00985131141.49913275
Downvote Item36678252023-05-29 18:44:36606 days ago1685385876IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00936108134.45783962
Upvote Item36638392023-05-29 5:10:48607 days ago1685337048IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.01050011151.08079434
Upvote Item36566242023-05-28 4:31:47608 days ago1685248307IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.01209879141.59245554
Upvote Item36566202023-05-28 4:31:00608 days ago1685248260IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.01211296141.75835055
Upvote Item36566202023-05-28 4:31:00608 days ago1685248260IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.01211296141.75835055
Upvote Item36566202023-05-28 4:31:00608 days ago1685248260IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.01211296141.75835055
Upvote Item36566162023-05-28 4:30:12608 days ago1685248212IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.01212346141.88125378
Upvote Item36566162023-05-28 4:30:12608 days ago1685248212IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.01212346141.88125378
Upvote Item36566152023-05-28 4:30:00608 days ago1685248200IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.01213425142.00752258
Upvote Item36566132023-05-28 4:29:36608 days ago1685248176IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.01213895142.06246177
Upvote Item36566122023-05-28 4:29:24608 days ago1685248164IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.01211816141.81922128
Upvote Item36542892023-05-27 20:37:18608 days ago1685219838IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00983335141.48715997
Upvote Item36542892023-05-27 20:37:18608 days ago1685219838IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00983335141.48715997
Upvote Item36542882023-05-27 20:37:06608 days ago1685219826IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.0097727140.61451379
Upvote Item36542822023-05-27 20:35:54608 days ago1685219754IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00980419141.06749483
Upvote Item36542812023-05-27 20:35:42608 days ago1685219742IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00981018141.15375399
Upvote Item36542802023-05-27 20:35:30608 days ago1685219730IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00981957141.28877821
Upvote Item36416322023-05-26 1:22:54610 days ago1685064174IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00880796128.89199431
Upvote Item36416292023-05-26 1:22:18610 days ago1685064138IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00895974128.93941249
Upvote Item36416212023-05-26 1:20:42610 days ago1685064042IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00896276128.98291814
Upvote Item36416142023-05-26 1:19:18610 days ago1685063958IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00901945129.77635974
Upvote Item36416062023-05-26 1:17:36610 days ago1685063856IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.00905939130.35103787
Upvote Item36416032023-05-26 1:17:00610 days ago1685063820IN
0x21d3d7f0...1B8DFBC22
0 GLMR0.0090848130.71657443
View all transactions

View more zero value Internal Transactions in Advanced View mode

Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Voting

Compiler Version
v0.6.2+commit.bacdbe57

Optimization Enabled:
Yes with 1 runs

Other Settings:
default evmVersion, MIT license

Contract Source Code (Solidity)

/**
 *Submitted for verification at moonbeam.moonscan.io on 2022-10-27
*/

// File: @openzeppelin/contracts/math/SafeMath.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        uint256 c = a + b;
        if (c < a) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b > a) return (false, 0);
        return (true, a - b);
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0);
        uint256 c = a * b;
        if (c / a != b) return (false, 0);
        return (true, c);
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a / b);
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        if (b == 0) return (false, 0);
        return (true, a % b);
    }

    /**
     * @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");
        return a - b;
    }

    /**
     * @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) {
        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, reverting 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) {
        require(b > 0, "SafeMath: division by zero");
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting 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;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
        require(b <= a, errorMessage);
        return a - b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryDiv}.
     *
     * 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, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * 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, string memory errorMessage) internal pure returns (uint256) {
        require(b > 0, errorMessage);
        return a % b;
    }
}

// File: @openzeppelin/contracts/utils/Context.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address payable) {
        return msg.sender;
    }

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

// File: @openzeppelin/contracts/token/ERC20/IERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
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: @openzeppelin/contracts/token/ERC20/ERC20.sol

// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.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 {ERC20PresetMinterPauser}.
 *
 * 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;

    string private _name;
    string private _symbol;
    uint8 private _decimals;

    /**
     * @dev Sets the values for {name} and {symbol}, initializes {decimals} with
     * a default value of 18.
     *
     * To select a different value for {decimals}, use {_setupDecimals}.
     *
     * All three of these values are immutable: they can only be set once during
     * construction.
     */
    constructor (string memory name_, string memory symbol_) public {
        _name = name_;
        _symbol = symbol_;
        _decimals = 18;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
     * called.
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual returns (uint8) {
        return _decimals;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override 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 virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

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

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override 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 virtual override 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 virtual 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 virtual 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 virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        _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 virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _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 virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        _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 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 virtual {
        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 Sets {decimals} to a value other than the default one of 18.
     *
     * WARNING: This function should only be called from the constructor. Most
     * applications that interact with token contracts will not expect
     * {decimals} to ever change, and may work incorrectly if it does.
     */
    function _setupDecimals(uint8 decimals_) internal virtual {
        _decimals = decimals_;
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be to transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}

// File: contracts/Voting.sol

pragma solidity ^0.6.0;
pragma experimental ABIEncoderV2;


// openzeppelin imports




/// @title Upvoting / Downvoting Contract
contract Voting {
  using SafeMath for uint256;

  event ItemVotesUpdated(
    uint256 indexed itemId,
    uint256 upvotes,
    uint256 downvotes,
    uint256 timestamp
  );

  event ItemVoteAction(
    address indexed user,
    VoteAction indexed action,
    uint256 indexed itemId,
    uint256 timestamp
  );

  enum VoteAction {
    upvote,
    removeUpvote,
    downvote,
    removeDownvote
  }

  struct ItemVotes {
    mapping(address => bool) usersUpvoted;
    mapping(address => bool) usersDownvoted;
    uint256 upvotes;
    uint256 downvotes;
  }

  mapping(uint256 => ItemVotes) items;

  IERC20 public token;
  uint256 public requiredBalance; // required balance for voting

  // ------ Modifiers ------

  modifier mustHoldRequiredBalance() {
    require(token.balanceOf(msg.sender) >= requiredBalance, "msg.sender must hold minimum erc20 balance");
    _;
  }

  // ------ Modifiers End ------

  /// @dev protocol is immutable and has no ownership
  constructor(
    IERC20 _token,
    uint256 _requiredBalance
  ) public {
    token = _token;
    requiredBalance = _requiredBalance;
  }

  /// @dev allows user to upvote an item
  function upvoteItem(uint256 itemId) mustHoldRequiredBalance external {
    voteItem(itemId, VoteAction.upvote);
  }

  /// @dev allows user to downvote an item
  function downvoteItem(uint256 itemId) mustHoldRequiredBalance external {
    voteItem(itemId, VoteAction.downvote);
  }

  /// @dev logic of upvoting/downvoting an item
  function voteItem(uint256 itemId, VoteAction action) private {
    require(action == VoteAction.upvote || action == VoteAction.downvote, "Function parameter has to be upvoted or downvoted");

    ItemVotes storage item = items[itemId];

    mapping(address => bool) storage listToAddVote = action == VoteAction.upvote ? item.usersUpvoted : item.usersDownvoted;
    mapping(address => bool) storage listToRemoveVote = action == VoteAction.upvote ? item.usersDownvoted : item.usersUpvoted;

    // check if user has not already voted on the selected direction
    bool hasUserVotedSelectedDirection = listToAddVote[msg.sender];

    require(hasUserVotedSelectedDirection == false, "User has already a vote on this item");

    // check if user has already downvoted
    bool hasUserVotedOtherDirection = listToRemoveVote[msg.sender];

    // remove from total downvoted if needed
    if (hasUserVotedOtherDirection) {
      action == VoteAction.upvote ? item.downvotes = item.downvotes.sub(1) : item.upvotes = item.upvotes.sub(1);
    }

    // add the vote
    action == VoteAction.upvote ? item.upvotes = item.upvotes.add(1) : item.downvotes = item.downvotes.add(1);
    listToAddVote[msg.sender] = true;
    listToRemoveVote[msg.sender] = false;

    // emit events
    emit ItemVoteAction(msg.sender, action, itemId, now);

    emit ItemVotesUpdated(itemId, item.upvotes, item.downvotes, now);

  }

  /// @dev allows user to remove an upvote from an item
  function removeUpvoteItem(uint256 itemId) mustHoldRequiredBalance external {
    removeVoteItem(itemId, VoteAction.removeUpvote);
  }

  /// @dev allows user to remove a downvote from an item
  function removeDownvoteItem(uint256 itemId) mustHoldRequiredBalance external {
    removeVoteItem(itemId, VoteAction.removeDownvote);
  }

  /// @dev logic of removing an upvote/downvote from an item
  function removeVoteItem(uint256 itemId, VoteAction action) private {
    require(action == VoteAction.removeUpvote || action == VoteAction.removeDownvote, "Function parameter has to be removeUpvoted or removeDownvoted");

    // get item votes
    ItemVotes storage item = items[itemId];

    mapping(address => bool) storage listToRemoveVote = action == VoteAction.removeUpvote ? item.usersUpvoted : item.usersDownvoted;

    // check if user has voted item
    bool hasUserVoted = listToRemoveVote[msg.sender];

    require(hasUserVoted == true, "User doesn't have a vote on this item");

    // remove the vote
    action == VoteAction.removeUpvote ? item.upvotes = item.upvotes.sub(1) : item.downvotes = item.downvotes.sub(1);
    listToRemoveVote[msg.sender] = false;

    // emit events
    emit ItemVoteAction(msg.sender, action, itemId, now);

    emit ItemVotesUpdated(itemId, item.upvotes, item.downvotes, now);
  }

  /// @dev Returns the number of upvotes/downvotes of an item
  function getItemVotes(uint256 itemId) external view returns (uint256, uint256) {
    ItemVotes storage item = items[itemId];

    return (item.upvotes, item.downvotes);
  }

  /// @dev Returns info if the user has a upvote or a downvote in an item
  function hasUserVotedItem(address user, uint256 itemId) external view returns (bool, bool) {
    ItemVotes storage item = items[itemId];

    return (item.usersUpvoted[user], item.usersDownvoted[user]);
  }

}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IERC20","name":"_token","type":"address"},{"internalType":"uint256","name":"_requiredBalance","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"enum Voting.VoteAction","name":"action","type":"uint8"},{"indexed":true,"internalType":"uint256","name":"itemId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ItemVoteAction","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"itemId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"upvotes","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"downvotes","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"ItemVotesUpdated","type":"event"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"downvoteItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"getItemVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"hasUserVotedItem","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"removeDownvoteItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"removeUpvoteItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requiredBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"itemId","type":"uint256"}],"name":"upvoteItem","outputs":[],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50604051610c24380380610c2483398101604081905261002f91610058565b600180546001600160a01b0319166001600160a01b039390931692909217909155600255610090565b6000806040838503121561006a578182fd5b82516001600160a01b0381168114610080578283fd5b6020939093015192949293505050565b610b858061009f6000396000f3fe608060405234801561001057600080fd5b50600436106100785760003560e01c806308560ace1461007d578063229a4d381461009b5780635c674b33146100b057806361641b9c146100c35780638ff84d18146100d6578063a1d78c02146100f7578063dd4e39671461010a578063fc0c546a1461012b575b600080fd5b610085610140565b6040516100929190610ae2565b60405180910390f35b6100ae6100a936600461089f565b610146565b005b6100ae6100be36600461089f565b6101fe565b6100ae6100d136600461089f565b6102aa565b6100e96100e4366004610869565b610356565b6040516100929291906108e3565b6100ae61010536600461089f565b610390565b61011d61011836600461089f565b61043c565b604051610092929190610aeb565b610133610459565b60405161009291906108cf565b60025481565b6002546001546040516370a0823160e01b81526001600160a01b03909116906370a08231906101799033906004016108cf565b60206040518083038186803b15801561019157600080fd5b505afa1580156101a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506101c991908101906108b7565b10156101f05760405162461bcd60e51b81526004016101e790610961565b60405180910390fd5b6101fb816000610468565b50565b6002546001546040516370a0823160e01b81526001600160a01b03909116906370a08231906102319033906004016108cf565b60206040518083038186803b15801561024957600080fd5b505afa15801561025d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061028191908101906108b7565b101561029f5760405162461bcd60e51b81526004016101e790610961565b6101fb81600361068f565b6002546001546040516370a0823160e01b81526001600160a01b03909116906370a08231906102dd9033906004016108cf565b60206040518083038186803b1580156102f557600080fd5b505afa158015610309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061032d91908101906108b7565b101561034b5760405162461bcd60e51b81526004016101e790610961565b6101fb816002610468565b6000908152602081815260408083206001600160a01b0394909416835283825280832054600190940190915290205460ff91821692911690565b6002546001546040516370a0823160e01b81526001600160a01b03909116906370a08231906103c39033906004016108cf565b60206040518083038186803b1580156103db57600080fd5b505afa1580156103ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061041391908101906108b7565b10156104315760405162461bcd60e51b81526004016101e790610961565b6101fb81600161068f565b600090815260208190526040902060028101546003909101549091565b6001546001600160a01b031681565b600081600381111561047657fe5b148061048d5750600281600381111561048b57fe5b145b6104a95760405162461bcd60e51b81526004016101e7906109ab565b600082815260208190526040812090808360038111156104c557fe5b146104d357816001016104d5565b815b90506000808460038111156104e657fe5b146104f157826104f6565b826001015b3360009081526020849052604090205490915060ff16801561052a5760405162461bcd60e51b81526004016101e7906109fc565b3360009081526020839052604090205460ff16801561059857600086600381111561055157fe5b1461057857600285015461056c90600163ffffffff61081516565b85600201819055610596565b600385015461058e90600163ffffffff61081516565b856003018190555b505b60008660038111156105a657fe5b146105cd5760038501546105c190600163ffffffff61083d16565b856003018190556105eb565b60028501546105e390600163ffffffff61083d16565b856002018190555b5033600090815260208581526040808320805460ff1990811660011790915591869052909120805490911690558686600381111561062557fe5b336001600160a01b0316600080516020610b108339815191524260405161064c9190610ae2565b60405180910390a486600080516020610b30833981519152866002015487600301544260405161067e93929190610af9565b60405180910390a250505050505050565b600181600381111561069d57fe5b14806106b4575060038160038111156106b257fe5b145b6106d05760405162461bcd60e51b81526004016101e790610a40565b60008281526020819052604081209060018360038111156106ed57fe5b146106fb57816001016106fd565b815b3360009081526020829052604090205490915060ff168015156001146107355760405162461bcd60e51b81526004016101e790610a9d565b600184600381111561074357fe5b1461076a57600383015461075e90600163ffffffff61081516565b83600301819055610788565b600283015461078090600163ffffffff61081516565b836002018190555b50336000908152602083905260409020805460ff19169055848460038111156107ad57fe5b336001600160a01b0316600080516020610b10833981519152426040516107d49190610ae2565b60405180910390a484600080516020610b30833981519152846002015485600301544260405161080693929190610af9565b60405180910390a25050505050565b6000828211156108375760405162461bcd60e51b81526004016101e79061092a565b50900390565b6000828201838110156108625760405162461bcd60e51b81526004016101e7906108f5565b9392505050565b6000806040838503121561087b578182fd5b82356001600160a01b0381168114610891578283fd5b946020939093013593505050565b6000602082840312156108b0578081fd5b5035919050565b6000602082840312156108c8578081fd5b5051919050565b6001600160a01b0391909116815260200190565b91151582521515602082015260400190565b6020808252601b908201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252602a908201527f6d73672e73656e646572206d75737420686f6c64206d696e696d756d2065726360408201526932302062616c616e636560b01b606082015260800190565b60208082526031908201527f46756e6374696f6e20706172616d657465722068617320746f206265207570766040820152701bdd1959081bdc88191bdddb9d9bdd1959607a1b606082015260800190565b60208082526024908201527f557365722068617320616c7265616479206120766f7465206f6e2074686973206040820152636974656d60e01b606082015260800190565b6020808252603d908201527f46756e6374696f6e20706172616d657465722068617320746f2062652072656d60408201527f6f76655570766f746564206f722072656d6f7665446f776e766f746564000000606082015260800190565b60208082526025908201527f5573657220646f65736e27742068617665206120766f7465206f6e2074686973604082015264206974656d60d81b606082015260800190565b90815260200190565b918252602082015260400190565b928352602083019190915260408201526060019056fea2729191d3d43dadea9138477a0b8a336c96a26108361f706a00de867034c1dbfeac3f5efe9271717007c9fe19e216ac66326c20488b228dba241f9c8f84f060a2646970667358221220c722d09a6c95fb8cd922a5b23a51bd9f3e473adb1896aea3fba571b2c13ea7de64736f6c634300060200330000000000000000000000008b29344f368b5fa35595325903fe0eaab70c8e1f0000000000000000000000000000000000000000000000000de0b6b3a7640000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100785760003560e01c806308560ace1461007d578063229a4d381461009b5780635c674b33146100b057806361641b9c146100c35780638ff84d18146100d6578063a1d78c02146100f7578063dd4e39671461010a578063fc0c546a1461012b575b600080fd5b610085610140565b6040516100929190610ae2565b60405180910390f35b6100ae6100a936600461089f565b610146565b005b6100ae6100be36600461089f565b6101fe565b6100ae6100d136600461089f565b6102aa565b6100e96100e4366004610869565b610356565b6040516100929291906108e3565b6100ae61010536600461089f565b610390565b61011d61011836600461089f565b61043c565b604051610092929190610aeb565b610133610459565b60405161009291906108cf565b60025481565b6002546001546040516370a0823160e01b81526001600160a01b03909116906370a08231906101799033906004016108cf565b60206040518083038186803b15801561019157600080fd5b505afa1580156101a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506101c991908101906108b7565b10156101f05760405162461bcd60e51b81526004016101e790610961565b60405180910390fd5b6101fb816000610468565b50565b6002546001546040516370a0823160e01b81526001600160a01b03909116906370a08231906102319033906004016108cf565b60206040518083038186803b15801561024957600080fd5b505afa15801561025d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061028191908101906108b7565b101561029f5760405162461bcd60e51b81526004016101e790610961565b6101fb81600361068f565b6002546001546040516370a0823160e01b81526001600160a01b03909116906370a08231906102dd9033906004016108cf565b60206040518083038186803b1580156102f557600080fd5b505afa158015610309573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061032d91908101906108b7565b101561034b5760405162461bcd60e51b81526004016101e790610961565b6101fb816002610468565b6000908152602081815260408083206001600160a01b0394909416835283825280832054600190940190915290205460ff91821692911690565b6002546001546040516370a0823160e01b81526001600160a01b03909116906370a08231906103c39033906004016108cf565b60206040518083038186803b1580156103db57600080fd5b505afa1580156103ef573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061041391908101906108b7565b10156104315760405162461bcd60e51b81526004016101e790610961565b6101fb81600161068f565b600090815260208190526040902060028101546003909101549091565b6001546001600160a01b031681565b600081600381111561047657fe5b148061048d5750600281600381111561048b57fe5b145b6104a95760405162461bcd60e51b81526004016101e7906109ab565b600082815260208190526040812090808360038111156104c557fe5b146104d357816001016104d5565b815b90506000808460038111156104e657fe5b146104f157826104f6565b826001015b3360009081526020849052604090205490915060ff16801561052a5760405162461bcd60e51b81526004016101e7906109fc565b3360009081526020839052604090205460ff16801561059857600086600381111561055157fe5b1461057857600285015461056c90600163ffffffff61081516565b85600201819055610596565b600385015461058e90600163ffffffff61081516565b856003018190555b505b60008660038111156105a657fe5b146105cd5760038501546105c190600163ffffffff61083d16565b856003018190556105eb565b60028501546105e390600163ffffffff61083d16565b856002018190555b5033600090815260208581526040808320805460ff1990811660011790915591869052909120805490911690558686600381111561062557fe5b336001600160a01b0316600080516020610b108339815191524260405161064c9190610ae2565b60405180910390a486600080516020610b30833981519152866002015487600301544260405161067e93929190610af9565b60405180910390a250505050505050565b600181600381111561069d57fe5b14806106b4575060038160038111156106b257fe5b145b6106d05760405162461bcd60e51b81526004016101e790610a40565b60008281526020819052604081209060018360038111156106ed57fe5b146106fb57816001016106fd565b815b3360009081526020829052604090205490915060ff168015156001146107355760405162461bcd60e51b81526004016101e790610a9d565b600184600381111561074357fe5b1461076a57600383015461075e90600163ffffffff61081516565b83600301819055610788565b600283015461078090600163ffffffff61081516565b836002018190555b50336000908152602083905260409020805460ff19169055848460038111156107ad57fe5b336001600160a01b0316600080516020610b10833981519152426040516107d49190610ae2565b60405180910390a484600080516020610b30833981519152846002015485600301544260405161080693929190610af9565b60405180910390a25050505050565b6000828211156108375760405162461bcd60e51b81526004016101e79061092a565b50900390565b6000828201838110156108625760405162461bcd60e51b81526004016101e7906108f5565b9392505050565b6000806040838503121561087b578182fd5b82356001600160a01b0381168114610891578283fd5b946020939093013593505050565b6000602082840312156108b0578081fd5b5035919050565b6000602082840312156108c8578081fd5b5051919050565b6001600160a01b0391909116815260200190565b91151582521515602082015260400190565b6020808252601b908201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604082015260600190565b6020808252601e908201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604082015260600190565b6020808252602a908201527f6d73672e73656e646572206d75737420686f6c64206d696e696d756d2065726360408201526932302062616c616e636560b01b606082015260800190565b60208082526031908201527f46756e6374696f6e20706172616d657465722068617320746f206265207570766040820152701bdd1959081bdc88191bdddb9d9bdd1959607a1b606082015260800190565b60208082526024908201527f557365722068617320616c7265616479206120766f7465206f6e2074686973206040820152636974656d60e01b606082015260800190565b6020808252603d908201527f46756e6374696f6e20706172616d657465722068617320746f2062652072656d60408201527f6f76655570766f746564206f722072656d6f7665446f776e766f746564000000606082015260800190565b60208082526025908201527f5573657220646f65736e27742068617665206120766f7465206f6e2074686973604082015264206974656d60d81b606082015260800190565b90815260200190565b918252602082015260400190565b928352602083019190915260408201526060019056fea2729191d3d43dadea9138477a0b8a336c96a26108361f706a00de867034c1dbfeac3f5efe9271717007c9fe19e216ac66326c20488b228dba241f9c8f84f060a2646970667358221220c722d09a6c95fb8cd922a5b23a51bd9f3e473adb1896aea3fba571b2c13ea7de64736f6c63430006020033

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

0000000000000000000000008b29344f368b5fa35595325903fe0eaab70c8e1f0000000000000000000000000000000000000000000000000de0b6b3a7640000

-----Decoded View---------------
Arg [0] : _token (address): 0x8b29344f368b5FA35595325903fE0eAab70C8E1F
Arg [1] : _requiredBalance (uint256): 1000000000000000000

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000008b29344f368b5fa35595325903fe0eaab70c8e1f
Arg [1] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000


Deployed Bytecode Sourcemap

22603:4932:0:-:0;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;22603:4932:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23260:30;;;:::i;:::-;;;;;;;;;;;;;;;;23805:117;;;;;;;;;:::i;:::-;;25841:139;;;;;;;;;:::i;23972:121::-;;;;;;;;;:::i;27320:210::-;;;;;;;;;:::i;:::-;;;;;;;;;25642:135;;;;;;;;;:::i;27063:176::-;;;;;;;;;:::i;:::-;;;;;;;;;23236:19;;;:::i;:::-;;;;;;;;23260:30;;;;:::o;23805:117::-;23441:15;;23410:5;;:27;;-1:-1:-1;;;23410:27:0;;-1:-1:-1;;;;;23410:5:0;;;;:15;;:27;;23426:10;;23410:27;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;23410:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23410:27:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;23410:27:0;;;;;;;;;:46;;23402:101;;;;-1:-1:-1;;;23402:101:0;;;;;;;;;;;;;;;;;23881:35:::1;23890:6;23898:17;23881:8;:35::i;:::-;23805:117:::0;:::o;25841:139::-;23441:15;;23410:5;;:27;;-1:-1:-1;;;23410:27:0;;-1:-1:-1;;;;;23410:5:0;;;;:15;;:27;;23426:10;;23410:27;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;23410:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23410:27:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;23410:27:0;;;;;;;;;:46;;23402:101;;;;-1:-1:-1;;;23402:101:0;;;;;;;;;25925:49:::1;25940:6;25948:25;25925:14;:49::i;23972:121::-:0;23441:15;;23410:5;;:27;;-1:-1:-1;;;23410:27:0;;-1:-1:-1;;;;;23410:5:0;;;;:15;;:27;;23426:10;;23410:27;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;23410:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23410:27:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;23410:27:0;;;;;;;;;:46;;23402:101;;;;-1:-1:-1;;;23402:101:0;;;;;;;;;24050:37:::1;24059:6;24067:19;24050:8;:37::i;27320:210::-:0;27399:4;27443:13;;;;;;;;;;;-1:-1:-1;;;;;27473:23:0;;;;;;;;;;;;;;27498:19;;;:25;;;;;;27473:23;;;;;27498:25;;;27320:210::o;25642:135::-;23441:15;;23410:5;;:27;;-1:-1:-1;;;23410:27:0;;-1:-1:-1;;;;;23410:5:0;;;;:15;;:27;;23426:10;;23410:27;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;23410:27:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;23410:27:0;;;;;;;101:4:-1;97:9;90:4;84;80:15;76:31;69:5;65:43;126:6;120:4;113:20;0:138;23410:27:0;;;;;;;;;:46;;23402:101;;;;-1:-1:-1;;;23402:101:0;;;;;;;;;25724:47:::1;25739:6;25747:23;25724:14;:47::i;27063:176::-:0;27124:7;27174:13;;;;;;;;;;27204:12;;;;27218:14;;;;;27204:12;;27063:176::o;23236:19::-;;;-1:-1:-1;;;;;23236:19:0;;:::o;24148:1431::-;24234:17;24224:6;:27;;;;;;;;;:60;;;-1:-1:-1;24265:19:0;24255:6;:29;;;;;;;;;24224:60;24216:122;;;;-1:-1:-1;;;24216:122:0;;;;;;;;;24347:22;24372:13;;;;;;;;;;;24347:22;24443:6;:27;;;;;;;;;:69;;24493:4;:19;;24443:69;;;24473:4;24443:69;24394:118;-1:-1:-1;24519:49:0;;24571:6;:27;;;;;;;;;:69;;24623:4;24571:69;;;24601:4;:19;;24571:69;24770:10;24719:34;24756:25;;;;;;;;;;;24519:121;;-1:-1:-1;24756:25:0;;24798:38;;24790:87;;;;-1:-1:-1;;;24790:87:0;;;;;;;;;24981:10;24930:31;24964:28;;;;;;;;;;;;;25047:154;;;;25098:17;25088:6;:27;;;;;;;;;:105;;25174:12;;;;:19;;25191:1;25174:19;:16;:19;:::i;:::-;25159:4;:12;;:34;;;25088:105;;;25135:14;;;;:21;;25154:1;25135:21;:18;:21;:::i;:::-;25118:4;:14;;:38;;;25088:105;;25047:154;25240:17;25230:6;:27;;;;;;;;;:105;;25314:14;;;;:21;;25333:1;25314:21;:18;:21;:::i;:::-;25297:4;:14;;:38;;;25230:105;;;25275:12;;;;:19;;25292:1;25275:19;:16;:19;:::i;:::-;25260:4;:12;;:34;;;25230:105;-1:-1:-1;25356:10:0;25342:25;;;;;;;;;;;;:32;;-1:-1:-1;;25342:32:0;;;25370:4;25342:32;;;;25381:28;;;;;;;:36;;;;;;;25486:6;25478;25451:47;;;;;;;;25466:10;-1:-1:-1;;;;;25451:47:0;-1:-1:-1;;;;;;;;;;;25494:3:0;25451:47;;;;;;;;;;;;;;;25529:6;-1:-1:-1;;;;;;;;;;;25537:4:0;:12;;;25551:4;:14;;;25567:3;25512:59;;;;;;;;;;;;;;;;;24148:1431;;;;;;;:::o;26048:946::-;26140:23;26130:6;:33;;;;;;;;;:72;;;-1:-1:-1;26177:25:0;26167:6;:35;;;;;;;;;26130:72;26122:146;;;;-1:-1:-1;;;26122:146:0;;;;;;;;;26300:22;26325:13;;;;;;;;;;;26409:23;26399:6;:33;;;;;;;;;:75;;26455:4;:19;;26399:75;;;26435:4;26399:75;26557:10;26520:17;26540:28;;;;;;;;;;;26347:127;;-1:-1:-1;26540:28:0;;26585:20;;;26540:28;26585:20;26577:70;;;;-1:-1:-1;;;26577:70:0;;;;;;;;;26690:23;26680:6;:33;;;;;;;;;:111;;26770:14;;;;:21;;26789:1;26770:21;:18;:21;:::i;:::-;26753:4;:14;;:38;;;26680:111;;;26731:12;;;;:19;;26748:1;26731:19;:16;:19;:::i;:::-;26716:4;:12;;:34;;;26680:111;-1:-1:-1;26815:10:0;26829:5;26798:28;;;;;;;;;;:36;;-1:-1:-1;;26798:36:0;;;26903:6;26895;26868:47;;;;;;;;26883:10;-1:-1:-1;;;;;26868:47:0;-1:-1:-1;;;;;;;;;;;26911:3:0;26868:47;;;;;;;;;;;;;;;26946:6;-1:-1:-1;;;;;;;;;;;26954:4:0;:12;;;26968:4;:14;;;26984:3;26929:59;;;;;;;;;;;;;;;;;26048:946;;;;;:::o;3290:158::-;3348:7;3381:1;3376;:6;;3368:49;;;;-1:-1:-1;;;3368:49:0;;;;;;;;;-1:-1:-1;3435:5:0;;;3290:158::o;2828:179::-;2886:7;2918:5;;;2942:6;;;;2934:46;;;;-1:-1:-1;;;2934:46:0;;;;;;;;;2998:1;2828:179;-1:-1:-1;;;2828:179:0:o;420:366:-1:-;;;541:2;529:9;520:7;516:23;512:32;509:2;;;-1:-1;;547:12;509:2;72:20;;-1:-1;;;;;9588:54;;10456:35;;10446:2;;-1:-1;;10495:12;10446:2;599:63;699:2;738:22;;;;209:20;;-1:-1;;;503:283;793:241;;897:2;885:9;876:7;872:23;868:32;865:2;;;-1:-1;;903:12;865:2;-1:-1;209:20;;859:175;-1:-1;859:175;1041:263;;1156:2;1144:9;1135:7;1131:23;1127:32;1124:2;;;-1:-1;;1162:12;1124:2;-1:-1;357:13;;1118:186;-1:-1;1118:186;4482:229;-1:-1;;;;;9588:54;;;;1390:58;;4608:2;4593:18;;4579:132;4718:300;9500:13;;9493:21;1525:34;;9500:13;9493:21;5004:2;4989:18;;1525:34;4852:2;4837:18;;4823:195;5273:407;5464:2;5478:47;;;1957:2;5449:18;;;9268:19;-1:-1;;;9308:14;;;1973:50;2042:12;;;5435:245;5687:407;5878:2;5892:47;;;2293:2;5863:18;;;9268:19;2329:32;9308:14;;;2309:53;2381:12;;;5849:245;6101:407;6292:2;6306:47;;;2632:2;6277:18;;;9268:19;2668:34;9308:14;;;2648:55;-1:-1;;;2723:12;;;2716:34;2769:12;;;6263:245;6515:407;6706:2;6720:47;;;3020:2;6691:18;;;9268:19;3056:34;9308:14;;;3036:55;-1:-1;;;3111:12;;;3104:41;3164:12;;;6677:245;6929:407;7120:2;7134:47;;;3415:2;7105:18;;;9268:19;3451:34;9308:14;;;3431:55;-1:-1;;;3506:12;;;3499:28;3546:12;;;7091:245;7343:407;7534:2;7548:47;;;3797:2;7519:18;;;9268:19;3833:34;9308:14;;;3813:55;3902:31;3888:12;;;3881:53;3953:12;;;7505:245;7757:407;7948:2;7962:47;;;4204:2;7933:18;;;9268:19;4240:34;9308:14;;;4220:55;-1:-1;;;4295:12;;;4288:29;4336:12;;;7919:245;8171:213;4433:37;;;8289:2;8274:18;;8260:124;8391:324;4433:37;;;8701:2;8686:18;;4433:37;8537:2;8522:18;;8508:207;8722:435;4433:37;;;9060:2;9045:18;;4433:37;;;;9143:2;9128:18;;4433:37;8896:2;8881:18;;8867:290

Swarm Source

ipfs://c722d09a6c95fb8cd922a5b23a51bd9f3e473adb1896aea3fba571b2c13ea7de

Block Transaction Gas Used Reward
view all blocks collator

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ 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.