Skip to content
Verified contractPartialMIT

ERC20

Address0xbc4171f45ef0ef66e76f979df021a34b46dcc81d
Balance

0 ETH

 

Transactions

27,135

 

Compiler

solc 0.7.4

 

Same code

Only this contract

 

Details

Compiler
solc 0.7.4+commit.3f05b770
Language
solidity
Optimization
No
EVM version
istanbul
License
MIT
Match
Partialcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
12,069,961
Creation transaction
0x83efd4204a…62d5847e5c

ERC20.sol

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

library SafeMath {
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    assert(b <= a);
    return a - b;
  }

  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    assert(c >= a);
    return c;
  }
}

contract ERC20 {
  using SafeMath for uint256;

  string public constant name = "Dorayaki";
  string public constant symbol = "DORA";
  uint256 public constant decimals = 18;
  uint256 _totalSupply = 10000000 ether;

  mapping (address => uint256) internal _balances;
  mapping (address => mapping (address => uint256)) internal _allowed;

  event Transfer(address indexed _from, address indexed _to, uint256 _value);
  event Approval(address indexed _owner, address indexed _spender, uint256 _value);

  constructor(address _founder) {
    _balances[_founder] = _totalSupply;
  }

  function totalSupply() public view returns (uint256 supply) {
    return _totalSupply;
  }

  function balanceOf(address _owner) public view returns (uint256 balance) {
    return _balances[_owner];
  }

  function transfer(address _to, uint256 _value) public returns (bool success) {
    require (_to != address(0), "");
    _balances[msg.sender] = _balances[msg.sender].sub(_value);
    _balances[_to] = _balances[_to].add(_value);
    emit Transfer(msg.sender, _to, _value);
    return true;
  }

  function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
    require (_to != address(0), "");
    _balances[_from] = _balances[_from].sub(_value);
    _allowed[_from][msg.sender] = _allowed[_from][msg.sender].sub(_value);
    _balances[_to] = _balances[_to].add(_value);
    emit Transfer(_from, _to, _value);
    return true;
  }

  function approve(address _spender, uint256 _value) public returns (bool success) {
    require(_allowed[msg.sender][_spender] == 0 || _value == 0);
    _allowed[msg.sender][_spender] = _value;
    emit Approval(msg.sender, _spender, _value);
    return true;
  }

  function allowance(address _owner, address _spender) public view returns (uint256 remaining) {
    return _allowed[_owner][_spender];
  }
}
Compiler settingsShow
{
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": false
  },
  "evmVersion": "istanbul",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.