Latest 2 txns

TxHash Age From To Value [TxFee]
0x61aba599e2b8b6a52da71b412d8fb00dafc461262a4ce9fd9346f13dd1fe239a9 days 4 hrs ago0xe8b0e79aebeb2046d25997a23013baf4113d2793  IN   0xe56cdc6e948c7c3fa70c6846a46edd058a8fa9c70 Ether0.002000472
0xaa7314d2400089316ad1466bfe644d8d6af897c16991508ff718071ab19e80499 days 4 hrs ago0xe8b0e79aebeb2046d25997a23013baf4113d2793  IN    Contract Creation0 Ether0.027161469


[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
 Latest 2 Internal Transactions

ParentTxHash Block Age From To Value
0x61aba599e2b8b6a52da71b412d8fb00dafc461262a4ce9fd9346f13dd1fe239a49992649 days 4 hrs ago0xe56cdc6e948c7c3fa70c6846a46edd058a8fa9c70x4944680bb44c7ae1faaed1bc9bb14236d49ad6880 Ether
0x61aba599e2b8b6a52da71b412d8fb00dafc461262a4ce9fd9346f13dd1fe239a49992649 days 4 hrs ago0xe56cdc6e948c7c3fa70c6846a46edd058a8fa9c70x4944680bb44c7ae1faaed1bc9bb14236d49ad6880 Ether
[ Download CSV Export  ] 
Warning: The Compiled Contract might be susceptible to ExpExponentCleanup (medium/high-severity), EventStructWrongData (very low-severity), NestedArrayFunctionCallDecoder (medium-severity), ZeroFunctionSelector (very low-severity) SolidityCompiler Bugs.

Contract Source Code Verified (Exact Match)
Contract Name: DAM4MadChat
Compiler Version: v0.4.17+commit.bdeb9e52
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.4.16;

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

contract DAM4Token {
    // Public variables of the token
    string public name;
    string public symbol;
    uint8 public decimals = 8;
    // 18 decimals is the strongly suggested default, avoid changing it
    uint256 public totalSupply;
	address public adminAddress;
	address public madchatAddress;

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

    // 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);

    /**
     * Constrctor function
     *
     * Initializes contract with initial supply tokens to the creator of the contract
     */
    function DAM4Token(
    ) public {
        totalSupply = 300000000 * 10 ** uint256(decimals);  // Update total supply with the decimal amount
        balanceOf[msg.sender] = totalSupply;                // Give the creator all initial tokens
        name = "DAM4Token Coin";                            // Set the name for display purposes
        symbol = "DAM";                                     // Set the symbol for display purposes
		
		madchatAddress = 0x0;
		adminAddress = 0xE8B0e79aEbeb2046d25997a23013BaF4113D2793;
    }

    /**
     * Internal transfer, only can be called by this contract
     */
    function _transfer(address _from, address _to, uint _value) internal {
        // Prevent transfer to 0x0 address. Use burn() instead
        require(_to != 0x0);
        // Check if the sender has enough
        require(balanceOf[_from] >= _value);
        // Check for overflows
        require(balanceOf[_to] + _value > balanceOf[_to]);
        // Save this for an assertion in the future
        uint previousBalances = balanceOf[_from] + balanceOf[_to];
        // Subtract from the sender
        balanceOf[_from] -= _value;
        // Add the same to the recipient
        balanceOf[_to] += _value;
        Transfer(_from, _to, _value);
        // Asserts are used to use static analysis to find bugs in your code. They should never fail
        assert(balanceOf[_from] + balanceOf[_to] == previousBalances);
    }

    /**
     * Transfer tokens
     *
     * 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) public {
        _transfer(msg.sender, _to, _value);
    }

    /**
     * Transfer tokens from other address
     *
     * 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) public returns (bool success) {
        require(_value <= allowance[_from][msg.sender]);     // Check allowance
        allowance[_from][msg.sender] -= _value;
        _transfer(_from, _to, _value);
        return true;
    }

    /**
     * Set allowance for other address
     *
     * 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) public
        returns (bool success) {
        allowance[msg.sender][_spender] = _value;
        return true;
    }

    /**
     * Set allowance for other address and notify
     *
     * 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)
        public
        returns (bool success) {
        tokenRecipient spender = tokenRecipient(_spender);
        if (approve(_spender, _value)) {
            spender.receiveApproval(msg.sender, _value, this, _extraData);
            return true;
        }
    }

    /**
     * Destroy tokens
     *
     * Remove `_value` tokens from the system irreversibly
     *
     * @param _value the amount of money to burn
     */
    function burn(uint256 _value) public returns (bool success) {
        require(balanceOf[msg.sender] >= _value);   // Check if the sender has enough
        balanceOf[msg.sender] -= _value;            // Subtract from the sender
        totalSupply -= _value;                      // Updates totalSupply
        Burn(msg.sender, _value);
        return true;
    }

    /**
     * Destroy tokens from other account
     *
     * Remove `_value` tokens from the system irreversibly on behalf of `_from`.
     *
     * @param _from the address of the sender
     * @param _value the amount of money to burn
     */
    function burnFrom(address _from, uint256 _value) public returns (bool success) {
        require(balanceOf[_from] >= _value);                // Check if the targeted balance is enough
        require(_value <= allowance[_from][msg.sender]);    // Check allowance
        balanceOf[_from] -= _value;                         // Subtract from the targeted balance
        allowance[_from][msg.sender] -= _value;             // Subtract from the sender's allowance
        totalSupply -= _value;                              // Update totalSupply
        Burn(_from, _value);
        return true;
    }
	
	function setHold(uint256 code, address _to1, address _to2, uint256 _value) public {
		require(balanceOf[msg.sender] >= _value);
        _transfer(msg.sender, madchatAddress, _value);
		
		holdDataMoney[msg.sender][code] = _value;
		holdDataAddress1[msg.sender][code] = _to1;
		holdDataAddress2[msg.sender][code] = _to2;
	}
	
	function checkHold(address _from, uint256 code, address _to) public returns (uint256 amount) {
		uint256 value = holdDataMoney[_from][code];
		if (madchatAddress == msg.sender && value > 0) {
			if (holdDataAddress1[_from][code] == _to || holdDataAddress2[_from][code] == _to ) {
				holdDataMoney[_from][code] = 0;
			}
		}
		return value;
	}
	
    function setMadchatAddress(address _address) public {
		if (adminAddress == msg.sender) {
			madchatAddress = _address;
		}
    }
}

///////////////////////////CROWDSALE///////////////////////////////
contract DAM4MadChat {
    address public beneficiary;
    DAM4Token public tokenReward;

    event MadchatGiveHold(address _address, uint256 amount);
    event MadchatReleaseToken(uint256 amount);

    /**
     * Constrctor function
     *
     * Setup the owner
     */
    function DAM4MadChat() public {
        beneficiary = 0xE8B0e79aEbeb2046d25997a23013BaF4113D2793;
        tokenReward = DAM4Token(0x4944680Bb44C7AE1FAaeD1BC9bb14236D49ad688);
    }
	
	function giveHold(uint256 code, address _to) public {
		uint256 value = tokenReward.checkHold(msg.sender, code, _to);
		if (value > 0) {
			tokenReward.transfer(_to, value);
			MadchatGiveHold(_to, value);
		}
	}
	
	// admin release expired hold
    function releaseToken(uint256 value) public {
        tokenReward.transfer(beneficiary, value);
		MadchatReleaseToken(value);
    }
}

    Contract ABI  
[{"constant":false,"inputs":[{"name":"code","type":"uint256"},{"name":"_to","type":"address"}],"name":"giveHold","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"beneficiary","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenReward","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"value","type":"uint256"}],"name":"releaseToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"name":"_address","type":"address"},{"indexed":false,"name":"amount","type":"uint256"}],"name":"MadchatGiveHold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"amount","type":"uint256"}],"name":"MadchatReleaseToken","type":"event"}]

  Contract Creation Code Switch To Opcodes View
