ETH Price: $3,321.02 (-3.72%)

Contract

0x21f1598b786fbf6b81E85f57E56faf83F78Fb59E
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040119659252021-03-03 14:46:371364 days ago1614782797IN
 Create: AlunaToken
0 ETH0.15672301101

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AlunaToken

Compiler Version
v0.5.6+commit.b259423e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity)

/**
 *Submitted for verification at Etherscan.io on 2021-03-03
*/

// File: @openzeppelin/upgrades/contracts/Initializable.sol

pragma solidity >=0.4.24 <0.7.0;


/**
 * @title Initializable
 *
 * @dev Helper contract to support initializer functions. To use it, replace
 * the constructor with a function that has the `initializer` modifier.
 * WARNING: Unlike constructors, initializer functions must be manually
 * invoked. This applies both to deploying an Initializable contract, as well
 * as extending an Initializable contract via inheritance.
 * WARNING: When used with inheritance, manual care must be taken to not invoke
 * a parent initializer twice, or ensure that all initializers are idempotent,
 * because this is not dealt with automatically as with constructors.
 */
contract Initializable {

  /**
   * @dev Indicates that the contract has been initialized.
   */
  bool private initialized;

  /**
   * @dev Indicates that the contract is in the process of being initialized.
   */
  bool private initializing;

  /**
   * @dev Modifier to use in the initializer function of a contract.
   */
  modifier initializer() {
    require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");

    bool isTopLevelCall = !initializing;
    if (isTopLevelCall) {
      initializing = true;
      initialized = true;
    }

    _;

    if (isTopLevelCall) {
      initializing = false;
    }
  }

  /// @dev Returns true if and only if the function is running in the constructor
  function isConstructor() private view returns (bool) {
    // extcodesize checks the size of the code stored in an address, and
    // address returns the current address. Since the code is still not
    // deployed when running a constructor, any checks on its code size will
    // yield zero, making it an effective way to detect if a contract is
    // under construction or not.
    address self = address(this);
    uint256 cs;
    assembly { cs := extcodesize(self) }
    return cs == 0;
  }

  // Reserved storage space to allow for layout changes in the future.
  uint256[50] private ______gap;
}

// File: @openzeppelin/contracts/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: @openzeppelin/contracts/ownership/Ownable.sol

