Oko contract explorer
Contract

Code for 0x391f…f981 (EighthContinentSocialMarketplaceToken)

Since block 4197542

Verified contract

/*
 * 8th Continent Social Marketplace Token Smart Contract. Owner Seventh
 * Continent Ltd. Company number: 07288379, UK  
 */

/*
 * ERC-20 Standard Token Smart Contract Interface.
 */

pragma solidity ^0.4.13;

contract tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData); }

contract EighthContinentSocialMarketplaceToken {
    /* Public variables of the token */
    string public name;
    string public symbol;
    uint8 public decimals;
    uint256 public totalSupply;

    /* This creates an array with all balances */
    mapping (address => uint256) public balanceOf;
    mapping (address => mapping (address => uint256)) public allowance;

    /* This generates a public event on the blockchain that will notify clients */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /* This notifies clients about the amount burnt */
    event Burn(address indexed from, uint256 value);

    /* Initializes contract with initial supply tokens to the creator of the contract */
    function EighthContinentSocialMarketplaceToken(
        uint256 initialSupply,
        string tokenName,
        uint8 decimalUnits,
        string tokenSymbol
        ) {
        balanceOf[msg.sender] = initialSupply;              // Give the creator all initial tokens
        totalSupply = initialSupply;                        // Update total supply
        name = tokenName;                                   // Set the name for display purposes
        symbol = tokenSymbol;                               // Set the symbol for display purposes
        decimals = decimalUnits;                            // Amount of decimals for display purposes
    }

    /* Internal transfer, only can be called by this contract */
    function _transfer(address _from, address _to, uint _value) internal {
        require (_to != 0x0);                               // Prevent transfer to 0x0 address. Use burn() instead
        require (balanceOf[_from] > _value);                // Check if the sender has enough
        require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows
        balanceOf[_from] -= _value;                         // Subtract from the sender
        balanceOf[_to] += _value;                            // Add the same to the recipient
        Transfer(_from, _to, _value);
    }

    /// @notice Send `_value` tokens to `_to` from your account
    /// @param _to The address of the recipient
    /// @param _value the amount to send
    function transfer(address _to, uint256 _value) {
        _transfer(msg.sender, _to, _value);
    }

    /// @notice Send `_value` tokens to `_to` in behalf of `_from`
    /// @param _from The address of the sender
    /// @param _to The address of the recipient
    /// @param _value the amount to send
    function transferFrom(address _from, address _to, uint256 _value) returns (bool success) {
        require (_value < allowance[_from][msg.sender]);     // Check allowance
        allowance[_from][msg.sender] -= _value;
        _transfer(_from, _to, _value);
        return true;
    }

    /// @notice Allows `_spender` to spend no more than `_value` tokens in your behalf
    /// @param _spender The address authorized to spend
    /// @param _value the max amount they can spend
    function approve(address _spender, uint256 _value)
        returns (bool success) {
        allowance[msg.sender][_spender] = _value;
        return true;
    }

    /// @notice Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it
    /// @param _spender The address authorized to spend
    /// @param _value the max amount they can spend
    /// @param _extraData some extra information to send to the approved contract
    function approveAndCall(address _spender, uint256 _value, bytes _extraData)
        returns (bool success) {
        tokenRecipient spender = tokenRecipient(_spender);
        if (approve(_spender, _value)) {
            spender.receiveApproval(msg.sender, _value, this, _extraData);
            return true;
        }
    }  
}

Contract sourced from Etherscan. Solidity version v0.4.13+commit.fb4cb1a.

Panoramix decompilation

# Palkeoramix decompiler. 

def storage:
  name is array of uint256 at storage 0
  symbol is array of uint256 at storage 1
  decimals is uint8 at storage 2
  totalSupply is uint256 at storage 3
  balanceOf is mapping of uint256 at storage 4
  allowance is mapping of uint256 at storage 5

def name(): # not payable
  return name[0 len name.length]

def totalSupply(): # not payable
  return totalSupply

def decimals(): # not payable
  return decimals

def balanceOf(address account): # not payable
  return balanceOf[account]

def symbol(): # not payable
  return symbol[0 len symbol.length]

def allowance(address owner, address spender): # not payable
  return allowance[owner][spender]

#
#  Regular functions
#

def _fallback(?) payable: # default function
  revert

