Skip to content
Verified contractExactMIT

MyToken

Address0xf8050e877ddc33aeee1e32f7237a7ed22f0aec29
Balance

0 ETH

 

Transactions

1

 

Compiler

solc 0.8.34

 

Same code

2 more contracts

 

Details

Compiler
solc 0.8.34+commit.80d5c536
Language
solidity
Optimization
No
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
24,817,731
Creation transaction
0x30b7cfda31…1823e74653
Main copy (most transactions)
0xb97db0df…57410cb7

contracts/MyToken.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract MyToken {
    string public name = "GigiToken";
    string public symbol = "GIGI";
    uint8 public decimals = 18;
    uint public totalSupply;

    mapping(address => uint) public balanceOf;

    event Transfer(address indexed from, address indexed to, uint value);

    constructor() {
        totalSupply = 100000000 * 10 ** uint(decimals);
        balanceOf[msg.sender] = totalSupply;
        emit Transfer(address(0), msg.sender, totalSupply);
    }

    function transfer(address to, uint amount) public returns (bool) {
        require(balanceOf[msg.sender] >= amount, "Not enough balance");

        balanceOf[msg.sender] -= amount;
        balanceOf[to] += amount;

        emit Transfer(msg.sender, to, amount);
        return true;
    }
}
Compiler settingsShow
{
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.