Token Cacao Shares

 

Overview [ERC-20]

Max Total Supply:
100,000,000 CCS

Holders:
208

Transfers:
-

 
Loading
[ Download CSV Export  ] 
Loading
[ Download CSV Export  ] 
Loading

OVERVIEW

CacaoShares acts as a bridge between small-scale producers, empowering them with technology to conquer global markets. Looking at fair trade, better prices, and better ethical choices for consumers as well as a balanced source of value for Token Holders.

# Exchange Pair Price  24H Volume % Volume
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
AssetCCS

Compiler Version
v0.4.19+commit.c4cbbb05

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
/**
 *Submitted for verification at Etherscan.io on 2018-01-30
*/

pragma solidity 0.4.19;
/**
* @title Cacao Shares TOKEN
* @dev ERC-20 Token Standard Compliant
* @notice Contact [email protected]
* @author Fares A. Akel C.
* ================================================
* CACAO SHARES IS A DIGITAL ASSET
* THAT ENABLES ANYONE TO OWN CACAO TREES
* OF THE CRIOLLO TYPE IN SUR DEL LAGO, VENEZUELA
* ================================================
*/

/**
 * @title SafeMath by OpenZeppelin (partially)
 * @dev Math operations with safety checks that throw on error
 */
library SafeMath {

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        assert(b <= a);
        return a - b;
    }

    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        assert(c >= a);
        return c;
    }

}
/**
 * Token contract interface for external use
 */
contract ERC20TokenInterface {

    function balanceOf(address _owner) public constant returns (uint256 value);
    function transfer(address _to, uint256 _value) public returns (bool success);
    function transferFrom(address _from, address _to, uint256 _value) public returns (bool success);
    function approve(address _spender, uint256 _value) public returns (bool success);
    function allowance(address _owner, address _spender) public constant returns (uint256 remaining);

    }


/**
* @title Admin parameters
* @dev Define administration parameters for this contract
*/
contract admined { //This token contract is administered
    address public admin; //Admin address is public
    bool public lockTransfer; //Transfer Lock flag
    address public allowedAddress; //an address that can override lock condition

    /**
    * @dev Contract constructor
    * define initial administrator
    */
    function admined() internal {
        admin = msg.sender; //Set initial admin to contract creator
        allowedAddress = msg.sender; //Set initial allowed to contract creator
        Admined(admin);
        AllowedSet(allowedAddress);
    }

    modifier onlyAdmin() { //A modifier to define admin-only functions
        require(msg.sender == admin);
        _;
    }

    modifier transferLock() { //A modifier to lock transactions
        require(lockTransfer == false || allowedAddress == msg.sender);
        _;
    }

   /**
    * @dev Function to set an allowed address
    * @param _to The address to give privileges.
    */
    function setAllowedAddress(address _to) onlyAdmin public {
        allowedAddress = _to;
        AllowedSet(_to);
    }

   /**
    * @dev Function to set new admin address
    * @param _newAdmin The address to transfer administration to
    */
    function transferAdminship(address _newAdmin) onlyAdmin public { //Admin can be transfered
        require(_newAdmin != address(0)); //Prevent zero address transactions
        admin = _newAdmin;
        TransferAdminship(admin);
    }

   /**
    * @dev Function to unlock transfers
    * @notice It's only possible to unlock the transfers
    */
    function setTransferLockFree() onlyAdmin public {
        require(lockTransfer == true);// only if it's locked
        lockTransfer = false;
        SetTransferLock(lockTransfer);
    }

    //All admin actions have a log for public review
    event AllowedSet(address _to);
    event SetTransferLock(bool _set);
    event TransferAdminship(address newAdminister);
    event Admined(address administer);

}