pragma solidity ^0.5.0;

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () internal {
        _owner = _msgSender();
        emit OwnershipTransferred(address(0), _owner);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(isOwner(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Returns true if the caller is the current owner.
     */
    function isOwner() public view returns (bool) {
        return _msgSender() == _owner;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public onlyOwner {
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     */
    function _transferOwnership(address newOwner) internal {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

// File: @openzeppelin/contracts/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: @openzeppelin/contracts/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: @openzeppelin/contracts/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: contracts/RewardsPool.sol

pragma solidity 0.5.6;






contract RewardsPool is Initializable, Ownable {
    using SafeMath for uint256;

    IERC20 public tokenALN;

    /**
      * @dev Rewards Pool Deposit Complete Event
      * @param sender The address who is making the payment
      * @param amount ALN token amount
    */
    event DepositComplete(address indexed sender, uint256 amount);

    /**
      * @dev Rewards Pool Withdrawal Complete Event
      * @param receiver The address of teh reward receiver
      * @param amount The value of the reward
    */
    event RewardComplete(address indexed receiver, uint256 amount);

    /**
      * ZeppelinOS Initializer Function
      * @param _tokenAddress address of ALN token
      * @param _owner contract owner
    */
    function initialize(address _owner, address _tokenAddress) public initializer {
        tokenALN = IERC20(_tokenAddress);
        _transferOwnership(_owner);
    }

    /**
     * @dev Deposits ALN tokens in Rewards Pool
     * @param from The address of the sender
     * @param value Amount of tokens
    */
    function deposit(address from, uint256 value) external {
        require(tokenALN.transferFrom(from, address(this), value), "Deposit failed");
        emit DepositComplete(from, value);
    }

    /**
     * @dev Send the rewards for a group of addresses
     * @param receivers The addresses of the rewards receivers
     * @param values The value in tokens to be sent to each receiver
    */
    function sendRewards(address[] calldata receivers, uint256[] calldata values) external onlyOwner {
        require(receivers.length == values.length, "RewardsPool: Invalid length of receivers and values");
        for (uint i = 0; i < receivers.length; i++) {
            require(tokenALN.transfer(receivers[i], values[i]), "Reward failed");
            emit RewardComplete(receivers[i], values[i]);
        }
    }
}

// File: contracts/PaymentReceiver.sol

pragma solidity 0.5.6;




contract PaymentReceiver is ERC20, Ownable {

    struct Payment {
        uint256 value;
        uint256 poolFee;
        bool refunded;
    }

    mapping(bytes32 => Payment) public payments;

    address public rewardsPoolAddress;

    uint256 public rewardsPoolPercentage;

    /**
      * @dev Payment Event To Rewards Pool
      * @param sender The address who is making the payment
      * @param value ALN token amount
      * @param paymentId payment ID
    */
    event PaymentProcessed(address sender, uint256 value, bytes32 indexed paymentId);

    /**
      * @dev Refund Payment Event To Sender
      * @param sender The address who is making the payment
      * @param value ALN token amount
      * @param paymentId payment ID
    */
    event PaymentRefunded(address sender, uint256 value, bool refunded, bytes32 indexed paymentId);

    /**
      * @dev Set rewards pool percentage share of payments
      * @param _rewardsPoolPercentage new percentage share
    */
    function setRewardsPoolPercentage(uint256 _rewardsPoolPercentage) external onlyOwner {
        _setRewardsPoolPercentage(_rewardsPoolPercentage);
    }

    /**
      * @dev Set rewards pool address
      * @param _rewardsPoolAddress new rewards pool address
    */
    function setRewardsPoolAddress(address _rewardsPoolAddress) external onlyOwner {
        _setRewardsPoolAddress(_rewardsPoolAddress);
    }

    /**
    * @dev Withdraws the ALN balance of the sender to the owner adddress,
    * and sends a percentage to the Rewards Pool.
    * Assumes percentages are whole numbers, 5 would be 5%.
    * Converts rewards pool percentage to amount and subtracts from total amount.
    * Emits `PaymentProcessed` when the payment is processed succesfully
    * @param _value amount ALN tokens to transfer.
    * @param _paymentId id of the payment provided by Aluna.
    */
    function processPayment(uint256 _value, bytes32 _paymentId) external {
        require(_value != 0, "PaymentProcessor: non-positive payment value");
        require(_paymentId != 0x0, "PaymentProcessor: invalid payment id");
        require(payments[_paymentId].value == 0, "PaymentProcessor: payment id already used");
        uint256 _rewardsPoolAmount = (_value.mul(rewardsPoolPercentage)).div(100);
        uint256 _remainingAmount = _value.sub(_rewardsPoolAmount);
        _transfer(msg.sender, owner(), _remainingAmount);
        _approve(msg.sender, rewardsPoolAddress, _rewardsPoolAmount);
        payments[_paymentId] = Payment(_value, _rewardsPoolAmount, false);
        RewardsPool(rewardsPoolAddress).deposit(msg.sender, _rewardsPoolAmount);
        emit PaymentProcessed(msg.sender, _value, _paymentId);
    }

    /**
    * @dev Refunds total or partial balance of a payment
    * Assumes percentages are whole numbers, 5 would be 5%.
    * Emits `PaymentRefunded` when the payment is refunded succesfully
    * @param _sender the sender of the payment to be refunded
    * @param _paymentId id of the payment provided by Aluna.
    */
    function refundPayment(address _sender, bytes32 _paymentId) external onlyOwner {
        require(!payments[_paymentId].refunded, "PaymentProcessor: payment already refunded");
        uint256 value_to_refund = payments[_paymentId].value;
        _transfer(owner(), _sender, payments[_paymentId].value.sub(payments[_paymentId].poolFee));
        _transfer(rewardsPoolAddress, _sender, payments[_paymentId].poolFee);
        payments[_paymentId].refunded = true;
        emit PaymentRefunded(_sender, value_to_refund, payments[_paymentId].refunded, _paymentId);
    }

    /**
      * @dev Set rewards pool percentage share of payments
      * @param _rewardsPoolPercentage new percentage share
    */
    function _setRewardsPoolPercentage(uint256 _rewardsPoolPercentage) internal {
        require(_rewardsPoolPercentage <= 100, "PaymentProcessor: rewards pool percentage is not 100 or lower");
        rewardsPoolPercentage = _rewardsPoolPercentage;
    }

    /**
      * @dev Set rewards pool address
      * @param _rewardsPoolAddress new rewards pool address
    */
    function _setRewardsPoolAddress(address _rewardsPoolAddress) internal {
        require(_rewardsPoolAddress != address(0), "PaymentProcessor: invalid rewards pool address");
        rewardsPoolAddress = _rewardsPoolAddress;
    }

}

// File: contracts/AlunaToken.sol

pragma solidity 0.5.6;



/**
 * @title AlunaToken
 * @dev The utility token at the heart of the Aluna ecosystem
 */
contract AlunaToken is PaymentReceiver, Initializable {

    // ERC20Detailed public variables
    string public name;
    string public symbol;
    uint8 public decimals;

    /**
      * ZeppelinOS Initializer Function
      * @param _totalSupply The total supply of the tokens
      * @param _rewardsPoolAddress address of Rewards Pool contract
      * @param _rewardsPoolPercentage percentage to be taken from payments and sent to rewards pool
      * @param _owner contract owner
    */
    function initialize(
        uint256 _totalSupply,
        address _rewardsPoolAddress,
        uint256 _rewardsPoolPercentage,
        address _owner
    ) public initializer {
        name = "Aluna";
        symbol = "ALN";
        decimals = 18;
        _mint(_owner, _totalSupply);
        _setRewardsPoolPercentage(_rewardsPoolPercentage);
        _setRewardsPoolAddress(_rewardsPoolAddress);
        _transferOwnership(_owner);
    }

    /**
    * @dev Function that allows the owner to execute multiple transfers in one transaction
    * It receives two arrays, recipients and values, the recipient[i] will receive values[i]
    * The tokens are transfered form the owner address
    * @param recipients An array of address of the token recipients
    * @param values An array of uint256 of value sent to each recipient
    */
    function groupTransfer(address[] calldata recipients, uint256[] calldata values) external onlyOwner {
        require(recipients.length == values.length, "AlunaToken: Invalid length of recipients and values");
        for (uint i = 0; i < recipients.length; i++) {
            _transfer(_msgSender(), recipients[i], values[i]);
        }
    }

}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"","type":"bytes32"}],"name":"payments","outputs":[{"name":"value","type":"uint256"},{"name":"poolFee","type":"uint256"},{"name":"refunded","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"amount","type":"uint256"}],"name":"approve","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"sender","type":"address"},{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"decimals","outputs":[{"name":"","type":"uint8"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"rewardsPoolPercentage","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_rewardsPoolPercentage","type":"uint256"}],"name":"setRewardsPoolPercentage","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_value","type":"uint256"},{"name":"_paymentId","type":"bytes32"}],"name":"processPayment","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_totalSupply","type":"uint256"},{"name":"_rewardsPoolAddress","type":"address"},{"name":"_rewardsPoolPercentage","type":"uint256"},{"name":"_owner","type":"address"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"recipients","type":"address[]"},{"name":"values","type":"uint256[]"}],"name":"groupTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"symbol","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_rewardsPoolAddress","type":"address"}],"name":"setRewardsPoolAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"spender","type":"address"},{"name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"recipient","type":"address"},{"name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_sender","type":"address"},{"name":"_paymentId","type":"bytes32"}],"name":"refundPayment","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"rewardsPoolAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"},{"name":"spender","type":"address"}],"name":"allowance","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"anonymous":false,"inputs":[{"indexed":false,"name":"sender","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":true,"name":"paymentId","type":"bytes32"}],"name":"PaymentProcessed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"sender","type":"address"},{"indexed":false,"name":"value","type":"uint256"},{"indexed":false,"name":"refunded","type":"bool"},{"indexed":true,"name":"paymentId","type":"bytes32"}],"name":"PaymentRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"previousOwner","type":"address"},{"indexed":true,"name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"from","type":"address"},{"indexed":true,"name":"to","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"name":"owner","type":"address"},{"indexed":true,"name":"spender","type":"address"},{"indexed":false,"name":"value","type":"uint256"}],"name":"Approval","type":"event"}]

608060405261001261006360201b60201c565b600380546001600160a01b0319166001600160a01b0392831617908190556040519116906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3610067565b3390565b611aab806100766000396000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c806376fceb76116100c3578063a457c2d71161007c578063a457c2d7146104c1578063a9059cbb146104ed578063bdf1baa414610519578063cce8505514610545578063dd62ed3e1461054d578063f2fde38b1461057b57610158565b806376fceb761461036957806382296939146103a55780638da5cb5b146104675780638f32d59b1461048b57806395d89b41146104935780639746f9e81461049b57610158565b806338b6da381161011557806338b6da38146102c557806339509351146102cd57806350174016146102f95780636077da7d1461031857806370a082311461033b578063715018a61461036157610158565b806306fdde031461015d5780630716326d146101da578063095ea7b31461021757806318160ddd1461025757806323b872dd14610271578063313ce567146102a7575b600080fd5b6101656105a1565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561019f578181015183820152602001610187565b50505050905090810190601f1680156101cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101f7600480360360208110156101f057600080fd5b503561062f565b604080519384526020840192909252151582820152519081900360600190f35b6102436004803603604081101561022d57600080fd5b506001600160a01b038135169060200135610653565b604080519115158252519081900360200190f35b61025f610671565b60408051918252519081900360200190f35b6102436004803603606081101561028757600080fd5b506001600160a01b03813581169160208101359091169060400135610678565b6102af610705565b6040805160ff9092168252519081900360200190f35b61025f61070e565b610243600480360360408110156102e357600080fd5b506001600160a01b038135169060200135610714565b6103166004803603602081101561030f57600080fd5b5035610768565b005b6103166004803603604081101561032e57600080fd5b50803590602001356107be565b61025f6004803603602081101561035157600080fd5b50356001600160a01b03166109eb565b610316610a06565b6103166004803603608081101561037f57600080fd5b508035906001600160a01b03602082013581169160408101359160609091013516610a9a565b610316600480360360408110156103bb57600080fd5b8101906020810181356401000000008111156103d657600080fd5b8201836020820111156103e857600080fd5b8035906020019184602083028401116401000000008311171561040a57600080fd5b91939092909160208101903564010000000081111561042857600080fd5b82018360208201111561043a57600080fd5b8035906020019184602083028401116401000000008311171561045c57600080fd5b509092509050610bd3565b61046f610cb0565b604080516001600160a01b039092168252519081900360200190f35b610243610cbf565b610165610ce5565b610316600480360360208110156104b157600080fd5b50356001600160a01b0316610d40565b610243600480360360408110156104d757600080fd5b506001600160a01b038135169060200135610d93565b6102436004803603604081101561050357600080fd5b506001600160a01b038135169060200135610e01565b6103166004803603604081101561052f57600080fd5b506001600160a01b038135169060200135610e15565b61046f610f96565b61025f6004803603604081101561056357600080fd5b506001600160a01b0381358116916020013516610fa5565b6103166004803603602081101561059157600080fd5b50356001600160a01b0316610fd0565b603a805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106275780601f106105fc57610100808354040283529160200191610627565b820191906000526020600020905b81548152906001019060200180831161060a57829003601f168201915b505050505081565b60046020526000908152604090208054600182015460029092015490919060ff1683565b6000610667610660611023565b8484611027565b5060015b92915050565b6002545b90565b6000610685848484611119565b6106fb84610691611023565b6106f68560405180606001604052806028815260200161193f602891396001600160a01b038a166000908152600160205260408120906106cf611023565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61127b16565b611027565b5060019392505050565b603c5460ff1681565b60065481565b6000610667610721611023565b846106f68560016000610732611023565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61131516565b610770610cbf565b6107b25760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b6107bb81611379565b50565b816107fd57604051600160e51b62461bcd02815260040180806020018281038252602c8152602001806117cc602c913960400191505060405180910390fd5b8061083c57604051600160e51b62461bcd02815260040180806020018281038252602481526020018061188f6024913960400191505060405180910390fd5b6000818152600460205260409020541561088a57604051600160e51b62461bcd0281526004018080602001828103825260298152602001806118666029913960400191505060405180910390fd5b60006108b260646108a6600654866113c190919063ffffffff16565b9063ffffffff61141d16565b905060006108c6848363ffffffff61145f16565b90506108da336108d4610cb0565b83611119565b6005546108f29033906001600160a01b031684611027565b6040805160608101825285815260208082018581526000838501818152888252600493849052858220945185559151600185015590516002909301805460ff1916931515939093179092556005548351600160e21b6311f9fbc902815233928101929092526024820186905292516001600160a01b03909316926347e7ef249260448084019391929182900301818387803b15801561099057600080fd5b505af11580156109a4573d6000803e3d6000fd5b5050604080513381526020810188905281518794507fb25c0a3970a0702d5c0740745907a99ea18f185a8996ed0bf201472e232ee6d093509081900390910190a250505050565b6001600160a01b031660009081526020819052604090205490565b610a0e610cbf565b610a505760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380546001600160a01b0319169055565b600754610100900460ff1680610ab35750610ab36114a1565b80610ac1575060075460ff16155b610aff57604051600160e51b62461bcd02815260040180806020018281038252602e8152602001806119ba602e913960400191505060405180910390fd5b600754610100900460ff16158015610b2a576007805460ff1961ff0019909116610100171660011790555b604080518082019091526005808252600160d81b64416c756e61026020909201918252610b5991603a91611710565b50604080518082019091526003808252600160e91b6220a627026020909201918252610b8791603b91611710565b50603c805460ff19166012179055610b9f82866114a7565b610ba883611379565b610bb18461159a565b610bba82611604565b8015610bcc576007805461ff00191690555b5050505050565b610bdb610cbf565b610c1d5760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b828114610c5e57604051600160e51b62461bcd0281526004018080602001828103825260338152602001806119676033913960400191505060405180910390fd5b60005b83811015610bcc57610ca8610c74611023565b868684818110610c8057fe5b905060200201356001600160a01b0316858585818110610c9c57fe5b90506020020135611119565b600101610c61565b6003546001600160a01b031690565b6003546000906001600160a01b0316610cd6611023565b6001600160a01b031614905090565b603b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106275780601f106105fc57610100808354040283529160200191610627565b610d48610cbf565b610d8a5760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b6107bb8161159a565b6000610667610da0611023565b846106f685604051806060016040528060258152602001611a5b6025913960016000610dca611023565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61127b16565b6000610667610e0e611023565b8484611119565b610e1d610cbf565b610e5f5760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b60008181526004602052604090206002015460ff1615610eb357604051600160e51b62461bcd02815260040180806020018281038252602a815260200180611a0d602a913960400191505060405180910390fd5b600081815260046020526040902054610ef9610ecd610cb0565b6000848152600460205260409020600181015490548691610ef4919063ffffffff61145f16565b611119565b600554600083815260046020526040902060010154610f23916001600160a01b0316908590611119565b600082815260046020908152604091829020600201805460ff19166001179081905582516001600160a01b038716815291820184905260ff16151581830152905183917f30ad45a92730c4ee615eec5c98778d9f95d738a7a81ce91ccadaa9df684d6c0a919081900360600190a2505050565b6005546001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610fd8610cbf565b61101a5760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b6107bb81611604565b3390565b6001600160a01b03831661106f57604051600160e51b62461bcd028152600401808060200182810382526024815260200180611a376024913960400191505060405180910390fd5b6001600160a01b0382166110b757604051600160e51b62461bcd02815260040180806020018281038252602281526020018061181e6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831661116157604051600160e51b62461bcd0281526004018080602001828103825260258152602001806119e86025913960400191505060405180910390fd5b6001600160a01b0382166111a957604051600160e51b62461bcd0281526004018080602001828103825260238152602001806117a96023913960400191505060405180910390fd5b6111ec81604051806060016040528060268152602001611840602691396001600160a01b038616600090815260208190526040902054919063ffffffff61127b16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611221908263ffffffff61131516565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561130d57604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156112d25781810151838201526020016112ba565b50505050905090810190601f1680156112ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156113725760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60648111156113bc57604051600160e51b62461bcd02815260040180806020018281038252603d8152602001806118b3603d913960400191505060405180910390fd5b600655565b6000826113d05750600061066b565b828202828482816113dd57fe5b041461137257604051600160e51b62461bcd02815260040180806020018281038252602181526020018061191e6021913960400191505060405180910390fd5b600061137283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116a8565b600061137283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061127b565b303b1590565b6001600160a01b0382166115055760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254611518908263ffffffff61131516565b6002556001600160a01b038216600090815260208190526040902054611544908263ffffffff61131516565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0381166115e257604051600160e51b62461bcd02815260040180806020018281038252602e8152602001806118f0602e913960400191505060405180910390fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811661164c57604051600160e51b62461bcd0281526004018080602001828103825260268152602001806117f86026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b600081836116fa57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156112d25781810151838201526020016112ba565b50600083858161170657fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061175157805160ff191683800117855561177e565b8280016001018555821561177e579182015b8281111561177e578251825591602001919060010190611763565b5061178a92915061178e565b5090565b61067591905b8082111561178a576000815560010161179456fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573735061796d656e7450726f636573736f723a206e6f6e2d706f736974697665207061796d656e742076616c75654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63655061796d656e7450726f636573736f723a207061796d656e7420696420616c726561647920757365645061796d656e7450726f636573736f723a20696e76616c6964207061796d656e742069645061796d656e7450726f636573736f723a207265776172647320706f6f6c2070657263656e74616765206973206e6f7420313030206f72206c6f7765725061796d656e7450726f636573736f723a20696e76616c6964207265776172647320706f6f6c2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365416c756e61546f6b656e3a20496e76616c6964206c656e677468206f6620726563697069656e747320616e642076616c7565734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656445524332303a207472616e736665722066726f6d20746865207a65726f20616464726573735061796d656e7450726f636573736f723a207061796d656e7420616c726561647920726566756e64656445524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa165627a7a7230582072cd10471b55d328d913658f38cfd5c689a9afcd492425cf3f998fbfe35ceac30029

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101585760003560e01c806376fceb76116100c3578063a457c2d71161007c578063a457c2d7146104c1578063a9059cbb146104ed578063bdf1baa414610519578063cce8505514610545578063dd62ed3e1461054d578063f2fde38b1461057b57610158565b806376fceb761461036957806382296939146103a55780638da5cb5b146104675780638f32d59b1461048b57806395d89b41146104935780639746f9e81461049b57610158565b806338b6da381161011557806338b6da38146102c557806339509351146102cd57806350174016146102f95780636077da7d1461031857806370a082311461033b578063715018a61461036157610158565b806306fdde031461015d5780630716326d146101da578063095ea7b31461021757806318160ddd1461025757806323b872dd14610271578063313ce567146102a7575b600080fd5b6101656105a1565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561019f578181015183820152602001610187565b50505050905090810190601f1680156101cc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101f7600480360360208110156101f057600080fd5b503561062f565b604080519384526020840192909252151582820152519081900360600190f35b6102436004803603604081101561022d57600080fd5b506001600160a01b038135169060200135610653565b604080519115158252519081900360200190f35b61025f610671565b60408051918252519081900360200190f35b6102436004803603606081101561028757600080fd5b506001600160a01b03813581169160208101359091169060400135610678565b6102af610705565b6040805160ff9092168252519081900360200190f35b61025f61070e565b610243600480360360408110156102e357600080fd5b506001600160a01b038135169060200135610714565b6103166004803603602081101561030f57600080fd5b5035610768565b005b6103166004803603604081101561032e57600080fd5b50803590602001356107be565b61025f6004803603602081101561035157600080fd5b50356001600160a01b03166109eb565b610316610a06565b6103166004803603608081101561037f57600080fd5b508035906001600160a01b03602082013581169160408101359160609091013516610a9a565b610316600480360360408110156103bb57600080fd5b8101906020810181356401000000008111156103d657600080fd5b8201836020820111156103e857600080fd5b8035906020019184602083028401116401000000008311171561040a57600080fd5b91939092909160208101903564010000000081111561042857600080fd5b82018360208201111561043a57600080fd5b8035906020019184602083028401116401000000008311171561045c57600080fd5b509092509050610bd3565b61046f610cb0565b604080516001600160a01b039092168252519081900360200190f35b610243610cbf565b610165610ce5565b610316600480360360208110156104b157600080fd5b50356001600160a01b0316610d40565b610243600480360360408110156104d757600080fd5b506001600160a01b038135169060200135610d93565b6102436004803603604081101561050357600080fd5b506001600160a01b038135169060200135610e01565b6103166004803603604081101561052f57600080fd5b506001600160a01b038135169060200135610e15565b61046f610f96565b61025f6004803603604081101561056357600080fd5b506001600160a01b0381358116916020013516610fa5565b6103166004803603602081101561059157600080fd5b50356001600160a01b0316610fd0565b603a805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106275780601f106105fc57610100808354040283529160200191610627565b820191906000526020600020905b81548152906001019060200180831161060a57829003601f168201915b505050505081565b60046020526000908152604090208054600182015460029092015490919060ff1683565b6000610667610660611023565b8484611027565b5060015b92915050565b6002545b90565b6000610685848484611119565b6106fb84610691611023565b6106f68560405180606001604052806028815260200161193f602891396001600160a01b038a166000908152600160205260408120906106cf611023565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61127b16565b611027565b5060019392505050565b603c5460ff1681565b60065481565b6000610667610721611023565b846106f68560016000610732611023565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61131516565b610770610cbf565b6107b25760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b6107bb81611379565b50565b816107fd57604051600160e51b62461bcd02815260040180806020018281038252602c8152602001806117cc602c913960400191505060405180910390fd5b8061083c57604051600160e51b62461bcd02815260040180806020018281038252602481526020018061188f6024913960400191505060405180910390fd5b6000818152600460205260409020541561088a57604051600160e51b62461bcd0281526004018080602001828103825260298152602001806118666029913960400191505060405180910390fd5b60006108b260646108a6600654866113c190919063ffffffff16565b9063ffffffff61141d16565b905060006108c6848363ffffffff61145f16565b90506108da336108d4610cb0565b83611119565b6005546108f29033906001600160a01b031684611027565b6040805160608101825285815260208082018581526000838501818152888252600493849052858220945185559151600185015590516002909301805460ff1916931515939093179092556005548351600160e21b6311f9fbc902815233928101929092526024820186905292516001600160a01b03909316926347e7ef249260448084019391929182900301818387803b15801561099057600080fd5b505af11580156109a4573d6000803e3d6000fd5b5050604080513381526020810188905281518794507fb25c0a3970a0702d5c0740745907a99ea18f185a8996ed0bf201472e232ee6d093509081900390910190a250505050565b6001600160a01b031660009081526020819052604090205490565b610a0e610cbf565b610a505760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380546001600160a01b0319169055565b600754610100900460ff1680610ab35750610ab36114a1565b80610ac1575060075460ff16155b610aff57604051600160e51b62461bcd02815260040180806020018281038252602e8152602001806119ba602e913960400191505060405180910390fd5b600754610100900460ff16158015610b2a576007805460ff1961ff0019909116610100171660011790555b604080518082019091526005808252600160d81b64416c756e61026020909201918252610b5991603a91611710565b50604080518082019091526003808252600160e91b6220a627026020909201918252610b8791603b91611710565b50603c805460ff19166012179055610b9f82866114a7565b610ba883611379565b610bb18461159a565b610bba82611604565b8015610bcc576007805461ff00191690555b5050505050565b610bdb610cbf565b610c1d5760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b828114610c5e57604051600160e51b62461bcd0281526004018080602001828103825260338152602001806119676033913960400191505060405180910390fd5b60005b83811015610bcc57610ca8610c74611023565b868684818110610c8057fe5b905060200201356001600160a01b0316858585818110610c9c57fe5b90506020020135611119565b600101610c61565b6003546001600160a01b031690565b6003546000906001600160a01b0316610cd6611023565b6001600160a01b031614905090565b603b805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156106275780601f106105fc57610100808354040283529160200191610627565b610d48610cbf565b610d8a5760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b6107bb8161159a565b6000610667610da0611023565b846106f685604051806060016040528060258152602001611a5b6025913960016000610dca611023565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61127b16565b6000610667610e0e611023565b8484611119565b610e1d610cbf565b610e5f5760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b60008181526004602052604090206002015460ff1615610eb357604051600160e51b62461bcd02815260040180806020018281038252602a815260200180611a0d602a913960400191505060405180910390fd5b600081815260046020526040902054610ef9610ecd610cb0565b6000848152600460205260409020600181015490548691610ef4919063ffffffff61145f16565b611119565b600554600083815260046020526040902060010154610f23916001600160a01b0316908590611119565b600082815260046020908152604091829020600201805460ff19166001179081905582516001600160a01b038716815291820184905260ff16151581830152905183917f30ad45a92730c4ee615eec5c98778d9f95d738a7a81ce91ccadaa9df684d6c0a919081900360600190a2505050565b6005546001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610fd8610cbf565b61101a5760408051600160e51b62461bcd028152602060048201819052602482015260008051602061199a833981519152604482015290519081900360640190fd5b6107bb81611604565b3390565b6001600160a01b03831661106f57604051600160e51b62461bcd028152600401808060200182810382526024815260200180611a376024913960400191505060405180910390fd5b6001600160a01b0382166110b757604051600160e51b62461bcd02815260040180806020018281038252602281526020018061181e6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b03831661116157604051600160e51b62461bcd0281526004018080602001828103825260258152602001806119e86025913960400191505060405180910390fd5b6001600160a01b0382166111a957604051600160e51b62461bcd0281526004018080602001828103825260238152602001806117a96023913960400191505060405180910390fd5b6111ec81604051806060016040528060268152602001611840602691396001600160a01b038616600090815260208190526040902054919063ffffffff61127b16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611221908263ffffffff61131516565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561130d57604051600160e51b62461bcd0281526004018080602001828103825283818151815260200191508051906020019080838360005b838110156112d25781810151838201526020016112ba565b50505050905090810190601f1680156112ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6000828201838110156113725760408051600160e51b62461bcd02815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60648111156113bc57604051600160e51b62461bcd02815260040180806020018281038252603d8152602001806118b3603d913960400191505060405180910390fd5b600655565b6000826113d05750600061066b565b828202828482816113dd57fe5b041461137257604051600160e51b62461bcd02815260040180806020018281038252602181526020018061191e6021913960400191505060405180910390fd5b600061137283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116a8565b600061137283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061127b565b303b1590565b6001600160a01b0382166115055760408051600160e51b62461bcd02815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254611518908263ffffffff61131516565b6002556001600160a01b038216600090815260208190526040902054611544908263ffffffff61131516565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6001600160a01b0381166115e257604051600160e51b62461bcd02815260040180806020018281038252602e8152602001806118f0602e913960400191505060405180910390fd5b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03811661164c57604051600160e51b62461bcd0281526004018080602001828103825260268152602001806117f86026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b600081836116fa57604051600160e51b62461bcd0281526020600482018181528351602484015283519092839260449091019190850190808383600083156112d25781810151838201526020016112ba565b50600083858161170657fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061175157805160ff191683800117855561177e565b8280016001018555821561177e579182015b8281111561177e578251825591602001919060010190611763565b5061178a92915061178e565b5090565b61067591905b8082111561178a576000815560010161179456fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573735061796d656e7450726f636573736f723a206e6f6e2d706f736974697665207061796d656e742076616c75654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63655061796d656e7450726f636573736f723a207061796d656e7420696420616c726561647920757365645061796d656e7450726f636573736f723a20696e76616c6964207061796d656e742069645061796d656e7450726f636573736f723a207265776172647320706f6f6c2070657263656e74616765206973206e6f7420313030206f72206c6f7765725061796d656e7450726f636573736f723a20696e76616c6964207265776172647320706f6f6c2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365416c756e61546f6b656e3a20496e76616c6964206c656e677468206f6620726563697069656e747320616e642076616c7565734f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656445524332303a207472616e736665722066726f6d20746865207a65726f20616464726573735061796d656e7450726f636573736f723a207061796d656e7420616c726561647920726566756e64656445524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa165627a7a7230582072cd10471b55d328d913658f38cfd5c689a9afcd492425cf3f998fbfe35ceac30029

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.