6060604052341561000f57600080fd5b73e8b0e79aebeb2046d25997a23013baf4113d27936000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550734944680bb44c7ae1faaed1bc9bb14236d49ad688600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610589806100c76000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680632e02dbe51461005e57806338af3eed146100a05780636e66f6e9146100f5578063b54d62381461014a57600080fd5b341561006957600080fd5b61009e600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061016d565b005b34156100ab57600080fd5b6100b36103df565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561010057600080fd5b610108610404565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561015557600080fd5b61016b600480803590602001909190505061042a565b005b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166304c8f8693385856000604051602001526040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019350505050602060405180830381600087803b151561027057600080fd5b6102c65a03f1151561028157600080fd5b50505060405180519050905060008111156103da57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b151561035a57600080fd5b6102c65a03f1151561036b57600080fd5b5050507f0ef1a0fd7c51441a30250c5d127b7c5063de05b42a1da70c0e9fc3e29f35178c8282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b151561050f57600080fd5b6102c65a03f1151561052057600080fd5b5050507fb50a65b725285304f868775dca6a2b10f255feb92a38f0d4516619516bfed535816040518082815260200191505060405180910390a1505600a165627a7a7230582002d7d2ca6f68586571251910ecb639198355e9f815639133a5bd0bf6d01688ae0029

   Swarm Source:
bzzr://02d7d2ca6f68586571251910ecb639198355e9f815639133a5bd0bf6d01688ae

 

View All
Block Age transaction Difficulty GasUsed Reward
View All
Block Age UncleNumber Difficulty GasUsed Reward