/**
* @title Token definition
* @dev Define token parameters including ERC20 ones
*/
contract ERC20Token is ERC20TokenInterface, admined { //Standard definition of a ERC20Token
    using SafeMath for uint256;
    uint256 public totalSupply;
    mapping (address => uint256) balances; //A mapping of all balances per address
    mapping (address => mapping (address => uint256)) allowed; //A mapping of all allowances

    /**
    * @dev Get the balance of an specified address.
    * @param _owner The address to be query.
    */
    function balanceOf(address _owner) public constant returns (uint256 value) {
      return balances[_owner];
    }

    /**
    * @dev transfer token to a specified address
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    */
    function transfer(address _to, uint256 _value) transferLock public returns (bool success) {
        require(_to != address(0)); //Prevent zero address transactions
        balances[msg.sender] = balances[msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        Transfer(msg.sender, _to, _value);
        return true;
    }

    /**
    * @dev transfer token from an address to another specified address using allowance
    * @param _from The address where token comes.
    * @param _to The address to transfer to.
    * @param _value The amount to be transferred.
    */
    function transferFrom(address _from, address _to, uint256 _value) transferLock public returns (bool success) {
        require(_to != address(0)); //Prevent zero address transactions
        balances[_from] = balances[_from].sub(_value);
        allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value);
        balances[_to] = balances[_to].add(_value);
        Transfer(_from, _to, _value);
        return true;
    }

    /**
    * @dev Assign allowance to an specified address to use the owner balance
    * @param _spender The address to be allowed to spend.
    * @param _value The amount to be allowed.
    */
    function approve(address _spender, uint256 _value) public returns (bool success) {
        require(_value == 0 || allowed[msg.sender][_spender] == 0); //Mitigation to possible attack on approve and transferFrom functions
        allowed[msg.sender][_spender] = _value;
        Approval(msg.sender, _spender, _value);
        return true;
    }

    /**
    * @dev Get the allowance of an specified address to use another address balance.
    * @param _owner The address of the owner of the tokens.
    * @param _spender The address of the allowed spender.
    */
    function allowance(address _owner, address _spender) public constant returns (uint256 remaining) {
        return allowed[_owner][_spender];
    }

    /**
    * @dev Log Events
    */
    event Transfer(address indexed _from, address indexed _to, uint256 _value);
    event Approval(address indexed _owner, address indexed _spender, uint256 _value);
}

/**
* @title AssetCCS
* @dev Initial CCS supply creation
*/
contract AssetCCS is ERC20Token {
    
    string public name = 'Cacao Shares';
    uint8 public decimals = 18;
    string public symbol = 'CCS';
    string public version = '1';

    function AssetCCS() public {
        
        totalSupply = 100000000 * (10**uint256(decimals)); //100 million total token creation
        balances[msg.sender] = totalSupply;

        /**
        * This token is locked for transfers until the 90th day after ICO ending,
        * the measure is globally applied, the only address able to transfer is the single
        * allowed address. During ICO period, allowed address will be ICO address.
        */
        lockTransfer = true;
        SetTransferLock(lockTransfer);

        Transfer(0, this, totalSupply);
        Transfer(this, msg.sender, balances[msg.sender]);
    
    }
    
    /**
    *@dev Function to handle callback calls
    */
    function() public {
        revert();
    }
}

Contract Security Audit

Contract ABI

[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_spender","type":"address"},{"name":"_value","type":"uint256"}],"name":"approve","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"lockTransfer","outputs":[{"name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_to","type":"address"}],"name":"setAllowedAddress","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"_from","type":"address"},{"name":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"name":"success","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":"allowedAddress","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"setTransferLockFree","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"version","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"_newAdmin","type":"address"}],"name":"transferAdminship","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"value","type":"uint256"}],"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":"_to","type":"address"},{"name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"name":"success","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"name":"_owner","type":"address"},{"name":"_spender","type":"address"}],"name":"allowance","outputs":[{"name":"remaining","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":false,"stateMutability":"nonpayable","type":"fallback"},{"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"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_to","type":"address"}],"name":"AllowedSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_set","type":"bool"}],"name":"SetTransferLock","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"newAdminister","type":"address"}],"name":"TransferAdminship","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"administer","type":"address"}],"name":"Admined","type":"event"}]