def approve(address spender, uint256 amount): # not payable
  allowance[caller][address(spender)] = amount
  return 1

def transfer(address recipient, uint256 amount): # not payable
  require recipient
  require balanceOf[caller] > amount
  require balanceOf[address(recipient)] + amount > balanceOf[address(recipient)]
  balanceOf[caller] -= amount
  balanceOf[recipient] += amount
  log Transfer(
        address from=amount,
        address to=caller,
        uint256 value=recipient)

def approveAndCall(address _spender, uint256 _value, bytes _extraData): # not payable
  allowance[caller][address(_spender)] = _value
  require ext_code.size(_spender)
  call _spender.receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) with:
       gas gas_remaining - 710 wei
      args caller, _value, address(this.address), Array(len=_extraData.length, data=_extraData[all])
  require ext_call.success
  return 1

def transferFrom(address sender, address recipient, uint256 amount): # not payable
  require amount < allowance[address(sender)][caller]
  allowance[address(sender)][caller] -= amount
  require recipient
  require balanceOf[address(sender)] > amount
  require balanceOf[address(recipient)] + amount > balanceOf[address(recipient)]
  balanceOf[address(sender)] -= amount
  balanceOf[recipient] += amount
  log Transfer(
        address from=amount,
        address to=sender,
        uint256 value=recipient)
  return 1

Decompilation generated by Panoramix.

Raw bytecode

0x606060405236156100a15763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100a6578063095ea7b31461013157806318160ddd1461016757806323b872dd1461018c578063313ce567146101c857806370a08231146101f157806395d89b4114610222578063a9059cbb146102ad578063cae9ca51146102d1578063dd62ed3e1461034a575b600080fd5b34156100b157600080fd5b6100b9610381565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100f65780820151818401525b6020016100dd565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013c57600080fd5b610153600160a060020a036004351660243561041f565b604051901515815260200160405180910390f35b341561017257600080fd5b61017a610450565b60405190815260200160405180910390f35b341561019757600080fd5b610153600160a060020a0360043581169060243516604435610456565b604051901515815260200160405180910390f35b34156101d357600080fd5b6101db6104cd565b60405160ff909116815260200160405180910390f35b34156101fc57600080fd5b61017a600160a060020a03600435166104d6565b60405190815260200160405180910390f35b341561022d57600080fd5b6100b96104e8565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156100f65780820151818401525b6020016100dd565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102b857600080fd5b6102cf600160a060020a0360043516602435610586565b005b34156102dc57600080fd5b61015360048035600160a060020a03169060248035919060649060443590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965061059695505050505050565b604051901515815260200160405180910390f35b341561035557600080fd5b61017a600160a060020a03600435811690602435166106ca565b60405190815260200160405180910390f35b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104175780601f106103ec57610100808354040283529160200191610417565b820191906000526020600020905b8154815290600101906020018083116103fa57829003601f168201915b505050505081565b600160a060020a03338116600090815260056020908152604080832093861683529290522081905560015b92915050565b60035481565b600160a060020a03808416600090815260056020908152604080832033909416835292905290812054821061048a57600080fd5b600160a060020a03808516600090815260056020908152604080832033909416835292905220805483900390556104c28484846106e7565b5060015b9392505050565b60025460ff1681565b60046020526000908152604090205481565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104175780601f106103ec57610100808354040283529160200191610417565b820191906000526020600020905b8154815290600101906020018083116103fa57829003601f168201915b505050505081565b6105913383836106e7565b5b5050565b6000836105a3818561041f565b156106c15780600160a060020a0316638f4ffcb1338630876040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561065a5780820151818401525b602001610641565b50505050905090810190601f1680156106875780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15156106a857600080fd5b6102c65a03f115156106b957600080fd5b505050600191505b5b509392505050565b600560209081526000928352604080842090915290825290205481565b600160a060020a03821615156106fc57600080fd5b600160a060020a03831660009081526004602052604090205481901161072157600080fd5b600160a060020a0382166000908152600460205260409020548181011161074757600080fd5b600160a060020a038084166000818152600460205260408082208054869003905592851680825290839020805485019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9084905190815260200160405180910390a35b5050505600a165627a7a72305820839544a937621192afcf5b0d0233887cc6d0da2f0e31ecdc8784f377dd94a31f0029