Blockwell

Moeda Loyalty Points

ERC20

This contract is an ERC20 token.

Name Moeda Loyalty Points
Symbol MDA
Decimals 18
Total Supply 19,628,888 MDA

About link description

Moeda Loyalty Points (MDA) is a cryptocurrency and operates on the Ethereum platform. Moeda Loyalty Points has a current supply of 19,628,888. The last known price of Moeda Loyalty Points is 0.55270964 USD and is up 2.13 over the last 24 hours. It is currently trading on 5 active market(s) with $2,261,660.91 traded over the last 24 hours. More information can be found at https://moedaseeds.com/.

Stats

Public Functions 14
Event Types 6
Code Size 11,771 bytes

Events (6) keyboard_arrow_up

Approval Event

Parameters help
owner
address help
spender
address help
value
uint256 help

LogCreation Event

Parameters help
donor
address help
tokensReceived
uint256 help

LogDestruction Event

Parameters help
sender
address help
amount
uint256 help

LogMigration Event

Parameters help
spender
address help
grantee
address help
amount
uint256 help

LogMintingFinished Event

Parameters help

Transfer Event

Parameters help
from
address help
to
address help
value
uint256 help

name Constant

string help
Moeda Loyalty Points

symbol Constant

string help
MDA

decimals Constant

uint8 help
18

AGENT_MAGIC_ID Constant

uint256 help
0x6e538c0d750418aae4131a91e5a20363

TOKEN_MULTIPLIER Constant

uint help
UNKNOWN VALUE

MAX_TOKENS Constant

uint help

migrationAgent Variable

address help

totalMigrated Variable

uint256 help

mintingFinished Variable

bool help

totalSupply Variable

uint256 help

owner Variable

address help

allowed Variable

mapping(address => mapping(address => uint256)) help
Internal Variable

balances Variable

mapping(address => uint256) help
Internal Variable

Functions Expand All Collapse All

transferOwnership keyboard_arrow_up

Parameters help

Name Type
newOwner
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferOwnership(address newOwner) onlyOwner {
  if (newOwner != address(0)) {
    owner = newOwner;
  }
}

tokenFallback keyboard_arrow_up

Parameters help

Name Type
from_
address help
value_
uint256 help
data_
bytes help

Properties

Visibility help public
Mutability help transaction
Source Code
function tokenFallback(
  address from_,
  uint256 value_,
  bytes data_
) external {
  revert();
}

reclaimToken keyboard_arrow_up

Parameters help

Name Type
tokenAddr
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function reclaimToken(address tokenAddr) external onlyOwner {
  ERC20Basic tokenInst = ERC20Basic(tokenAddr);
  uint256 balance = tokenInst.balanceOf(this);
  tokenInst.transfer(owner, balance);
}

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];
}

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;
}

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];
}

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;
}

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;
}

setMigrationAgent keyboard_arrow_up

Parameters help

Name Type
agent
address help

Properties

Visibility help public
Mutability help transaction
Source Code
function setMigrationAgent(address agent) external onlyOwner afterMinting {
  require(agent != address(0) && isContract(agent));
  require(MigrationAgent(agent).MIGRATE_MAGIC_ID() == AGENT_MAGIC_ID);
  require(migrationAgent == address(0));
  migrationAgent = MigrationAgent(agent);
}

migrate keyboard_arrow_up

Parameters help

Name Type
beneficiary
address help
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Modifiers help

Source Code
function migrate(address beneficiary, uint256 amount) external afterMinting {
  require(beneficiary != address(0));
  require(migrationAgent != address(0));
  require(amount > 0);

  // safemath subtraction will throw if balance < amount
  balances[msg.sender] = balances[msg.sender].sub(amount);
  totalSupply = totalSupply.sub(amount);
  totalMigrated = totalMigrated.add(amount);
  migrationAgent.migrateTo(beneficiary, amount);

  LogMigration(msg.sender, beneficiary, amount);
}

burn keyboard_arrow_up

Parameters help

Name Type
amount
uint256 help

Properties

Visibility help public
Mutability help transaction

Requirements help

Source Code
function burn(uint256 amount) external {
  require(amount > 0);
  balances[msg.sender] = balances[msg.sender].sub(amount);
  totalSupply = totalSupply.sub(amount);

  LogDestruction(msg.sender, amount);
}

unlock keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help public
Mutability help transaction
Source Code
function unlock() external onlyOwner canMint {
  mintingFinished = true;
  LogMintingFinished();
}

Parameters help

Name Type
to
address help
_value
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transfer(address to, uint256 _value)
  public
  canTransfer(to)
  returns (bool)
{
  return super.transfer(to, _value);
}

Parameters help

Name Type
from
address help
to
address help
value
uint help

Properties

Visibility help public
Mutability help transaction
Source Code
function transferFrom(
  address from,
  address to,
  uint256 value
) public canTransfer(to) returns (bool) {
  return super.transferFrom(from, to, value);
}

Internal Functions Expand All Collapse All

Internal functions are parts of the contract that can't be used directly, but instead are used by the public functions listed above.

internal MoedaToken.issueTokens keyboard_arrow_up

Parameters help

This function has no parameters.

Properties

Visibility help internal
Mutability help transaction

Requirements help

Source Code
function issueTokens() internal {
  mint(0x2f37be861699b6127881693010596B4bDD146f5e, MAX_TOKENS);
}

internal MoedaToken.isContract keyboard_arrow_up

Parameters help

Name Type
addr
address help

Properties

Visibility help internal
Mutability help constant
Source Code
function isContract(address addr) internal constant returns (bool) {
  uint256 size;
  assembly {
    size := extcodesize(addr)
  }
  return size > 0;
}

internal MoedaToken.mint keyboard_arrow_up

Parameters help

Name Type
recipient
address help
amount
uint256 help

Properties

Visibility help internal
Mutability help transaction

Modifiers help

Requirements help

Source Code
function mint(address recipient, uint256 amount) internal canMint {
  require(amount > 0);
  require(totalSupply.add(amount) <= MAX_TOKENS);

  balances[recipient] = balances[recipient].add(amount);
  totalSupply = totalSupply.add(amount);

  LogCreation(recipient, amount);
}