606060405260408051908101604052600c81527f436163616f2053686172657300000000000000000000000000000000000000006020820152600590805161004b9291602001906102ae565b506006805460ff1916601217905560408051908101604052600381527f4343530000000000000000000000000000000000000000000000000000000000602082015260079080516100a09291602001906102ae565b5060408051908101604052600181527f3100000000000000000000000000000000000000000000000000000000000000602082015260089080516100e89291602001906102ae565b5034156100f457600080fd5b60008054600160a060020a03338116600160a060020a031992831681179384905560018054909316179091557fa2b0867ddc9434a6620c27aae2ee7b19d3db53f3e7f059bdbecc3f2091e24f779116604051600160a060020a03909116815260200160405180910390a16001547f742e2ebd0014f6b28dbbce00d10b8f4f4a46f5b69d9a6224c87d0e733a8d997790600160a060020a0316604051600160a060020a03909116815260200160405180910390a16006546305f5e10060ff918216600a0a026002819055600160a060020a03331660009081526003602052604080822092909255805460a060020a60ff02191674010000000000000000000000000000000000000000908117918290557ff33f8ef436f631648b30f6761d8d417b93dc359444a28c3d5c5bdb05c10edc16939104169051901515815260200160405180910390a130600160a060020a03166000600080516020610dc383398151915260025460405190815260200160405180910390a3600160a060020a0333811660008181526003602052604090819020549192301691600080516020610dc3833981519152915190815260200160405180910390a3610349565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106102ef57805160ff191683800117855561031c565b8280016001018555821561031c579182015b8281111561031c578251825591602001919060010190610301565b5061032892915061032c565b5090565b61034691905b808211156103285760008155600101610332565b90565b610a6b806103586000396000f3006060604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f5578063095ea7b31461017f57806318160ddd146101b55780631a9aea0a146101da5780631b8fc2f0146101ed57806323b872dd1461020e578063313ce567146102365780634cf781701461025f5780634de504cd1461028e57806354fd4d50146102a15780635be7cc16146102b457806370a08231146102d357806395d89b41146102f2578063a9059cbb14610305578063dd62ed3e14610327578063f851a4401461034c575b34156100f057600080fd5b600080fd5b341561010057600080fd5b61010861035f565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561014457808201518382015260200161012c565b50505050905090810190601f1680156101715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018a57600080fd5b6101a1600160a060020a03600435166024356103fd565b604051901515815260200160405180910390f35b34156101c057600080fd5b6101c86104a3565b60405190815260200160405180910390f35b34156101e557600080fd5b6101a16104a9565b34156101f857600080fd5b61020c600160a060020a03600435166104b9565b005b341561021957600080fd5b6101a1600160a060020a036004358116906024351660443561053c565b341561024157600080fd5b610249610697565b60405160ff909116815260200160405180910390f35b341561026a57600080fd5b6102726106a0565b604051600160a060020a03909116815260200160405180910390f35b341561029957600080fd5b61020c6106af565b34156102ac57600080fd5b610108610746565b34156102bf57600080fd5b61020c600160a060020a03600435166107b1565b34156102de57600080fd5b6101c8600160a060020a0360043516610850565b34156102fd57600080fd5b61010861086b565b341561031057600080fd5b6101a1600160a060020a03600435166024356108d6565b341561033257600080fd5b6101c8600160a060020a03600435811690602435166109dd565b341561035757600080fd5b610272610a08565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103f55780601f106103ca576101008083540402835291602001916103f5565b820191906000526020600020905b8154815290600101906020018083116103d857829003601f168201915b505050505081565b600081158061042f5750600160a060020a03338116600090815260046020908152604080832093871683529290522054155b151561043a57600080fd5b600160a060020a03338116600081815260046020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60025481565b60005460a060020a900460ff1681565b60005433600160a060020a039081169116146104d457600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790557f742e2ebd0014f6b28dbbce00d10b8f4f4a46f5b69d9a6224c87d0e733a8d997781604051600160a060020a03909116815260200160405180910390a150565b6000805460a060020a900460ff161580610564575060015433600160a060020a039081169116145b151561056f57600080fd5b600160a060020a038316151561058457600080fd5b600160a060020a0384166000908152600360205260409020546105ad908363ffffffff610a1716565b600160a060020a03808616600090815260036020908152604080832094909455600481528382203390931682529190915220546105f0908363ffffffff610a1716565b600160a060020a0380861660009081526004602090815260408083203385168452825280832094909455918616815260039091522054610636908363ffffffff610a2916565b600160a060020a03808516600081815260036020526040908190209390935591908616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60065460ff1681565b600154600160a060020a031681565b60005433600160a060020a039081169116146106ca57600080fd5b60005460a060020a900460ff1615156001146106e557600080fd5b6000805474ff00000000000000000000000000000000000000001916908190557ff33f8ef436f631648b30f6761d8d417b93dc359444a28c3d5c5bdb05c10edc169060a060020a900460ff16604051901515815260200160405180910390a1565b60088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103f55780601f106103ca576101008083540402835291602001916103f5565b60005433600160a060020a039081169116146107cc57600080fd5b600160a060020a03811615156107e157600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383811691909117918290557f4f2723059e5730f1d4ffa943789d401722067ca1121b828944c6965dbd303e089116604051600160a060020a03909116815260200160405180910390a150565b600160a060020a031660009081526003602052604090205490565b60078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156103f55780601f106103ca576101008083540402835291602001916103f5565b6000805460a060020a900460ff1615806108fe575060015433600160a060020a039081169116145b151561090957600080fd5b600160a060020a038316151561091e57600080fd5b600160a060020a033316600090815260036020526040902054610947908363ffffffff610a1716565b600160a060020a03338116600090815260036020526040808220939093559085168152205461097c908363ffffffff610a2916565b600160a060020a0380851660008181526003602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b600054600160a060020a031681565b600082821115610a2357fe5b50900390565b600082820183811015610a3857fe5b93925050505600a165627a7a72305820ed836a1b4007d2651e53a9e816ab6941bff0699bc70d00efcbeeeeb121fe92e10029ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

Swarm Source

bzzr://ed836a1b4007d2651e53a9e816ab6941bff0699bc70d00efcbeeeeb121fe92e1

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.