ETH Price: $2,414.97 (-1.36%)

Contract

0x8aA971084Ed42fc3452D34c5AeC4878c28DD7cD0
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60806040135308412021-11-01 11:14:381048 days ago1635765278IN
 Contract Creation
0 ETH0.1171969499.60119939

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Similar Match Source Code
This contract matches the deployed Bytecode of the Source Code for Contract 0x613a126c...7b76eeb5A
The constructor portion of the code might be different and could alter the actual behaviour of the contract

Contract Name:
CustomGovernToken

Compiler Version
v0.6.8+commit.0bbfe453

Optimization Enabled:
Yes with 20000 runs

Other Settings:
default evmVersion
File 1 of 3 : CustomGovernToken.sol
/*
 * SPDX-License-Identifier:    GPL-3.0
 */

pragma solidity ^0.6.8;

import './Initializable.sol';
import './SafeMath.sol';

// Copied and modified from https://github.com/aragon/govern/blob/develop/packages/govern-token/contracts/GovernToken.sol
// Token to be used on subDAOs for the AN DAO.
// Changes:
//   - Rename onlyMinter to onlyController for clarity
//   - Only the controller can transfer ownership (Main DAO, aka community)
//   - Allows controller to also burn tokens
//   - No longer required methods removed

contract CustomGovernToken is Initializable {
    using SafeMath for uint256;

    // bytes32 private constant EIP712DOMAIN_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)")
    bytes32 private constant EIP712DOMAIN_HASH = 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f;
    // bytes32 private constant VERSION_HASH = keccak256("1")
    bytes32 private constant VERSION_HASH = 0xc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6;

    string public name;
    string public symbol;
    uint8 public decimals;

    address public controller;
    uint256 public totalSupply;
    mapping (address => uint256) public balanceOf;

    event Transfer(address indexed from, address indexed to, uint256 value);
    event ChangeController(address indexed controller);

    modifier onlyController {
        require(msg.sender == controller, "token: not controller");
        _;
    }

    constructor(address _initialController, string memory _name, string memory _symbol, uint8 _decimals) public {
        initialize(_initialController, _name, _symbol, _decimals);
    }

    function initialize(address _initialController, string memory _name, string memory _symbol, uint8 _decimals) public onlyInit("token") {
        _changeController(_initialController);
        name = _name;
        symbol = _symbol;
        decimals = _decimals;
    }

    function _changeController(address newController) internal {
        controller = newController;
        emit ChangeController(newController);
    }

    function _mint(address to, uint256 value) internal {
        totalSupply = totalSupply.add(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(address(0), to, value);
    }

    function _burn(address from, uint value) internal {
        // Balance is implicitly checked with SafeMath's underflow protection
        balanceOf[from] = balanceOf[from].sub(value);
        totalSupply = totalSupply.sub(value);
        emit Transfer(from, address(0), value);
    }

    function _transfer(address from, address to, uint256 value) private {
        require(to != address(this) && to != address(0), "token: bad to");

        // Balance is implicitly checked with SafeMath's underflow protection
        balanceOf[from] = balanceOf[from].sub(value);
        balanceOf[to] = balanceOf[to].add(value);
        emit Transfer(from, to, value);
    }

    function getChainId() public pure returns (uint256 chainId) {
        assembly { chainId := chainid() }
    }

    function getDomainSeparator() public view returns (bytes32) {
        return keccak256(
            abi.encode(
                EIP712DOMAIN_HASH,
                keccak256(abi.encodePacked(name)),
                VERSION_HASH,
                getChainId(),
                address(this)
            )
        );
    }

    function mint(address to, uint256 value) external onlyController returns (bool) {
        _mint(to, value);
        return true;
    }

    function changeController(address newController) external onlyController {
        _changeController(newController);
    }

    function burn(address target, uint256 value) external onlyController returns (bool) {
        _burn(target, value);
        return true;
    }

    function transferFrom(address from, address to, uint256 value) external onlyController returns (bool) {
        _transfer(from, to, value);
        return true;
    }
}

File 2 of 3 : Initializable.sol
/*
 * SPDX-License-Identifier:    MIT
 */

pragma solidity 0.6.8;

contract Initializable {
    mapping (string => uint256) public initBlocks;

    event Initialized(string indexed key);

    modifier onlyInit(string memory key) {
        require(initBlocks[key] == 0, "initializable: already initialized");
        initBlocks[key] = block.number;
        _;
        emit Initialized(key);
    }
}

File 3 of 3 : SafeMath.sol
/*
 * SPDX-License-Identifier:    GPL-3.0
 */

pragma solidity ^0.6.8;

// A library for performing overflow-safe math, courtesy of DappHub: https://github.com/dapphub/ds-math/blob/d0ef6d6a5f/src/math.sol
// Modified to include only the essentials
library SafeMath {
    function add(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x + y) >= x, "math: overflow");
    }

    function sub(uint256 x, uint256 y) internal pure returns (uint256 z) {
        require((z = x - y) <= x, "math: underflow");
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 20000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "metadata": {
    "useLiteralContent": true
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_initialController","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"controller","type":"address"}],"name":"ChangeController","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"key","type":"string"}],"name":"Initialized","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":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newController","type":"address"}],"name":"changeController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"controller","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"chainId","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getDomainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"initBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_initialController","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"uint8","name":"_decimals","type":"uint8"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"mint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","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":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063cc1d4cab11610066578063cc1d4cab146102e5578063ed24911d1461038b578063f6d2ee8614610393578063f77c4791146104e2576100ea565b806370a082311461027157806395d89b41146102a45780639dc29fac146102ac576100ea565b8063313ce567116100c8578063313ce567146101dd5780633408e470146101fb5780633cebb8231461020357806340c10f1914610238576100ea565b806306fdde03146100ef57806318160ddd1461016c57806323b872dd14610186575b600080fd5b6100f7610513565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101746105be565b60408051918252519081900360200190f35b6101c96004803603606081101561019c57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135811691602081013590911690604001356105c4565b604080519115158252519081900360200190f35b6101e5610667565b6040805160ff9092168252519081900360200190f35b610174610670565b6102366004803603602081101561021957600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610674565b005b6101c96004803603604081101561024e57600080fd5b5073ffffffffffffffffffffffffffffffffffffffff813516906020013561070b565b6101746004803603602081101561028757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166107ad565b6100f76107bf565b6101c9600480360360408110156102c257600080fd5b5073ffffffffffffffffffffffffffffffffffffffff8135169060200135610835565b610174600480360360208110156102fb57600080fd5b81019060208101813564010000000081111561031657600080fd5b82018360208201111561032857600080fd5b8035906020019184600183028401116401000000008311171561034a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506108cd945050505050565b6101746108ea565b610236600480360360808110156103a957600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156103e157600080fd5b8201836020820111156103f357600080fd5b8035906020019184600183028401116401000000008311171561041557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561046857600080fd5b82018360208201111561047a57600080fd5b8035906020019184600183028401116401000000008311171561049c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050903560ff1691506109fe9050565b6104ea610cef565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b60018054604080516020600284861615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0190941693909304601f810184900484028201840190925281815292918301828280156105b65780601f1061058b576101008083540402835291602001916105b6565b820191906000526020600020905b81548152906001019060200180831161059957829003601f168201915b505050505081565b60045481565b600354600090610100900473ffffffffffffffffffffffffffffffffffffffff16331461065257604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f6b656e3a206e6f7420636f6e74726f6c6c65720000000000000000000000604482015290519081900360640190fd5b61065d848484610d10565b5060019392505050565b60035460ff1681565b4690565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1633146106ff57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f6b656e3a206e6f7420636f6e74726f6c6c65720000000000000000000000604482015290519081900360640190fd5b61070881610e97565b50565b600354600090610100900473ffffffffffffffffffffffffffffffffffffffff16331461079957604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f6b656e3a206e6f7420636f6e74726f6c6c65720000000000000000000000604482015290519081900360640190fd5b6107a38383610f0d565b5060015b92915050565b60056020526000908152604090205481565b600280546040805160206001841615610100027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01909316849004601f810184900484028201840190925281815292918301828280156105b65780601f1061058b576101008083540402835291602001916105b6565b600354600090610100900473ffffffffffffffffffffffffffffffffffffffff1633146108c357604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f746f6b656e3a206e6f7420636f6e74726f6c6c65720000000000000000000000604482015290519081900360640190fd5b6107a38383610fbe565b805160208183018101805160008252928201919093012091525481565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60001b600160405160200180828054600181600116156101000203166002900480156109705780601f1061094e576101008083540402835291820191610970565b820191906000526020600020905b81548152906001019060200180831161095c575b5050915050604051602081830303815290604052805190602001207fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660001b6109b7610670565b6040805160208082019690965280820194909452606084019290925260808301523060a0808401919091528151808403909101815260c09092019052805191012090505b90565b6040518060400160405280600581526020017f746f6b656e0000000000000000000000000000000000000000000000000000008152506000816040518082805190602001908083835b60208310610a8457805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610a47565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0180199092169116179052920194855250604051938490030190922054159150610b289050576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806111ff6022913960400191505060405180910390fd5b436000826040518082805190602001908083835b60208310610b7957805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610b3c565b51815160209384036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff018019909216911617905292019485525060405193849003019092209290925550610bd2905085610e97565b8351610be5906001906020870190611166565b508251610bf9906002906020860190611166565b50600380547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660ff84161790556040518151829190819060208401908083835b60208310610c7757805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610c3a565b5181516020939093036101000a7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01801990911692169190911790526040519201829003822093507f7bc2a48a4a566e237a12186f19d985b0f76afc9d5290601edac19876253670c292506000919050a25050505050565b600354610100900473ffffffffffffffffffffffffffffffffffffffff1681565b73ffffffffffffffffffffffffffffffffffffffff82163014801590610d4b575073ffffffffffffffffffffffffffffffffffffffff821615155b610db657604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600d60248201527f746f6b656e3a2062616420746f00000000000000000000000000000000000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff8316600090815260056020526040902054610dec908263ffffffff61108216565b73ffffffffffffffffffffffffffffffffffffffff8085166000908152600560205260408082209390935590841681522054610e2e908263ffffffff6110f416565b73ffffffffffffffffffffffffffffffffffffffff80841660008181526005602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600380547fffffffffffffffffffffff0000000000000000000000000000000000000000ff1661010073ffffffffffffffffffffffffffffffffffffffff8416908102919091179091556040517fc0c3fe6333763f87ec50ad1366067ab6f03fd677c62f3c20e50e9446afd32ef690600090a250565b600454610f20908263ffffffff6110f416565b60045573ffffffffffffffffffffffffffffffffffffffff8216600090815260056020526040902054610f59908263ffffffff6110f416565b73ffffffffffffffffffffffffffffffffffffffff831660008181526005602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b73ffffffffffffffffffffffffffffffffffffffff8216600090815260056020526040902054610ff4908263ffffffff61108216565b73ffffffffffffffffffffffffffffffffffffffff831660009081526005602052604090205560045461102d908263ffffffff61108216565b60045560408051828152905160009173ffffffffffffffffffffffffffffffffffffffff8516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b808203828111156107a757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6d6174683a20756e646572666c6f770000000000000000000000000000000000604482015290519081900360640190fd5b808201828110156107a757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f6d6174683a206f766572666c6f77000000000000000000000000000000000000604482015290519081900360640190fd5b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106111a757805160ff19168380011785556111d4565b828001600101855582156111d4579182015b828111156111d45782518255916020019190600101906111b9565b506111e09291506111e4565b5090565b6109fb91905b808211156111e057600081556001016111ea56fe696e697469616c697a61626c653a20616c726561647920696e697469616c697a6564a2646970667358221220cc5a2989a1daee2097334bafaf7bec8617042abcae38e55bca6e5d78aadb3f1364736f6c63430006080033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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
Loading...
Loading
[ 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.