Verified contractExactMIT
MyToken
Address0xb97db0df71c7cbeb6d2d5b780f8e985957410cb7
- 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,816,724
- Creation transaction
- 0x5ef666e678…59e00ebd03
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.