Skip to content
Verified contractPartial

MyToken

Address0xaba7f149abcf485422d5c4263b480eb205cb2f52
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.5.2

 

Same code

3 more contracts

 

Details

Compiler
solc 0.5.2+commit.1df8f40c
Language
solidity
Optimization
No
License
Not stated
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
7,051,883
Creation transaction
0xfaca68a516…a4825b31a9

MyToken.sol

pragma solidity >=0.4.22 <0.6.0;

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

    /* Initializes contract with initial supply tokens to the creator of the contract */
    constructor(
        uint256 initialSupply
        ) public {
        balanceOf[msg.sender] = initialSupply;              // Give the creator all initial tokens
    }

    /* Send coins */
    function transfer(address _to, uint256 _value) public returns (bool success) {
        require(balanceOf[msg.sender] >= _value);           // Check if the sender has enough
        require(balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows
        balanceOf[msg.sender] -= _value;                    // Subtract from the sender
        balanceOf[_to] += _value;                           // Add the same to the recipient
        return true;
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 0,
    "enabled": false
  }
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.