Blockwell

AppCoins

ERC20

This contract is an ERC20 token.

Name AppCoins
Symbol APPC
Decimals 18
Total Supply 246,203,093 APPC

About link description

AppCoins is an open and distributed protocol for app stores based on the Ethereum blockchain and smart contracts. It redesigns app advertising, in-app purchases (IAP), and app approval flows through a circular model. As a higher share of the advertising and IAP revenue is kept within the app ecosystem, more value is retained in the app economy. Being an open protocol, it would theoretically provide more transparency and trust. Multiple app stores can implement and benefit from this and stakeholders will have to contribute to its development and adoption. Furthermore, API integration will streamline implementation. AppCoins integrates app stores, users, developers, advertisers, and OEMs. This system is app store agnostic, existing across different mobile platforms (Android & iOS). The different app stores act as oracles of the smart contracts, which are associated with each of the platform’s core transactions. This system creates a trust layer for the economy, obviating the need for intermediaries. AppCoins aims to become the universal language of the app economy. The protocol also includes a so-called Proof-of-Attention system. Users, app stores, and OEMs receive tokens through the Proof-of Attention concept as a reward. Developers that want to advertise their apps can be sure that the user has installed and used it. The users reinvest their tokens via inapp purchases and this would theoretically create a virtuous loop that boosts the AppCoins economic growth. - Link to the Source Code: https://github.com/AppStoreFoundation - Chat: https://t.me/appcoinsofficial - Announcement: https://medium.com/@appcoins - Source: Official website: https://appcoins.io

Stats

Public Functions 22
Event Types 9
Code Size 23,895 bytes

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

Burned Event

Parameters help
burner
address help
burnedAmount
uint help

Minted Event

Parameters help
receiver
address help
amount
uint help

MintingAgentChanged Event

Parameters help
addr
address help
state
bool help

OwnerReclaim Event

Parameters help
fromWhom
address help
amount
uint help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

UpdatedTokenInformation Event

Parameters help
newName
string help
newSymbol
string help

Upgrade Event

Parameters help
_from
address help
_to
address help
_value
uint256 help

UpgradeAgentSet Event

Parameters help
agent
address help

Functions Expand All Collapse All

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 (uint256 balance) {
    return balances[_owner];
  }

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
  function transfer(address _to, uint256 _value) returns (bool) {
    balances[msg.sender] = balances[msg.sender].sub(_value);
    balances[_to] = balances[_to].add(_value);
    Transfer(msg.sender, _to, _value);
    return true;
  }

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 (uint256 remaining) {
    return allowed[_owner][_spender];
  }

transferFrom keyboard_arrow_up

Parameters help

Name Type
_from
address help
_to
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction
Source Code
  function transferFrom(address _from, address _to, uint256 _value) returns (bool) {
    var _allowance = allowed[_from][msg.sender];

    // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met
    // require (_value <= _allowance);

    balances[_to] = balances[_to].add(_value);
    balances[_from] = balances[_from].sub(_value);
    allowed[_from][msg.sender] = _allowance.sub(_value);
    Transfer(_from, _to, _value);
    return true;
  }

approve keyboard_arrow_up

Parameters help

Name Type
_spender
address help
_value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

One or more of the following:
Source Code
  function approve(address _spender, uint256 _value) returns (bool) {

    // To change the approve amount you first have to reduce the addresses`
    //  allowance to zero by calling `approve(_spender, 0)` if it is not
    //  already 0 to mitigate the race condition described here:
    //  https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
    require((_value == 0) || (allowed[msg.sender][_spender] == 0));

    allowed[msg.sender][_spender] = _value;
    Approval(msg.sender, _spender, _value);
    return true;
  }

isToken keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
  function isToken() public constant returns (bool weAre) {
    return true;
  }

upgrade keyboard_arrow_up

Parameters help

Name Type
value
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
  function upgrade(uint256 value) public {

      UpgradeState state = getUpgradeState();
      if(!(state == UpgradeState.ReadyToUpgrade || state == UpgradeState.Upgrading)) {
        // Called in a bad state
        throw;
      }

      // Validate input value.
      if (value == 0) throw;

      balances[msg.sender] = balances[msg.sender].sub(value);

      // Take tokens out from circulation
      totalSupply = totalSupply.sub(value);
      totalUpgraded = totalUpgraded.add(value);

      // Upgrade agent reissues the tokens
      upgradeAgent.upgradeFrom(msg.sender, value);
      Upgrade(msg.sender, upgradeAgent, value);
  }

setUpgradeAgent keyboard_arrow_up

Parameters help

Name Type
agent
address help

Properties

