Latest 2 txns

TxHash Age From To Value [TxFee]
0x1192eb7cf256071e5b863c3d8ad36361f30afde87d16c8ee42d8fa28f7f4a0469 days 1 hr ago0x5f1331f6e1d7ed4adbc91b70fe4f12984865bd35  IN   0x793331e0b5a5a9c4b392092f60ccc692dcee18970 Ether0.000271216
0x91d666fa14846526b4588283238298956106d60d1e487e7c18881e724958d7a79 days 1 hr ago0x5f1331f6e1d7ed4adbc91b70fe4f12984865bd35  IN    Contract Creation0 Ether0.003894594


[ Download CSV Export  ] 
 Internal Transactions as a result of Contract Execution
View All
ParentTxHash Block Age From To Value
Contract Source Code Verified (Exact Match)
Contract Name: ERC20
Compiler Version: v0.5.3+commit.10d17f24
Optimization Enabled: No
Runs (Optimiser):  200



  Contract Source Code   Find Similiar Contracts

pragma solidity ^0.5.2;

library SafeMath {
    /**
     * @dev Multiplies two unsigned integers, reverts on overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
        // benefit is lost if 'b' is also tested.
        // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b);

        return c;
    }

    /**
     * @dev Integer division of two unsigned integers truncating the quotient, reverts on division by zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        // Solidity only automatically asserts when dividing by 0
        require(b > 0);
        uint256 c = a / b;
        // assert(a == b * c + a % b); // There is no case in which this doesn't hold

        return c;
    }

    /**
     * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend).
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a);
        uint256 c = a - b;

        return c;
    }

    /**
     * @dev Adds two unsigned integers, reverts on overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 c = a + b;
        require(c >= a);

        return c;
    }

    /**
     * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo),
     * reverts when dividing by zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b != 0);
        return a % b;
    }
} 

/**
 * @title Standard ERC20 token
 *
 * @dev Implementation of the basic standard token.
 * 
 */
 
contract ERC20  {
    
    using SafeMath for uint256;

    mapping (address => uint256) private _balances;

    mapping (address => mapping (address => uint256)) private _allowed;

    uint256 private _totalSupply;

    string public constant name = "Le token de l'amour";

    string public constant symbol = "STVALENTIN";
    
    address adrienOwner;
    
    constructor() public {
        /* Car l'amour il y en a plein */
        adrienOwner = msg.sender;
        _mint(adrienOwner,15022019); /* Comprendra qui pourra */
    }

    /**
     *   Bon allez on va coder une fonction pour donner
     *   de l'amour à qui souhaite
     */
    function getSomeLove() public returns(string memory){
         /* 1 donné par transaction faut pas déconner non plus */
        if(balanceOf(adrienOwner) >= 1) {
           _transfer(adrienOwner, msg.sender, 1);
           return "Voici un peu d'amour pour toi";
        }
        else {
            return "Je n'ai plus rien à offrir :'(";
        }
    }
    
    function giveSomeLove() public returns(string memory){
        _transfer(msg.sender, adrienOwner, 1);
        return "Merci <3";
    }


    /**
     * @dev Total number of tokens in existence
     */
    function totalSupply() public view returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev Gets the balance of the specified address.
     * @param owner The address to query the balance of.
     * @return An uint256 representing the amount owned by the passed address.
     */
    function balanceOf(address owner) public view returns (uint256) {
        return _balances[owner];
    }

    /**
     * @dev Transfer token for a specified address
     * @param to The address to transfer to.
     * @param value The amount to be transferred.
     */
    function transfer(address to, uint256 value) public returns (bool) {
        _transfer(msg.sender, to, value);
        return true;
    }

    /**
     * @dev Transfer token for a specified addresses
     * @param from The address to transfer from.
     * @param to The address to transfer to.
     * @param value The amount to be transferred.
     */
    function _transfer(address from, address to, uint256 value) internal {
        require(to != address(0));

        _balances[from] = _balances[from].sub(value);
        _balances[to] = _balances[to].add(value);
    }

    /**
     * @dev Internal function that mints an amount of the token and assigns it to
     * an account. This encapsulates the modification of balances such that the
     * proper events are emitted.
     * @param account The account that will receive the created tokens.
     * @param value The amount that will be created.
     */
    function _mint(address account, uint256 value) internal {
        require(account != address(0));

        _totalSupply = _totalSupply.add(value);
        _balances[account] = _balances[account].add(value);
    }


}

    Contract ABI  
[{"constant":true,"inputs":[],"name":"name","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"totalSupply","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"giveSomeLove","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"nonpayable","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":"","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"getSomeLove","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}]

  Contract Creation Code Switch To Opcodes View
608060405234801561001057600080fd5b5033600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610090600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1662e537c3610095640100000000026401000000009004565b6101be565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156100d157600080fd5b6100f38160025461019d64010000000002610733179091906401000000009004565b600281905550610157816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461019d64010000000002610733179091906401000000009004565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60008082840190508381101515156101b457600080fd5b8091505092915050565b610780806101cd6000396000f3fe608060405234801561001057600080fd5b506004361061009a576000357c0100000000000000000000000000000000000000000000000000000000900480637fca2418116100785780637fca24181461019857806395d89b411461021b578063a9059cbb1461029e578063d5a8ef84146103045761009a565b806306fdde031461009f57806318160ddd1461012257806370a0823114610140575b600080fd5b6100a7610387565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100e75780820151818401526020810190506100cc565b50505050905090810190601f1680156101145780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61012a6103c0565b6040518082815260200191505060405180910390f35b6101826004803603602081101561015657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506103ca565b6040518082815260200191505060405180910390f35b6101a0610412565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101e05780820151818401526020810190506101c5565b50505050905090810190601f16801561020d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61022361047d565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610263578082015181840152602081019050610248565b50505050905090810190601f1680156102905780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102ea600480360360408110156102b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104b6565b604051808215151515815260200191505060405180910390f35b61030c6104cd565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561034c578082015181840152602081019050610331565b50505050905090810190601f1680156103795780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6040805190810160405280601381526020017f4c6520746f6b656e206465206c27616d6f75720000000000000000000000000081525081565b6000600254905090565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606061044233600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660016105aa565b6040805190810160405280600881526020017f4d65726369203c33000000000000000000000000000000000000000000000000815250905090565b6040805190810160405280600a81526020017f535456414c454e54494e0000000000000000000000000000000000000000000081525081565b60006104c33384846105aa565b6001905092915050565b606060016104fc600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166103ca565b10151561056e57610531600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff163360016105aa565b6040805190810160405280601d81526020017f566f69636920756e20706575206427616d6f757220706f757220746f6900000081525090506105a7565b6040805190810160405280601f81526020017f4a65206e27616920706c7573207269656e20c3a0206f6666726972203a27280081525090505b90565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515156105e657600080fd5b610637816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461071190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506106ca816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461073390919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b600082821115151561072257600080fd5b600082840390508091505092915050565b600080828401905083811015151561074a57600080fd5b809150509291505056fea165627a7a7230582087159f1ee252127870b655d3be8f06e87acf0208599b107532da2d22fc97756f0029

   Swarm Source:
bzzr://87159f1ee252127870b655d3be8f06e87acf0208599b107532da2d22fc97756f

 

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