ETH Price: $2,276.65 (-5.97%)
Gas: 0.04 GWei

Contract

0x8414560d69650bC0c915d5d4385e1714a23cbe81

Overview

ETH Balance

Scroll LogoScroll LogoScroll Logo0 ETH

ETH Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040175432023-10-12 2:34:13340 days ago1697078053IN
 Create: InitializableERC20
0 ETH0.000833050.72

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
InitializableERC20

Compiler Version
v0.6.9+commit.3e3065ac

Optimization Enabled:
Yes with 200 runs

Other Settings:
istanbul EvmVersion
File 1 of 2 : InitializableERC20.sol
/*

    Copyright 2020 DODO ZOO.
    SPDX-License-Identifier: Apache-2.0

*/

pragma solidity 0.6.9;

import {SafeMath} from "../../lib/SafeMath.sol";

contract InitializableERC20 {
    using SafeMath for uint256;

    string public name;
    uint8 public decimals;
    string public symbol;
    uint256 public totalSupply;

    bool public initialized;

    mapping(address => uint256) internal balances;
    mapping(address => mapping(address => uint256)) internal allowed;

    event Transfer(address indexed from, address indexed to, uint256 amount);
    event Approval(address indexed owner, address indexed spender, uint256 amount);

    function init(
        address _creator,
        uint256 _totalSupply,
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) public {
        require(!initialized, "TOKEN_INITIALIZED");
        initialized = true;
        totalSupply = _totalSupply;
        balances[_creator] = _totalSupply;
        name = _name;
        symbol = _symbol;
        decimals = _decimals;
        emit Transfer(address(0), _creator, _totalSupply);
    }

    function transfer(address to, uint256 amount) public returns (bool) {
        _transfer(msg.sender, to, amount);
        return true;
    }

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

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public returns (bool) {
        require(to != address(0), "TO_ADDRESS_IS_EMPTY");
        require(amount <= balances[from], "BALANCE_NOT_ENOUGH");
        require(amount <= allowed[from][msg.sender], "ALLOWANCE_NOT_ENOUGH");

        balances[from] = balances[from].sub(amount);
        balances[to] = balances[to].add(amount);
        allowed[from][msg.sender] = allowed[from][msg.sender].sub(amount);
        emit Transfer(from, to, amount);
        return true;
    }

    function approve(address spender, uint256 amount) public returns (bool) {
        allowed[msg.sender][spender] = amount;
        emit Approval(msg.sender, spender, amount);
        return true;
    }

    function allowance(address owner, address spender) public view returns (uint256) {
        return allowed[owner][spender];
    }

    function _transfer(address sender, address recipient, uint256 amount) internal {
        require(sender != address(0), "FROM_ADDRESS_IS_EMPTY");
        require(recipient != address(0), "TO_ADDRESS_IS_EMPTY");
        require(amount <= balances[sender], "BALANCE_NOT_ENOUGH");

        balances[sender] = balances[sender].sub(amount);
        balances[recipient] = balances[recipient].add(amount);

        emit Transfer(sender, recipient, amount);
    }

}

File 2 of 2 : SafeMath.sol
/*

    Copyright 2020 DODO ZOO.
    SPDX-License-Identifier: Apache-2.0

*/

pragma solidity 0.6.9;
pragma experimental ABIEncoderV2;


/**
 * @title SafeMath
 * @author DODO Breeder
 *
 * @notice Math operations with safety checks that revert on error
 */
library SafeMath {
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        uint256 c = a * b;
        require(c / a == b, "MUL_ERROR");

        return c;
    }

    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b > 0, "DIVIDING_ERROR");
        return a / b;
    }

    function divCeil(uint256 a, uint256 b) internal pure returns (uint256) {
        uint256 quotient = div(a, b);
        uint256 remainder = a - quotient * b;
        if (remainder > 0) {
            return quotient + 1;
        } else {
            return quotient;
        }
    }

    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        require(b <= a, "SUB_ERROR");
        return a - b;
    }

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

    function sqrt(uint256 x) internal pure returns (uint256 y) {
        uint256 z = x / 2 + 1;
        y = x;
        while (z < y) {
            y = z;
            z = (x / z + z) / 2;
        }
    }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "evmVersion": "istanbul",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_creator","type":"address"},{"internalType":"uint256","name":"_totalSupply","type":"uint256"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