Visibility help public
Mutability help transaction
Source Code
  function setUpgradeAgent(address agent) external {

      if(!canUpgrade()) {
        // The token is not yet in a state that we could think upgrading
        throw;
      }

      if (agent == 0x0) throw;
      // Only a master can designate the next agent
      if (msg.sender != upgradeMaster) throw;
      // Upgrade has already begun for an agent
      if (getUpgradeState() == UpgradeState.Upgrading) throw;

      upgradeAgent = UpgradeAgent(agent);

      // Bad interface
      if(!upgradeAgent.isUpgradeAgent()) throw;
      // Make sure that token supplies match in source and target
      if (upgradeAgent.originalSupply() != totalSupply) throw;

      UpgradeAgentSet(upgradeAgent);
  }

getUpgradeState keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
  function getUpgradeState() public constant returns(UpgradeState) {
    if(!canUpgrade()) return UpgradeState.NotAllowed;
    else if(address(upgradeAgent) == 0x00) return UpgradeState.WaitingForAgent;
    else if(totalUpgraded == 0) return UpgradeState.ReadyToUpgrade;
    else return UpgradeState.Upgrading;
  }

setUpgradeMaster keyboard_arrow_up

Parameters help

Name Type
master
address help

Properties

Visibility help public
Mutability help transaction
Source Code
  function setUpgradeMaster(address master) public {
      if (master == 0x0) throw;
      if (msg.sender != upgradeMaster) throw;
      upgradeMaster = master;
  }

canUpgrade keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help constant
Source Code
  function canUpgrade() public constant returns(bool) {
    return released && super.canUpgrade();
  }

transferOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
  function transferOwnership(address newOwner) onlyOwner {
    require(newOwner != address(0));      
    owner = newOwner;
  }

mint keyboard_arrow_up

Parameters help

Name Type
receiver
address help
amount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
  function mint(address receiver, uint amount) onlyMintAgent canMint public {
    totalSupply = totalSupply.plus(amount);
    balances[receiver] = balances[receiver].plus(amount);

    // This will make the mint transaction apper in EtherScan.io
    // We can remove this after there is a standardized minting event
    Transfer(0, receiver, amount);
  }

setMintAgent keyboard_arrow_up

Parameters help

Name Type
addr
address help
state
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
  function setMintAgent(address addr, bool state) onlyOwner canMint public {
    mintAgents[addr] = state;
    MintingAgentChanged(addr, state);
  }

setReleaseAgent keyboard_arrow_up

Parameters help

Name Type
addr
address help

Properties

Visibility help public
Mutability help transaction
Source Code
  function setReleaseAgent(address addr) onlyOwner inReleaseState(false) public {

    // We don't do interface check here as we might want to a normal wallet address to act as a release agent
    releaseAgent = addr;
  }

setTransferAgent keyboard_arrow_up

Parameters help

Name Type
addr
address help
state
bool help

Properties

Visibility help public
Mutability help transaction
Source Code
  function setTransferAgent(address addr, bool state) onlyOwner inReleaseState(false) public {
    transferAgents[addr] = state;
  }

releaseTokenTransfer keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
  function releaseTokenTransfer() public onlyReleaseAgent {
    mintingFinished = true;
    super.releaseTokenTransfer();
  }

transfer keyboard_arrow_up

Parameters help

Name Type
_to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction

Modifiers help

canTransfer checks for the following:
Source Code
  function transfer(address _to, uint _value) canTransfer(msg.sender) returns (bool success) {
    // Call StandardToken.transfer()
   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

canTransfer checks for the following:
Source Code
  function transferFrom(address _from, address _to, uint _value) canTransfer(_from) returns (bool success) {
    // Call StandardToken.transferForm()
    return super.transferFrom(_from, _to, _value);
  }

setTokenInformation keyboard_arrow_up

Parameters help

Name Type
_name
string help
_symbol
string help

Properties

Visibility help public
Mutability help transaction
Source Code
  function setTokenInformation(string _name, string _symbol) onlyOwner {
    name = _name;
    symbol = _symbol;

    UpdatedTokenInformation(name, symbol);
  }

burn keyboard_arrow_up

Parameters help

Name Type
burnAmount
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
  function burn(uint burnAmount) {
    address burner = msg.sender;
    balances[burner] = balances[burner].sub(burnAmount);
    totalSupply = totalSupply.sub(burnAmount);
    Burned(burner, burnAmount);

    // Inform the blockchain explores that track the
    // balances only by a transfer event that the balance in this
    // address has decreased
    Transfer(burner, BURN_ADDRESS, burnAmount);
  }

transferToOwner keyboard_arrow_up

Parameters help

Name Type
fromWhom
address help

Properties

Visibility help public
Mutability help transaction
Source Code
  function transferToOwner(address fromWhom) onlyOwner {
    if (released) revert();

    uint amount = balanceOf(fromWhom);
    balances[fromWhom] = balances[fromWhom].sub(amount);
    balances[owner] = balances[owner].add(amount);
    Transfer(fromWhom, owner, amount);
    OwnerReclaim(fromWhom, amount);
  }