Blockwell

WINGS

ERC20

This contract is an ERC20 token.

Name WINGS
Symbol WINGS
Decimals 18
Total Supply 100,000,000 WINGS

About link description

Wings (WINGS) is a cryptocurrency token and operates on the Ethereum platform. Wings has a current supply of 100,000,000 with 97,259,638.118 in circulation. The last known price of Wings is $0.169697 USD and is up 4.35% over the last 24 hours. It is currently trading on 9 active market(s) with $23,867.14 traded over the last 24 hours. More information can be found at https://wings.ai/.

Stats

Public Functions 13
Event Types 7
Code Size 10,070 bytes

ALLOCATION Event

Parameters help
account
address help
amount
uint help

Approval Event

Parameters help
owner
address help
spender
address help
value
uint help

PREMINER_ADDED Event

Parameters help
owner
address help
account
address help
amount
uint help

PREMINER_CHANGED Event

Parameters help
oldPreminer
address help
newPreminer
address help
newRecipient
address help

PREMINE_ALLOCATION_ADDED Event

Parameters help
account
address help
time
uint help

PREMINE_RELEASE Event

Parameters help
account
address help
timestamp
uint help
amount
uint help

Transfer Event

Parameters help
from
address help
to
address help
value
uint help

Preminer Event

Members
account
address help
monthlyPayment
uint help
latestAllocation
uint help
disabled
bool help
allocationsCount
uint help
allocations
mapping(uint => uint) help

Functions Expand All Collapse All

transferOwner keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOwner checks for the following:
Source Code
  function transferOwner(address newOwner) onlyOwner {
    if (newOwner != address(0)) owner = newOwner;
  }

balanceOf keyboard_arrow_up

Parameters help

Name Type
_owner
address help

Properties

Visibility help public
Mutability help constant
Source Code
  function balanceOf(address _owner) constant returns (uint balance) {
    return balances[_owner];
  }

allowance keyboard_arrow_up

Parameters help

Name Type
_owner
address help
_spender
address help

Properties

Visibility help public
Mutability help constant
Source Code
  function allowance(address _owner, address _spender) constant returns (uint remaining) {
    return allowed[_owner][_spender];
  }

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

whenAllocation checks for the following:
Source Code
  function transfer(address _to, uint _value) whenAllocation(false) returns (bool success) {
    return super.transfer(_to, _value);
  }

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

whenAllocation checks for the following:
Source Code
  function transferFrom(address _from, address _to, uint _value) whenAllocation(false) returns (bool success) {
    return super.transferFrom(_from, _to, _value);
  }

approve keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

whenAllocation checks for the following:
Source Code
  function approve(address _spender, uint _value) whenAllocation(false) returns (bool success) {
    return super.approve(_spender, _value);
  }

allocate keyboard_arrow_up

Parameters help

Name Type
user
address help
balance
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOwner checks for the following:
whenAllocation checks for the following:
whenAccountHasntAllocated checks for the following:
Source Code
  function allocate(address user, uint balance) onlyOwner() whenAllocation(true) whenAccountHasntAllocated(user) {
    balances[user] = balance;

    accountsToAllocate--;
    ALLOCATION(user, balance);
  }

addPreminer keyboard_arrow_up

Parameters help

Name Type
preminer
address help
recipient
address help
initialBalance
uint help
monthlyPayment
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOwner checks for the following:
whenAllocation checks for the following:
whenPremineHasntAllocated checks for the following:
Source Code
  function addPreminer(address preminer, address recipient, uint initialBalance, uint monthlyPayment) onlyOwner() whenAllocation(true) whenPremineHasntAllocated(preminer) {
    var premine = Preminer(
        recipient,
        monthlyPayment,
        0,
        false,
        0
      );


    balances[recipient] = safeAdd(balances[recipient], initialBalance);
    preminers[preminer] = premine;
    accountsToAllocate--;
    PREMINER_ADDED(preminer, premine.account, initialBalance);
  }

disablePreminer keyboard_arrow_up

Parameters help

Name Type
_preminer
address help
_newPreminer
address help
_newRecipient
address help

Properties

Visibility help public
Mutability help transaction
Source Code
  function disablePreminer(address _preminer, address _newPreminer, address _newRecipient) onlyMultisignature() whenPreminerIsntDisabled(_preminer) {
    var oldPreminer = preminers[_preminer];

    if (oldPreminer.account == address(0) || preminers[_newPreminer].account != address(0)) {
      throw;
    }

    preminers[_newPreminer] = oldPreminer;
    preminers[_newPreminer].account = _newRecipient;
    oldPreminer.disabled = true;

    if(preminers[_newPreminer].disabled == true) {
      throw;
    }

    for (uint i = 0; i < preminers[_newPreminer].allocationsCount; i++) {
      preminers[_newPreminer].allocations[i] = oldPreminer.allocations[i];
    }

    PREMINER_CHANGED(_preminer, _newPreminer, _newRecipient);
  }

addPremineAllocation keyboard_arrow_up

Parameters help

Name Type
_preminer
address help
_time
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

onlyOwner checks for the following:
whenAllocation checks for the following:
whenPreminerIsntDisabled checks for the following:
Source Code
  function addPremineAllocation(address _preminer, uint _time) onlyOwner() whenAllocation(true) whenPreminerIsntDisabled(_preminer) {
    var preminer = preminers[_preminer];

    if (preminer.account == address(0) ||  _time == 0 || preminer.allocationsCount == MAX_ALLOCATIONS_COUNT) {
      throw;
    }

    if (preminer.allocationsCount > 0) {
      var previousAllocation = preminer.allocations[preminer.allocationsCount-1];

      if (previousAllocation > _time) {
        throw;
      }

      if (previousAllocation + DAYS_28 > _time) {
        throw;
      }

      if (previousAllocation + DAYS_31 < _time) {
        throw;
      }
    }

    preminer.allocations[preminer.allocationsCount++] = _time;
    PREMINE_ALLOCATION_ADDED(_preminer, _time);
  }

getPreminer keyboard_arrow_up

Parameters help

Name Type
_preminer
address help

Properties

Visibility help public
Mutability help constant
Source Code
  function getPreminer(address _preminer) constant returns (address, bool, uint, uint, uint) {
    var preminer = preminers[_preminer];

    return (preminer.account, preminer.disabled, preminer.monthlyPayment, preminer.latestAllocation, preminer.allocationsCount);
  }

getPreminerAllocation keyboard_arrow_up

Parameters help

Name Type
_preminer
address help
_index
uint help

Properties

Visibility help public
Mutability help constant
Source Code
  function getPreminerAllocation(address _preminer, uint _index) constant returns (uint) {
    return preminers[_preminer].allocations[_index];
  }

releasePremine keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction

Modifiers help

whenAllocation checks for the following:
whenPreminerIsntDisabled checks for the following:

Requirements help

Source Code
  function releasePremine() whenAllocation(false) whenPreminerIsntDisabled(msg.sender) {
    var preminer = preminers[msg.sender];

    if (preminer.account == address(0)) {
      throw;
    }

    for (uint i = preminer.latestAllocation; i < preminer.allocationsCount; i++) {
      if (preminer.allocations[i] < block.timestamp) {
        if (preminer.allocations[i] == 0) {
          continue;
        }

        balances[preminer.account] = safeAdd(balances[preminer.account], preminer.monthlyPayment);
        preminer.latestAllocation = i;

        PREMINE_RELEASE(preminer.account, preminer.allocations[i], preminer.monthlyPayment);
        preminer.allocations[i] = 0;
      } else {
        break;
      }
    }
  }