608060405234801561001057600080fd5b50610bc1806100206000396000f3fe608060405234801561001057600080fd5b50600436106100a95760003560e01c8063313ce56711610071578063313ce567146101c357806370a08231146101e157806395d89b4114610207578063a9059cbb1461020f578063dd62ed3e1461023b578063fc90ef1814610269576100a9565b806306fdde03146100ae578063095ea7b31461012b578063158ef93e1461016b57806318160ddd1461017357806323b872dd1461018d575b600080fd5b6100b66103b2565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b038135169060200135610440565b604080519115158252519081900360200190f35b6101576104a6565b61017b6104af565b60408051918252519081900360200190f35b610157600480360360608110156101a357600080fd5b506001600160a01b038135811691602081013590911690604001356104b5565b6101cb6106e6565b6040805160ff9092168252519081900360200190f35b61017b600480360360208110156101f757600080fd5b50356001600160a01b03166106ef565b6100b661070a565b6101576004803603604081101561022557600080fd5b506001600160a01b038135169060200135610762565b61017b6004803603604081101561025157600080fd5b506001600160a01b0381358116916020013516610778565b6103b0600480360360a081101561027f57600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156102af57600080fd5b8201836020820111156102c157600080fd5b803590602001918460018302840111640100000000831117156102e357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561033657600080fd5b82018360208201111561034857600080fd5b8035906020019184600183028401116401000000008311171561036a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506107a39050565b005b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104385780601f1061040d57610100808354040283529160200191610438565b820191906000526020600020905b81548152906001019060200180831161041b57829003601f168201915b505050505081565b3360008181526006602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60045460ff1681565b60035481565b60006001600160a01b038316610508576040805162461bcd60e51b8152602060048201526013602482015272544f5f414444524553535f49535f454d50545960681b604482015290519081900360640190fd5b6001600160a01b03841660009081526005602052604090205482111561056a576040805162461bcd60e51b81526020600482015260126024820152710848298829c868abe9c9ea8be8a9c9eaa8e960731b604482015290519081900360640190fd5b6001600160a01b03841660009081526006602090815260408083203384529091529020548211156105d9576040805162461bcd60e51b815260206004820152601460248201527308298989eae829c868abe9c9ea8be8a9c9eaa8e960631b604482015290519081900360640190fd5b6001600160a01b038416600090815260056020526040902054610602908363ffffffff61089a16565b6001600160a01b038086166000908152600560205260408082209390935590851681522054610637908363ffffffff6108e316565b6001600160a01b03808516600090815260056020908152604080832094909455918716815260068252828120338252909152205461067b908363ffffffff61089a16565b6001600160a01b03808616600081815260066020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60015460ff1681565b6001600160a01b031660009081526005602052604090205490565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156104385780601f1061040d57610100808354040283529160200191610438565b600061076f338484610930565b50600192915050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b60045460ff16156107ef576040805162461bcd60e51b81526020600482015260116024820152701513d2d15397d253925512505312569151607a1b604482015290519081900360640190fd5b6004805460ff1916600117905560038490556001600160a01b03851660009081526005602090815260408220869055845161082d9291860190610af0565b508151610841906002906020850190610af0565b506001805460ff191660ff83161790556040805185815290516001600160a01b038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef916020908290030190a35050505050565b6000828211156108dd576040805162461bcd60e51b815260206004820152600960248201526829aaa12fa2a92927a960b91b604482015290519081900360640190fd5b50900390565b600082820183811015610929576040805162461bcd60e51b815260206004820152600960248201526820a2222fa2a92927a960b91b604482015290519081900360640190fd5b9392505050565b6001600160a01b038316610983576040805162461bcd60e51b815260206004820152601560248201527446524f4d5f414444524553535f49535f454d50545960581b604482015290519081900360640190fd5b6001600160a01b0382166109d4576040805162461bcd60e51b8152602060048201526013602482015272544f5f414444524553535f49535f454d50545960681b604482015290519081900360640190fd5b6001600160a01b038316600090815260056020526040902054811115610a36576040805162461bcd60e51b81526020600482015260126024820152710848298829c868abe9c9ea8be8a9c9eaa8e960731b604482015290519081900360640190fd5b6001600160a01b038316600090815260056020526040902054610a5f908263ffffffff61089a16565b6001600160a01b038085166000908152600560205260408082209390935590841681522054610a94908263ffffffff6108e316565b6001600160a01b0380841660008181526005602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610b3157805160ff1916838001178555610b5e565b82800160010185558215610b5e579182015b82811115610b5e578251825591602001919060010190610b43565b50610b6a929150610b6e565b5090565b610b8891905b80821115610b6a5760008155600101610b74565b9056fea26469706673582212208865b4d8e734dcade33e57ae887adc6ea253b80452e837f11b0bbb47bb1eadc364736f6c63430006090033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100a95760003560e01c8063313ce56711610071578063313ce567146101c357806370a08231146101e157806395d89b4114610207578063a9059cbb1461020f578063dd62ed3e1461023b578063fc90ef1814610269576100a9565b806306fdde03146100ae578063095ea7b31461012b578063158ef93e1461016b57806318160ddd1461017357806323b872dd1461018d575b600080fd5b6100b66103b2565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100f05781810151838201526020016100d8565b50505050905090810190601f16801561011d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101576004803603604081101561014157600080fd5b506001600160a01b038135169060200135610440565b604080519115158252519081900360200190f35b6101576104a6565b61017b6104af565b60408051918252519081900360200190f35b610157600480360360608110156101a357600080fd5b506001600160a01b038135811691602081013590911690604001356104b5565b6101cb6106e6565b6040805160ff9092168252519081900360200190f35b61017b600480360360208110156101f757600080fd5b50356001600160a01b03166106ef565b6100b661070a565b6101576004803603604081101561022557600080fd5b506001600160a01b038135169060200135610762565b61017b6004803603604081101561025157600080fd5b506001600160a01b0381358116916020013516610778565b6103b0600480360360a081101561027f57600080fd5b6001600160a01b03823516916020810135918101906060810160408201356401000000008111156102af57600080fd5b8201836020820111156102c157600080fd5b803590602001918460018302840111640100000000831117156102e357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561033657600080fd5b82018360208201111561034857600080fd5b8035906020019184600183028401116401000000008311171561036a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506107a39050565b005b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104385780601f1061040d57610100808354040283529160200191610438565b820191906000526020600020905b81548152906001019060200180831161041b57829003601f168201915b505050505081565b3360008181526006602090815260408083206001600160a01b038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60045460ff1681565b60035481565b60006001600160a01b038316610508576040805162461bcd60e51b8152602060048201526013602482015272544f5f414444524553535f49535f454d50545960681b604482015290519081900360640190fd5b6001600160a01b03841660009081526005602052604090205482111561056a576040805162461bcd60e51b81526020600482015260126024820152710848298829c868abe9c9ea8be8a9c9eaa8e960731b604482015290519081900360640190fd5b6001600160a01b03841660009081526006602090815260408083203384529091529020548211156105d9576040805162461bcd60e51b815260206004820152601460248201527308298989eae829c868abe9c9ea8be8a9c9eaa8e960631b604482015290519081900360640190fd5b6001600160a01b038416600090815260056020526040902054610602908363ffffffff61089a16565b6001600160a01b038086166000908152600560205260408082209390935590851681522054610637908363ffffffff6108e316565b6001600160a01b03808516600090815260056020908152604080832094909455918716815260068252828120338252909152205461067b908363ffffffff61089a16565b6001600160a01b03808616600081815260066020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60015460ff1681565b6001600160a01b031660009081526005602052604090205490565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156104385780601f1061040d57610100808354040283529160200191610438565b600061076f338484610930565b50600192915050565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b60045460ff16156107ef576040805162461bcd60e51b81526020600482015260116024820152701513d2d15397d253925512505312569151607a1b604482015290519081900360640190fd5b6004805460ff1916600117905560038490556001600160a01b03851660009081526005602090815260408220869055845161082d9291860190610af0565b508151610841906002906020850190610af0565b506001805460ff191660ff83161790556040805185815290516001600160a01b038716916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef916020908290030190a35050505050565b6000828211156108dd576040805162461bcd60e51b815260206004820152600960248201526829aaa12fa2a92927a960b91b604482015290519081900360640190fd5b50900390565b600082820183811015610929576040805162461bcd60e51b815260206004820152600960248201526820a2222fa2a92927a960b91b604482015290519081900360640190fd5b9392505050565b6001600160a01b038316610983576040805162461bcd60e51b815260206004820152601560248201527446524f4d5f414444524553535f49535f454d50545960581b604482015290519081900360640190fd5b6001600160a01b0382166109d4576040805162461bcd60e51b8152602060048201526013602482015272544f5f414444524553535f49535f454d50545960681b604482015290519081900360640190fd5b6001600160a01b038316600090815260056020526040902054811115610a36576040805162461bcd60e51b81526020600482015260126024820152710848298829c868abe9c9ea8be8a9c9eaa8e960731b604482015290519081900360640190fd5b6001600160a01b038316600090815260056020526040902054610a5f908263ffffffff61089a16565b6001600160a01b038085166000908152600560205260408082209390935590841681522054610a94908263ffffffff6108e316565b6001600160a01b0380841660008181526005602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10610b3157805160ff1916838001178555610b5e565b82800160010185558215610b5e579182015b82811115610b5e578251825591602001919060010190610b43565b50610b6a929150610b6e565b5090565b610b8891905b80821115610b6a5760008155600101610b74565b9056fea26469706673582212208865b4d8e734dcade33e57ae887adc6ea253b80452e837f11b0bbb47bb1eadc364736f6c63430006090033

Block Transaction Gas Used Reward
view all blocks sequenced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.